Created
June 1, 2015 22:10
-
-
Save martinarroyo/b9e0a963ad27169a6eee to your computer and use it in GitHub Desktop.
A LaTeX macro that sets a Wikipedia-stylized "Citation Needed" template and outputs the counter of references with a surprise. Use with write18 enabled! and the Figures directory in \graphicspath{}!
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
\newcounter{undefinedreferences} | |
\setcounter{undefinedreferences}{0} | |
\newcommand{\citationneeded}[1][None]{\stepcounter{undefinedreferences}\textsuperscript{\color{blue} [Citation needed: #1]}} | |
\newcommand{\checkreferences}{ | |
\ifnum\value{undefinedreferences} > 0 | |
\begin{center} | |
\immediate\write18{wget -O Figures/protester.png -nc http://imgs.xkcd.com/comics/wikipedian_protester.png} | |
\includegraphics[width=\textwidth]{protester.png} | |
\end{center} | |
\else | |
No undefined references. Good! | |
\fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimalistically (without the images and the counter):