diff options
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/3681.md | 27 | ||||
-rw-r--r-- | test/command/3803.md | 10 | ||||
-rw-r--r-- | test/command/3804.md | 6 | ||||
-rw-r--r-- | test/command/html-read-figure.md | 45 | ||||
-rw-r--r-- | test/command/ifstrequal.md | 10 | ||||
-rw-r--r-- | test/command/macros.md | 17 |
6 files changed, 115 insertions, 0 deletions
diff --git a/test/command/3681.md b/test/command/3681.md new file mode 100644 index 000000000..d0805e820 --- /dev/null +++ b/test/command/3681.md @@ -0,0 +1,27 @@ +``` +% pandoc -f latex -t native +\newcommand{\cicd}{CI/CD\xspace} + +Software developers create \cicd pipelines to… Following issue can be resolved by \cicd: +^D +[Para [Str "Software",Space,Str "developers",Space,Str "create",Space,Str "CI/CD",Space,Str "pipelines",Space,Str "to\8230",Space,Str "Following",Space,Str "issue",Space,Str "can",Space,Str "be",Space,Str "resolved",Space,Str "by",Space,Str "CI/CD:"]] +``` + +``` +% pandoc -f latex -t native +\newcommand{\cicd}{CI/CD\xspace} + +\cicd\footnote{\url{https://en.wikipedia.org/wiki/CI/CD}} is awesome. +^D +[Para [Str "CI/CD",Note [Para [Link ("",[],[]) [Str "https://en.wikipedia.org/wiki/CI/CD"] ("https://en.wikipedia.org/wiki/CI/CD","")]],Space,Str "is",Space,Str "awesome."]] +``` + +``` +% pandoc -f latex -t native +\newcommand{\cicd}{CI/CD\xspace} +\newcommand{\pipeline}{pipeline\xspace} + +\cicd\pipeline. +^D +[Para [Str "CI/CD",Space,Str "pipeline."]] +``` diff --git a/test/command/3803.md b/test/command/3803.md new file mode 100644 index 000000000..a2e60359d --- /dev/null +++ b/test/command/3803.md @@ -0,0 +1,10 @@ +``` +% pandoc -f markdown+raw_tex -t latex +\begin{blah*} +*ok* +\end{blah*} +^D +\begin{blah*} +*ok* +\end{blah*} +``` diff --git a/test/command/3804.md b/test/command/3804.md new file mode 100644 index 000000000..c13c2ef42 --- /dev/null +++ b/test/command/3804.md @@ -0,0 +1,6 @@ +``` +% pandoc -t native +\titleformat{\chapter}[display]{\normalfont\large\bfseries}{第\thechapter{}章}{20pt}{\Huge} +^D +[RawBlock (Format "latex") "\\titleformat{\\chapter}[display]{\\normalfont\\large\\bfseries}{\31532\\thechapter{}\31456}{20pt}{\\Huge}"] +``` diff --git a/test/command/html-read-figure.md b/test/command/html-read-figure.md new file mode 100644 index 000000000..9c604c706 --- /dev/null +++ b/test/command/html-read-figure.md @@ -0,0 +1,45 @@ +``` +% pandoc -f html -t native +<figure> + <img src="foo.png" title="voyage"> + <figcaption>bar</figcaption> +</figure> +^D +[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]] +``` + +``` +% pandoc -f html -t native +<figure> + <figcaption>bar</figcaption> + <img src="foo.png" title="voyage"> +</figure> +^D +[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]] +``` + +``` +% pandoc -f html -t native +<figure> + <img src="foo.png" title="voyage"> +</figure> +^D +[Para [Image ("",[],[]) [] ("foo.png","fig:voyage")]] +``` + +``` +% pandoc -f html -t native +<figure> + <p><img src="foo.png" title="voyage"></p> + <figcaption>bar</figcaption> +</figure> +^D +[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]] +``` + +``` +% pandoc -f html -t native +<figure><img src="foo.png" title="voyage" alt="this is ignored"><figcaption>bar <strong>baz</strong></figcaption></figure> +^D +[Para [Image ("",[],[]) [Str "bar",Space,Strong [Str "baz"]] ("foo.png","fig:voyage")]] +``` diff --git a/test/command/ifstrequal.md b/test/command/ifstrequal.md new file mode 100644 index 000000000..4ad04d2e1 --- /dev/null +++ b/test/command/ifstrequal.md @@ -0,0 +1,10 @@ +``` +% pandoc -f latex -t native +\ifstrequal{a}{b}{yes}{\emph{no}} +\newcommand{\h}[1]{\ifstrequal{#1}{a}{\'a}{#1}} +\h{a} +\h{b} +^D +[Para [Emph [Str "no"]] +,Para [Str "\225",SoftBreak,Str "b"]] +``` diff --git a/test/command/macros.md b/test/command/macros.md new file mode 100644 index 000000000..055c86d25 --- /dev/null +++ b/test/command/macros.md @@ -0,0 +1,17 @@ +``` +% pandoc -f markdown+latex_macros -t markdown +\newcommand{\my}{\phi} +$\my+\my$ +^D +\newcommand{\my}{\phi} +$\phi+\phi$ +``` + +``` +% pandoc -f markdown-latex_macros -t markdown +\newcommand{\my}{\phi} +$\my+\my$ +^D +\newcommand{\my}{\phi} +$\my+\my$ +``` |