Thanks Albert,
Yes it works.
function Span(el)
if FORMAT == "latex" and el.attributes.color then
return { pandoc.RawInline("latex", "\\textcolor{" ..
el.attributes.color .. "}"), el }
elseif FORMAT == "latex" and el.attributes['text-decoration'] then
return { pandoc.RawInline("latex", "\\underline{" ..
el.attributes['text-decoration'] .. "}"), el }
end
end
But something is strange:
Input:
[this is my text]{color=red}
[this is my text]{text-decoration=underline}
Output:
this is my text
underlinethis is my text
It underlines the word underline!
Is my input wrong?
On Tuesday, May 5, 2020 at 4:36:51 PM UTC+2, R. Wils wrote:
Does anyone know how to color text in a PDF
(converting from a pandoc.markdown text file)?
I tried to use a span and div tag without success.
(Sorry I'm a new pandoc user)