24 Feb 2009 12:08
r5872 - in trunk/sandbox/stylesheets: bold-definition-terms.css index.txt listings-python-options.sty listings-tex-options.sty
<milde <at> users.berlios.de>
2009-02-24 11:08:08 GMT
2009-02-24 11:08:08 GMT
Author: milde Date: 2009-02-24 12:08:08 +0100 (Tue, 24 Feb 2009) New Revision: 5872 Added: trunk/sandbox/stylesheets/bold-definition-terms.css trunk/sandbox/stylesheets/listings-python-options.sty trunk/sandbox/stylesheets/listings-tex-options.sty Modified: trunk/sandbox/stylesheets/index.txt Log: sandbox/stylesheets: add LaTeX styles section, add new style sheets Added: trunk/sandbox/stylesheets/bold-definition-terms.css =================================================================== --- trunk/sandbox/stylesheets/bold-definition-terms.css 2009-02-23 16:03:50 UTC (rev 5871) +++ trunk/sandbox/stylesheets/bold-definition-terms.css 2009-02-24 11:08:08 UTC (rev 5872) <at> <at> -0,0 +1,22 <at> <at> +/* transiton-stars.css: Style a Docutils transition */ +/* :Author: Günter Milde */ +/* :Copyright: © 2008 Günter Milde. */ +/* Released without warranties or conditions of any kind */ +/* under the terms of the Apache License, Version 2.0 */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* :Id: $Id$ */ + +/* Style sheet for use with Docutils */ + +/* You can use this style as a template for customising the transition */ +/* element. */ + +/* Extends the standard docutils style sheet */ + +/* Instead of modifying html4css1.css, you can convert your sources with: */ +/* rst2html --stylesheet=/html4css1.css,/bold-definition-terms.css INFILE */ +/* to get bold face definition terms. */ + +dl.docutils dt { + font-weight: bold } +*/ Property changes on: trunk/sandbox/stylesheets/bold-definition-terms.css ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/sandbox/stylesheets/index.txt =================================================================== --- trunk/sandbox/stylesheets/index.txt 2009-02-23 16:03:50 UTC (rev 5871) +++ trunk/sandbox/stylesheets/index.txt 2009-02-24 11:08:08 UTC (rev 5872) <at> <at> -2,7 +2,7 <at> <at> Docutils_ Stylesheets ======================= -:Author: Lea Wiemann +:Author: Lea Wiemann and others :Contact: LeWiemann <at> gmail.com :Revision: $Revision$ :Date: $Date$ <at> <at> -28,19 +28,41 <at> <at> Please see "`Writing HTML (CSS) Stylesheets for Docutils`__" on how to write your own CSS stylesheet for use with Docutils' HTML writer. -__ http://docutils.sf.net/docs/howto/html-stylesheets.html +__ ../../docutils/docs/howto/html-stylesheets.html * `<voidspace.css>`_: Blue boxes around section headings, more borders, and somewhat more colorful than the default stylesheet. -* `<transition-stars.css>`_: +* `<transition-stars.css>`_: Example/Template for customising the transition__ element. - + Replaces the horizontal line with three stars as often seen in novels. -__ http://docutils.sf.net/docs/ref/rst/restructuredtext.html#transitions +__ ../../docutils/docs/ref/rst/restructuredtext.html#transitions +LaTeX Style Sheets +================== + +See "`Generating LaTeX with Docutils`_" for details on usage and writing of +LaTeX style sheets for the Docutils' "latex2e" writer. + +Hint: usage is simpler, if you copy (or link) the stye files into a +directory in the LaTeX INPUT PATH, e.g., (on a modern TeX installation) +``/usr/local/share/texmf/tex/latex/`` or ``~/texmf/tex/latex/`` und run +``texhash``. + +* `<listings-python-options.sty>`_ + Highlight literal blocks as python code. Use with the + ``--literal-block-env=lstlistings`` option. + +* `<listings-tex-options.sty>`_ + Highlight literal blocks as (La)TeX code. Use with the + ``--literal-block-env=lstlistings`` option. + +.. _Generating LaTeX with Docutils: + ../../docutils/docs/user/latex.html + .. References: .. _Docutils: http://docutils.sourceforge.net/ Added: trunk/sandbox/stylesheets/listings-python-options.sty =================================================================== --- trunk/sandbox/stylesheets/listings-python-options.sty 2009-02-23 16:03:50 UTC (rev 5871) +++ trunk/sandbox/stylesheets/listings-python-options.sty 2009-02-24 11:08:08 UTC (rev 5872) <at> <at> -0,0 +1,117 <at> <at> +% Settings for the listings package with Python +% ============================================= +% +% :Author: Günter Milde +% :Contact: milde <at> users.berlios.de +% :Revision: $Revision: 5534 $ +% :Date: $Date: 2009-02-24$ +% :Copyright: © 2007, 2009 G. Milde, +% Released without warranties or conditions of any kind +% under the terms of the Apache License, Version 2.0 +% http://www.apache.org/licenses/LICENSE-2.0 +% +% To use this pass the +% ``--stylesheet=listings-python-options.sty --literal-block-env=lstlisting`` +% options to ``rst2latex.py``. +% +% For full documentation see listings.pdf_. +% +% Of course, we need to load the listings package itself:: + +\RequirePackage{listings} + +% In a document with lots of lists and listings, separating paragraphs by +% vertical seems appropriate:: + +\RequirePackage{parskip} + +% Font settings +% ~~~~~~~~~~~~~ +% +% Textfont:: + +% \RequirePackage{mathptmx} % Times +\RequirePackage{mathpazo} % Palatino + +% We need a "rich" monospaced font. `txfonts`' typewriter font comes +% with bold, slanted, and small-caps variants and without the problems of +% `txfonts`' math fonts:: + +\renewcommand{\ttdefault}{txtt} + +% Default language +% ~~~~~~~~~~~~~~~~ +% :: + +%\lstset{language={}} + +% Highlight literal blocks as Python, +% add missing keywords:: + +\lstset{language=Python, + morekeywords=[1]{yield} +} + +% pre-load the language +\lstloadlanguages{Python} % comma separated list of languages + + +% Style +% ~~~~~ +% +% Typeface settings:: + +\lstset{ + basicstyle=\ttfamily, % print whole listing in tt + % basicstyle=\ttfamily\small, % and, maybe small + keywordstyle=\bfseries, + % identifierstyle=\slshape, % object names + commentstyle=\rmfamily\itshape, % italic comments + stringstyle=\slshape, % strings +} + +% Visible whitespace:: + +\lstset{showstringspaces=false} % no visible spaces in strings +%\lstset{showspaces=true, +% showtabs=true, +% tab=\rightarrowfill} + +% Line numbers:: + +%\lstset{numbers=left, numberstyle=\tiny, stepnumber=2, numbersep=5pt} + +% Frames around listings:: + +%\lstset{frame=single} + + +% Extended characters in listings:: + +%extendedchars=true +%extendedchars=false + +% Column alignment +% ~~~~~~~~~~~~~~~~ +% +% (for typesetting with variable width fonts) +% +% ``columns=[c|l|r] <alignment>`` +% <alignment> in [fixed, flexible, spaceflexible, or fullflexible] +% The optional c, l, or r controls the horizontal orientation of smallest +% output units (keywords, identifiers, etc.). +% +% default: [c]fixed +% +% ``basewidth={fixed, flexible}`` +% sets the width of a single character box for fixed and flexible column +% mode (both to the same value or individually). +% +% default: {0.6em,0.45em} +% +% :: + +\lstset{columns=fullflexible, basewidth={0.5em,0.4em}} + +% .. _listings.pdf: +% ftp://dante.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf Added: trunk/sandbox/stylesheets/listings-tex-options.sty =================================================================== --- trunk/sandbox/stylesheets/listings-tex-options.sty 2009-02-23 16:03:50 UTC (rev 5871) +++ trunk/sandbox/stylesheets/listings-tex-options.sty 2009-02-24 11:08:08 UTC (rev 5872) <at> <at> -0,0 +1,130 <at> <at> +% Settings for the listings package with LaTeX +% ============================================ +% +% :Author: Günter Milde +% :Contact: milde <at> users.berlios.de +% :Revision: $Revision: 5534 $ +% :Date: $Date: 2005-06-28$ +% :Copyright: © 2007, 2009 G. Milde, +% Released without warranties or conditions of any kind +% under the terms of the Apache License, Version 2.0 +% http://www.apache.org/licenses/LICENSE-2.0 +% +% To use this pass the +% ``--stylesheet=listings-tex-options.sty --literal-block-env=lstlisting`` +% options to ``rst2latex.py``. +% +% For full documentation see listings.pdf_. +% +% Of course, we need to load the listings package itself:: + +\RequirePackage{listings} + +% In a document with lots of lists and listings, separating paragraphs by +% vertical seems appropriate:: + +\RequirePackage{parskip} + +% load hyperref with blue citation colour:: + +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue] +{hyperref} + +% In the References/Bibliography section, +% avoid holes in the title due to block alignment:: + +\renewcommand{\titlereference}[1]{\raggedright\textsl{#1}} + +% Omit the auto-inserted "References" heading, to be compatible with HTML +% output also if use latex references is set:: + +\AtBeginDocument{\renewcommand{\refname}{\vspace{-2em}}} + +% Font settings +% ~~~~~~~~~~~~~ +% +% Textfont:: + +% \RequirePackage{mathptmx} % Times +\RequirePackage{mathpazo} % Palatino + +% We need a "rich" monospaced font. `txfonts`' typewriter font comes +% with bold, slanted, and small-caps variants and without the problems of +% `txfonts`' math fonts:: + +\renewcommand{\ttdefault}{txtt} + +% Default language +% ~~~~~~~~~~~~~~~~ +% +% Highlight literal blocks as TeX:: + +\lstset{language=[LaTeX]TeX} + +% pre-load the language:: + +\lstloadlanguages{[LaTeX]TeX} % comma separated list of languages + +% Style +% ~~~~~ +% +% Typeface settings:: + +\lstset{ + basicstyle=\ttfamily, % print whole listing in tt + % basicstyle=\ttfamily\small, + keywordstyle={}, % do not highlight keywords + % identifierstyle=\slshape, % macros that are not keywords, args + commentstyle=\rmfamily\itshape, % italic comments + % stringstyle=\ttfamily, % typewriter type for strings + % texcsstyle=\slshape, +} + +% Visible whitespace:: + +\lstset{showstringspaces=false} % no visible spaces in strings +%\lstset{showspaces=true, +% showtabs=true, +% tab=\rightarrowfill} + +% Line numbers:: + +%\lstset{numbers=left, numberstyle=\tiny, stepnumber=2, numbersep=5pt} + +% Frames around listings:: + +%\lstset{frame=single} + + +% Extended characters in listings:: + +%extendedchars=true +%extendedchars=false + +% Column alignment +% ~~~~~~~~~~~~~~~~ +% +% (for typesetting with variable width fonts) +% +% ``columns=[c|l|r] <alignment>`` +% <alignment> in [fixed, flexible, spaceflexible, or fullflexible] +% +% The optional c, l, or r controls the horizontal orientation of smallest +% output units (keywords, identifiers, etc.). +% +% default: [c]fixed +% +% ``basewidth={fixed, flexible}`` +% .. +% +% sets the width of a single character box for fixed and flexible column +% mode (both to the same value or individually). +% +% default: {0.6em,0.45em} +% +% Free spacing for comments:: + +\lstset{columns=fullflexible, basewidth={0.5em,0.4em}} + +% .. _listings.pdf: +% ftp://dante.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Docutils-checkins mailing list Docutils-checkins <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/docutils-checkins
RSS Feed