Last active
March 12, 2019 09:50
-
-
Save tommyvn/58d7c89b3afe879e791f6b7d4df1069e to your computer and use it in GitHub Desktop.
pandoc variable tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandoc --template test.tex --variable NAME=tom --variable checkedvar -o test.pdf /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{enumitem} | |
\usepackage{wasysym} | |
\newlist{todolist}{itemize}{2} | |
\setlist[todolist]{label=\Square} | |
\def\true{true} | |
\def\checkbox#1{ | |
\def\temp{#1} | |
\ifx \temp\true | |
\CheckedBox | |
\else | |
\Square | |
\fi | |
} | |
\begin{document} | |
Hello $NAME$! | |
\begin{todolist} | |
\item[\checkbox{$checkedvar$}] checked | |
\item[\checkbox{$notcheckedvar$}] not checked | |
\end{todolist} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment