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)

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d3523f75-4ff6-455f-a5f7-d177cf048486%40googlegroups.com.