##// END OF EJS Templates
Typo fix
Jonathan Frederic -
Show More
@@ -1,193 +1,193 b''
1 1 ((= Latex base template (must inherit)
2 2 This template builds upon the abstract template, adding common latex output
3 3 functions. Figures, data_text,
4 4 This template does not define a docclass, the inheriting class must define this.=))
5 5
6 6 ((*- extends 'abstract.tplx' -*))
7 7
8 8 %===============================================================================
9 9 % Abstract overrides
10 10 %===============================================================================
11 11
12 12 ((* block packages *))
13 13 \usepackage{graphicx} % Used to insert images
14 14 \usepackage{adjustbox} % Used to constrain images to a maximum size
15 15 \usepackage{color} % Allow colors to be defined
16 16 \usepackage{enumerate} % Needed for markdown enumerations to work
17 17 \usepackage{geometry} % Used to adjust the document margins
18 18 \usepackage{amsmath} % Equations
19 19 \usepackage{amssymb} % Equations
20 20 \usepackage[utf8]{inputenc} % Allow utf-8 characters in the tex document
21 21 \usepackage{ucs} % Extended unicode (utf-8) support
22 22 \usepackage{fancyvrb} % verbatim replacement that allows latex
23 23 \usepackage{grffile} % extends the file name processing of package graphics
24 24 %to support a larger range
25 25
26 26 % The hyperref package gives us a pdf with properly built
27 27 % internal navigation ('pdf bookmarks' for the table of contents,
28 28 % internal cross-reference links, web links for URLs, etc.)
29 29 \usepackage{hyperref}
30 30 ((* endblock packages *))
31 31
32 32 ((* block definitions *))
33 33
34 34 \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
35 35 \definecolor{darkorange}{rgb}{.71,0.21,0.01}
36 36 \definecolor{darkgreen}{rgb}{.12,.54,.11}
37 37 \definecolor{myteal}{rgb}{.26, .44, .56}
38 38 \definecolor{gray}{gray}{0.45}
39 39 \definecolor{lightgray}{gray}{.95}
40 40 \definecolor{mediumgray}{gray}{.8}
41 41 \definecolor{inputbackground}{rgb}{.95, .95, .85}
42 42 \definecolor{outputbackground}{rgb}{.95, .95, .95}
43 43 \definecolor{traceback}{rgb}{1, .95, .95}
44 44
45 45 % new ansi colors
46 46 \definecolor{brown}{rgb}{0.54,0.27,0.07}
47 47 \definecolor{purple}{rgb}{0.5,0.0,0.5}
48 48 \definecolor{darkgray}{gray}{0.25}
49 49 \definecolor{lightred}{rgb}{1.0,0.39,0.28}
50 50 \definecolor{lightgreen}{rgb}{0.48,0.99,0.0}
51 51 \definecolor{lightblue}{rgb}{0.53,0.81,0.92}
52 52 \definecolor{lightpurple}{rgb}{0.87,0.63,0.87}
53 53 \definecolor{lightcyan}{rgb}{0.5,1.0,0.83}
54 54
55 55 % Define a nice break command that doesn't care if a line doesn't already
56 56 % exist.
57 57 \def\br{\hspace*{\fill} \\* }
58 58
59 59 % Math Jax compatability definitions
60 \def\gt{<}
60 \def\gt{>}
61 61 \def\lt{<}
62 62
63 63 % Document parameters
64 64 ((* block title *))\title{((( resources.metadata.name | escape_latex )))}((* endblock title *))
65 65 ((* block date *))((* endblock date *))
66 66 ((* block author *))((* endblock author *))
67 67 ((* endblock definitions *))
68 68
69 69 ((* block commands *))
70 70 \sloppy % Prevent overflowing lines due to hard-to-break entities
71 71
72 72 % Setup hyperref package
73 73 \hypersetup{
74 74 breaklinks=true, % so long urls are correctly broken across lines
75 75 colorlinks=true,
76 76 urlcolor=blue,
77 77 linkcolor=darkorange,
78 78 citecolor=darkgreen,
79 79 }
80 80
81 81 % Slightly bigger margins than the latex defaults
82 82 ((* block margins *))
83 83 \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
84 84 ((* endblock margins *))
85 85 ((* endblock commands *))
86 86
87 87 ((* block predoc *))
88 88 ((* block maketitle *))\maketitle((* endblock maketitle *))
89 89 ((* block abstract *))((* endblock abstract *))
90 90 ((* endblock predoc *))
91 91
92 92 %===============================================================================
93 93 % Support blocks
94 94 %===============================================================================
95 95
96 96 % Displaying simple data text
97 97 ((* block data_text *))
98 98 \begin{verbatim}
99 99 ((( output.text )))
100 100 \end{verbatim}
101 101 ((* endblock data_text *))
102 102
103 103 % Display python error text as-is
104 104 ((* block pyerr *))
105 105 \begin{Verbatim}[commandchars=\\\{\}]
106 106 ((( super() )))
107 107 \end{Verbatim}
108 108 ((* endblock pyerr *))
109 109 ((* block traceback_line *))
110 110 ((( line | indent | strip_ansi | escape_latex )))
111 111 ((* endblock traceback_line *))
112 112
113 113 % Display stream ouput with coloring
114 114 ((* block stream *))
115 115 \begin{Verbatim}[commandchars=\\\{\}]
116 116 ((( output.text | escape_latex | ansi2latex )))
117 117 \end{Verbatim}
118 118 ((* endblock stream *))
119 119
120 120 % Display latex
121 121 ((* block data_latex -*))
122 122 ((*- if output.latex.startswith('$'): -*))
123 123 ((= Replace $ symbols with more explicit, equation block. =))
124 124 \begin{equation*}
125 125 ((( output.latex | strip_dollars )))
126 126 \end{equation*}
127 127 ((*- else -*))
128 128 ((( output.latex )))
129 129 ((*- endif *))
130 130 ((* endblock data_latex *))
131 131
132 132 % Default mechanism for rendering figures
133 133 ((*- block data_png -*))((( draw_figure(output.png_filename) )))((*- endblock -*))
134 134 ((*- block data_jpg -*))((( draw_figure(output.jpeg_filename) )))((*- endblock -*))
135 135 ((*- block data_svg -*))((( draw_figure(output.svg_filename) )))((*- endblock -*))
136 136 ((*- block data_pdf -*))((( draw_figure(output.pdf_filename) )))((*- endblock -*))
137 137
138 138 % Draw a figure using the graphicx package.
139 139 ((* macro draw_figure(filename) -*))
140 140 ((* set filename = filename | posix_path *))
141 141 ((*- block figure scoped -*))
142 142 \begin{center}
143 143 \adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{((( filename )))}
144 144 \end{center}
145 145 { \hspace*{\fill} \\}
146 146 ((*- endblock figure -*))
147 147 ((*- endmacro *))
148 148
149 149 % Draw heading cell. Explicitly map different cell levels.
150 150 ((* block headingcell scoped *))
151 151
152 152 ((* if cell.level == 1 -*))
153 153 ((* block h1 -*))\section((* endblock h1 -*))
154 154 ((* elif cell.level == 2 -*))
155 155 ((* block h2 -*))\subsection((* endblock h2 -*))
156 156 ((* elif cell.level == 3 -*))
157 157 ((* block h3 -*))\subsubsection((* endblock h3 -*))
158 158 ((* elif cell.level == 4 -*))
159 159 ((* block h4 -*))\paragraph((* endblock h4 -*))
160 160 ((* elif cell.level == 5 -*))
161 161 ((* block h5 -*))\subparagraph((* endblock h5 -*))
162 162 ((* elif cell.level == 6 -*))
163 163 ((* block h6 -*))\\*\textit((* endblock h6 -*))
164 164 ((*- endif -*))
165 165 {((( cell.source | replace('\n', ' ') | citation2latex | markdown2latex )))}
166 166
167 167 ((* endblock headingcell *))
168 168
169 169 % Redirect pyout to display data priority.
170 170 ((* block pyout scoped *))
171 171 ((* block data_priority scoped *))
172 172 ((( super() )))
173 173 ((* endblock *))
174 174 ((* endblock pyout *))
175 175
176 176 % Render markdown
177 177 ((* block markdowncell scoped *))
178 178 ((( cell.source | citation2latex | markdown2latex )))
179 179 ((* endblock markdowncell *))
180 180
181 181 % Spit out the contents of raw cells unmodified
182 182 ((* block rawcell scoped *))
183 183 ((( cell.source )))
184 184 ((* endblock rawcell *))
185 185
186 186 % Don't display unknown types
187 187 ((* block unknowncell scoped *))
188 188 ((* endblock unknowncell *))
189 189
190 190 % Add a bibliography block to the postdoc
191 191 ((* block postdoc *))
192 192 ((* block bibliography *))((* endblock bibliography *))
193 193 ((* endblock postdoc *)) No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now