test/files/test.latex in RbST-0.5.1 vs test/files/test.latex in RbST-0.6.0
- old
+ new
@@ -1,12 +1,12 @@
\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{alltt}
\usepackage{graphicx}
\usepackage{multirow}
\setcounter{secnumdepth}{0}
\usepackage{longtable,ltcaption,array}
\setlength{\extrarowheight}{2pt}
@@ -27,11 +27,11 @@
\providecommand*{\DUprovidelength}[2]{
\ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
}
% docinfo (width of docinfo table)
-\DUprovidelength{\DUdocinfowidth}{0.9\textwidth}
+\DUprovidelength{\DUdocinfowidth}{0.9\linewidth}
% fieldlist environment
\ifthenelse{\isundefined{\DUfieldlist}}{
\newenvironment{DUfieldlist}%
{\quote\description}
@@ -82,29 +82,31 @@
}{}
% titlereference role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
+% character width in monospaced font
+\newlength{\ttemwidth}
+\settowidth{\ttemwidth}{\ttfamily M}
+
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+ \usepackage{bookmark}
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
\hypersetup{
pdftitle={The reStructuredText Cheat Sheet: Syntax Reminders},
pdfauthor={David Goodger <goodger@python.org>}
}
-%%% Title Data
-\title{\phantomsection%
- The \href{http://docutils.sf.net/rst.html}{reStructuredText} Cheat Sheet: Syntax Reminders%
+%%% Body
+\begin{document}
+\title{The \href{http://docutils.sf.net/rst.html}{reStructuredText} Cheat Sheet: Syntax Reminders%
\label{the-restructuredtext-cheat-sheet-syntax-reminders}}
\author{}
\date{}
-
-%%% Body
-\begin{document}
\maketitle
% Docinfo
\begin{center}
\begin{tabularx}{\DUdocinfowidth}{lX}
@@ -141,38 +143,42 @@
\begin{longtable*}[c]{|p{0.389\DUtablewidth}|p{0.424\DUtablewidth}|}
\hline
Paragraphs are flush-left,
separated by blank lines.
-%
-\begin{quote}
+\begin{quote}
Block quotes are indented.
-
\end{quote}
& \multirow{2}{0.42\DUtablewidth}{%
Literal block, preceded by \textquotedbl{}::\textquotedbl{}:
-{\ttfamily \raggedright \noindent
+\begin{minipage}{8\ttemwidth}
+\begin{alltt}
Indented
-}
+\end{alltt}
+\end{minipage}
or:
-{\ttfamily \raggedright \noindent
->~Quoted
-}
+\begin{minipage}{8\ttemwidth}
+\begin{alltt}
+> Quoted
+\end{alltt}
+\end{minipage}
} \\
\cline{1-1}
-{\ttfamily \raggedright \noindent
->{}>{}>~print~'Doctest~block'\\
-Doctest~block
-}
+\begin{minipage}{25\ttemwidth}
+\begin{alltt}
+>>> print 'Doctest block'
+Doctest block
+\end{alltt}
+\end{minipage}
& \\
\hline
-\multicolumn{2}{|p{0.81\DUtablewidth}|}{
+\multicolumn{2}{|p{0.81\DUtablewidth}|}{%
\begin{DUlineblock}{0em}
\item[] Line blocks preserve line breaks \& indents. {[}new in 0.3.6{]}
\item[]
\begin{DUlineblock}{\DUlineblockindent}
\item[] Useful for addresses, verse, and adornment-free lists; long
@@ -206,60 +212,49 @@
\multicolumn{2}{c}{\hfill ... continued on next page} \\
\endfoot
\endlastfoot
Bullet list
- & %
+ &
\begin{itemize}
-
\item items begin with \textquotedbl{}-\textquotedbl{}, \textquotedbl{}+\textquotedbl{}, or \textquotedbl{}*\textquotedbl{}
-
\end{itemize}
\\
\hline
Enumerated list
- & \newcounter{listcnt0}
-\begin{list}{\arabic{listcnt0}.}
-{
-\usecounter{listcnt0}
-\setlength{\rightmargin}{\leftmargin}
-}
-
+ &
+\begin{enumerate}
\item items use any variation of \textquotedbl{}1.\textquotedbl{}, \textquotedbl{}A)\textquotedbl{}, and \textquotedbl{}(i)\textquotedbl{}
\item also auto-enumerated
-\end{list}
+\end{enumerate}
\\
\hline
Definition list
- & %
+ &
\begin{description}
\item[{Term is flush-left}] \leavevmode (\textbf{optional classifier})
-
Definition is indented, no blank line between
\end{description}
\\
\hline
Field list
- & %
+ &
\begin{DUfieldlist}
\item[{field name:}]
field body
-
\end{DUfieldlist}
\\
\hline
Option list
- & %
+ &
\begin{DUoptionlist}
-
\item[-o] at least 2 spaces between option \& description
-
\end{DUoptionlist}
\\
\hline
\end{longtable*}