git.iko.soy/typeable/pandoc
on master help sign in
\textcolor works as inline and block command
commit1728d4e60983e050be4bfb5b8c2e6065b4dd198a authorMarc Schreiber <marc.schreiber@fh-aachen.de> dateWed 3 May 2017, 13:39 (10 years ago) parentd943980
2 files changed+13−9
src/Text/Pandoc/Readers/LaTeX.hs+1−1 test/command/textcolor.md+12−8
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks
420420blockTextcolor = do
421421 skipopts
422422 color <- braced
423− return <$> divWith ("",[],[("style","color: " ++ color)]) $ block
423+ divWith ("",[],[("style","color: " ++ color)]) <$> grouped block
424424
425425graphicsPath :: PandocMonad m => LP m Blocks
426426graphicsPath = do
test/command/textcolor.md+12−8
@@ -1,24 +1,28 @@
11```
22% pandoc -f latex -t native
3−\textcolor{red}{Hello World}
3+Hello \textcolor{red}{World}
44^D
5−[Para [Span ("",[],[("style","color: red")]) [Str "Hello",Space,Str "World"]]]
5+[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
66```
77
88```
99% pandoc -f latex -t native
10−\textcolor{blue}{Hello \textbf{World}}
10+Hello \textcolor{blue}{\textbf{World}}
1111^D
12−[Para [Span ("",[],[("style","color: blue")]) [Str "Hello",Space,Strong [Str "World"]]]]
12+[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]]
1313```
1414
1515```
1616% pandoc -f latex -t native
1717\textcolor{orange}{
18− \begin{itemize}
19− \item Test
20− \end{itemize}
18+\begin{itemize}
19+ \item Item 1
20+ \item Item 2
21+\end{itemize}
2122}
2223^D
23−
24+[Div ("",[],[("style","color: orange")])
25+ [BulletList
26+ [[Para [Str "Item",Space,Str "1"]]
27+ ,[Para [Str "Item",Space,Str "2"]]]]]
2428```