diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2013-01-17 15:48:30 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2013-01-17 15:48:30 +0000 |
| commit | d50ae48c6bd935772929abdddc49f1bd5e607330 (patch) | |
| tree | 7d5ceb27d3fd5fe2e0fe805bce6d9df5afbef054 /test | |
| parent | d123ce247f5ed7d6047a73c244b459061d91a9eb (diff) | |
| download | docutils-d50ae48c6bd935772929abdddc49f1bd5e607330.tar.gz | |
Fix literal use of babel shorthands (straight quote, tilde, ...).
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7589 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/expected/cyrillic.tex | 12 | ||||
| -rw-r--r-- | test/functional/expected/latex_babel.tex | 61 | ||||
| -rw-r--r-- | test/functional/expected/standalone_rst_latex.tex | 28 | ||||
| -rw-r--r-- | test/functional/expected/standalone_rst_xetex.tex | 30 | ||||
| -rw-r--r-- | test/functional/expected/xetex-cyrillic.tex | 14 | ||||
| -rw-r--r-- | test/functional/input/cyrillic.txt | 6 | ||||
| -rw-r--r-- | test/functional/input/latex_babel.txt | 36 | ||||
| -rw-r--r-- | test/functional/tests/latex_babel.py | 10 | ||||
| -rw-r--r-- | test/functional/tests/latex_cyrillic.py | 3 | ||||
| -rw-r--r-- | test/functional/tests/xetex_cyrillic.py | 2 | ||||
| -rwxr-xr-x | test/test_writers/test_latex2e.py | 5 |
11 files changed, 160 insertions, 47 deletions
diff --git a/test/functional/expected/cyrillic.tex b/test/functional/expected/cyrillic.tex index 740241904..90dff86c3 100644 --- a/test/functional/expected/cyrillic.tex +++ b/test/functional/expected/cyrillic.tex @@ -37,28 +37,28 @@ \label{id1}% } -первый пример: "Здравствуй, мир!" +первый пример: «Здравствуй, мир!» \section{Title% \label{title}% } -\otherlanguage{english}{first example: "Hello world".} +\foreignlanguage{english}{first example: “Hello world”.} \section{Notes% \label{notes}% } -This example tests rendering of Latin and Cyrillic characters by the LaTeX +\foreignlanguage{english}{This example tests rendering of Latin and Cyrillic characters by the LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in text and -bookmarks. +bookmarks.} -To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref} +\foreignlanguage{english}{To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref} versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py} sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py} sets it to \texttt{'unicode=false'}. The recommended option for current -(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}. +(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.} \end{document} diff --git a/test/functional/expected/latex_babel.tex b/test/functional/expected/latex_babel.tex new file mode 100644 index 000000000..5f89f91d6 --- /dev/null +++ b/test/functional/expected/latex_babel.tex @@ -0,0 +1,61 @@ +\documentclass[a4paper]{article} +% generated by Docutils <http://docutils.sourceforge.net/> +\usepackage{fixltx2e} % LaTeX patches, \textsubscript +\usepackage{cmap} % fix search and cut-and-paste in Acrobat +\usepackage{ifthen} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[basque,esperanto,estonian,galician,ngerman,english]{babel} +\AtBeginDocument{\shorthandoff{.<>}} +\deactivatetilden % restore ~ in Galician +\makeatletter + \addto\extrasestonian{\bbl@deactivate{~}} +\makeatother +\makeatletter + \addto\extrasbasque{\bbl@deactivate{~}} +\makeatother + +%%% Custom LaTeX preamble +% PDF Standard Fonts +\usepackage{mathptmx} % Times +\usepackage[scaled=.90]{helvet} +\usepackage{courier} + +%%% User specified packages and stylesheets + +%%% Fallback definitions for Docutils-specific commands + +% hyperlinks: +\ifthenelse{\isundefined{\hypersetup}}{ + \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} + \urlstyle{same} % normal text font (alternatives: tt, rm, sf) +}{} + + +%%% Body +\begin{document} + +The \href{http://www.ctan.org/packages/babel}{babel} package introduces the concept of \textquotedbl{}shorthands\textquotedbl{}: additional +characters that introduce a latex macro. Most common is the active double +quote (\textquotedbl{}). Problematic is the tilde character (\textasciitilde{}) which is regularely used +for no-break spaces but redefined by some language definition files: + +English: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces + +\foreignlanguage{basque}{Basque: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces} + +\foreignlanguage{esperanto}{Esperanto: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces} + +\foreignlanguage{estonian}{Estonian: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces} + +\foreignlanguage{galician}{Galician: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces} + +\foreignlanguage{ngerman}{German: 'an' \textquotedbl{}active\textquotedbl{}-quote, \textasciicircum{}circumflex, and~no-break~spaces} + +Spanish: option clash with Galician! + +% .. class:: language-es +% +% Spanish: 'an' "active"-quote, ^circumflex, and no-break spaces + +\end{document} diff --git a/test/functional/expected/standalone_rst_latex.tex b/test/functional/expected/standalone_rst_latex.tex index 1ba0875ed..767db1c30 100644 --- a/test/functional/expected/standalone_rst_latex.tex +++ b/test/functional/expected/standalone_rst_latex.tex @@ -359,7 +359,7 @@ reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subti The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym -(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print "hello world"}}); a \textsubscript{subscript}; +(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript}; a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}’ \emph{standard} \textbf{inline} \texttt{markup}. @@ -701,7 +701,7 @@ A line block, like the following poem by Christian Morgenstern, can also be centre-aligned: \begin{DUlineblock}{0em} -\otherlanguage{ngerman}{\DUrole{align-center}{ +\foreignlanguage{ngerman}{\DUrole{align-center}{ \item[] \textbf{Die Trichter} \item[] \item[] Zwei Trichter wandeln durch die Nacht. @@ -742,7 +742,7 @@ a class attribute: % % \begin{quote} -\otherlanguage{french}{ +\foreignlanguage{french}{ ReStructuredText est un langage de balisage léger utilisé notamment dans la documentation du langage Python. } @@ -754,8 +754,8 @@ notamment dans la documentation du langage Python. } % \begin{quote}{\ttfamily \raggedright \noindent ->{}>{}>~print~'Python-specific~usage~examples;~begun~with~">{}>{}>"'\\ -Python-specific~usage~examples;~begun~with~">{}>{}>"\\ +>{}>{}>~print~'Python-specific~usage~examples;~begun~with~\textquotedbl{}>{}>{}>\textquotedbl{}'\\ +Python-specific~usage~examples;~begun~with~\textquotedbl{}>{}>{}>\textquotedbl{}\\ >{}>{}>~print~'(cut~and~pasted~from~interactive~Python~sessions)'\\ (cut~and~pasted~from~interactive~Python~sessions) } @@ -1512,7 +1512,7 @@ body row 3 \item A language-switching role: -Let’s count in German \otherlanguage{ngerman}{eins zwei drei}. +Let’s count in German \foreignlanguage{ngerman}{eins zwei drei}. \item A role with multiple class attributes, styled with raw directives: @@ -1525,14 +1525,14 @@ The following works in most browsers but does not validate \begin{quote}{\ttfamily \raggedright \noindent ..~raw::~html\\ ~\\ -~~<style~type="text/css"><!-{}-\\ +~~<style~type=\textquotedbl{}text/css\textquotedbl{}><!-{}-\\ ~~~.green~\{color:~green;\}\\ ~~~.sc~\{font-variant:~small-caps;\}\\ ~~~-{}-></style> } \end{quote} -\otherlanguage{british}{\DUrole{green}{\DUrole{sc}{British colourful text in small-caps}}}. +\foreignlanguage{british}{\DUrole{green}{\DUrole{sc}{British colourful text in small-caps}}}. \end{itemize} @@ -1821,7 +1821,7 @@ is contained in a quote These are all ASCII characters except a-zA-Z0-9 and space: -\texttt{!!!"{}"{}"\#\#\#\$\$\$\%\%\%\&\&\&'{}'{}'((()))***+++,{},{},-{}-{}-...///:::} +\texttt{!!!\textquotedbl{}\textquotedbl{}\textquotedbl{}\#\#\#\$\$\$\%\%\%\&\&\&'{}'{}'((()))***+++,{},{},-{}-{}-...///:::} \texttt{;;;<{}<{}<===>{}>{}>???@@@{[}{[}{[}\textbackslash{}\textbackslash{}\textbackslash{}{]}{]}{]}\textasciicircum{}\textasciicircum{}\textasciicircum{}\_\_\_`{}`{}`\{\{\{|||\}\}\}\textasciitilde{}\textasciitilde{}\textasciitilde{}} @@ -2521,7 +2521,7 @@ section, “Docutils System Messages”: {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104 \hyperlink{id28}{ -Undefined substitution referenced: "problematic". +Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2531,7 +2531,7 @@ Undefined substitution referenced: "problematic". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~391 \hyperlink{id46}{ -Unknown target name: "5". +Unknown target name: \textquotedbl{}5\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2541,7 +2541,7 @@ Unknown target name: "5". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~400 \hyperlink{id48}{ -Unknown target name: "nonexistent". +Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2551,7 +2551,7 @@ Unknown target name: "nonexistent". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~427 \hyperlink{id50}{ -Unknown target name: "hyperlink reference without a target". +Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2561,7 +2561,7 @@ Unknown target name: "hyperlink reference without a target". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~440 \hyperlink{id52}{ -Duplicate target name, cannot be used as a unique reference: "duplicate target names". +Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}. }} \end{document} diff --git a/test/functional/expected/standalone_rst_xetex.tex b/test/functional/expected/standalone_rst_xetex.tex index 0876e9bce..fc9a4768e 100644 --- a/test/functional/expected/standalone_rst_xetex.tex +++ b/test/functional/expected/standalone_rst_xetex.tex @@ -28,7 +28,7 @@ % Linux Libertine (free, wide coverage, not only for Linux) \setmainfont{Linux Libertine O} \setsansfont{Linux Biolinum O} -\setmonofont[HyphenChar=None]{DejaVu Sans Mono} +\setmonofont[HyphenChar=None,Scale=MatchLowercase]{DejaVu Sans Mono} %%% User specified packages and stylesheets @@ -358,7 +358,7 @@ reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subti The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an RFC reference (\href{http://www.faqs.org/rfcs/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym -(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print "hello world"}}); a \textsubscript{subscript}; +(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript}; a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}’ \emph{standard} \textbf{inline} \texttt{markup}. @@ -700,7 +700,7 @@ A line block, like the following poem by Christian Morgenstern, can also be centre-aligned: \begin{DUlineblock}{0em} -\otherlanguage{german}{\DUrole{align-center}{ +\foreignlanguage{german}{\DUrole{align-center}{ \item[] \textbf{Die Trichter} \item[] \item[] Zwei Trichter wandeln durch die Nacht. @@ -741,7 +741,7 @@ a class attribute: % % \begin{quote} -\otherlanguage{french}{ +\foreignlanguage{french}{ ReStructuredText est un langage de balisage léger utilisé notamment dans la documentation du langage Python. } @@ -753,8 +753,8 @@ notamment dans la documentation du langage Python. } % \begin{quote}{\ttfamily \raggedright \noindent ->>>~print~'Python-specific~usage~examples;~begun~with~">>>"'\\ -Python-specific~usage~examples;~begun~with~">>>"\\ +>>>~print~'Python-specific~usage~examples;~begun~with~\textquotedbl{}>>>\textquotedbl{}'\\ +Python-specific~usage~examples;~begun~with~\textquotedbl{}>>>\textquotedbl{}\\ >>>~print~'(cut~and~pasted~from~interactive~Python~sessions)'\\ (cut~and~pasted~from~interactive~Python~sessions) } @@ -1511,7 +1511,7 @@ body row 3 \item A language-switching role: -Let’s count in German \otherlanguage{german}{eins zwei drei}. +Let’s count in German \foreignlanguage{german}{eins zwei drei}. \item A role with multiple class attributes, styled with raw directives: @@ -1524,14 +1524,14 @@ The following works in most browsers but does not validate \begin{quote}{\ttfamily \raggedright \noindent ..~raw::~html\\ ~\\ -~~<style~type="text/css"><!--\\ +~~<style~type=\textquotedbl{}text/css\textquotedbl{}><!--\\ ~~~.green~\{color:~green;\}\\ ~~~.sc~\{font-variant:~small-caps;\}\\ ~~~--></style> } \end{quote} -\otherlanguage{british}{\DUrole{green}{\DUrole{sc}{British colourful text in small-caps}}}. +\foreignlanguage{british}{\DUrole{green}{\DUrole{sc}{British colourful text in small-caps}}}. \end{itemize} @@ -1632,7 +1632,7 @@ is contained in a quote These are all ASCII characters except a-zA-Z0-9 and space: -\texttt{!!!"""\#\#\#\$\$\$\%\%\%\&\&\&'''((()))***+++,,,---...///:::} +\texttt{!!!\textquotedbl{}\textquotedbl{}\textquotedbl{}\#\#\#\$\$\$\%\%\%\&\&\&'''((()))***+++,,,---...///:::} \texttt{;;;<<<===>>>???@@@{[}{[}{[}\textbackslash{}\textbackslash{}\textbackslash{}{]}{]}{]}\textasciicircum{}\textasciicircum{}\textasciicircum{}\_\_\_```\{\{\{|||\}\}\}\textasciitilde{}\textasciitilde{}\textasciitilde{}} @@ -2344,7 +2344,7 @@ section, “Docutils System Messages”: {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~104 \hyperlink{id28}{ -Undefined substitution referenced: "problematic". +Undefined substitution referenced: \textquotedbl{}problematic\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2354,7 +2354,7 @@ Undefined substitution referenced: "problematic". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~391 \hyperlink{id45}{ -Unknown target name: "5". +Unknown target name: \textquotedbl{}5\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2364,7 +2364,7 @@ Unknown target name: "5". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~400 \hyperlink{id47}{ -Unknown target name: "nonexistent". +Unknown target name: \textquotedbl{}nonexistent\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2374,7 +2374,7 @@ Unknown target name: "nonexistent". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~427 \hyperlink{id49}{ -Unknown target name: "hyperlink reference without a target". +Unknown target name: \textquotedbl{}hyperlink reference without a target\textquotedbl{}. }} \DUadmonition[system-message]{ @@ -2384,7 +2384,7 @@ Unknown target name: "hyperlink reference without a target". {\color{red}ERROR/3} in \texttt{functional/input/data/standard.txt}, line~440 \hyperlink{id51}{ -Duplicate target name, cannot be used as a unique reference: "duplicate target names". +Duplicate target name, cannot be used as a unique reference: \textquotedbl{}duplicate target names\textquotedbl{}. }} \end{document} diff --git a/test/functional/expected/xetex-cyrillic.tex b/test/functional/expected/xetex-cyrillic.tex index 945dad910..e711374c0 100644 --- a/test/functional/expected/xetex-cyrillic.tex +++ b/test/functional/expected/xetex-cyrillic.tex @@ -13,7 +13,7 @@ % Linux Libertine (free, wide coverage, not only for Linux) \setmainfont{Linux Libertine O} \setsansfont{Linux Biolinum O} -\setmonofont[HyphenChar=None]{DejaVu Sans Mono} +\setmonofont[HyphenChar=None,Scale=MatchLowercase]{DejaVu Sans Mono} %%% User specified packages and stylesheets @@ -37,28 +37,28 @@ \label{id1}% } -первый пример: "Здравствуй, мир!" +первый пример: «Здравствуй, мир!» \section{Title% \label{title}% } -\otherlanguage{english}{first example: "Hello world".} +\foreignlanguage{english}{first example: “Hello world”.} \section{Notes% \label{notes}% } -This example tests rendering of Latin and Cyrillic characters by the LaTeX +\foreignlanguage{english}{This example tests rendering of Latin and Cyrillic characters by the LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in text and -bookmarks. +bookmarks.} -To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref} +\foreignlanguage{english}{To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref} versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py} sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py} sets it to \texttt{'unicode=false'}. The recommended option for current -(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}. +(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.} \end{document} diff --git a/test/functional/input/cyrillic.txt b/test/functional/input/cyrillic.txt index 2696522ff..38de95383 100644 --- a/test/functional/input/cyrillic.txt +++ b/test/functional/input/cyrillic.txt @@ -10,15 +10,17 @@ Title first example: "Hello world". -.. class:: language-en - Notes ----- +.. class:: language-en + This example tests rendering of Latin and Cyrillic characters by the LaTeX and XeTeX writers. Check the compiled PDF for garbage characters in text and bookmarks. +.. class:: language-en + To work around a problem with Cyrillic in PDF-bookmarks in `hyperref` versions older than v6.79g 2009/11/20, the test caller ``latex_cyrillic.py`` sets ``hyperref_options`` to ``'unicode=true'`` while ``xetex_cyrillic.py`` diff --git a/test/functional/input/latex_babel.txt b/test/functional/input/latex_babel.txt new file mode 100644 index 000000000..b749ab69b --- /dev/null +++ b/test/functional/input/latex_babel.txt @@ -0,0 +1,36 @@ +The babel_ package introduces the concept of "shorthands": additional +characters that introduce a latex macro. Most common is the active double +quote ("). Problematic is the tilde character (~) which is regularely used +for no-break spaces but redefined by some language definition files: + +English: 'an' "active"-quote, ^circumflex, and no-break spaces + +.. class:: language-eu + +Basque: 'an' "active"-quote, ^circumflex, and no-break spaces + +.. class:: language-eo + +Esperanto: 'an' "active"-quote, ^circumflex, and no-break spaces + +.. class:: language-et + +Estonian: 'an' "active"-quote, ^circumflex, and no-break spaces + +.. class:: language-gl + +Galician: 'an' "active"-quote, ^circumflex, and no-break spaces + +.. class:: language-de + +German: 'an' "active"-quote, ^circumflex, and no-break spaces + +Spanish: option clash with Galician! + +.. + .. class:: language-es + + Spanish: 'an' "active"-quote, ^circumflex, and no-break spaces + + +.. _babel: http://www.ctan.org/packages/babel diff --git a/test/functional/tests/latex_babel.py b/test/functional/tests/latex_babel.py new file mode 100644 index 000000000..de109b71e --- /dev/null +++ b/test/functional/tests/latex_babel.py @@ -0,0 +1,10 @@ +# Source and destination file names. +test_source = "latex_babel.txt" +test_destination = "latex_babel.tex" + +# Keyword parameters passed to publish_file. +reader_name = "standalone" +parser_name = "rst" +writer_name = "latex" + +# Extra setting we need diff --git a/test/functional/tests/latex_cyrillic.py b/test/functional/tests/latex_cyrillic.py index 9003f1d4f..13dc7a496 100644 --- a/test/functional/tests/latex_cyrillic.py +++ b/test/functional/tests/latex_cyrillic.py @@ -13,3 +13,6 @@ settings_overrides['hyperref_options'] = 'unicode=true' settings_overrides['font_encoding'] = 'T1,T2A' settings_overrides['stylesheet'] = 'cmlgc' settings_overrides['language_code'] = 'ru' + +# use "smartquotes" transition: +settings_overrides['smart_quotes'] = True diff --git a/test/functional/tests/xetex_cyrillic.py b/test/functional/tests/xetex_cyrillic.py index f301ad564..7cc0533c6 100644 --- a/test/functional/tests/xetex_cyrillic.py +++ b/test/functional/tests/xetex_cyrillic.py @@ -11,3 +11,5 @@ settings_overrides['language_code'] = 'ru' # language to work around a problem with cyrillic in PDF-bookmarks in # hyperref versions < v6.79g 2009/11/20 settings_overrides['hyperref_options'] = 'unicode=false' +# use "smartquotes" transition: +settings_overrides['smart_quotes'] = True diff --git a/test/test_writers/test_latex2e.py b/test/test_writers/test_latex2e.py index a45366931..d7b6223f8 100755 --- a/test/test_writers/test_latex2e.py +++ b/test/test_writers/test_latex2e.py @@ -116,9 +116,9 @@ r"""\usepackage{ifthen} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish,english]{babel} -\addto\shorthandsspanish{\spanishdeactivate{."~<>}} +\AtBeginDocument{\shorthandoff{.<>}} """)) + r""" -Und damit \otherlanguage{spanish}{basta}! +Und damit \foreignlanguage{spanish}{basta}! \end{document} """], @@ -605,7 +605,6 @@ two stylesheets embedded in the header """], ] - if __name__ == '__main__': import unittest unittest.main(defaultTest='suite') |
