dotfiles/emacs/snippets/latex-mode/agraph
foo-dogsquared d117f30281 Add YASnippets to Doom Emacs and systemd
I've also changed the target of zsh to its appropriate location according to the XDG Base Directory specs so that's neat.
2020-06-01 23:31:18 +08:00

25 lines
748 B
Plaintext

# -*- mode: snippet -*-
# name: Graph without considering integers
# key: agraph
# --
\begin{figure}[${1:ht}]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel=${2:$x$},
ylabel=${3:$y$},
axis lines = middle,
grid=major,
axis equal=false,
tick style={very thick},
major tick style=thick,
minor tick num=2,
domain=${4:-10}:${5:10},$6
]
\addplot[samples=${7:$$(+ (string-to-number (or (yas-field-value 5) "0")) (string-to-number (or (yas-field-value 4) "0")))}, $8]{${9:x}\};
\end{axis}
\end{tikzpicture}
\caption{$10}
\label{fig!${11:$10}}
\end{figure}
`(yas-field-value 4)`