git.iko.soy/typeable/pandoc
on master help sign in
\textcolor works as inline and block command
1728d4eMarc Schreiber
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks
420blockTextcolor = do
420blockTextcolor = do
421 skipopts
421 skipopts
422 color <- braced
422 color <- braced
423− return <$> divWith ("",[],[("style","color: " ++ color)]) $ block
423+ divWith ("",[],[("style","color: " ++ color)]) <$> grouped block
424
424
425graphicsPath :: PandocMonad m => LP m Blocks
425graphicsPath :: PandocMonad m => LP m Blocks
426graphicsPath = do
426graphicsPath = do
test/command/textcolor.md+12−8
@@ -1,24 +1,28 @@
1```
1```
2% pandoc -f latex -t native
2% pandoc -f latex -t native
3−\textcolor{red}{Hello World}
3+Hello \textcolor{red}{World}
4^D
4^D
5−[Para [Span ("",[],[("style","color: red")]) [Str "Hello",Space,Str "World"]]]
5+[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
6```
6```
7
7
8```
8```
9% pandoc -f latex -t native
9% pandoc -f latex -t native
10−\textcolor{blue}{Hello \textbf{World}}
10+Hello \textcolor{blue}{\textbf{World}}
11^D
11^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"]]]]
13```
13```
14
14
15```
15```
16% pandoc -f latex -t native
16% pandoc -f latex -t native
17\textcolor{orange}{
17\textcolor{orange}{
18− \begin{itemize}
18+\begin{itemize}
19− \item Test
19+ \item Item 1
20+ \item Item 2
20− \end{itemize}
21+\end{itemize}
21}
22}
22^D
23^D
23−
24+[Div ("",[],[("style","color: orange")])
25+ [BulletList
26+ [[Para [Str "Item",Space,Str "1"]]
27+ ,[Para [Str "Item",Space,Str "2"]]]]]
24```
28```