File: custom_roles_latex.txt

package info (click to toggle)
python-docutils 0.13.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,728 kB
  • ctags: 7,259
  • sloc: python: 43,776; lisp: 13,142; xml: 1,644; sh: 164; makefile: 151
file content (54 lines) | stat: -rw-r--r-- 1,505 bytes parent folder | download | duplicates (3)
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
Custom Roles in LaTeX
---------------------

* Role names and class arguments are converted to conform to the
  regular expression ``[a-z][-a-z0-9]*`` (letters are downcased,
  accents and similar decoration is stripped, non-conforming
  characters are replaced by a hyphen).

  Class arguments may contain numbers and hyphens, which need special
  treatment in LaTeX command names.

  .. role:: custom4
     :class: large custom4 small_caps custom.role custom\role

  :custom4:`Interpreted Text`

* With LaTeX, roles can be styled within the document using the `raw`
  directive.

  .. raw:: latex

    \newcommand{\DUrolelarge}[1]{{\large #1}}
    \makeatletter
    \@namedef{DUrolesmall-caps}{\textsc}
    \@namedef{DUrolecustom4}{\textbf}
    \makeatother

  :custom4:`Interpreted Text` in large, bold, small-caps.

* Custom roles can be based on standard roles:

  .. role:: custom-emphasis(emphasis)

  This is a :custom-emphasis:`customized emphasis text role`

  .. role:: custom-literal(literal)

  This is a :custom-literal:`customized literal text role`

  .. role:: custom-strong(strong)

  This is a :custom-strong:`customized strong text role`

  .. role:: custom-subscript(subscript)

  This is a :custom-subscript:`customized subscript text role`

  .. role:: custom-superscript(superscript)

  This is a :custom-superscript:`customized superscript text role`

  .. role:: custom-title-reference(title-reference)

  This is a :custom-title-reference:`customized title-reference text role`