1In LaTeX, literal blocks can be customized with the "literal-block-env"
2setting. This test file exists to check if the LaTeX writer output compiles
3and looks as expected.
4
5Start 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
13A latex "code-block" (set with "literal-block-env", if syntax
14highlight 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
24A literal block in a table:
25
26====  ===========  ====
27test  ::           test
28
29        \sin^2 x
30====  ===========  ====
31
32A 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.. role:: custom
48.. role:: custom-role
49
50Parsed literal block with inline markup and leading whitespace:
51
52.. parsed-literal::
53
54      *emphasis*, **strong emphasis**, ``inline literals``,
55   standalone hyperlinks (http://www.python.org),
56   internal_ and external_ hyperlinks,
57   _`internal` hyperlink targets,
58   images via substitution references (|example|),
59   footnote references [*]_,
60   citation references ([CIT2002]_), and more.
61
62      Here are some explicit interpreted text roles:
63   a PEP reference (:PEP:`287`),
64   an RFC reference (:RFC:`2822`),
65   an abbreviation (:ab:`abb.`), an acronym (:ac:`reST`),
66   code (:code:`print "hello world"`),
67   maths :math:`\sin^2(x)`,
68   :sub:`subscript` and :sup:`superscript`,
69   :custom:`custom` :custom-role:`roles`, and explicit roles for
70   :title:`Docutils`' :emphasis:`standard` :strong:`inline` :literal:`markup`.
71
72.. [*] This footnote is referenced in a `parsed literal` block.
73
74   It contains a literal block::
75
76     \sin^2 x
77
78.. [CIT2002] Sample Citation, 2017.
79
80.. _external: http://www.python.org/
81
82.. |EXAMPLE| image:: ../../../docs/user/rst/images/biohazard.png
83