On 06/14/2023 02:49 AM, Bastien DUMONT wrote: > You can learn which elements have an “attributes” field from the doc: https://pandoc.org/lua-filters.html > > Le Tuesday 13 June 2023 à 08:34:05PM, H a écrit : >> On 06/13/2023 06:53 PM, H wrote: >>> On 06/13/2023 06:05 PM, H wrote: >>>> On 06/13/2023 05:27 PM, Bastien DUMONT wrote: >>>>> attr.style = 'color: #112233;' >>>> Wonderful, many thanks! Btw, I was reading my email in the reverse order or I would have found this before my other post... >>>> >>> How can I similarly add a style to an tag? This tag is wrapped inside a
tag. >>> >> Besides adding a style to (Image) elements, I also want to add a style to
(HorizontalRule). It seems that the following does not work: >> >> local style_hr = 'border-top-style: solid; border-top-width: thin; border-color: #cc002b;' >> >> if (el.type == 'HorizontalRule') then >>   local attr = el.attributes >>   attr.style = style_hr >> end >> >> The desired output is: >> >>
>> >> Pandoc fails assigning the style, however, adding the code to the html file shows it is valid html code. >> >> Have I missed something or might this be a bug? >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/61724767-ada0-133f-6751-5884c7460a25%40meddatainc.com. Corre,t in that list HorizontalRule does not have an attributes field but ought it not to have one? My example above is, after all, valid HTML code. I have for now worked around it by creating the desired
tag in my code but it would be much more elegant to to be able to add style information to HorizontalRule. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b696e1f5-0648-c8f0-4117-257896e40f8b%40meddatainc.com.