Find file
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (96 sloc) 3.8 KB
%% This is the automatic preamble used by IPython. Note that it does *not*
%% include a documentclass declaration, that is added at runtime to the overall
%% document.
% needed for markdown enumerations to work
% Slightly bigger margins than the latex defaults
% Define a few colors for use in code, links and cell shading
\definecolor{myteal}{rgb}{.26, .44, .56}
\definecolor{inputbackground}{rgb}{.95, .95, .85}
\definecolor{outputbackground}{rgb}{.95, .95, .95}
\definecolor{traceback}{rgb}{1, .95, .95}
% Framed environments for code cells (inputs, outputs, errors, ...). The
% various uses of \unskip (or not) at the end were fine-tuned by hand, so don't
% randomly change them unless you're sure of the effect it will have.
% remove extraneous vertical space in boxes
% codecell is the whole input+output set of blocks that a Code cell can
% generate.
% TODO: unfortunately, it seems that using a framed codecell environment breaks
% the ability of the frames inside of it to be broken across pages. This
% causes at least the problem of having lots of empty space at the bottom of
% pages as new frames are moved to the next page, and if a single frame is too
% long to fit on a page, will completely stop latex from compiling the
% document. So unless we figure out a solution to this, we'll have to instead
% leave the codecell env. as empty. I'm keeping the original codecell
% definition here (a thin vertical bar) for reference, in case we find a
% solution to the page break issue.
%% \newenvironment{codecell}{%
%% \def\FrameCommand{\color{mediumgray} \vrule width 1pt \hspace{5pt}}%
%% \MakeFramed{\vspace{-0.5em}}}
%% {\unskip\endMakeFramed}
% For now, make this a no-op...
\MakeFramed{\advance\hsize-\width \FrameRestore}}
\MakeFramed{\advance\hsize-\width \FrameRestore}}
\MakeFramed{\advance\hsize-\width \FrameRestore}}
% Use and configure listings package for nicely formatted code
basicstyle=\small \ttfamily,
columns=fullflexible, % tighter character kerning, like verb
% The hyperref package gives us a pdf with properly built
% internal navigation ('pdf bookmarks' for the table of contents,
% internal cross-reference links, web links for URLs, etc.)
breaklinks=true, % so long urls are correctly broken across lines
% hardcode size of all verbatim environments to be a bit smaller
% Prevent overflowing lines due to urls and other hard-to-break entities.