Thank you very much for taking the time to reply to me, bpj. I am under the impression that PowerPoint does not support custom character styles - are you certain that it does? (In the custom styles section of Pandoc's manual, I also only see references to docx and ICML.) I think it'd be great if one could do [highlighted text]{.accent1}, and this would in PPTX export set the span to the accent1 color from the reference's color scheme [1]. But I believe this isn't possible right now. Best, Gottfried [1] http://officeopenxml.com/prSlide-color.php On Sun, Feb 6, 2022 at 6:48 PM BPJ wrote: > Custom named styles is usually the solution > > https://pandoc.org/MANUAL.html#custom-styles > > So just create a named character style "Highlight" with suitable > formatting — unless there is one already — and apply it with `[highlighted > text]{custom-style=Highlight}` or since that is a lot to type use this > filter so you can type just `[highlighted text]{.hl}`: > > ``````lua > -- Add class-to-style mappings here as needed > class2style = { > hl = 'Highlight', > } > > local function apply_style (elem) > for _,cls in ipairs(elem.classes) do > if class2style[cls] then > elem.attributes['custom-style'] = class2style[cls] > return elem > end > end > return nil > end > > return { > { Div = apply_style, -- paragraph styles > Span = apply_style, -- character styles > }, > } > `````` > > The pandoc markdown syntax for paragraph styles is > > ``````pandoc > ::: {custom-style="Style Name"} > Styled text > ::: > `````` > > If the style name consists of only letters you may omit the quotes. > > With the filter this becomes > > ``````pandoc > :::class_name > Styled text > ::: > `````` > > HTH, > > /bpj > > > Den sön 6 feb. 2022 10:52Gottfried Haider > skrev: > >> Hello all, >> >> Let me begin by saying thank you for this extremely versatile tool! >> >> I've been dabbling with using Pandoc to go from Markdown to Powerpoint. >> The layouts from a specified reference doc are very pleasant to work, but >> so far I have been unsuccessful in finding a way how highlighted text is to >> be rendered in the PPTX. Specifically, I would be looking for a way to >> highlight text by changing its color in the output. >> >> I saw that d0a895ac [1] principally implements colored text output for >> syntax highlighting, but as far as I understand there is no way of using >> this from the AST? (My ideal scenario would writing a custom AST filter >> that turns bold and italic highlights into colored spans.) >> >> Another idea I had was to leverage the user-definable accent colors from >> the reference doc, so that .accent1 to .accent6 could be used as classes, >> similarly to how underline works today. >> >> I am not fluent in Haskell, but I'd appreciate if someone had some other >> ideas - or comments on the feasibility of those changes? (I'd be happy to >> sponsor someone to implement them.) >> >> Thanks & best >> Gottfried >> >> [1] >> https://github.com/jgm/pandoc/commit/d0a895acee371b13a9c31873c10dd124e04564d1 >> >> -- >> 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/4595d478-2dae-4042-b535-95a295042478n%40googlegroups.com >> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/zUR2jOxNiBw/unsubscribe. > To unsubscribe from this group and all its topics, 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/CADAJKhAh0GHwF4K8LTLajiSGWi-%2BxTjC7cT5jbjW0AXeXfyW8A%40mail.gmail.com > > . > -- 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/CAPoCmYJujq5HYnguRDusqHG8jM0P%2BoyFCARYOoYoC7cbJu6ZvA%40mail.gmail.com.