Skip to content

Instantly share code, notes, and snippets.

@onesandzeroes
Created October 10, 2014 08:19
Show Gist options
  • Save onesandzeroes/e61c4f700948c1908e60 to your computer and use it in GitHub Desktop.
Save onesandzeroes/e61c4f700948c1908e60 to your computer and use it in GitHub Desktop.
Ipython Nbconvert simple article template
((* extends 'article.tplx' *))
((* block docclass *))
\documentclass[a4paper,11pt]{article}
((* endblock docclass *))
((* block commands *))
% Prevent overflowing lines due to hard-to-break entities
\sloppy
% Setup hyperref package
\hypersetup{
breaklinks=true, % so long urls are correctly broken across lines
colorlinks=false,
urlcolor=blue,
linkcolor=darkorange,
citecolor=darkgreen,
}
\urlstyle{same} % don't use monospace font for urls
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
((* block margins *))
% None
((* endblock margins *))
((* endblock commands *))
%Disable section numbering
((* block headingcell scoped *))
((* if cell.level == 1 -*))
((* block h1 -*))\section*((* endblock h1 -*))
((* elif cell.level == 2 -*))
((* block h2 -*))\subsection*((* endblock h2 -*))
((* elif cell.level == 3 -*))
((* block h3 -*))\subsubsection*((* endblock h3 -*))
((* elif cell.level == 4 -*))
((* block h4 -*))\paragraph((* endblock h4 -*))
((* elif cell.level == 5 -*))
((* block h5 -*))\subparagraph((* endblock h5 -*))
((* elif cell.level == 6 -*))
((* block h6 -*))\\*\textit((* endblock h6 -*))
((*- endif -*))
{((( cell.source | replace('\n', ' ') | citation2latex | strip_files_prefix | markdown2latex )))}
((* endblock headingcell *))
% Render markdown
((* block markdowncell scoped *))
\noindent
((( cell.source | citation2latex | strip_files_prefix | markdown2latex )))
((* endblock markdowncell *))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment