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