Debian Codegraph @

test/functional/input/latex_literal_block.rst

raw
1 In LaTeX, literal blocks can be customized with the "literal-block-env"
2 setting. This test file exists to check if the LaTeX writer output compiles
3 and looks as expected.
4
5 Start with a plain literal block::
6
7 $\sin^2(x)$ and $\cos^2(x)$ equals one:
8
9 \[
10 \sin^2(x) + \cos^2(x) = 1 % for all x
11 \]
12
13 A latex "code-block" (set with "literal-block-env", if syntax
14 highlight is "none"):
15
16 .. code:: latex
17
18 $\sin^2(x)$ and $\cos^2(x)$ equals one:
19
20 \[
21 \sin^2(x) + \cos^2(x) = 1 % for all x
22 \]
23
24 A literal block in a table:
25
26 ==== =========== ====
27 test :: test
28
29 \sin^2 x
30 ==== =========== ====
31
32 A literal block in a table with auto-width columns:
33
34 .. table::
35 :widths: auto
36
37 ==== =========== ====
38 test :: test
39
40 \sin^2 x
41 ==== =========== ====
42
43 .. note:: A literal block in an admonition::
44
45 \sin^2 x
46
47 .. sidebar:: Literal Block in a Sidebar
48
49 ::
50
51 \sin^2 x
52
53 .. role:: custom
54 .. role:: custom-role
55
56 Parsed literal block with inline markup and leading whitespace:
57
58 .. parsed-literal::
59
60 *emphasis*, **strong emphasis**, ``inline literals``,
61 standalone hyperlinks (http://www.python.org),
62 internal_ and external_ hyperlinks,
63 _`internal` hyperlink targets,
64 images via substitution references (|example|),
65 footnote references [*]_,
66 citation references ([CIT2002]_), and more.
67
68 Here are some explicit interpreted text roles:
69 a PEP reference (:PEP:`287`),
70 an RFC reference (:RFC:`2822`),
71 an abbreviation (:ab:`abb.`), an acronym (:ac:`reST`),
72 code (:code:`print "hello world"`),
73 maths :math:`\sin^2(x)`,
74 :sub:`subscript` and :sup:`superscript`,
75 :custom:`custom` :custom-role:`roles`, and explicit roles for
76 :title:`Docutils`' :emphasis:`standard` :strong:`inline` :literal:`markup`.
77
78 .. [*] This footnote is referenced in a `parsed literal` block.
79
80 It contains a literal block::
81
82 \sin^2 x
83
84 .. [CIT2002] Sample Citation, 2017.
85
86 .. _external: http://www.python.org/
87
88 .. |EXAMPLE| image:: ../../../docs/user/rst/images/biohazard.png