\documentclass[a4paper]{article} % generated by Docutils \usepackage{fixltx2e} % LaTeX patches, \textsubscript \usepackage{cmap} % fix search and cut-and-paste in Acrobat \usepackage{ifthen} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \setcounter{secnumdepth}{0} %%% 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 % fieldlist environment \ifthenelse{\isundefined{\DUfieldlist}}{ \newenvironment{DUfieldlist}% {\quote\description} {\enddescription\endquote} }{} % hyperlinks: \ifthenelse{\isundefined{\hypersetup}}{ \usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} \urlstyle{same} % normal text font (alternatives: tt, rm, sf) }{} \hypersetup{ pdftitle={Character tests}, } %%% Title Data \title{\phantomsection% Character tests% \label{character-tests}} \author{} \date{} %%% Body \begin{document} \maketitle The LaTeX Info pages lists under \textquotedbl{}2.18 Special Characters\textquotedbl{} % \begin{quote} The following characters play a special role in LaTeX and are called \textquotedbl{}special printing characters\textquotedbl{}, or simply \textquotedbl{}special characters\textquotedbl{}. % \begin{quote} \# \$ \% \& \textasciitilde{} \_ \textasciicircum{} \{ \} \end{quote} Note: the backslash will not be displayed, it is a \texttt{\textbackslash{}} to the blank. \end{quote} The special chars verbatim: % \begin{quote}{\ttfamily \raggedright \noindent \#~\$~\%~\&~\textasciitilde{}~\_~\textasciicircum{}~\textbackslash{}~\{~\} } \end{quote} \section{bracketts in lists% \label{bracketts-in-lists}% } LaTeX has some special characters in certain cases, e.g. \# is LaTeX's macro argument chracter. Bracketts also have some meaning in macros, but need(ed) no special treatment up to now. \newcounter{listcnt0} \begin{list}{\arabic{listcnt0}.} { \usecounter{listcnt0} \setlength{\rightmargin}{\leftmargin} } \item {[}Advanced{]} test from dave. \newcounter{listcnt1} \begin{list}{\arabic{listcnt1}.} { \usecounter{listcnt1} \setlength{\rightmargin}{\leftmargin} } \item The bracketts don't show up. They are in TeX file, but they're missing in PDF and DVI. Probably because in LaTeX % \begin{quote}{\ttfamily \raggedright \noindent \textbackslash{}begin\{itemize\}\\ \textbackslash{}item~one~is~plain.\\ \textbackslash{}item~{[}two{]}~two~becomes~bold.\\ \textbackslash{}end\{itemize\} } \end{quote} \item Numbering {[}is{]} also missing for the \textquotedbl{}Advanced\textquotedbl{} test case above, not here in this line. \item Simply escaping the {[}{]}'s with a backslash in the LaTeX file puts \textquotedbl{}Advanced\textquotedbl{} centered emphasized on a separate line. But the \textquotedbl{}1.\textquotedbl{} is displayed then. \item Using LaTeX's enumerate environment instead of docutils's custom list environment for the list does not work too. \end{list} \end{list} \emph{Fix} append \textquotedbl{}\{\}\textquotedbl{} to the item command, i.e. % \begin{quote}{\ttfamily \raggedright \noindent \textbackslash{}item~\{\}~{[}Advanced{]} } \end{quote} \section{double back qoutes field list names% \label{double-back-qoutes-field-list-names}% } The \emph{double back qoutes} in the follwing example are ignored, i.e. they are still \emph{double back quotes} in TeX. Example % \begin{quote} % \begin{DUfieldlist} \item[{The \texttt{lambda} Operator:}] A metafunction which transforms a lambda expression into a corresponding metafunction class. \end{DUfieldlist} \end{quote} This is not writer but reader specific. \section{hash \# in section title% \label{hash-in-section-title}% } with pdflatex. \section{fontencodings% \label{fontencodings}% } In T1 literal text double hyphens and angle bracketts need help to remain two characters: % \begin{quote}{\ttfamily \raggedright \noindent <{}<~-{}-~>{}> } \end{quote} non literal \textquotedbl{}<< -{}- >>\textquotedbl{}. \section{with context% \label{with-context}% } also \emph{square brackets} {[}{]} and \emph{spaces} (after macros) need special care. Compare the items in the following lists: % \begin{itemize} \item simple item \item {[}bracketed{]} item \end{itemize} % \begin{description} \item[{simple}] \leavevmode description term \item[{{[}bracketed{]}}] \leavevmode description term \end{description} The OT1 font-encoding misses some chars: % \begin{quote}{\ttfamily \raggedright \noindent <~|~> } \end{quote} come out as % \begin{quote} < | > \end{quote} \end{document}