diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-21 22:39:07 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-30 05:37:00 +0300 |
commit | f3e8274d0425b3bf7a2459a2d88af585b491507f (patch) | |
tree | 91ec28f8ec2b3b63114ec2f442cc4fe04a45caf5 /tests | |
parent | 34c6ff1f602cefa6c68af096a69bd1483e613606 (diff) | |
download | pandoc-f3e8274d0425b3bf7a2459a2d88af585b491507f.tar.gz |
LaTeX Reader: check for block-level newcommand aliases in blockCommand
Diffstat (limited to 'tests')
-rw-r--r-- | tests/latex-reader.latex | 19 | ||||
-rw-r--r-- | tests/latex-reader.native | 6 |
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/latex-reader.latex b/tests/latex-reader.latex index 2ebdfed99..0e5983d6a 100644 --- a/tests/latex-reader.latex +++ b/tests/latex-reader.latex @@ -845,4 +845,23 @@ indented. \$ \% \& \# \_ \{ \} +\section{Block newcommands} + +See e.g. issues #1866, #1835 + +\newcommand{\FIG}[3]{ + \begin{figure}[h!] + \centering + \includegraphics[width=#2\columnwidth,angle=0]{#1} + \caption{#3} + \label{fig:#1} + \end{figure} +} + +\newcommand{\separator}{\vspace{4em}} + +\separator + +\FIG{lalune.jpg}{0.5}{Test caption} + \end{document} diff --git a/tests/latex-reader.native b/tests/latex-reader.native index abc4b05a7..2cc6508de 100644 --- a/tests/latex-reader.native +++ b/tests/latex-reader.native @@ -372,4 +372,8 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa [[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] ,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."] ,Header 1 ("escaped-characters",[],[]) [Str "Escaped",Space,Str "characters"] -,Para [Str "$",Space,Str "%",Space,Str "&",Space,Str "#",Space,Str "_",Space,Str "{",Space,Str "}"]] +,Para [Str "$",Space,Str "%",Space,Str "&",Space,Str "#",Space,Str "_",Space,Str "{",Space,Str "}"] +,Header 1 ("block-newcommands",[],[]) [Str "Block",Space,Str "newcommands"] +,Para [Str "See",Space,Str "e.g.",Space,Str "issues",Space,Str "#1866,",Space,Str "#1835"] +,RawBlock (Format "latex") "\\vspace{4em}" +,Para [RawInline (Format "latex") "\\centering",Image [Str "Test",Space,Str "caption",Span ("",[],[("data-label","fig:lalune.jpg")]) []] ("lalune.jpg","fig:")]] |