emacs.d/etc/yasnippet/snippets/latex-mode/standalone

76 lines
1.8 KiB
Plaintext

# -*- coding: utf-8 -*-
# name: \documentclass[options]{standalone}
# key: standalone
# expand-env: ((yas/indent-line 'fixed))
# --
\documentclass[${1:12pt},svgnames,tikz]{standalone}
\usepackage{ifthen,ifluatex,ifxetex}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pifont} % check marks (\ding{52}) and cross marks (\ding{56})
\usepackage{textcomp} % \texttimes
\usepackage{wasysym} % \diameter
\ifthenelse{\boolean{luatex}}{
\usepackage{fontspec}
\usepackage{unicode-math}
}{\ifthenelse{\boolean{xetex}}{
\usepackage{mathspec}
}{
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
}
}
\usepackage{hyperref}
\hypersetup{
unicode=true,
colorlinks=true,
citecolor=blue,
filecolor=blue,
linkcolor=blue,
urlcolor=blue,
}
\usepackage{siunitx}
\sisetup{
range-phrase=\ensuremath{\text{\,\textendash\,}},
range-units=brackets,
separate-uncertainty,
}
\DeclareSIUnit\dollar{\\\$}
\DeclareSIUnit\euro{€}
\DeclareSIUnit\mK{\milli\kelvin}
\DeclareSIUnit\mbar{\milli\bar}
\DeclareSIUnit\micron{\micro\meter}
\DeclareSIUnit\nW{\nano\watt}
\usepackage{tikz}
\usetikzlibrary{3d,arrows,backgrounds,calc,plotmarks}
\newcommand{\cmark}{{\color{Green} \ding{52}}}%
\newcommand{\omark}{{\color{Red} \ding{44}}}%
\newcommand{\xmark}{{\color{Red} \ding{56}}}%
\newcommand{\Nusselt}{\mbox{\textit{Nu}}}
\newcommand{\Reynolds}{\mbox{\textit{Re}}}
\newcommand{\Knudsen}{\mbox{\textit{Kn}}}
% Create fake beamer commands for standalone pictures.
% https://xuc.me/blog/reuse-tikz-figures-in-articles-and-slides/
\usepackage{xparse}
\NewDocumentCommand{\onslide}{s t+ d<>}{}
\NewDocumentCommand{\only}{d<>}{}
\NewDocumentCommand{\uncover}{d<>}{}
\NewDocumentCommand{\visible}{d<>}{}
\NewDocumentCommand{\invisible}{d<>}{}
\begin{document}
$0
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% fill-column: 88
%%% End: