emacs.d/etc/yasnippet/snippets/latex-mode/standalone
2022-08-04 19:00:13 +02:00

77 lines
2.0 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}
\ifthenelse{\boolean{luatex}}{
\usepackage{fontspec}
}{\ifthenelse{\boolean{xetex}}{
\usepackage{mathspec}
}{
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
}
}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pifont} % check marks (\ding{52}) and cross marks (\ding{56})
\usepackage{textcomp} % \texttimes
\usepackage{wasysym} % \diameter
\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,decorations.pathmorphing,patterns,plotmarks}
\usepackage{pgfplots}
\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:
%%% TeX-master: t
%%% compile-command: "latexmk -interaction=nonstopmode -lualatex -pvc -synctex=1 ${5:`(file-name-nondirectory (buffer-file-name))`}"
%%% fill-column: 88
%%% mode: latex
%%% End: