aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorVasily Alferov <ya-ikmik2012@yandex.ru>2019-07-14 02:55:41 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2019-07-13 16:55:41 -0700
commitf6c92c7523a4070f13fbf193ef80ad7ac63f6693 (patch)
tree5e4afc7c98d7368780df2d868e0d0cf11cd7e048 /test/command
parent7bc9eab8465e16a13768834e49f124a3efbf29f4 (diff)
downloadpandoc-f6c92c7523a4070f13fbf193ef80ad7ac63f6693.tar.gz
Fix #4499: add mbox and hbox handling to LaTeX reader (#5586)
When `+raw_tex` is enabled, these are passed through literally. Otherwise, they are handled in a way that emulates LaTeX's behavior.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/4499.md87
1 files changed, 87 insertions, 0 deletions
diff --git a/test/command/4499.md b/test/command/4499.md
new file mode 100644
index 000000000..073f76c0e
--- /dev/null
+++ b/test/command/4499.md
@@ -0,0 +1,87 @@
+```
+% pandoc -f latex -t html
+\mbox{abc def} ghi
+^D
+<p>abc def ghi</p>
+```
+
+```
+% pandoc -f latex+raw_tex -t native
+\mbox{abc def}
+^D
+[Para [RawInline (Format "latex") "\\mbox{abc def}"]]
+```
+
+```
+% pandoc -f latex -t html
+abc \mbox{\textit{def ghi} jkl} mno
+^D
+<p>abc <em>def ghi</em> jkl mno</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \mbox{def \\ ghi} jkl
+^D
+<p>abc defghi jkl</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \mbox{def
+ghi}
+^D
+<p>abc def ghi</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \mbox{def \textit{ghi \\ jkl}
+mno} pqr
+^D
+<p>abc def <em>ghijkl</em> mno pqr</p>
+```
+
+```
+% pandoc -f latex -t html
+\hbox{abc def} ghi
+^D
+<p>abc def ghi</p>
+```
+
+```
+% pandoc -f latex+raw_tex -t native
+\hbox{abc def}
+^D
+[Para [RawInline (Format "latex") "\\hbox{abc def}"]]
+```
+
+```
+% pandoc -f latex -t html
+abc \hbox{\textit{def ghi} jkl} mno
+^D
+<p>abc <em>def ghi</em> jkl mno</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \hbox{def \\ ghi} jkl
+^D
+<p>abc defghi jkl</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \hbox{def
+ghi}
+^D
+<p>abc def ghi</p>
+```
+
+```
+% pandoc -f latex -t html
+abc \hbox{def \textit{ghi \\ jkl}
+mno} pqr
+^D
+<p>abc def <em>ghijkl</em> mno pqr</p>
+```