diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lhs-test.latex | 32 | ||||
-rw-r--r-- | tests/lhs-test.latex+lhs | 32 | ||||
-rw-r--r-- | tests/writer.context | 68 | ||||
-rw-r--r-- | tests/writer.latex | 32 | ||||
-rw-r--r-- | tests/writers-lang-and-dir.context | 52 | ||||
-rw-r--r-- | tests/writers-lang-and-dir.latex | 32 |
6 files changed, 87 insertions, 161 deletions
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex index 4eed48b19..0dfe323a9 100644 --- a/tests/lhs-test.latex +++ b/tests/lhs-test.latex @@ -22,32 +22,14 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\makeatletter -\@ifpackageloaded{hyperref}{}{% -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -} -\@ifpackageloaded{color}{ - \PassOptionsToPackage{usenames,dvipsnames}{color} -}{% - \usepackage[usenames,dvipsnames]{color} -} -\makeatother +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref \hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={}, - pdftitle={}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0} - } + unicode=true, colorlinks=true, + citecolor=black, + urlcolor=black, + linkcolor=black, + pdfborder={0 0 0}} \urlstyle{same} % don't use monospace font for urls \usepackage{color} \usepackage{fancyvrb} diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs index 21219e99a..b025da64b 100644 --- a/tests/lhs-test.latex+lhs +++ b/tests/lhs-test.latex+lhs @@ -22,32 +22,14 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\makeatletter -\@ifpackageloaded{hyperref}{}{% -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -} -\@ifpackageloaded{color}{ - \PassOptionsToPackage{usenames,dvipsnames}{color} -}{% - \usepackage[usenames,dvipsnames]{color} -} -\makeatother +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref \hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={}, - pdftitle={}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0} - } + unicode=true, colorlinks=true, + citecolor=black, + urlcolor=black, + linkcolor=black, + pdfborder={0 0 0}} \urlstyle{same} % don't use monospace font for urls \usepackage{listings} \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} diff --git a/tests/writer.context b/tests/writer.context index 2ae763771..a2427b363 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -1,27 +1,30 @@ -\startmode[*mkii] - \enableregime[utf-8] - \setupcolors[state=start] -\stopmode - % Enable hyperlinks -\setupinteraction[state=start, color=middleblue] - -\setuppapersize [letter][letter] -\setuplayout [width=middle, backspace=1.5in, cutspace=1.5in, - height=middle, topspace=0.75in, bottomspace=0.75in] - -\setuppagenumbering[location={footer,center}] - -\setupbodyfont[11pt] - +\setupinteraction + [state=start, + style=normal, + color=black, + contrastcolor=black, + title=Pandoc Test Suite, + author=John MacFarlane; Anonymous] +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + +\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes] % use microtypography +\setupalign[hz,hanging] +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted +\setupbodyfont[mainfont] \setupwhitespace[medium] -\setuphead[chapter] [style=\tfd] -\setuphead[section] [style=\tfc] -\setuphead[subsection] [style=\tfb] -\setuphead[subsubsection][style=\bf] +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] -\setuphead[chapter, section, subsection, subsubsection][number=no] +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] \definedescription [description] @@ -35,24 +38,19 @@ \setupthinrules[width=15em] % width of horizontal rules -\setupdelimitedtext - [blockquote] - [before={\blank[medium]}, - after={\blank[medium]}, - indentnext=no, - ] +\setuphead[title][ + style={\tfd\raggedcenter}, + before={\startalignment[middle]}, + after={ + \smallskip + {\tfa John MacFarlane\crlf Anonymous} + \smallskip + {\tfa July 17, 2006} + \bigskip\stopalignment}] \starttext -\startalignment[center] - \blank[2*big] - {\tfd Pandoc Test Suite} - \blank[3*medium] - {\tfa John MacFarlane\crlf Anonymous} - \blank[2*medium] - {\tfa July 17, 2006} - \blank[3*medium] -\stopalignment +\title{Pandoc Test Suite} This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite. diff --git a/tests/writer.latex b/tests/writer.latex index 013f2c342..32f200a27 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -22,32 +22,14 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\makeatletter -\@ifpackageloaded{hyperref}{}{% -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -} -\@ifpackageloaded{color}{ - \PassOptionsToPackage{usenames,dvipsnames}{color} -}{% - \usepackage[usenames,dvipsnames]{color} -} -\makeatother +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref \hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={John MacFarlane; Anonymous}, - pdftitle={Pandoc Test Suite}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0} - } + unicode=true, pdftitle={Pandoc Test Suite}, pdfauthor={John MacFarlane; Anonymous}, colorlinks=true, + citecolor=black, + urlcolor=black, + linkcolor=black, + pdfborder={0 0 0}} \urlstyle{same} % don't use monospace font for urls \usepackage{fancyvrb} \VerbatimFootnotes % allows verbatim text in footnotes diff --git a/tests/writers-lang-and-dir.context b/tests/writers-lang-and-dir.context index 244bd76b1..477b808a6 100644 --- a/tests/writers-lang-and-dir.context +++ b/tests/writers-lang-and-dir.context @@ -1,27 +1,28 @@ -\startmode[*mkii] - \enableregime[utf-8] - \setupcolors[state=start] -\stopmode - % Enable hyperlinks -\setupinteraction[state=start, color=middleblue] - -\setuppapersize [letter][letter] -\setuplayout [width=middle, backspace=1.5in, cutspace=1.5in, - height=middle, topspace=0.75in, bottomspace=0.75in] - -\setuppagenumbering[location={footer,center}] - -\setupbodyfont[11pt] - +\setupinteraction + [state=start, + style=normal, + color=black, + contrastcolor=black] +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + +\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=yes] % use microtypography +\setupalign[hz,hanging] +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted +\setupbodyfont[mainfont] \setupwhitespace[medium] -\setuphead[chapter] [style=\tfd] -\setuphead[section] [style=\tfc] -\setuphead[subsection] [style=\tfb] -\setuphead[subsubsection][style=\bf] +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] -\setuphead[chapter, section, subsection, subsubsection][number=no] +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] \definedescription [description] @@ -35,12 +36,11 @@ \setupthinrules[width=15em] % width of horizontal rules -\setupdelimitedtext - [blockquote] - [before={\blank[medium]}, - after={\blank[medium]}, - indentnext=no, - ] +\setuphead[title][ + style={\tfd\raggedcenter}, + before={\startalignment[middle]}, + after={ + \bigskip\stopalignment}] \starttext diff --git a/tests/writers-lang-and-dir.latex b/tests/writers-lang-and-dir.latex index d37851df7..93b9ceeb5 100644 --- a/tests/writers-lang-and-dir.latex +++ b/tests/writers-lang-and-dir.latex @@ -22,32 +22,14 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\makeatletter -\@ifpackageloaded{hyperref}{}{% -\ifxetex - \usepackage[setpagesize=false, % page size defined by xetex - unicode=false, % unicode breaks when used with xetex - xetex]{hyperref} -\else - \usepackage[unicode=true]{hyperref} -\fi -} -\@ifpackageloaded{color}{ - \PassOptionsToPackage{usenames,dvipsnames}{color} -}{% - \usepackage[usenames,dvipsnames]{color} -} -\makeatother +\usepackage{hyperref} +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref \hypersetup{breaklinks=true, - bookmarks=true, - pdfauthor={}, - pdftitle={}, - colorlinks=true, - citecolor=blue, - urlcolor=blue, - linkcolor=magenta, - pdfborder={0 0 0} - } + unicode=true, colorlinks=true, + citecolor=black, + urlcolor=black, + linkcolor=black, + pdfborder={0 0 0}} \urlstyle{same} % don't use monospace font for urls \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[shorthands=off,ngerman,british,ngerman,spanish,french,main=english]{babel} |