diff --git a/resources/default_template.tex b/resources/default_template.tex index 54477871..f19a0ca5 100644 --- a/resources/default_template.tex +++ b/resources/default_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 diff --git a/resources/legacy_template.tex b/resources/legacy_template.tex new file mode 100644 index 00000000..a18561ad --- /dev/null +++ b/resources/legacy_template.tex @@ -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}