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