2019-11-02 17:40:08 +01:00
|
|
|
```
|
|
|
|
% pandoc -t native
|
|
|
|
\parbox{1em}{#1}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "\\parbox{1em}{#1}" ] ]
|
2019-11-02 17:40:08 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -t native
|
|
|
|
\newcommand{\highlight}[1]{\colorbox{yellow}{\parbox{\dimexpr\linewidth-2\fboxsep}{#1}}
|
|
|
|
|
|
|
|
Hello World
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "\\newcommand{"
|
|
|
|
, RawInline (Format "tex") "\\highlight"
|
|
|
|
, Str "}[1]{\\colorbox{yellow}{\\parbox{"
|
|
|
|
, RawInline (Format "tex") "\\dimexpr"
|
|
|
|
, RawInline (Format "tex") "\\linewidth-2"
|
|
|
|
, RawInline (Format "tex") "\\fboxsep"
|
|
|
|
, Str "}{#1}}"
|
|
|
|
]
|
|
|
|
, Para [ Str "Hello" , Space , Str "World" ]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2019-11-02 17:40:08 +01:00
|
|
|
```
|