Show More
@@ -1,214 +1,214 b'' | |||||
1 | ((*- extends 'display_priority.tplx' -*)) |
|
1 | ((*- extends 'display_priority.tplx' -*)) | |
2 |
|
2 | |||
3 | ((* block in_prompt *))((* endblock in_prompt *)) |
|
3 | ((* block in_prompt *))((* endblock in_prompt *)) | |
4 |
|
4 | |||
5 | ((* block output_prompt *))((* endblock output_prompt *)) |
|
5 | ((* block output_prompt *))((* endblock output_prompt *)) | |
6 |
|
6 | |||
7 | ((* block codecell *))\begin{codecell}((( super() ))) |
|
7 | ((* block codecell *))\begin{codecell}((( super() ))) | |
8 | \end{codecell} |
|
8 | \end{codecell} | |
9 | ((* endblock *)) |
|
9 | ((* endblock *)) | |
10 |
|
10 | |||
11 | ((* block input *)) |
|
11 | ((* block input *)) | |
12 | \begin{codeinput} |
|
12 | \begin{codeinput} | |
13 | \begin{lstlisting} |
|
13 | \begin{lstlisting} | |
14 | ((( cell.input ))) |
|
14 | ((( cell.input ))) | |
15 | \end{lstlisting} |
|
15 | \end{lstlisting} | |
16 | \end{codeinput} |
|
16 | \end{codeinput} | |
17 | ((* endblock input *)) |
|
17 | ((* endblock input *)) | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | ((= Those Two are for error displaying |
|
20 | ((= Those Two are for error displaying | |
21 | even if the first one seem to do nothing, |
|
21 | even if the first one seem to do nothing, | |
22 | it introduces a new line |
|
22 | it introduces a new line | |
23 |
|
23 | |||
24 | =)) |
|
24 | =)) | |
25 | ((* block pyerr *))((( super() ))) |
|
25 | ((* block pyerr *))((( super() ))) | |
26 | ((* endblock pyerr *)) |
|
26 | ((* endblock pyerr *)) | |
27 |
|
27 | |||
28 | ((* block traceback_line *)) |
|
28 | ((* block traceback_line *)) | |
29 | ((( line |indent| rm_ansi )))((* endblock traceback_line *)) |
|
29 | ((( line |indent| rm_ansi )))((* endblock traceback_line *)) | |
30 | ((= .... =)) |
|
30 | ((= .... =)) | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | ((*- block output_group -*)) |
|
33 | ((*- block output_group -*)) | |
34 | \begin{codeoutput} |
|
34 | \begin{codeoutput} | |
35 | ((( super() ))) |
|
35 | ((( super() ))) | |
36 | \end{codeoutput}((* endblock *)) |
|
36 | \end{codeoutput}((* endblock *)) | |
37 |
|
37 | |||
38 | ((*- block data_png -*)) |
|
38 | ((*- block data_png -*)) | |
39 | \begin{center} |
|
39 | \begin{center} | |
40 | \includegraphics[width=0.7\textwidth]{(((output.key_png)))} |
|
40 | \includegraphics[width=0.7\textwidth, height=0.9\textheight, keepaspectratio]{(((output.key_png)))} | |
41 | \par |
|
41 | \par | |
42 | \end{center} |
|
42 | \end{center} | |
43 | ((*- endblock -*)) |
|
43 | ((*- endblock -*)) | |
44 |
|
44 | |||
45 | ((*- block data_svg -*)) |
|
45 | ((*- block data_svg -*)) | |
46 | \begin{center} |
|
46 | \begin{center} | |
47 | \includegraphics[width=0.7\textwidth]{(((output.key_svg)))} |
|
47 | \includegraphics[width=0.7\textwidth]{(((output.key_svg)))} | |
48 | \par |
|
48 | \par | |
49 | \end{center} |
|
49 | \end{center} | |
50 | ((*- endblock -*)) |
|
50 | ((*- endblock -*)) | |
51 |
|
51 | |||
52 | ((* block pyout *)) |
|
52 | ((* block pyout *)) | |
53 | ((( output.text))) |
|
53 | ((( output.text))) | |
54 | ((* endblock pyout *)) |
|
54 | ((* endblock pyout *)) | |
55 |
|
55 | |||
56 | ((* block data_text *)) |
|
56 | ((* block data_text *)) | |
57 | \begin{verbatim} |
|
57 | \begin{verbatim} | |
58 | ((( output.text ))) |
|
58 | ((( output.text ))) | |
59 | \end{verbatim} |
|
59 | \end{verbatim} | |
60 | ((* endblock *)) |
|
60 | ((* endblock *)) | |
61 |
|
61 | |||
62 | ((* block stream *)) |
|
62 | ((* block stream *)) | |
63 | \begin{verbatim} |
|
63 | \begin{verbatim} | |
64 | ((( output.text))) |
|
64 | ((( output.text))) | |
65 | \end{verbatim} |
|
65 | \end{verbatim} | |
66 | ((* endblock stream *)) |
|
66 | ((* endblock stream *)) | |
67 |
|
67 | |||
68 |
|
68 | |||
69 |
|
69 | |||
70 |
|
70 | |||
71 | ((* block markdowncell scoped *))((( cell.source | markdown2latex ))) |
|
71 | ((* block markdowncell scoped *))((( cell.source | markdown2latex ))) | |
72 | ((* endblock markdowncell *)) |
|
72 | ((* endblock markdowncell *)) | |
73 |
|
73 | |||
74 | ((* block headingcell scoped *)) |
|
74 | ((* block headingcell scoped *)) | |
75 | \section{((( cell.source)))} |
|
75 | \section{((( cell.source)))} | |
76 | ((* endblock headingcell *)) |
|
76 | ((* endblock headingcell *)) | |
77 |
|
77 | |||
78 | ((* block rawcell scoped *)) |
|
78 | ((* block rawcell scoped *)) | |
79 | ((( cell.source | pycomment ))) |
|
79 | ((( cell.source | pycomment ))) | |
80 | ((* endblock rawcell *)) |
|
80 | ((* endblock rawcell *)) | |
81 |
|
81 | |||
82 | ((* block unknowncell scoped *)) |
|
82 | ((* block unknowncell scoped *)) | |
83 | unknown type (((cell.type))) |
|
83 | unknown type (((cell.type))) | |
84 | ((* endblock unknowncell *)) |
|
84 | ((* endblock unknowncell *)) | |
85 |
|
85 | |||
86 |
|
86 | |||
87 |
|
87 | |||
88 | ((* block body *))\begin{document} |
|
88 | ((* block body *))\begin{document} | |
89 | ((( super() ))) |
|
89 | ((( super() ))) | |
90 | \end{document} |
|
90 | \end{document} | |
91 | ((* endblock*)) |
|
91 | ((* endblock*)) | |
92 |
|
92 | |||
93 | ((* block header *)) |
|
93 | ((* block header *)) | |
94 | %% This file was auto-generated by IPython. |
|
94 | %% This file was auto-generated by IPython. | |
95 | %% Conversion from the original notebook file: |
|
95 | %% Conversion from the original notebook file: | |
96 | %% tests/ipynbref/Gun_Data.orig.ipynb |
|
96 | %% tests/ipynbref/Gun_Data.orig.ipynb | |
97 | %% |
|
97 | %% | |
98 | \documentclass[11pt,english]{article} |
|
98 | \documentclass[11pt,english]{article} | |
99 |
|
99 | |||
100 | %% This is the automatic preamble used by IPython. Note that it does *not* |
|
100 | %% This is the automatic preamble used by IPython. Note that it does *not* | |
101 | %% include a documentclass declaration, that is added at runtime to the overall |
|
101 | %% include a documentclass declaration, that is added at runtime to the overall | |
102 | %% document. |
|
102 | %% document. | |
103 |
|
103 | |||
104 | \usepackage{amsmath} |
|
104 | \usepackage{amsmath} | |
105 | \usepackage{amssymb} |
|
105 | \usepackage{amssymb} | |
106 | \usepackage{graphicx} |
|
106 | \usepackage{graphicx} | |
107 | \usepackage{ucs} |
|
107 | \usepackage{ucs} | |
108 | \usepackage[utf8x]{inputenc} |
|
108 | \usepackage[utf8x]{inputenc} | |
109 |
|
109 | |||
110 | % needed for markdown enumerations to work |
|
110 | % needed for markdown enumerations to work | |
111 | \usepackage{enumerate} |
|
111 | \usepackage{enumerate} | |
112 |
|
112 | |||
113 | % Slightly bigger margins than the latex defaults |
|
113 | % Slightly bigger margins than the latex defaults | |
114 | \usepackage{geometry} |
|
114 | \usepackage{geometry} | |
115 | \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2.5cm,rmargin=2.5cm} |
|
115 | \geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=2.5cm,rmargin=2.5cm} | |
116 |
|
116 | |||
117 | % Define a few colors for use in code, links and cell shading |
|
117 | % Define a few colors for use in code, links and cell shading | |
118 | \usepackage{color} |
|
118 | \usepackage{color} | |
119 | \definecolor{orange}{cmyk}{0,0.4,0.8,0.2} |
|
119 | \definecolor{orange}{cmyk}{0,0.4,0.8,0.2} | |
120 | \definecolor{darkorange}{rgb}{.71,0.21,0.01} |
|
120 | \definecolor{darkorange}{rgb}{.71,0.21,0.01} | |
121 | \definecolor{darkgreen}{rgb}{.12,.54,.11} |
|
121 | \definecolor{darkgreen}{rgb}{.12,.54,.11} | |
122 | \definecolor{myteal}{rgb}{.26, .44, .56} |
|
122 | \definecolor{myteal}{rgb}{.26, .44, .56} | |
123 | \definecolor{gray}{gray}{0.45} |
|
123 | \definecolor{gray}{gray}{0.45} | |
124 | \definecolor{lightgray}{gray}{.95} |
|
124 | \definecolor{lightgray}{gray}{.95} | |
125 | \definecolor{mediumgray}{gray}{.8} |
|
125 | \definecolor{mediumgray}{gray}{.8} | |
126 | \definecolor{inputbackground}{rgb}{.95, .95, .85} |
|
126 | \definecolor{inputbackground}{rgb}{.95, .95, .85} | |
127 | \definecolor{outputbackground}{rgb}{.95, .95, .95} |
|
127 | \definecolor{outputbackground}{rgb}{.95, .95, .95} | |
128 | \definecolor{traceback}{rgb}{1, .95, .95} |
|
128 | \definecolor{traceback}{rgb}{1, .95, .95} | |
129 |
|
129 | |||
130 | % Framed environments for code cells (inputs, outputs, errors, ...). The |
|
130 | % Framed environments for code cells (inputs, outputs, errors, ...). The | |
131 | % various uses of \unskip (or not) at the end were fine-tuned by hand, so don't |
|
131 | % various uses of \unskip (or not) at the end were fine-tuned by hand, so don't | |
132 | % randomly change them unless you're sure of the effect it will have. |
|
132 | % randomly change them unless you're sure of the effect it will have. | |
133 | \usepackage{framed} |
|
133 | \usepackage{framed} | |
134 |
|
134 | |||
135 | % remove extraneous vertical space in boxes |
|
135 | % remove extraneous vertical space in boxes | |
136 | \setlength\fboxsep{0pt} |
|
136 | \setlength\fboxsep{0pt} | |
137 |
|
137 | |||
138 | % codecell is the whole input+output set of blocks that a Code cell can |
|
138 | % codecell is the whole input+output set of blocks that a Code cell can | |
139 | % generate. |
|
139 | % generate. | |
140 |
|
140 | |||
141 | % TODO: unfortunately, it seems that using a framed codecell environment breaks |
|
141 | % TODO: unfortunately, it seems that using a framed codecell environment breaks | |
142 | % the ability of the frames inside of it to be broken across pages. This |
|
142 | % the ability of the frames inside of it to be broken across pages. This | |
143 | % causes at least the problem of having lots of empty space at the bottom of |
|
143 | % causes at least the problem of having lots of empty space at the bottom of | |
144 | % pages as new frames are moved to the next page, and if a single frame is too |
|
144 | % pages as new frames are moved to the next page, and if a single frame is too | |
145 | % long to fit on a page, will completely stop latex from compiling the |
|
145 | % long to fit on a page, will completely stop latex from compiling the | |
146 | % document. So unless we figure out a solution to this, we'll have to instead |
|
146 | % document. So unless we figure out a solution to this, we'll have to instead | |
147 | % leave the codecell env. as empty. I'm keeping the original codecell |
|
147 | % leave the codecell env. as empty. I'm keeping the original codecell | |
148 | % definition here (a thin vertical bar) for reference, in case we find a |
|
148 | % definition here (a thin vertical bar) for reference, in case we find a | |
149 | % solution to the page break issue. |
|
149 | % solution to the page break issue. | |
150 |
|
150 | |||
151 | %% \newenvironment{codecell}{% |
|
151 | %% \newenvironment{codecell}{% | |
152 | %% \def\FrameCommand{\color{mediumgray} \vrule width 1pt \hspace{5pt}}% |
|
152 | %% \def\FrameCommand{\color{mediumgray} \vrule width 1pt \hspace{5pt}}% | |
153 | %% \MakeFramed{\vspace{-0.5em}}} |
|
153 | %% \MakeFramed{\vspace{-0.5em}}} | |
154 | %% {\unskip\endMakeFramed} |
|
154 | %% {\unskip\endMakeFramed} | |
155 |
|
155 | |||
156 | % For now, make this a no-op... |
|
156 | % For now, make this a no-op... | |
157 | \newenvironment{codecell}{} |
|
157 | \newenvironment{codecell}{} | |
158 |
|
158 | |||
159 | \newenvironment{codeinput}{% |
|
159 | \newenvironment{codeinput}{% | |
160 | \def\FrameCommand{\colorbox{inputbackground}}% |
|
160 | \def\FrameCommand{\colorbox{inputbackground}}% | |
161 | \MakeFramed{\advance\hsize-\width \FrameRestore}} |
|
161 | \MakeFramed{\advance\hsize-\width \FrameRestore}} | |
162 | {\unskip\endMakeFramed} |
|
162 | {\unskip\endMakeFramed} | |
163 |
|
163 | |||
164 | \newenvironment{codeoutput}{% |
|
164 | \newenvironment{codeoutput}{% | |
165 | \def\FrameCommand{\colorbox{outputbackground}}% |
|
165 | \def\FrameCommand{\colorbox{outputbackground}}% | |
166 | \vspace{-1.4em} |
|
166 | \vspace{-1.4em} | |
167 | \MakeFramed{\advance\hsize-\width \FrameRestore}} |
|
167 | \MakeFramed{\advance\hsize-\width \FrameRestore}} | |
168 | {\unskip\medskip\endMakeFramed} |
|
168 | {\unskip\medskip\endMakeFramed} | |
169 |
|
169 | |||
170 | \newenvironment{traceback}{% |
|
170 | \newenvironment{traceback}{% | |
171 | \def\FrameCommand{\colorbox{traceback}}% |
|
171 | \def\FrameCommand{\colorbox{traceback}}% | |
172 | \MakeFramed{\advance\hsize-\width \FrameRestore}} |
|
172 | \MakeFramed{\advance\hsize-\width \FrameRestore}} | |
173 | {\endMakeFramed} |
|
173 | {\endMakeFramed} | |
174 |
|
174 | |||
175 | % Use and configure listings package for nicely formatted code |
|
175 | % Use and configure listings package for nicely formatted code | |
176 | \usepackage{listingsutf8} |
|
176 | \usepackage{listingsutf8} | |
177 | \lstset{ |
|
177 | \lstset{ | |
178 | language=python, |
|
178 | language=python, | |
179 | inputencoding=utf8x, |
|
179 | inputencoding=utf8x, | |
180 | extendedchars=\true, |
|
180 | extendedchars=\true, | |
181 | aboveskip=\smallskipamount, |
|
181 | aboveskip=\smallskipamount, | |
182 | belowskip=\smallskipamount, |
|
182 | belowskip=\smallskipamount, | |
183 | xleftmargin=2mm, |
|
183 | xleftmargin=2mm, | |
184 | breaklines=true, |
|
184 | breaklines=true, | |
185 | basicstyle=\small \ttfamily, |
|
185 | basicstyle=\small \ttfamily, | |
186 | showstringspaces=false, |
|
186 | showstringspaces=false, | |
187 | keywordstyle=\color{blue}\bfseries, |
|
187 | keywordstyle=\color{blue}\bfseries, | |
188 | commentstyle=\color{myteal}, |
|
188 | commentstyle=\color{myteal}, | |
189 | stringstyle=\color{darkgreen}, |
|
189 | stringstyle=\color{darkgreen}, | |
190 | identifierstyle=\color{darkorange}, |
|
190 | identifierstyle=\color{darkorange}, | |
191 | columns=fullflexible, % tighter character kerning, like verb |
|
191 | columns=fullflexible, % tighter character kerning, like verb | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 | % The hyperref package gives us a pdf with properly built |
|
194 | % The hyperref package gives us a pdf with properly built | |
195 | % internal navigation ('pdf bookmarks' for the table of contents, |
|
195 | % internal navigation ('pdf bookmarks' for the table of contents, | |
196 | % internal cross-reference links, web links for URLs, etc.) |
|
196 | % internal cross-reference links, web links for URLs, etc.) | |
197 | \usepackage{hyperref} |
|
197 | \usepackage{hyperref} | |
198 | \hypersetup{ |
|
198 | \hypersetup{ | |
199 | breaklinks=true, % so long urls are correctly broken across lines |
|
199 | breaklinks=true, % so long urls are correctly broken across lines | |
200 | colorlinks=true, |
|
200 | colorlinks=true, | |
201 | urlcolor=blue, |
|
201 | urlcolor=blue, | |
202 | linkcolor=darkorange, |
|
202 | linkcolor=darkorange, | |
203 | citecolor=darkgreen, |
|
203 | citecolor=darkgreen, | |
204 | } |
|
204 | } | |
205 |
|
205 | |||
206 | % hardcode size of all verbatim environments to be a bit smaller |
|
206 | % hardcode size of all verbatim environments to be a bit smaller | |
207 | \makeatletter |
|
207 | \makeatletter | |
208 | \g@addto@macro\@verbatim\small\topsep=0.5em\partopsep=0pt |
|
208 | \g@addto@macro\@verbatim\small\topsep=0.5em\partopsep=0pt | |
209 | \makeatother |
|
209 | \makeatother | |
210 |
|
210 | |||
211 | % Prevent overflowing lines due to urls and other hard-to-break entities. |
|
211 | % Prevent overflowing lines due to urls and other hard-to-break entities. | |
212 | \sloppy |
|
212 | \sloppy | |
213 |
|
213 | |||
214 | ((* endblock *)) |
|
214 | ((* endblock *)) |
General Comments 0
You need to be logged in to leave comments.
Login now