3 # Author: engelbert gruber
4 # Contact: grubert@users.sourceforge.net
7 # Copyright: This module has been placed in the public domain.
10 Tests for latex2e writer.
13 from __init__
import DocutilsTestSupport
16 s
= DocutilsTestSupport
.LatexPublishTestSuite()
17 s
.generateTests(totest
)
22 \\documentclass[10pt,english]{article}
24 \\usepackage{shortvrb}
25 \\usepackage[latin1]{inputenc}
26 \\usepackage{tabularx}
27 \\usepackage{longtable}
28 \\setlength{\\extrarowheight}{2pt}
30 \\usepackage{graphicx}
32 \\usepackage{multirow}
33 \\usepackage[colorlinks,linkcolor=blue]{hyperref}
34 \\usepackage[a4paper,margin=2cm,nohead]{geometry}
35 %% generator Docutils: http://docutils.sourceforge.net/
36 \\newlength{\\admwidth}
37 \\addtolength{\\admwidth}{0.9\\textwidth}
38 \\newcommand{\\optionlistlabel}[1]{\\bf #1 \\hfill}
39 \\newenvironment{optionlist}[1]
41 {\\setlength{\\labelwidth}{#1}
42 \\setlength{\\rightmargin}{1cm}
43 \\setlength{\\leftmargin}{\\rightmargin}
44 \\addtolength{\\leftmargin}{\\labelwidth}
45 \\addtolength{\\leftmargin}{\\labelsep}
46 \\renewcommand{\\makelabel}{\\optionlistlabel}}
48 % begin: floats for footnotes tweaking.
49 \\setlength{\\floatsep}{0.5em}
50 \\setlength{\\textfloatsep}{\\fill}
51 \\addtolength{\\textfloatsep}{3em}
52 \\renewcommand{\\textfraction}{0.5}
53 \\renewcommand{\\topfraction}{0.5}
54 \\renewcommand{\\bottomfraction}{0.5}
55 \\setcounter{totalnumber}{50}
56 \\setcounter{topnumber}{50}
57 \\setcounter{bottomnumber}{50}
58 % end floats for footnotes
64 totest
['empty file'] = [
78 Document empty; must have contents.
86 totest
['tables_of_contents'] = [
88 .. contents:: Table of Contents
102 \\hypersetup{\npdftitle={Title 1}
108 \\hypertarget{table-of-contents}{}\\begin{center}
109 \\subsection*{Table of Contents}
111 \\pdfbookmark[0]{Table of Contents}{table-of-contents}
113 \\item \\href{#title-2}{Title 2}
121 %___________________________________________________________________________
123 \\hypertarget{title-2}{}
125 \\pdfbookmark[0]{Title 2}{title-2}
135 if __name__
== '__main__':
137 unittest
.main(defaultTest
='suite')