public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Using --toc with docx files gives a warning: "fields referring to other files"
@ 2020-08-06  6:22 Abdeali Kothari
       [not found] ` <69d0df29-46d5-4098-9e01-3485f17bcbd5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Abdeali Kothari @ 2020-08-06  6:22 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,
I am trying to use pandoc to convert some documents to word docx format.
I found that when I use the --toc argument, I get a warning from Microsoft 
Word on windows about fields that are referring to other files.

I'm trying to figure out how can I avoid thi warning for the users of my 
generated document ?

*Steps to reproduce*:
Step1: Create a document of either markdown of html (I am using markdown as 
an example)
Here is my example markdown file:
$ cat test.md
# head1

## subhead1

# head2

## subhead2

Step 2: Convert to docx with pandoc with the --toc argument
pandoc --toc -o test.docx test.md

Step 3: Open the test.docx with Microsoft Word
PFA a screenshot of the warning I get.

   - If I click "Yes" - the table of contents appears
   - If I click "No" - the table of contents does not appear, and I have to 
   click on "update TOC" to update it with the correct contents

Other info:

   - Pandoc version: 2.10
   - Windows: 10 Version 2004
   - I use WSL with Ubuntu: 18.04.4


Any help appreciated

-- 
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/69d0df29-46d5-4098-9e01-3485f17bcbd5n%40googlegroups.com.

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

[-- Attachment #2: pandoc-warn.png --]
[-- Type: image/png, Size: 6006 bytes --]

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

* Re: Using --toc with docx files gives a warning: "fields referring to other files"
       [not found] ` <69d0df29-46d5-4098-9e01-3485f17bcbd5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-08-06 13:19   ` Leonard Rosenthol
  2020-08-08 17:17   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: Leonard Rosenthol @ 2020-08-06 13:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

It also happens if you use a filter to add the TOC to a docx file.

It has to do with the limited amount of info that we are able to add to the
native docx format vs. what Word actually expects.   More details at
https://github.com/jgm/pandoc/issues/458

On Thu, Aug 6, 2020 at 2:22 AM Abdeali Kothari <abdealikothari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi,
> I am trying to use pandoc to convert some documents to word docx format.
> I found that when I use the --toc argument, I get a warning from Microsoft
> Word on windows about fields that are referring to other files.
>
> I'm trying to figure out how can I avoid thi warning for the users of my
> generated document ?
>
> *Steps to reproduce*:
> Step1: Create a document of either markdown of html (I am using markdown
> as an example)
> Here is my example markdown file:
> $ cat test.md
> # head1
>
> ## subhead1
>
> # head2
>
> ## subhead2
>
> Step 2: Convert to docx with pandoc with the --toc argument
> pandoc --toc -o test.docx test.md
>
> Step 3: Open the test.docx with Microsoft Word
> PFA a screenshot of the warning I get.
>
>    - If I click "Yes" - the table of contents appears
>    - If I click "No" - the table of contents does not appear, and I have
>    to click on "update TOC" to update it with the correct contents
>
> Other info:
>
>    - Pandoc version: 2.10
>    - Windows: 10 Version 2004
>    - I use WSL with Ubuntu: 18.04.4
>
>
> Any help appreciated
>
> --
> 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/69d0df29-46d5-4098-9e01-3485f17bcbd5n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/69d0df29-46d5-4098-9e01-3485f17bcbd5n%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/CALu%3Dv3%2BGA12ZBC%2BeMEKGPKycmS9-0FWZApRQ8WH-H9a3vp%3Dv-w%40mail.gmail.com.

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

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

* Re: Using --toc with docx files gives a warning: "fields referring to other files"
       [not found] ` <69d0df29-46d5-4098-9e01-3485f17bcbd5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-08-06 13:19   ` Leonard Rosenthol
@ 2020-08-08 17:17   ` John MacFarlane
       [not found]     ` <m2pn81jbv3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2020-08-08 17:17 UTC (permalink / raw)
  To: Abdeali Kothari, pandoc-discuss


This is because Word produces the table of contents dynamically,
so that it can include page numbers.

Nothing to worry about here, and no way to do better as far
as I can see.

Abdeali Kothari <abdealikothari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi,
> I am trying to use pandoc to convert some documents to word docx format.
> I found that when I use the --toc argument, I get a warning from Microsoft 
> Word on windows about fields that are referring to other files.
>
> I'm trying to figure out how can I avoid thi warning for the users of my 
> generated document ?
>
> *Steps to reproduce*:
> Step1: Create a document of either markdown of html (I am using markdown as 
> an example)
> Here is my example markdown file:
> $ cat test.md
> # head1
>
> ## subhead1
>
> # head2
>
> ## subhead2
>
> Step 2: Convert to docx with pandoc with the --toc argument
> pandoc --toc -o test.docx test.md
>
> Step 3: Open the test.docx with Microsoft Word
> PFA a screenshot of the warning I get.
>
>    - If I click "Yes" - the table of contents appears
>    - If I click "No" - the table of contents does not appear, and I have to 
>    click on "update TOC" to update it with the correct contents
>
> Other info:
>
>    - Pandoc version: 2.10
>    - Windows: 10 Version 2004
>    - I use WSL with Ubuntu: 18.04.4
>
>
> Any help appreciated
>
> -- 
> 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/69d0df29-46d5-4098-9e01-3485f17bcbd5n%40googlegroups.com.


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

* Re: Using --toc with docx files gives a warning: "fields referring to other files"
       [not found]     ` <m2pn81jbv3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-08-09  2:28       ` Abdeali Kothari
  0 siblings, 0 replies; 4+ messages in thread
From: Abdeali Kothari @ 2020-08-09  2:28 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss

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

I see, thanks John, Leonard.
This helps

On Sat, Aug 8, 2020, 22:47 John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

>
> This is because Word produces the table of contents dynamically,
> so that it can include page numbers.
>
> Nothing to worry about here, and no way to do better as far
> as I can see.
>
> Abdeali Kothari <abdealikothari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hi,
> > I am trying to use pandoc to convert some documents to word docx format.
> > I found that when I use the --toc argument, I get a warning from
> Microsoft
> > Word on windows about fields that are referring to other files.
> >
> > I'm trying to figure out how can I avoid thi warning for the users of my
> > generated document ?
> >
> > *Steps to reproduce*:
> > Step1: Create a document of either markdown of html (I am using markdown
> as
> > an example)
> > Here is my example markdown file:
> > $ cat test.md
> > # head1
> >
> > ## subhead1
> >
> > # head2
> >
> > ## subhead2
> >
> > Step 2: Convert to docx with pandoc with the --toc argument
> > pandoc --toc -o test.docx test.md
> >
> > Step 3: Open the test.docx with Microsoft Word
> > PFA a screenshot of the warning I get.
> >
> >    - If I click "Yes" - the table of contents appears
> >    - If I click "No" - the table of contents does not appear, and I have
> to
> >    click on "update TOC" to update it with the correct contents
> >
> > Other info:
> >
> >    - Pandoc version: 2.10
> >    - Windows: 10 Version 2004
> >    - I use WSL with Ubuntu: 18.04.4
> >
> >
> > Any help appreciated
> >
> > --
> > 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/69d0df29-46d5-4098-9e01-3485f17bcbd5n%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/CA%2BBKPDVKKRJ2a7nj_EMEiJgRzcfh%2BOaCuW3z5kt4wRFyBWAegw%40mail.gmail.com.

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

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

end of thread, other threads:[~2020-08-09  2:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06  6:22 Using --toc with docx files gives a warning: "fields referring to other files" Abdeali Kothari
     [not found] ` <69d0df29-46d5-4098-9e01-3485f17bcbd5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-06 13:19   ` Leonard Rosenthol
2020-08-08 17:17   ` John MacFarlane
     [not found]     ` <m2pn81jbv3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-09  2:28       ` Abdeali Kothari

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