git.iko.soy/typeable/pandoc
on master help sign in
Use ` as default character for \verb in LaTeX output.

If ` is in the content to be escaped, another symbol will be used as before. git-svn-id: https://pandoc.googlecode.com/svn/trunk@806 788f1e2b-df1e-0410-8736-df70ead52e1b

commit4283ce3662cbb4b9d3165aef40455203ae106c47 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 27 Jul 2007, 22:52 (19 years ago) parent56016a9
2 files changed+7−7
src/Text/Pandoc/Writers/LaTeX.hs+1−1 tests/writer.latex+6−6
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -216,7 +216,7 @@ inlineToLaTeX (Subscript lst) = do
216216 return $ "\\textsubscript{" ++ contents ++ "}"
217217inlineToLaTeX (Code str) = return $ "\\verb" ++ [chr] ++ stuffing ++ [chr]
218218 where stuffing = str
219− chr = ((enumFromTo '!' '~') \\ stuffing) !! 0
219+ chr = (('`':(enumFromTo '!' '~')) \\ stuffing) !! 0
220220inlineToLaTeX (Quoted SingleQuote lst) = do
221221 contents <- inlineListToLaTeX lst
222222 let s1 = if (not (null lst)) && (isQuoted (head lst)) then "\\," else ""
tests/writer.latex+6−6
@@ -412,7 +412,7 @@ So is \textbf{\emph{this}} word.
412412
413413So is \textbf{\emph{this}} word.
414414
415−This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!<html>!.
415+This is code: \verb`>`, \verb`$`, \verb`\`, \verb`\$`, \verb`<html>`.
416416
417417\sout{This is \emph{strikeout}.}
418418
@@ -434,7 +434,7 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
434434
435435`He said, ``I want to go.''\,' Were you alive in the 70's?
436436
437−Here is some quoted `\verb!code!' and a ``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
437+Here is some quoted `\verb`code`' and a ``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
438438
439439Some dashes: one---two---three---four---five.
440440
@@ -460,9 +460,9 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
460460These shouldn't be math:
461461
462462\begin{itemize}
463−\item To get the famous equation, write \verb!$e = mc^2$!.
463+\item To get the famous equation, write \verb`$e = mc^2$`.
464464\item \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is emphasized.)
465−\item Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
465+\item Escaped \verb`$`: \$73 \emph{this should be emphasized} 23\$.
466466\end{itemize}
467467Here's a LaTeX table:
468468
@@ -603,7 +603,7 @@ An e-mail address: \href{mailto:nobody@nowhere.net}{nobody@nowhere.net}
603603Blockquoted: \href{http://example.com/}{http://example.com/}
604604
605605\end{quote}
606−Auto-links should not occur here: \verb!<http://example.com/>!
606+Auto-links should not occur here: \verb`<http://example.com/>`
607607
608608\begin{verbatim}
609609or here: <http://example.com/>
@@ -629,7 +629,7 @@ Subsequent blocks are indented to show that they belong to the footnote (as with
629629\begin{verbatim}
630630 { <code> }
631631\end{verbatim}
632−If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should \emph{not} be a footnote reference, because it contains a space.[\^{}my note] Here is an inline note.\footnote{This is \emph{easier} to type. Inline notes may contain \href{http://google.com}{links} and \verb!]! verbatim characters, as well as [bracketed text].}
632+If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.} This should \emph{not} be a footnote reference, because it contains a space.[\^{}my note] Here is an inline note.\footnote{This is \emph{easier} to type. Inline notes may contain \href{http://google.com}{links} and \verb`]` verbatim characters, as well as [bracketed text].}
633633
634634\begin{quote}
635635Notes can go in quotes.\footnote{In quote.}