Add snippets for the LaTeX beamer and standalone classes

This commit is contained in:
Gerard Vermeulen 2022-04-20 18:19:03 +02:00
parent b963e4d35b
commit a43fd777a8
2 changed files with 203 additions and 0 deletions

View File

@ -0,0 +1,128 @@
# -*- coding: utf-8 -*-
# name: \documentclass{beamer}
# key: beamer
# expand-env: ((yas-indent-line 'fixed))
# --
\documentclass[
hyperref={
colorlinks=true,
citecolor=blue,
filecolor=blue,
linkcolor=blue,
unicode=true,
urlcolor=blue
},
xcolor={table,svgnames}]{beamer}
%\usepackage{pgfpages}
%\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]
% Inner theme + color:
\useinnertheme{rounded}
\usecolortheme{rose}
% Outer theme + color:
\usecolortheme{dolphin}
\useoutertheme{infolines}
\setbeamertemplate{headline}[default]
\setbeamerfont{button}{size=\footnotesize}
\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{graphicx}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{comment}
\usepackage{standalone}
\usepackage{subcaption}
\usepackage{tabularx}
\usepackage[load-configurations=abbreviations]{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,patterns,plotmarks}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\def\axisdefaultwidth{57.5mm}
\def\axisdefaultheight{40mm}
\graphicspath{
{../2015-03-09/TEX/}
{../2015-04-13/TEX/}
{./float/}
}
\newcommand{\cmark}{{\color{Green} \ding{52}}}%
\newcommand{\omark}{{\color{Orange} \ding{43}}}%
\newcommand{\xmark}{{\color{Red} \ding{56}}}%
\newcommand{\Reynolds}{\mbox{\textit{Re}}}
\newcommand{\Nusselt}{\mbox{\textit{Nu}}}
\newcommand{\Knudsen}{\mbox{\textit{Kn}}}
% https://tex.stackexchange.com/questions/29082/latex-beamer-applies-the-cancel-command-only-a-specified-slides
\usepackage[thicklines]{cancel}
\renewcommand\CancelColor{\color{Red}}
\newcommand<>{\overlayxcancel}[1]{\alt#2{\xcancel{#1}\vphantom{#1}}{#1}}
\title{${1:Closed Cycle Dilution Refrigerator}}
\subtitle{${2:CCDR}}
\author{Gerard Vermeulen \inst{1} \and Camille Noûs \inst{2}}
\institute{\inst{1} Néel Institute (CNRS) \and \inst{2} Cogitamus Laboratory}
\date[Grenoble, ${3:`(format-time-string "%Y-%m-%d")`}]{Grenoble, ${4:`(format-time-string "%Y-%m-%d")`}}
\AtBeginSection[]{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,hideallsubsections]
\end{frame}}
\AtBeginSubsection[]{
\begin{frame}<beamer>{Outline}
\tableofcontents[
currentsection,
sectionstyle=show/hide,
subsectionstyle=show/shaded/hide]
\end{frame}}
\begin{document}
\frame{\titlepage}
$0
%\input{section-1}
%\input{section-2}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% compile-command: "latexmk -interaction=nonstopmode -lualatex -pvc -synctex=1 ${5:`(file-name-nondirectory (buffer-file-name))`}"
%%% fill-column: 88
%%% End:

View File

@ -0,0 +1,75 @@
# -*- 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: