File: classes_latex.txt

package info (click to toggle)
python-docutils 0.14%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,976 kB
  • sloc: python: 44,718; lisp: 14,476; xml: 1,782; sh: 167; makefile: 150
file content (87 lines) | stat: -rw-r--r-- 2,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
class handling
--------------

This section tests class handling for block level elements by the LaTeX
writer. See the input file ``classes_latex.txt`` for the raw LaTeX code used
to style the examples.

An "epigraph" directive is exported as "quote" wrapped in a "DUclass"
environment. Here, it is styled by a "DUCLASSepigraph" environment
redefining the "quote" environment as "minipage":

.. raw:: latex

   \newcommand*{\DUCLASSepigraph}{%
     \renewenvironment{quote}{\vspace{1em}
                              \footnotesize\hfill{}%
                              \begin{minipage}{0.4\columnwidth}}%
                             {\end{minipage}\vskip\baselineskip}}

.. epigraph::

   Do not play this piece fast. It is never right to play *Ragtime* fast.

   -- Scott Joplin

Raw latex is also used to style the following lists: "DUCLASSenumerateitems"
redefines "itemize" as "enumerate", "DUCLASSrules" draws horizontal lines
above and below. 

.. raw:: latex

   \newcommand*{\DUCLASSenumerateitems}{%
     \renewenvironment{itemize}{\begin{enumerate}}%
                               {\end{enumerate}}%
   }

   \newenvironment{DUCLASSrules}%
                  {\noindent\rule[0.5ex]{1\columnwidth}{1pt}}%
                  {\noindent\rule[0.5ex]{1\columnwidth}{1pt}}

An "enumerated" bullet list:

.. class::  enumerateItems

* item
* next item
* third item

A list with lines above and below:

.. class:: rules

* item
* next item
    
A normal bullet list is kept unchanged by the above redefinitions:

* item
* next item
* third item

A container wraps several elements in a common "class wrapper". Here, we use
it to set 2 paragraphs and a list in small caps:

.. raw:: latex

   \newcommand*{\DUCLASSscshape}{\scshape}

.. container:: scshape

   paragraph 1

   paragraph 2

   * bullet list
   * still bullet list


A right-aligned line-block. Alignment handling is built into the latex
writer for image, table, and line block elements.

.. class:: align-right

| Max Mustermann
| Waldstr. 22
| D 01234 Testdorf
| Tel.: 0123/456789