From a4be679c4b21d7f5549b64ae44f520948c16ea6c Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 18 Sep 2022 12:43:40 +0200 Subject: [PATCH] Improve snippets --- etc/yasnippet/snippets/latex-mode/beamer | 9 +++---- etc/yasnippet/snippets/latex-mode/standalone | 26 +++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/etc/yasnippet/snippets/latex-mode/beamer b/etc/yasnippet/snippets/latex-mode/beamer index c0352fe..b1c2b1d 100644 --- a/etc/yasnippet/snippets/latex-mode/beamer +++ b/etc/yasnippet/snippets/latex-mode/beamer @@ -63,19 +63,18 @@ \usepackage{tikz} \usetikzlibrary{3d,arrows,backgrounds,calc,patterns,plotmarks} - +% https://tex.stackexchange.com/a/55849 answers: +% How to reveal a tikzpicture step by step? +\usetikzlibrary{overlay-beamer-styles} % known as aobs-tikz by texdoc \usepackage{pgfplots} \pgfplotsset{compat=newest} \def\axisdefaultwidth{57.5mm} \def\axisdefaultheight{40mm} \graphicspath{ - {../2015-03-09/TEX/} - {../2015-04-13/TEX/} - {./float/} + {./floats/} } - \newcommand{\cmark}{{\color{Green} \ding{52}}}% \newcommand{\omark}{{\color{Orange} \ding{43}}}% \newcommand{\xmark}{{\color{Red} \ding{56}}}% diff --git a/etc/yasnippet/snippets/latex-mode/standalone b/etc/yasnippet/snippets/latex-mode/standalone index 9fe6e42..3dfe27f 100644 --- a/etc/yasnippet/snippets/latex-mode/standalone +++ b/etc/yasnippet/snippets/latex-mode/standalone @@ -29,6 +29,12 @@ linkcolor=blue, urlcolor=blue, } +% 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<>}{} \usepackage{siunitx} \sisetup{ @@ -45,24 +51,20 @@ \usepackage{tikz} \usetikzlibrary{3d,arrows,backgrounds,calc,decorations.pathmorphing,patterns,plotmarks} +\tikzset{ + invisible/.style={opacity=1}, + visible on/.style={opacity=1}, +} \usepackage{pgfplots} +\pgfplotsset{compat=newest} \newcommand{\cmark}{{\color{Green} \ding{52}}}% \newcommand{\omark}{{\color{Red} \ding{44}}}% \newcommand{\xmark}{{\color{Red} \ding{56}}}% -\newcommand{\Knudsen}{\mbox{\textit{Kn}}} -\newcommand{\Nusselt}{\mbox{\textit{Nu}}} -\newcommand{\Reynolds}{\mbox{\textit{Re}}} - -% 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<>}{} +\newcommand{\Knudsen}{\operatorname{\mathit{Kn}}} +\newcommand{\Nusselt}{\operatorname{\mathit{Nu}}} +\newcommand{\Reynolds}{\operatorname{\mathit{Re}}} \begin{document} $0