Skip to content

Instantly share code, notes, and snippets.

@LukasCBossert
Created March 11, 2020 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LukasCBossert/31051444516b49b1620c12c632267208 to your computer and use it in GitHub Desktop.
Save LukasCBossert/31051444516b49b1620c12c632267208 to your computer and use it in GitHub Desktop.
Template for 'literate programming' in TeX
% \iffalse
%<*batchfile>
\begingroup % starte eine Gruppe
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\nopreamble
\nopostamble
\generate{\file{MeinMWE.tex}{\from{\jobname.dtx}{code}}}
\endgroup % beende die Gruppe
%</batchfile>
%<*driver>
\documentclass{ltxdoc}
\author{AUTHOR}
\title{TITLE}
\begin{document}
\maketitle
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
% \iffalse
%<*code>
% \fi
%\section{Code-Documentation}
% Als erstes laden wir die Dokumentenklasse.
% In unserem Beispiel ist dies |article|.
% \begin{macrocode}
\documentclass{article}
% \end{macrocode}
% Im Anschluss daran die |document|-Umgebung.
% \begin{environment}{document}
\begin{document}
Hello World!
\end{document}
% \end{environment}
% \iffalse
%</code>
% \fi
%\endinput
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment