public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pipe character in YAML field won't output to docx
@ 2022-09-10  1:06 Kevin Coombes
       [not found] ` <9161ae41-4195-40b7-9e60-679e2b7c49e4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Coombes @ 2022-09-10  1:06 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

I am writing a document in Rmarkdown (so for practical purposes here, just 
in markdown) that I would like to be able to convert to all of HTML, PDF, 
and Word (docx). The document has multiple authors with different 
affiliations. Since I haven't been able to coerce any of the online 
descriptions of how to mark this setting up formally to work in all three 
output environments, I tried manually creating the output I wanted by 
hacking the "date" metadata and exploiting hand-written superscripts. 
Basically, something like this:

author: |
  | Author One^1^
  | Author Two^2^
date: |
  | ^1^Institution One
  | ^2^Institution Two

Of course, this is a simplified example since there are way more authors 
and institutions than that, which is why I am using the pipe character to 
force line breaks. This idea works for both HTML and PDF output. When I try 
to create the output in a .docx file, neither the Author list nor the 
Affiliation list (in the hacked ate variable) gets included in the 
document. If I delete the pipe characters, then the output gets included in 
the file, but without the line breaks.

Why does the YAML  pipe character apparently not work for Word output? Is 
there some setting that I am missing to enable this feature for Word output?

Thanks,
  Kevin

-- 
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/9161ae41-4195-40b7-9e60-679e2b7c49e4n%40googlegroups.com.

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

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

* Re: Pipe character in YAML field won't output to docx
       [not found] ` <9161ae41-4195-40b7-9e60-679e2b7c49e4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-09-10  2:58   ` John MacFarlane
       [not found]     ` <CD378307-ADE8-48F3-B76E-B3B2EDEEB4B3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2022-09-10  2:58 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I suspect you're running into this issue:

https://github.com/jgm/pandoc/issues/8256

We should probably fix this in the docx writer. but try this;

author: |-
  Author One^1^\
  Author Two^2^


> On Sep 9, 2022, at 6:06 PM, Kevin Coombes <kevin.r.coombes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Hi,
> 
> I am writing a document in Rmarkdown (so for practical purposes here, just in markdown) that I would like to be able to convert to all of HTML, PDF, and Word (docx). The document has multiple authors with different affiliations. Since I haven't been able to coerce any of the online descriptions of how to mark this setting up formally to work in all three output environments, I tried manually creating the output I wanted by hacking the "date" metadata and exploiting hand-written superscripts. Basically, something like this:
> 
> author: |
>   | Author One^1^
>   | Author Two^2^
> date: |
>   | ^1^Institution One
>   | ^2^Institution Two
> 
> Of course, this is a simplified example since there are way more authors and institutions than that, which is why I am using the pipe character to force line breaks. This idea works for both HTML and PDF output. When I try to create the output in a .docx file, neither the Author list nor the Affiliation list (in the hacked ate variable) gets included in the document. If I delete the pipe characters, then the output gets included in the file, but without the line breaks.
> 
> Why does the YAML  pipe character apparently not work for Word output? Is there some setting that I am missing to enable this feature for Word output?
> 
> Thanks,
>   Kevin
> 
> -- 
> 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/9161ae41-4195-40b7-9e60-679e2b7c49e4n%40googlegroups.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/CD378307-ADE8-48F3-B76E-B3B2EDEEB4B3%40gmail.com.


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

* Re: Pipe character in YAML field won't output to docx
       [not found]     ` <CD378307-ADE8-48F3-B76E-B3B2EDEEB4B3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2022-09-10 16:47       ` Kevin Coombes
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Coombes @ 2022-09-10 16:47 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks! That fixed it.

And it would be wonderful if there was official documentation somewhere 
(that google can find) so that the next person doesn't take as long as I 
did to find something that works....

On Friday, September 9, 2022 at 10:58:42 PM UTC-4 fiddlosopher wrote:

> I suspect you're running into this issue:
>
> https://github.com/jgm/pandoc/issues/8256
>
> We should probably fix this in the docx writer. but try this;
>
> author: |-
> Author One^1^\
> Author Two^2^
>
>
> > On Sep 9, 2022, at 6:06 PM, Kevin Coombes <kevin.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> > Hi,
> > 
> > I am writing a document in Rmarkdown (so for practical purposes here, 
> just in markdown) that I would like to be able to convert to all of HTML, 
> PDF, and Word (docx). The document has multiple authors with different 
> affiliations. Since I haven't been able to coerce any of the online 
> descriptions of how to mark this setting up formally to work in all three 
> output environments, I tried manually creating the output I wanted by 
> hacking the "date" metadata and exploiting hand-written superscripts. 
> Basically, something like this:
> > 
> > author: |
> > | Author One^1^
> > | Author Two^2^
> > date: |
> > | ^1^Institution One
> > | ^2^Institution Two
> > 
> > Of course, this is a simplified example since there are way more authors 
> and institutions than that, which is why I am using the pipe character to 
> force line breaks. This idea works for both HTML and PDF output. When I try 
> to create the output in a .docx file, neither the Author list nor the 
> Affiliation list (in the hacked ate variable) gets included in the 
> document. If I delete the pipe characters, then the output gets included in 
> the file, but without the line breaks.
> > 
> > Why does the YAML pipe character apparently not work for Word output? Is 
> there some setting that I am missing to enable this feature for Word output?
> > 
> > Thanks,
> > Kevin
> > 
> > -- 
> > 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/9161ae41-4195-40b7-9e60-679e2b7c49e4n%40googlegroups.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/fa490777-bb33-4c30-af1a-24c82bb94f75n%40googlegroups.com.

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

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

end of thread, other threads:[~2022-09-10 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-10  1:06 Pipe character in YAML field won't output to docx Kevin Coombes
     [not found] ` <9161ae41-4195-40b7-9e60-679e2b7c49e4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-09-10  2:58   ` John MacFarlane
     [not found]     ` <CD378307-ADE8-48F3-B76E-B3B2EDEEB4B3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-09-10 16:47       ` Kevin Coombes

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