From 0ab970fa30912a440c46df4f7aeac1fe990e13f3 Mon Sep 17 00:00:00 2001 From: milde Date: Fri, 30 Jan 2009 13:37:26 +0000 Subject: latex2e writer: backwards compatible implementation of failsave custom roles git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5862 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../functional/input/data/custom_roles_latex.txt | 28 ++++++++++++++++++++++ docutils/test/functional/input/data/latex2e.txt | 25 ------------------- .../test/functional/input/data/option_lists.txt | 18 ++++++++++++++ 3 files changed, 46 insertions(+), 25 deletions(-) create mode 100644 docutils/test/functional/input/data/custom_roles_latex.txt delete mode 100644 docutils/test/functional/input/data/latex2e.txt create mode 100644 docutils/test/functional/input/data/option_lists.txt (limited to 'docutils/test/functional/input/data') diff --git a/docutils/test/functional/input/data/custom_roles_latex.txt b/docutils/test/functional/input/data/custom_roles_latex.txt new file mode 100644 index 000000000..cc423fcf4 --- /dev/null +++ b/docutils/test/functional/input/data/custom_roles_latex.txt @@ -0,0 +1,28 @@ +Custom Roles in LaTeX +--------------------- + +* Role names and class arguments are are converted to conform to the regular + expression ``[a-z][-a-z0-9]*`` (all non-conforming characters are replaced + by a hyphen, all letters are downcased). + + 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{\docutilsrolelarge}[1]{{\large #1}} + \makeatletter + \@namedef{docutilsrolesmall-caps}{\textsc} + \@namedef{docutilsrolecustom4}{\textbf} + \makeatother + + :custom4:`Interpreted Text` in large, bold, small-caps. diff --git a/docutils/test/functional/input/data/latex2e.txt b/docutils/test/functional/input/data/latex2e.txt deleted file mode 100644 index 223831c16..000000000 --- a/docutils/test/functional/input/data/latex2e.txt +++ /dev/null @@ -1,25 +0,0 @@ -Some Tests for the LaTeX2e Writer -================================= - -These tests have been written to exercise some unusual combinations of -syntax elements which may cause trouble for the LaTeX writer but do -not need to be tested with other writers (e.g. the HTML writer). - -This file is user by the standalone_rst_latex test. - -Option lists -============ - -The LaTeX-2e description environment is used for definition lists. -The definition is continued on the same line as the term, this should -not happen if a option-list is at the top of the definition. - -If the option list is not at the first element in the definition, it -is contained in a quote - - --help show help - -v verbose - -In a definition list: - --help show help - -v verbose diff --git a/docutils/test/functional/input/data/option_lists.txt b/docutils/test/functional/input/data/option_lists.txt new file mode 100644 index 000000000..285143244 --- /dev/null +++ b/docutils/test/functional/input/data/option_lists.txt @@ -0,0 +1,18 @@ +.. This file is used by the standalone_rst_latex test. + +Option lists +------------ + +The LaTeX-2e description environment is used for definition lists. +The definition is continued on the same line as the term, this should +not happen if a option-list is at the top of the definition. + +If the option list is not at the first element in the definition, it +is contained in a quote + + --help show help + -v verbose + +In a definition list: + --help show help + -v verbose -- cgit v1.2.1