summaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-07-25 11:42:10 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-07-25 11:42:10 +0200
commit2b039acb4ec6af8792c4e212822d3fe359633d16 (patch)
treef73c000a3d3da3920c9965416b56c88dea11247f /test/command
parent862d92f09a394a318a554fc7e5ec1b4ab0da1a2a (diff)
parentf93d7d06f688654137b5e728601441881ff5aebf (diff)
Merge branch 'textcolor-support' of https://github.com/schrieveslaach/pandoc into schrieveslaach-textcolor-support
Diffstat (limited to 'test/command')
-rw-r--r--test/command/latex-color.md127
1 files changed, 127 insertions, 0 deletions
diff --git a/test/command/latex-color.md b/test/command/latex-color.md
new file mode 100644
index 000000000..9fd2585a3
--- /dev/null
+++ b/test/command/latex-color.md
@@ -0,0 +1,127 @@
+# `\textcolor{}{}`
+
+```
+% pandoc -f latex -t native
+Hello \textcolor{red}{World}
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
+```
+
+```
+% pandoc -f latex -t native
+\textcolor{red}{Hello} World
+^D
+[Para [Span ("",[],[("style","color: red")]) [Str "Hello"],Space,Str "World"]]
+```
+
+```
+% pandoc -f latex -t native
+Hello \textcolor{blue}{\textbf{World}}
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]]
+```
+
+
+```
+% pandoc -f latex -t native
+Hello \textcolor{blue}{\textbf{World}}.
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]],Str "."]]
+```
+
+```
+% pandoc -f latex -t native
+\textcolor{orange}{
+\begin{itemize}
+ \item Item 1
+ \item Item 2
+\end{itemize}
+}
+^D
+[Div ("",[],[("style","color: orange")])
+ [BulletList
+ [[Para [Str "Item",Space,Str "1"]]
+ ,[Para [Str "Item",Space,Str "2"]]]]]
+```
+
+```
+% pandoc -f latex -t native
+\textcolor{blue}{
+\begin{itemize}
+ \item Item 1
+ \item Item 2
+\end{itemize}
+} some more text
+^D
+[Div ("",[],[("style","color: blue")])
+ [BulletList
+ [[Para [Str "Item",Space,Str "1"]]
+ ,[Para [Str "Item",Space,Str "2"]]]]
+,Para [Str "some",Space,Str "more",Space,Str "text"]]
+```
+
+# `\colorbox{}{}`
+
+
+```
+% pandoc -f latex -t native
+Hello \colorbox{red}{World}
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","background-color: red")]) [Str "World"]]]
+```
+
+```
+% pandoc -f latex -t native
+\colorbox{red}{Hello} World
+^D
+[Para [Span ("",[],[("style","background-color: red")]) [Str "Hello"],Space,Str "World"]]
+```
+
+```
+% pandoc -f latex -t native
+Hello \colorbox{blue}{\textbf{World}}
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]]]]
+```
+
+```
+% pandoc -f latex -t native
+Hello \colorbox{blue}{\textbf{World}}.
+^D
+[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]],Str "."]]
+```
+
+```
+% pandoc -f latex -t native
+\colorbox{orange}{
+\begin{minipage}{\textwidth}
+\begin{itemize}
+ \item Item 1
+ \item Item 2
+\end{itemize}
+\end{minipage}
+}
+^D
+[Div ("",[],[("style","background-color: orange")])
+ [BulletList
+ [[Para [Str "Item",Space,Str "1"]]
+ ,[Para [Str "Item",Space,Str "2"]]]]]
+```
+
+```
+% pandoc -f latex -t native
+\colorbox{blue}{
+\begin{minipage}{\textwidth}
+\begin{itemize}
+ \item Item 1
+ \item Item 2
+\end{itemize}
+\end{minipage}
+} some more text
+^D
+[Div ("",[],[("style","background-color: blue")])
+ [BulletList
+ [[Para [Str "Item",Space,Str "1"]]
+ ,[Para [Str "Item",Space,Str "2"]]]]
+,Para [Str "some",Space,Str "more",Space,Str "text"]]
+```