public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* PPTX character styles workarounds
@ 2022-02-06  9:52 Gottfried Haider
       [not found] ` <4595d478-2dae-4042-b535-95a295042478n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Gottfried Haider @ 2022-02-06  9:52 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1604 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 2070 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPTX character styles workarounds
       [not found] ` <4595d478-2dae-4042-b535-95a295042478n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-06 10:48   ` BPJ
       [not found]     ` <CADAJKhAh0GHwF4K8LTLajiSGWi-+xTjC7cT5jbjW0AXeXfyW8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: BPJ @ 2022-02-06 10:48 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 3505 bytes --]

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 <gottfried.haider-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
> <https://groups.google.com/d/msgid/pandoc-discuss/4595d478-2dae-4042-b535-95a295042478n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhAh0GHwF4K8LTLajiSGWi-%2BxTjC7cT5jbjW0AXeXfyW8A%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5663 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPTX character styles workarounds
       [not found]     ` <CADAJKhAh0GHwF4K8LTLajiSGWi-+xTjC7cT5jbjW0AXeXfyW8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-06 15:45       ` Gottfried Haider
       [not found]         ` <CAPoCmYJujq5HYnguRDusqHG8jM0P+oyFCARYOoYoC7cbJu6ZvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Gottfried Haider @ 2022-02-06 15:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5028 bytes --]

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 <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <gottfried.haider-Re5JQEeQqe8@public.gmane.orgm>
> 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
>> <https://groups.google.com/d/msgid/pandoc-discuss/4595d478-2dae-4042-b535-95a295042478n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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
> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAh0GHwF4K8LTLajiSGWi-%2BxTjC7cT5jbjW0AXeXfyW8A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.

[-- Attachment #2: Type: text/html, Size: 7838 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPTX character styles workarounds
       [not found]         ` <CAPoCmYJujq5HYnguRDusqHG8jM0P+oyFCARYOoYoC7cbJu6ZvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-06 16:15           ` BPJ
       [not found]             ` <CADAJKhAG0sx0wfUbHNAfhvJNAxGykcaom7aQf0S6zgMNkJe7-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: BPJ @ 2022-02-06 16:15 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 6326 bytes --]

Den sön 6 feb. 2022 16:46Gottfried Haider <gottfried.haider-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
skrev:

> 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.)
>

Drat. If style search-replace and wildcard search-replace is possible in
PowerPoint (which I haven't used for over a decade) you might insert some
text say `aCcEnT1(highlighted)aCcEnT1`

then search for `aCcEnT1(.*)aCcEnT1` or whatever and apply the style, then
search for `aCcEnT1(` and `)aCcEnT1` respectively and remove them.

It might be possible to do this with Python if in no other way

https://python-pptx.readthedocs.io/en/latest/



>
> 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 <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <gottfried.haider@gmail.com>
>> 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
>>> <https://groups.google.com/d/msgid/pandoc-discuss/4595d478-2dae-4042-b535-95a295042478n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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
>> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAh0GHwF4K8LTLajiSGWi-%2BxTjC7cT5jbjW0AXeXfyW8A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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
> <https://groups.google.com/d/msgid/pandoc-discuss/CAPoCmYJujq5HYnguRDusqHG8jM0P%2BoyFCARYOoYoC7cbJu6ZvA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhAG0sx0wfUbHNAfhvJNAxGykcaom7aQf0S6zgMNkJe7-Q%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 10133 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPTX character styles workarounds
       [not found]             ` <CADAJKhAG0sx0wfUbHNAfhvJNAxGykcaom7aQf0S6zgMNkJe7-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-06 17:52               ` BPJ
  0 siblings, 0 replies; 5+ messages in thread
From: BPJ @ 2022-02-06 17:52 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 6927 bytes --]

Sorry, I misunderstood. So pptx doesn't support character styles *at all*?
How incredibly stupid!

And you can't even search/replace and set to underline for example?

Well I guess there was a reason why I switched to HTML-based presentations
back when I did presentations...

Sorry for the noise! I hope you find a solution.


Den sön 6 feb. 2022 17:15BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

>
>
> Den sön 6 feb. 2022 16:46Gottfried Haider <gottfried.haider-Re5JQEeQqe8@public.gmane.orgm>
> skrev:
>
>> 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.)
>>
>
> Drat. If style search-replace and wildcard search-replace is possible in
> PowerPoint (which I haven't used for over a decade) you might insert some
> text say `aCcEnT1(highlighted)aCcEnT1`
>
> then search for `aCcEnT1(.*)aCcEnT1` or whatever and apply the style, then
> search for `aCcEnT1(` and `)aCcEnT1` respectively and remove them.
>
> It might be possible to do this with Python if in no other way
>
> https://python-pptx.readthedocs.io/en/latest/
>
>
>
>>
>> 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 <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <gottfried.haider@gmail.com>
>>> 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
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/4595d478-2dae-4042-b535-95a295042478n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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
>>> <https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAh0GHwF4K8LTLajiSGWi-%2BxTjC7cT5jbjW0AXeXfyW8A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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
>> <https://groups.google.com/d/msgid/pandoc-discuss/CAPoCmYJujq5HYnguRDusqHG8jM0P%2BoyFCARYOoYoC7cbJu6ZvA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/CADAJKhCnDCTKKNrYL0gMp49va3mJdagbHQ5%3DZmsWn%2Bcrq5y1gA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 11341 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-06 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-06  9:52 PPTX character styles workarounds Gottfried Haider
     [not found] ` <4595d478-2dae-4042-b535-95a295042478n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-06 10:48   ` BPJ
     [not found]     ` <CADAJKhAh0GHwF4K8LTLajiSGWi-+xTjC7cT5jbjW0AXeXfyW8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-06 15:45       ` Gottfried Haider
     [not found]         ` <CAPoCmYJujq5HYnguRDusqHG8jM0P+oyFCARYOoYoC7cbJu6ZvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-06 16:15           ` BPJ
     [not found]             ` <CADAJKhAG0sx0wfUbHNAfhvJNAxGykcaom7aQf0S6zgMNkJe7-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-06 17:52               ` BPJ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).