\textcolor works as inline and block command
This commit is contained in:
parent
d9439808f2
commit
1728d4e609
2 changed files with 13 additions and 9 deletions
|
@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks
|
|||
blockTextcolor = do
|
||||
skipopts
|
||||
color <- braced
|
||||
return <$> divWith ("",[],[("style","color: " ++ color)]) $ block
|
||||
divWith ("",[],[("style","color: " ++ color)]) <$> grouped block
|
||||
|
||||
graphicsPath :: PandocMonad m => LP m Blocks
|
||||
graphicsPath = do
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
```
|
||||
% pandoc -f latex -t native
|
||||
\textcolor{red}{Hello World}
|
||||
Hello \textcolor{red}{World}
|
||||
^D
|
||||
[Para [Span ("",[],[("style","color: red")]) [Str "Hello",Space,Str "World"]]]
|
||||
[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t native
|
||||
\textcolor{blue}{Hello \textbf{World}}
|
||||
Hello \textcolor{blue}{\textbf{World}}
|
||||
^D
|
||||
[Para [Span ("",[],[("style","color: blue")]) [Str "Hello",Space,Strong [Str "World"]]]]
|
||||
[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]]
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -f latex -t native
|
||||
\textcolor{orange}{
|
||||
\begin{itemize}
|
||||
\item Test
|
||||
\end{itemize}
|
||||
\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"]]]]]
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue