You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
737 B
33 lines
737 B
\documentclass[varwidth=true, crop, border=5pt]{standalone} |
|
|
|
% Packages |
|
\usepackage{amsmath} |
|
\usepackage{amssymb} |
|
|
|
% for storing in memory verbatim content to be reused later |
|
\usepackage{scontents} |
|
|
|
% Blank formula checking |
|
\usepackage{ifthen} |
|
\newlength{\pheight} |
|
|
|
% Color support |
|
\usepackage{xcolor} |
|
\definecolor{xpp_font_color}{HTML}{%%XPP_TEXT_COLOR%%} |
|
|
|
% User input |
|
\begin{scontents}[store-env=preview] |
|
\( |
|
\displaystyle |
|
%%XPP_TOOL_INPUT%% |
|
\) |
|
\end{scontents} |
|
|
|
\begin{document} |
|
% Check if the formula is empty |
|
\settoheight{\pheight}{\getstored[1]{preview}} |
|
\ifthenelse{\pheight=0}{\GenericError{}{xournalpp:blankformula}{}{}} |
|
|
|
% Render the user input |
|
\textcolor{xpp_font_color}{\getstored[1]{preview}} |
|
\end{document} |