Yay. PDF docs for Jinja2
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Armin Ronacher · committed by Armin Ronacher · parent 2a590ef · Browse files · 7 files·+173 added−36 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+173 added−36 removed
- other:+173 added−36 removed
Provenance
- Commit
89f61fd- Tree
d929e2f- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent
2a590ef
7 files changed+173 added−36 removed
modified:docs/conf.py+16 added-11 removed
117 unmodified lines118 119 # Grouping the document tree into LaTeX files. List of tuples120 # (source start file, target name, title, author, document class [howto/manual]).121 latex_documents = [122- ('index', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher', 'manual', 'toctree_only'),122+ ('latexindex', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher',123+ 'manual'),124 ]125 125-# Additional stuff for the LaTeX preamble.126-latex_preamble = '''127-\usepackage{palatino}128-\definecolor{TitleColor}{rgb}{0.7,0,0}129-\definecolor{InnerLinkColor}{rgb}{0.7,0,0}130-\definecolor{OuterLinkColor}{rgb}{0.8,0,0}131-\definecolor{VerbatimColor}{rgb}{0.985,0.985,0.985}132-\definecolor{VerbatimBorderColor}{rgb}{0.8,0.8,0.8}126+# Additional stuff for LaTeX127+latex_elements = {128+ 'fontpkg': r'\usepackage{mathpazo}',129+ 'papersize': 'a4paper',130+ 'pointsize': '12pt',131+ 'preamble': r'''132+\usepackage{jinjastyle}133+134+% i hate you latex135+\DeclareUnicodeCharacter{14D}{o}136 '''137+}138 135-# Documents to append as an appendix to all manuals.136-#latex_appendices = []139+latex_use_parts = True140 141+latex_additional_files = ['jinjastyle.sty', 'logo.pdf']142+143 # If false, no module index is generated.144 latex_use_modindex = False145 146 html_sidebars = {5 unmodified linesadded:docs/contents.rst.inc+29 added
1+Jinja2 Documentation2+--------------------3+4+.. toctree::5+ :maxdepth: 26+7+ intro8+ api9+ sandbox10+ templates11+ extensions12+ integration13+ switching14+ tricks15+16+Additional Information17+----------------------18+19+.. toctree::20+ :maxdepth: 221+22+ faq23+ changelog24+25+If you can't find the information you're looking for, have a look at the26+index of try to find it using the search function:27+28+* :ref:`genindex`29+* :ref:`search`modified:docs/index.rst+1 added-23 removed
23 unmodified lines24 - easy to debug. Line numbers of exceptions directly point to25 the correct line in the template.26 - configurable syntax27 28-Jinja2 Documentation29---------------------28+.. include:: contents.rst.inc29 31-.. toctree::32- :maxdepth: 233-34- intro35- api36- sandbox37- templates38- extensions39- integration40- switching41- tricks42-43-Additional Information44-----------------------45-46-.. toctree::47- :maxdepth: 248-49- faq50- changelog51-30 If you can't find the information you're looking for, have a look at the31 index of try to find it using the search function:32 33 * :ref:`genindex`1 unmodified lineadded:docs/jinjastyle.sty+119 added
1+\definecolor{TitleColor}{rgb}{0,0,0}2+\definecolor{InnerLinkColor}{rgb}{0,0,0}3+\definecolor{OuterLinkColor}{rgb}{0.8,0,0}4+5+\renewcommand{\maketitle}{%6+ \begin{titlepage}%7+ \let\footnotesize\small8+ \let\footnoterule\relax9+ \ifsphinxpdfoutput10+ \begingroup11+ % This \def is required to deal with multi-line authors; it12+ % changes \\ to ', ' (comma-space), making it pass muster for13+ % generating document info in the PDF file.14+ \def\\{, }15+ \pdfinfo{16+ /Author (\@author)17+ /Title (\@title)18+ }19+ \endgroup20+ \fi21+ \begin{flushright}%22+ %\sphinxlogo%23+ {\center24+ \vspace*{3cm}25+ \includegraphics{logo.pdf}26+ \vspace{3cm}27+ \par28+ {\rm\Huge \@title \par}%29+ {\em\LARGE \py@release\releaseinfo \par}30+ {\large31+ \@date \par32+ \py@authoraddress \par33+ }}%34+ \end{flushright}%\par35+ \@thanks36+ \end{titlepage}%37+ \cleardoublepage%38+ \setcounter{footnote}{0}%39+ \let\thanks\relax\let\maketitle\relax40+ %\gdef\@thanks{}\gdef\@author{}\gdef\@title{}41+}42+43+\fancypagestyle{normal}{44+ \fancyhf{}45+ \fancyfoot[LE,RO]{{\thepage}}46+ \fancyfoot[LO]{{\nouppercase{\rightmark}}}47+ \fancyfoot[RE]{{\nouppercase{\leftmark}}}48+ \fancyhead[LE,RO]{{ \@title, \py@release}}49+ \renewcommand{\headrulewidth}{0.4pt}50+ \renewcommand{\footrulewidth}{0.4pt}51+}52+53+\fancypagestyle{plain}{54+ \fancyhf{}55+ \fancyfoot[LE,RO]{{\thepage}}56+ \renewcommand{\headrulewidth}{0pt}57+ \renewcommand{\footrulewidth}{0.4pt}58+}59+60+\titleformat{\section}{\Large}%61+ {\py@TitleColor\thesection}{0.5em}{\py@TitleColor}{\py@NormalColor}62+\titleformat{\subsection}{\large}%63+ {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}64+\titleformat{\subsubsection}{}%65+ {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}66+\titleformat{\paragraph}{\large}%67+ {\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor}68+69+\ChNameVar{\raggedleft\normalsize}70+\ChNumVar{\raggedleft \bfseries\Large}71+\ChTitleVar{\raggedleft \rm\Huge}72+73+\renewcommand\thepart{\@Roman\c@part}74+\renewcommand\part{%75+ \pagestyle{plain}76+ \if@noskipsec \leavevmode \fi77+ \cleardoublepage78+ \vspace*{6cm}%79+ \@afterindentfalse80+ \secdef\@part\@spart}81+82+\def\@part[#1]#2{%83+ \ifnum \c@secnumdepth >\m@ne84+ \refstepcounter{part}%85+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%86+ \else87+ \addcontentsline{toc}{part}{#1}%88+ \fi89+ {\parindent \z@ %\center90+ \interlinepenalty \@M91+ \normalfont92+ \ifnum \c@secnumdepth >\m@ne93+ \rm\Large \partname~\thepart94+ \par\nobreak95+ \fi96+ \MakeUppercase{\rm\Huge #2}%97+ \markboth{}{}\par}%98+ \nobreak99+ \vskip 8ex100+ \@afterheading}101+\def\@spart#1{%102+ {\parindent \z@ %\center103+ \interlinepenalty \@M104+ \normalfont105+ \huge \bfseries #1\par}%106+ \nobreak107+ \vskip 3ex108+ \@afterheading}109+110+% use inconsolata font111+\usepackage{inconsolata}112+113+% fix single quotes, for inconsolata. (does not work)114+%%\usepackage{textcomp}115+%%\begingroup116+%% \catcode`'=\active117+%% \g@addto@macro\@noligs{\let'\textsinglequote}118+%% \endgroup119+%%\endinputadded:docs/latexindex.rst+6 added
1+:orphan:2+3+Jinja2 Documentation4+====================5+6+.. include:: contents.rst.incadded:docs/logo.pdfbinary
A binary file, added.
modified:Makefile+2 added-2 removed
1 unmodified line2 python setup.py test3 4 upload-docs:5 $(MAKE) -C docs html dirhtml latex6- #$(MAKE) -C docs/_build/latex all-pdf6+ $(MAKE) -C docs/_build/latex all-pdf7 cd docs/_build/; mv html jinja-docs; zip -r jinja-docs.zip jinja-docs; mv jinja-docs html8 scp -r docs/_build/dirhtml/* pocoo.org:/var/www/jinja.pocoo.org/docs/9- #scp -r docs/_build/latex/Jinja.pdf pocoo.org:/var/www/jinja.pocoo.org/docs/jinja-docs.pdf9+ scp -r docs/_build/latex/Jinja.pdf pocoo.org:/var/www/jinja.pocoo.org/docs/jinja-docs.pdf10 scp -r docs/_build/jinja-docs.zip pocoo.org:/var/www/jinja.pocoo.org/docs/11 12 .PHONY: test