add legacy LaTeX template for older TeX distributions

upstream-master
rolandlo 5 years ago committed by Roland Lötscher
parent d0597f7649
commit 0e604d6046
  1. 1
      resources/default_template.tex
  2. 30
      resources/legacy_template.tex

@ -1,3 +1,4 @@
% This template uses the scontents package, which is only available on relatively recent TeX distributions. In case it is not available on your system, use the legacy_template.tex
\documentclass[varwidth=true, crop, border=5pt]{standalone}
% Packages

@ -0,0 +1,30 @@
% This template avoids the scontents package, which is only available on relatively recent TeX distributions
\documentclass[varwidth=true, crop, border=5pt]{standalone}
% Packages
\usepackage{amsmath}
\usepackage{amssymb}
% Blank formula checking
\usepackage{ifthen}
\newlength{\pheight}
% Color support
\usepackage{xcolor}
\definecolor{xpp_font_color}{HTML}{%%XPP_TEXT_COLOR%%}
% User input
\def\preview{\(
\displaystyle
%%XPP_TOOL_INPUT%%
\)%
}
\begin{document}
% Check if the formula is empty
\settoheight{\pheight}{\preview}
\ifthenelse{\pheight=0}{\GenericError{}{xournalpp:blankformula}{}{}}
% Render the user input
\textcolor{xpp_font_color}{\preview}
\end{document}
Loading…
Cancel
Save