* Integrate TOC for docx as a pandoc native function
@ 2014-12-03 23:43 tolot27
[not found] ` <1e23c9dd-68aa-49f8-871a-46330d140488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: tolot27 @ 2014-12-03 23:43 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1.1: Type: text/plain, Size: 2185 bytes --]
Hi!
I'll start the discussion related to the issue Table of contents not
generated for DOCX #458 <https://github.com/jgm/pandoc/issues/458>. I've
proposed and tested the maximal possible solution to insert a TOC in a docx
file (semi-) automatically.
It is not possible to include it without user intervention, at least not,
if page numbers should be displayed in the TOC. The reason is that only
after rendering the docx, the correct page numbers are known. Rendering is
only possible with an installed Word application or Word Automation
Services (SharePoint Portal Server), but only with Windows or Mac. Another
way is to insert an updatable TOC field. Then, one has to open the docx
file and a question regarding to field updates is shown automatically.
Clicking in 'Yes' will update the TOC.
Nikolay implemented this behaviour as a filter
<https://gist.github.com/lierdakil/461cf6b0ef67f8cee47e> and raised the question
<https://github.com/jgm/pandoc/issues/458#issuecomment-60556703>whether
this feature should be implemented natively into pandoc or as a filter to
avoid dirty docx. I still believe (after some practial expierences) that a
native implementation is beneficial over a filter because using a json
filter requires installation of additional components like runghc, which
may increases complexity for some users. Also, some tools which integrate
pandoc (like knitr/rmarkdown) would not benefit from this feature because
mostly, they do not support piped commands.
Please follow our discussion in the issue comments and share your opinion
with us.
--
Kind regards,
Mathias
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1e23c9dd-68aa-49f8-871a-46330d140488%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 2754 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Integrate TOC for docx as a pandoc native function
[not found] ` <1e23c9dd-68aa-49f8-871a-46330d140488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-12-03 23:51 ` tolot27
2014-12-04 0:11 ` John MacFarlane
2017-05-15 20:33 ` lzytniak
2 siblings, 0 replies; 5+ messages in thread
From: tolot27 @ 2014-12-03 23:51 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
[-- Attachment #1.1: Type: text/plain, Size: 651 bytes --]
Okay, piping can be replaced by using parameter '-F ./docx-toc.hs'
--
Mathias
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f87986e8-4594-4491-a0e3-efb74c9db87f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 1097 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Integrate TOC for docx as a pandoc native function
[not found] ` <1e23c9dd-68aa-49f8-871a-46330d140488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-12-03 23:51 ` tolot27
@ 2014-12-04 0:11 ` John MacFarlane
2017-05-15 20:33 ` lzytniak
2 siblings, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2014-12-04 0:11 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
+++ tolot27 [Dec 03 14 15:43 ]:
> I still believe (after some practial expierences) that a
>native implementation is beneficial over a filter because using a json
>filter requires installation of additional components like runghc, which
>may increases complexity for some users.
Not necessarily -- a filter could be provided in executable form.
That's not a comment on the proposal. I'm beginning to think it would
be okay to generate a TOC in docx in this way. After all, people who
don't like it don't have to use the `--toc` option.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Integrate TOC for docx as a pandoc native function
[not found] ` <1e23c9dd-68aa-49f8-871a-46330d140488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-12-03 23:51 ` tolot27
2014-12-04 0:11 ` John MacFarlane
@ 2017-05-15 20:33 ` lzytniak
[not found] ` <ca4b92f4-2ee8-48a7-a51a-0d87314db584-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2 siblings, 1 reply; 5+ messages in thread
From: lzytniak @ 2017-05-15 20:33 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2641 bytes --]
Hello,
I have a question, how to use option --toc, to include table of content?
I have files:
- input.tex
- input.toc
I would like to convert it to docx or rst.
I tried:
pandoc -s -S input.tex --toc --toc-depth=3 -o output.docx
but it doesn't include table of content.
Thank you in advance for your help!
Best,
On Thursday, 4 December 2014 00:43:48 UTC+1, tolot27 wrote:
>
> Hi!
>
> I'll start the discussion related to the issue Table of contents not
> generated for DOCX #458 <https://github.com/jgm/pandoc/issues/458>. I've
> proposed and tested the maximal possible solution to insert a TOC in a docx
> file (semi-) automatically.
> It is not possible to include it without user intervention, at least not,
> if page numbers should be displayed in the TOC. The reason is that only
> after rendering the docx, the correct page numbers are known. Rendering is
> only possible with an installed Word application or Word Automation
> Services (SharePoint Portal Server), but only with Windows or Mac. Another
> way is to insert an updatable TOC field. Then, one has to open the docx
> file and a question regarding to field updates is shown automatically.
> Clicking in 'Yes' will update the TOC.
>
> Nikolay implemented this behaviour as a filter
> <https://gist.github.com/lierdakil/461cf6b0ef67f8cee47e> and raised the question
> <https://github.com/jgm/pandoc/issues/458#issuecomment-60556703>whether
> this feature should be implemented natively into pandoc or as a filter to
> avoid dirty docx. I still believe (after some practial expierences) that a
> native implementation is beneficial over a filter because using a json
> filter requires installation of additional components like runghc, which
> may increases complexity for some users. Also, some tools which integrate
> pandoc (like knitr/rmarkdown) would not benefit from this feature because
> mostly, they do not support piped commands.
>
> Please follow our discussion in the issue comments and share your opinion
> with us.
>
> --
> Kind regards,
> Mathias
>
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ca4b92f4-2ee8-48a7-a51a-0d87314db584%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 4974 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Integrate TOC for docx as a pandoc native function
[not found] ` <ca4b92f4-2ee8-48a7-a51a-0d87314db584-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-05-16 7:16 ` John MacFarlane
0 siblings, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2017-05-16 7:16 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
input.toc won't be used in any way. The --toc option
normally constructs a table of contents from the heading
structure of your document. But it works differently for
different output formats. Please consult the manual for
your pandoc version. In earlier versions docx was not
supported at all; in recent versions, an instruction is
inserted into the docx, but you may need to do something
to tell Word to expand it into an actual toc.
+++ lzytniak [May 15 17 13:33 ]:
> Hello,
> I have a question, how to use option --toc, to include table of
> content?
> I have files:
> * input.tex
> * input.toc
>
> I would like to convert it to docx or rst.
> I tried:
>
> pandoc -s -S input.tex --toc --toc-depth=3 -o output.docx
>
> but it doesn't include table of content.
> Thank you in advance for your help!
> Best,
> On Thursday, 4 December 2014 00:43:48 UTC+1, tolot27 wrote:
>
> Hi!
> I'll start the discussion related to the issue [1]Table of contents not
> generated for DOCX #458. I've proposed and tested the maximal possible
> solution to insert a TOC in a docx file (semi-) automatically.
> It is not possible to include it without user intervention, at least
> not, if page numbers should be displayed in the TOC. The reason is that
> only after rendering the docx, the correct page numbers are known.
> Rendering is only possible with an installed Word application or Word
> Automation Services (SharePoint Portal Server), but only with Windows
> or Mac. Another way is to insert an updatable TOC field. Then, one has
> to open the docx file and a question regarding to field updates is
> shown automatically. Clicking in 'Yes' will update the TOC.
> Nikolay implemented this behaviour as a [2]filter and raised the
> [3]question whether this feature should be implemented natively into
> pandoc or as a filter to avoid dirty docx. I still believe (after some
> practial expierences) that a native implementation is beneficial over a
> filter because using a json filter requires installation of additional
> components like runghc, which may increases complexity for some users.
> Also, some tools which integrate pandoc (like knitr/rmarkdown) would
> not benefit from this feature because mostly, they do not support piped
> commands.
> Please follow our discussion in the issue comments and share your
> opinion with us.
> --
> Kind regards,
> Mathias
>
> --
> 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 [4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
> [5]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> [6]https://groups.google.com/d/msgid/pandoc-discuss/ca4b92f4-2ee8-48a7-
> a51a-0d87314db584%40googlegroups.com.
> For more options, visit [7]https://groups.google.com/d/optout.
>
>References
>
> 1. https://github.com/jgm/pandoc/issues/458
> 2. https://gist.github.com/lierdakil/461cf6b0ef67f8cee47e
> 3. https://github.com/jgm/pandoc/issues/458#issuecomment-60556703
> 4. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 5. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 6. https://groups.google.com/d/msgid/pandoc-discuss/ca4b92f4-2ee8-48a7-a51a-0d87314db584-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
> 7. https://groups.google.com/d/optout
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-16 7:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03 23:43 Integrate TOC for docx as a pandoc native function tolot27
[not found] ` <1e23c9dd-68aa-49f8-871a-46330d140488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-12-03 23:51 ` tolot27
2014-12-04 0:11 ` John MacFarlane
2017-05-15 20:33 ` lzytniak
[not found] ` <ca4b92f4-2ee8-48a7-a51a-0d87314db584-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-16 7:16 ` John MacFarlane
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).