Newer
Older
tmkproject / tmkproject.rst
@tundra tundra on 5 Sep 2012 1 KB *** empty log message ***
\documentclass[a4paper]{article}
% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in Acrobat
\usepackage{ifthen}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

%%% Custom LaTeX preamble
% PDF Standard Fonts
\usepackage{mathptmx} % Times
\usepackage[scaled=.90]{helvet}
\usepackage{courier}

%%% User specified packages and stylesheets
\usepackage{parskip}

%%% Fallback definitions for Docutils-specific commands

% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
  \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
  \urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}


%%% Body
\begin{document}

\#!/usr/local/bin/python2.7

\# \$Id: tmkproject.rst,v 1.126 2012/09/05 17:22:00 tundra Exp $
\# Author: David Goodger <\href{mailto:goodger@python.org}{goodger@python.org}>
\# Copyright: This module has been placed in the public domain.

``''``
A minimal front end to the Docutils Publisher, producing LaTeX.
''``''
%
\begin{description}
\item[{try:}] \leavevmode 
import locale
locale.setlocale(locale.LC\_ALL, '')

\item[{except:}] \leavevmode 
pass

\end{description}

from docutils.core import publish\_cmdline
%
\begin{description}
\item[{description = ('Generates LaTeX documents from standalone reStructuredText '}] \leavevmode 
'sources. '
'Reads from <source> (default is stdin) and writes to '
'<destination> (default is stdout).  See '
'<\url{http://docutils.sourceforge.net/docs/user/latex.html}> for '
'the full reference.')

\end{description}

publish\_cmdline(writer\_name='latex', description=description)

\end{document}