Apply [ 125 ] respect automatic table column sizing also in html4css1.
[docutils.git] / docutils / test / functional / input / data / custom_roles.txt
blobbdad1a0b6b8a8c3be419bc6366b584a91f0f9599
1 Custom Roles
2 ------------
4 * A role based on an existing role.
6   .. role:: custom(literal)
8   :custom:`one` :custom:`two` :custom:`three`
10 * A new role.
12   .. role:: customnew
14   :customnew:`one two three`
16 * A role with class attribute.
18   .. role:: customclass
19      :class: special
21   :customclass:`interpreted text`
23 * A language-switching role:
25   .. role:: language-de
27   Let's count in German :language-de:`eins zwei drei`.
29 * A role with multiple class attributes, styled with raw directives:
31   .. role:: customx
32      :class: green sc language-en-GB
34   .. raw:: latex
36      \newcommand{\DUrolegreen}[1]{\textcolor{green}{#1}}
37      \newcommand{\DUrolesc}[1]{\textsc{#1}}
39   The following works in most browsers but does not validate
40   (``<style>`` is only allowed in the document head)::
42     .. raw:: html
44       <style type="text/css"><!--
45        .green {color: green;}
46        .sc {font-variant: small-caps;}
47        --></style>
49   :customx:`British colourful text in small-caps`.