Use \textsubscr instead of \textsubscript for LaTeX subscript macro.

\textsubscript conflicts with a definition in the memoir class.
Resolves Issue #65.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1280 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2008-06-08 03:29:09 +00:00
parent cd38d4ae79
commit 3337b46e30
2 changed files with 6 additions and 6 deletions

View file

@ -257,9 +257,9 @@ inlineToLaTeX (Superscript lst) =
inlineToLaTeX (Subscript lst) = do
contents <- inlineListToLaTeX $ deVerb lst
-- oddly, latex includes \textsuperscript but not \textsubscript
-- so we have to define it:
addToHeader "\\newcommand{\\textsubscript}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}}"
return $ inCmd "textsubscript" contents
-- so we have to define it (using a different name so as not to conflict with memoir class):
addToHeader "\\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1}}}}"
return $ inCmd "textsubscr" contents
inlineToLaTeX (Code str) = do
st <- get
if stInNote st

View file

@ -5,7 +5,7 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
\usepackage[breaklinks=true]{hyperref}
\usepackage[normalem]{ulem}
\usepackage{enumerate}
@ -529,8 +529,8 @@ This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
Superscripts: a\textsuperscript{bc}d
a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
H\textsubscript{many of them}O.
Subscripts: H\textsubscr{2}O, H\textsubscr{23}O,
H\textsubscr{many of them}O.
These should not be superscripts or subscripts, because of the
unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b