-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_template.tex
62 lines (40 loc) · 1.48 KB
/
default_template.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%&xournal
% is the speed annoying you? the font maps *may* be the culprit; its hard to say!
% SHIFT THESE LINES INTO PREGENERATED LATER
\newcommand{\sumF}{\sum \text F}
\newcommand{\sumM}{\sum \text M}
\newcommand{\clockw}{\circlearrowright}
\newcommand{\cclockw}{\circlearrowleft}
\newcommand{\deltat}{\Delta \text t}
\newcommand{\ej}[1]{{e^{\j #1}}}
\newcommand{\et}[1]{{e^{#1 t}}}
% magic from stack overflow
\newcommand\hcancel[2][black]{\setbox0=\hbox{$#2$}%
\rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{1pt}}}}#2}
\newcommand{\volume}{\hcancel{V}}
\newcommand{\del}{\nabla}
\newcommand{\tsub}[2]{{{#1}_\text{#2}}}
% DONE WITH CACHED SHIFT
%% DELETE THESE LINES ON UPDATE
%% DONE WITH PRE-DONE SHIFT
\definecolor{xpp_font_color}{HTML}{%%XPP_TEXT_COLOR%%}
% avoid dealing with the massive pdftex.map file
% pdftex will magically build any missing fonts
% causes a slight slowdown on rebuild, but saves us half a second once the build is done
% also makes things a little pixelated
%\pdfmapfile{esint.map}
% note: when running off AC, and the extra .1s isn't an issue, uncomment above line
% User input
\begin{scontents}[store-env=preview]
\(
\displaystyle \mleftright
%%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}