public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Manually apply styles to output docx?
@ 2022-05-15 12:28 ` Shane Liesegang
       [not found]   ` <2a9a59ee-359b-4670-a140-234fb4c52311n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Shane Liesegang @ 2022-05-15 12:28 UTC (permalink / raw)
  To: pandoc-discuss


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

I've customized a reference.docx file for applying styles to an exported 
Word document, and am attempting to follow the instructions from the Custom 
Styles <https://pandoc.org/MANUAL.html#custom-styles> section of the 
manual. If I'm reading the documentation right (and I may not be!) if I 
attempt to apply a custom style that is already defined in the reference 
document, it will not redefine it but apply the existing style. 

However, when I do something like this in markdown+bracketed_spans: 

[my strong text]{custom-style="Strong"}

And there is already a "Strong" style in the reference file, I find the 
span instead has a new style applied to it called "Strong1". 

Is there any way I can manually apply styles to Markdown text for docx 
output? 

Thanks for any help / letting me know where I misunderstand. 

-- 
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/2a9a59ee-359b-4670-a140-234fb4c52311n%40googlegroups.com.

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

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

* AW: Manually apply styles to output docx?
       [not found]   ` <2a9a59ee-359b-4670-a140-234fb4c52311n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-05-16  9:43     ` denis.maier-NSENcxR/0n0
       [not found]       ` <3b8d1a41518f4384a6087ac54b826b3c-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2022-05-16  9:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

I would have expected the same given the documentation says «For docx output, styles will be defined in the output file as inheriting from normal text, if the styles are not yet in your reference.docx. If they are already defined, pandoc will not alter the definition.»

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Shane Liesegang
Gesendet: Sonntag, 15. Mai 2022 14:28
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Manually apply styles to output docx?

I've customized a reference.docx file for applying styles to an exported Word document, and am attempting to follow the instructions from the Custom Styles<https://pandoc.org/MANUAL.html#custom-styles> section of the manual. If I'm reading the documentation right (and I may not be!) if I attempt to apply a custom style that is already defined in the reference document, it will not redefine it but apply the existing style.

However, when I do something like this in markdown+bracketed_spans:

[my strong text]{custom-style="Strong"}

And there is already a "Strong" style in the reference file, I find the span instead has a new style applied to it called "Strong1".

Is there any way I can manually apply styles to Markdown text for docx output?

Thanks for any help / letting me know where I misunderstand.
--
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<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%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/3b8d1a41518f4384a6087ac54b826b3c%40unibe.ch.

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

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

* Re: Manually apply styles to output docx?
       [not found]       ` <3b8d1a41518f4384a6087ac54b826b3c-NSENcxR/0n0@public.gmane.org>
@ 2022-05-19  3:33         ` Shane Liesegang
       [not found]           ` <56357d0c-ae70-44bc-8e53-25c686fa73f0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Shane Liesegang @ 2022-05-19  3:33 UTC (permalink / raw)
  To: pandoc-discuss


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

That was my understanding of that line in the documentation, too. But I'm 
not sure if my understanding is wrong (and I can't do this), or if the 
documentation is wrong (and the current behavior is intended), or if the 
current behavior is wrong (and it's a bug). 

On Monday, May 16, 2022 at 12:43:11 PM UTC+3 denis...-NSENcxR/0n0@public.gmane.org wrote:

> I would have expected the same given the documentation says «For docx 
> output, styles will be defined in the output file as inheriting from normal 
> text, if the styles are not yet in your reference.docx. If they are already 
> defined, pandoc will not alter the definition.» 
>
>  
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *Shane Liesegang
> *Gesendet:* Sonntag, 15. Mai 2022 14:28
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* Manually apply styles to output docx?
>
>  
>
> I've customized a reference.docx file for applying styles to an exported 
> Word document, and am attempting to follow the instructions from the Custom 
> Styles <https://pandoc.org/MANUAL.html#custom-styles> section of the 
> manual. If I'm reading the documentation right (and I may not be!) if I 
> attempt to apply a custom style that is already defined in the reference 
> document, it will not redefine it but apply the existing style. 
>
>  
>
> However, when I do something like this in markdown+bracketed_spans: 
>
>  
>
> [my strong text]{custom-style="Strong"}
>
>  
>
> And there is already a "Strong" style in the reference file, I find the 
> span instead has a new style applied to it called "Strong1". 
>
>  
>
> Is there any way I can manually apply styles to Markdown text for docx 
> output? 
>
>  
>
> Thanks for any help / letting me know where I misunderstand. 
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%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/56357d0c-ae70-44bc-8e53-25c686fa73f0n%40googlegroups.com.

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

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

* Re: Manually apply styles to output docx?
       [not found]           ` <56357d0c-ae70-44bc-8e53-25c686fa73f0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-05-25 20:18             ` Shane Liesegang
  0 siblings, 0 replies; 4+ messages in thread
From: Shane Liesegang @ 2022-05-25 20:18 UTC (permalink / raw)
  To: pandoc-discuss


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

After a bunch of investigation, I wanted to post what I figured out in case 
someone else comes across this. 

Pandoc will happily apply a custom style on whatever span or div you tell 
it to, but in this case the built-in "Strong" style is for a paragraph, not 
a character. Since I was trying to apply it to a span, Pandoc made a new 
style for characters, and then incremented the name so it wouldn't clash 
with the existing paragraph one. 

The same thing happens in reverse, if you try to apply a character style to 
a div. 

It makes sense once you understand it, but was definitely confusing to try 
and figure out. Maybe worth adding some admonitions in the document, but I 
know it's not meant as a tutorial for the docx format. 
On Thursday, May 19, 2022 at 6:33:53 AM UTC+3 Shane Liesegang wrote:

> That was my understanding of that line in the documentation, too. But I'm 
> not sure if my understanding is wrong (and I can't do this), or if the 
> documentation is wrong (and the current behavior is intended), or if the 
> current behavior is wrong (and it's a bug). 
>
> On Monday, May 16, 2022 at 12:43:11 PM UTC+3 denis...-NSENcxR/0n0@public.gmane.org wrote:
>
>> I would have expected the same given the documentation says «For docx 
>> output, styles will be defined in the output file as inheriting from normal 
>> text, if the styles are not yet in your reference.docx. If they are already 
>> defined, pandoc will not alter the definition.» 
>>
>>  
>>
>> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
>> Auftrag von *Shane Liesegang
>> *Gesendet:* Sonntag, 15. Mai 2022 14:28
>> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>> *Betreff:* Manually apply styles to output docx?
>>
>>  
>>
>> I've customized a reference.docx file for applying styles to an exported 
>> Word document, and am attempting to follow the instructions from the Custom 
>> Styles <https://pandoc.org/MANUAL.html#custom-styles> section of the 
>> manual. If I'm reading the documentation right (and I may not be!) if I 
>> attempt to apply a custom style that is already defined in the reference 
>> document, it will not redefine it but apply the existing style. 
>>
>>  
>>
>> However, when I do something like this in markdown+bracketed_spans: 
>>
>>  
>>
>> [my strong text]{custom-style="Strong"}
>>
>>  
>>
>> And there is already a "Strong" style in the reference file, I find the 
>> span instead has a new style applied to it called "Strong1". 
>>
>>  
>>
>> Is there any way I can manually apply styles to Markdown text for docx 
>> output? 
>>
>>  
>>
>> Thanks for any help / letting me know where I misunderstand. 
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/2a9a59ee-359b-4670-a140-234fb4c52311n%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/68b882c7-aeb6-47dc-9308-2d1054fdc119n%40googlegroups.com.

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

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

end of thread, other threads:[~2022-05-25 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AQHYaFdG0wl3fC04FE2XyAGiW0Bttq0hQeiA>
2022-05-15 12:28 ` Manually apply styles to output docx? Shane Liesegang
     [not found]   ` <2a9a59ee-359b-4670-a140-234fb4c52311n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-16  9:43     ` AW: " denis.maier-NSENcxR/0n0
     [not found]       ` <3b8d1a41518f4384a6087ac54b826b3c-NSENcxR/0n0@public.gmane.org>
2022-05-19  3:33         ` Shane Liesegang
     [not found]           ` <56357d0c-ae70-44bc-8e53-25c686fa73f0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-25 20:18             ` Shane Liesegang

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