public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How is --toc supposed to work with ms output?
@ 2020-08-05  2:36 T. Kurt Bond
       [not found] ` <CAN1EhV9z_GcM3KfvRHVb_mZtdi8p-HOg92XobBN=+sv1XoPPcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: T. Kurt Bond @ 2020-08-05  2:36 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

If I process the following RST file
Try out Table of Contents for ms Output
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Section One
===========

This is a paragraph.

Section One.One
---------------

This is a paragraph.

Section One.Two
---------------

This is a paragraph.

Section Two
===========

This is a paragraph.
with the command
pandoc -s --toc -r rst -w ms --output=trytoc.ms.pdf trytoc.rst
I get the attached PDF file.  It has a blank page numbered 1, a page with
the table of contents, numbered one, and then the page with the sections.
The PDF outline has the table of contents entries to click on.

But what is with that blank first page?  And why are the blank page and the
table of contents contents page both numbered 1?
-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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/CAN1EhV9z_GcM3KfvRHVb_mZtdi8p-HOg92XobBN%3D%2Bsv1XoPPcw%40mail.gmail.com.

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

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

* Re: How is --toc supposed to work with ms output?
       [not found] ` <CAN1EhV9z_GcM3KfvRHVb_mZtdi8p-HOg92XobBN=+sv1XoPPcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-08-05 17:52   ` T. Kurt Bond
       [not found]     ` <CAN1EhV8xRWBa1JAn4jnbee3v_0ZJ6zmugJx70TuOQFB2po5orQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: T. Kurt Bond @ 2020-08-05 17:52 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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

Well, it looks like I left off the attached PDF.  Here it is.

On Tue, Aug 4, 2020 at 10:36 PM T. Kurt Bond <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> If I process the following RST file
> Try out Table of Contents for ms Output
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> Section One
> ===========
>
> This is a paragraph.
>
> Section One.One
> ---------------
>
> This is a paragraph.
>
> Section One.Two
> ---------------
>
> This is a paragraph.
>
> Section Two
> ===========
>
> This is a paragraph.
> with the command
> pandoc -s --toc -r rst -w ms --output=trytoc.ms.pdf trytoc.rst
> I get the attached PDF file.  It has a blank page numbered 1, a page with
> the table of contents, numbered one, and then the page with the sections.
> The PDF outline has the table of contents entries to click on.
>
> But what is with that blank first page?  And why are the blank page and
> the table of contents contents page both numbered 1?
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>


-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

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

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

[-- Attachment #2: trytoc.ms.pdf --]
[-- Type: application/pdf, Size: 15487 bytes --]

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

* Re: How is --toc supposed to work with ms output?
       [not found]     ` <CAN1EhV8xRWBa1JAn4jnbee3v_0ZJ6zmugJx70TuOQFB2po5orQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-12-04 19:10       ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]         ` <087f1f46-16b4-480b-ad78-0b50cabac705n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-12-04 19:10 UTC (permalink / raw)
  To: pandoc-discuss


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

More on this topic: if I add 

include-after: 
 - |
   ```{=ms}
   .TC
   ```

to my YAML metadata, the TOC still comes at first, not at last, contrary to 
what is stated in groff's documentation. A bug here, maybe?



Il giorno mercoledì 5 agosto 2020 alle 12:52:51 UTC-5 tkur...-Re5JQEeQqe8@public.gmane.orgm ha 
scritto:

> Well, it looks like I left off the attached PDF.  Here it is.
>
> On Tue, Aug 4, 2020 at 10:36 PM T. Kurt Bond <tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> If I process the following RST file
>> Try out Table of Contents for ms Output
>> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>>
>> Section One
>> ===========
>>
>> This is a paragraph.
>>
>> Section One.One
>> ---------------
>>
>> This is a paragraph.
>>
>> Section One.Two
>> ---------------
>>
>> This is a paragraph.
>>
>> Section Two
>> ===========
>>
>> This is a paragraph.
>> with the command
>> pandoc -s --toc -r rst -w ms --output=trytoc.ms.pdf trytoc.rst
>> I get the attached PDF file.  It has a blank page numbered 1, a page with 
>> the table of contents, numbered one, and then the page with the sections.  
>> The PDF outline has the table of contents entries to click on.
>>
>> But what is with that blank first page?  And why are the blank page and 
>> the table of contents contents page both numbered 1?
>> -- 
>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>
>
>
> -- 
> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>

-- 
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/087f1f46-16b4-480b-ad78-0b50cabac705n%40googlegroups.com.

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

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

* Re: How is --toc supposed to work with ms output?
       [not found]         ` <087f1f46-16b4-480b-ad78-0b50cabac705n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-12-04 19:50           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]             ` <67a01480-0d92-4846-bb35-e5f49a80ebb5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-12-04 19:50 UTC (permalink / raw)
  To: pandoc-discuss


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

Moreover, this weird behavior is avoided if processed through a pipe AND 
removing `-mspdf`

```
pandoc -st ms filename.md | pdfroff -ms -mpdfmark -Dutf8 -e -t -
```

The table of contents appears at the end of the document, as expected. My 
best guess is that this is a bug, in calling `-mspdf`

pandoc v2.16.2, pdfroff v1.22.4 on cygwin x86-64, v3.2.0

Il giorno sabato 4 dicembre 2021 alle 13:10:02 UTC-6 jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ha 
scritto:

> More on this topic: if I add 
>
> include-after: 
>  - |
>    ```{=ms}
>    .TC
>    ```
>
> to my YAML metadata, the TOC still comes at first, not at last, contrary 
> to what is stated in groff's documentation. A bug here, maybe?
>
>
>
> Il giorno mercoledì 5 agosto 2020 alle 12:52:51 UTC-5 tkur...@gmail.com 
> ha scritto:
>
>> Well, it looks like I left off the attached PDF.  Here it is.
>>
>> On Tue, Aug 4, 2020 at 10:36 PM T. Kurt Bond <tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> If I process the following RST file
>>> Try out Table of Contents for ms Output
>>> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>>>
>>> Section One
>>> ===========
>>>
>>> This is a paragraph.
>>>
>>> Section One.One
>>> ---------------
>>>
>>> This is a paragraph.
>>>
>>> Section One.Two
>>> ---------------
>>>
>>> This is a paragraph.
>>>
>>> Section Two
>>> ===========
>>>
>>> This is a paragraph.
>>> with the command
>>> pandoc -s --toc -r rst -w ms --output=trytoc.ms.pdf trytoc.rst
>>> I get the attached PDF file.  It has a blank page numbered 1, a page 
>>> with the table of contents, numbered one, and then the page with the 
>>> sections.  The PDF outline has the table of contents entries to click on.
>>>
>>> But what is with that blank first page?  And why are the blank page and 
>>> the table of contents contents page both numbered 1?
>>> -- 
>>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>>
>>
>>
>> -- 
>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>
>

-- 
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/67a01480-0d92-4846-bb35-e5f49a80ebb5n%40googlegroups.com.

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

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

* Re: How is --toc supposed to work with ms output?
       [not found]             ` <67a01480-0d92-4846-bb35-e5f49a80ebb5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-12-04 20:46               ` T. Kurt Bond
       [not found]                 ` <CAN1EhV_ZgP+ntmt-AGzie5Rn3eoxGGfEEF5MWLmp+pb6sH6acA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: T. Kurt Bond @ 2021-12-04 20:46 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

The pdfroff program is supposed to handle multiple passes of groff to
produce and combine table of contents and body text in the order expected
by those not familiar with groff (and troff), that is contents first, then
body text.   For those not familiar with troff, by itself doesn't do
multiple passes when building the document, so it traditionally produced
the table of contents at the end of the document, after it had collected
all the section titles and their page numbers.  Since output primarily to
paper originally, it was easy to manually move the piece or pieces of paper
with the table of contents up to the right spot in the document.

I've not used pdfroff myself (despite having used troff extensively from
before there was a groff), so I wasn't sure what the combination of pandoc
and groff were supposed to produce in this case, but found the blank page
and the two pages being numbered 1 surprising, and thought someone might
know off hand what to expect here.

I should at some point read the pdfroff man page in detail and figure out
what it's normal use produces and then figure out what is happening in this
case with the pandoc output, but I'm suffering from an extreme lack of
round tuits, though not interest, right now.

On Sat, Dec 4, 2021 at 2:50 PM jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <jlrn77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Moreover, this weird behavior is avoided if processed through a pipe AND
> removing `-mspdf`
>
> ```
> pandoc -st ms filename.md | pdfroff -ms -mpdfmark -Dutf8 -e -t -
> ```
>
> The table of contents appears at the end of the document, as expected. My
> best guess is that this is a bug, in calling `-mspdf`
>
> pandoc v2.16.2, pdfroff v1.22.4 on cygwin x86-64, v3.2.0
>
> Il giorno sabato 4 dicembre 2021 alle 13:10:02 UTC-6 jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ha
> scritto:
>
>> More on this topic: if I add
>>
>> include-after:
>>  - |
>>    ```{=ms}
>>    .TC
>>    ```
>>
>> to my YAML metadata, the TOC still comes at first, not at last, contrary
>> to what is stated in groff's documentation. A bug here, maybe?
>>
>>
>>
>> Il giorno mercoledì 5 agosto 2020 alle 12:52:51 UTC-5 tkur...@gmail.com
>> ha scritto:
>>
>>> Well, it looks like I left off the attached PDF.  Here it is.
>>>
>>> On Tue, Aug 4, 2020 at 10:36 PM T. Kurt Bond <tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> If I process the following RST file
>>>> Try out Table of Contents for ms Output
>>>> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>>>>
>>>> Section One
>>>> ===========
>>>>
>>>> This is a paragraph.
>>>>
>>>> Section One.One
>>>> ---------------
>>>>
>>>> This is a paragraph.
>>>>
>>>> Section One.Two
>>>> ---------------
>>>>
>>>> This is a paragraph.
>>>>
>>>> Section Two
>>>> ===========
>>>>
>>>> This is a paragraph.
>>>> with the command
>>>> pandoc -s --toc -r rst -w ms --output=trytoc.ms.pdf trytoc.rst
>>>> I get the attached PDF file.  It has a blank page numbered 1, a page
>>>> with the table of contents, numbered one, and then the page with the
>>>> sections.  The PDF outline has the table of contents entries to click on.
>>>>
>>>> But what is with that blank first page?  And why are the blank page and
>>>> the table of contents contents page both numbered 1?
>>>> --
>>>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>>>
>>>
>>>
>>> --
>>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>>>
>> --
> 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/67a01480-0d92-4846-bb35-e5f49a80ebb5n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/67a01480-0d92-4846-bb35-e5f49a80ebb5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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/CAN1EhV_ZgP%2Bntmt-AGzie5Rn3eoxGGfEEF5MWLmp%2Bpb6sH6acA%40mail.gmail.com.

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

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

* Re: How is --toc supposed to work with ms output?
       [not found]                 ` <CAN1EhV_ZgP+ntmt-AGzie5Rn3eoxGGfEEF5MWLmp+pb6sH6acA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-12-06  6:11                   ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]                     ` <ba4cdd48-2209-4951-a61a-5f200593fab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-12-06  6:11 UTC (permalink / raw)
  To: pandoc-discuss


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



Il giorno sabato 4 dicembre 2021 alle 14:46:44 UTC-6 tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ha 
scritto:

> The pdfroff program is supposed to handle multiple passes of groff to 
> produce and combine table of contents and body text in the order expected 
> by those not familiar with groff (and troff), that is contents first, then 
> body text.   For those not familiar with troff, by itself doesn't do 
> multiple passes when building the document, so it traditionally produced 
> the table of contents at the end of the document, after it had collected 
> all the section titles and their page numbers.  Since output primarily to 
> paper originally, it was easy to manually move the piece or pieces of paper 
> with the table of contents up to the right spot in the document.
>
>
It occurred to me that the way to avoid this weird behavior was to use the 
documented option to disable the double pass mechanism, and it worked.

pandoc -t ms --pdf-engine-opt --no-toc-relocation -No manual.pdf manual.txt

I guess the other behavior was designed with titlepages in mind, while the 
default document type in pdf/groff puts titles on the first document page.

So it seems to me that this switch must be added to the command line call 
to pdfgroff to produce an output consistent with standard groff.

Besides, there may be a way to add or remove support for titlepages, just 
as in *LaTeX. I may try to do that to the ms template in a couple of days 
in a fork.
 

> I've not used pdfroff myself (despite having used troff extensively from 
> before there was a groff), so I wasn't sure what the combination of pandoc 
> and groff were supposed to produce in this case, but found the blank page 
> and the two pages being numbered 1 surprising, and thought someone might 
> know off hand what to expect here.
>
>
I think I just have figured it out.
 

> I should at some point read the pdfroff man page in detail and figure out 
> what it's normal use produces and then figure out what is happening in this 
> case with the pandoc output, but I'm suffering from an extreme lack of 
> round tuits, though not interest, right now.
> <https://tkurtbond.github.io>
>

I have a working hypothesis it  -_o

Cheers!

-- 
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/ba4cdd48-2209-4951-a61a-5f200593fab0n%40googlegroups.com.

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

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

* Re: How is --toc supposed to work with ms output?
       [not found]                     ` <ba4cdd48-2209-4951-a61a-5f200593fab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-12-06 16:57                       ` T. Kurt Bond
       [not found]                         ` <CAN1EhV_DTbCzmDBwd9nwXcD0JVdJJL8kSt5+g8rterSqN70VOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: T. Kurt Bond @ 2021-12-06 16:57 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Thanks for explaining what you've figured out.

On Mon, Dec 6, 2021 at 1:11 AM jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <jlrn77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
>
> Il giorno sabato 4 dicembre 2021 alle 14:46:44 UTC-6 tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ha
> scritto:
>
>> The pdfroff program is supposed to handle multiple passes of groff to
>> produce and combine table of contents and body text in the order expected
>> by those not familiar with groff (and troff), that is contents first, then
>> body text.   For those not familiar with troff, by itself doesn't do
>> multiple passes when building the document, so it traditionally produced
>> the table of contents at the end of the document, after it had collected
>> all the section titles and their page numbers.  Since output primarily to
>> paper originally, it was easy to manually move the piece or pieces of paper
>> with the table of contents up to the right spot in the document.
>>
>>
> It occurred to me that the way to avoid this weird behavior was to use the
> documented option to disable the double pass mechanism, and it worked.
>
> pandoc -t ms --pdf-engine-opt --no-toc-relocation -No manual.pdf manual.txt
>
> I guess the other behavior was designed with titlepages in mind, while the
> default document type in pdf/groff puts titles on the first document page.
>
> So it seems to me that this switch must be added to the command line call
> to pdfgroff to produce an output consistent with standard groff.
>
> Besides, there may be a way to add or remove support for titlepages, just
> as in *LaTeX. I may try to do that to the ms template in a couple of days
> in a fork.
>
>
>> I've not used pdfroff myself (despite having used troff extensively from
>> before there was a groff), so I wasn't sure what the combination of pandoc
>> and groff were supposed to produce in this case, but found the blank page
>> and the two pages being numbered 1 surprising, and thought someone might
>> know off hand what to expect here.
>>
>>
> I think I just have figured it out.
>
>
>> I should at some point read the pdfroff man page in detail and figure out
>> what it's normal use produces and then figure out what is happening in this
>> case with the pandoc output, but I'm suffering from an extreme lack of
>> round tuits, though not interest, right now.
>> <https://tkurtbond.github.io>
>>
>
> I have a working hypothesis it  -_o
>
> Cheers!
>
> --
> 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/ba4cdd48-2209-4951-a61a-5f200593fab0n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/ba4cdd48-2209-4951-a61a-5f200593fab0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

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

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

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

* Re: How is --toc supposed to work with ms output?
       [not found]                         ` <CAN1EhV_DTbCzmDBwd9nwXcD0JVdJJL8kSt5+g8rterSqN70VOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-12-06 18:32                           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  0 siblings, 0 replies; 8+ messages in thread
From: jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-12-06 18:32 UTC (permalink / raw)
  To: pandoc-discuss


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

After a little more research it seems to me that the bug, if any, is indeed 
in pdfroff. I'll see where to go over there.

Meanwhile, I believe the fix is to add `--no-toc-relocation` to the call to 
pdfroff in pandoc. I'll submit an issue later, with a patch to add this fix.

Cheerfully,


Il giorno lunedì 6 dicembre 2021 alle 10:57:42 UTC-6 tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ha 
scritto:

> Thanks for explaining what you've figured out.
>
> On Mon, Dec 6, 2021 at 1:11 AM jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>>
>>
>> Il giorno sabato 4 dicembre 2021 alle 14:46:44 UTC-6 tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> ha scritto:
>>
>>> The pdfroff program is supposed to handle multiple passes of groff to 
>>> produce and combine table of contents and body text in the order expected 
>>> by those not familiar with groff (and troff), that is contents first, then 
>>> body text.   For those not familiar with troff, by itself doesn't do 
>>> multiple passes when building the document, so it traditionally produced 
>>> the table of contents at the end of the document, after it had collected 
>>> all the section titles and their page numbers.  Since output primarily to 
>>> paper originally, it was easy to manually move the piece or pieces of paper 
>>> with the table of contents up to the right spot in the document.
>>>
>>>
>> It occurred to me that the way to avoid this weird behavior was to use 
>> the documented option to disable the double pass mechanism, and it worked.
>>
>> pandoc -t ms --pdf-engine-opt --no-toc-relocation -No manual.pdf 
>> manual.txt
>>
>> I guess the other behavior was designed with titlepages in mind, while 
>> the default document type in pdf/groff puts titles on the first document 
>> page.
>>
>> So it seems to me that this switch must be added to the command line call 
>> to pdfgroff to produce an output consistent with standard groff.
>>
>> Besides, there may be a way to add or remove support for titlepages, just 
>> as in *LaTeX. I may try to do that to the ms template in a couple of days 
>> in a fork.
>>  
>>
>>> I've not used pdfroff myself (despite having used troff extensively from 
>>> before there was a groff), so I wasn't sure what the combination of pandoc 
>>> and groff were supposed to produce in this case, but found the blank page 
>>> and the two pages being numbered 1 surprising, and thought someone might 
>>> know off hand what to expect here.
>>>
>>>
>> I think I just have figured it out.
>>  
>>
>>> I should at some point read the pdfroff man page in detail and figure 
>>> out what it's normal use produces and then figure out what is happening in 
>>> this case with the pandoc output, but I'm suffering from an extreme lack of 
>>> round tuits, though not interest, right now.
>>> <https://tkurtbond.github.io>
>>>
>>
>> I have a working hypothesis it  -_o
>>
>> Cheers!
>>
>> -- 
>> 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/ba4cdd48-2209-4951-a61a-5f200593fab0n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/ba4cdd48-2209-4951-a61a-5f200593fab0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>

-- 
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/954dd4da-5a89-409b-a7b5-ec8ee55821b4n%40googlegroups.com.

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

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

end of thread, other threads:[~2021-12-06 18:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05  2:36 How is --toc supposed to work with ms output? T. Kurt Bond
     [not found] ` <CAN1EhV9z_GcM3KfvRHVb_mZtdi8p-HOg92XobBN=+sv1XoPPcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-08-05 17:52   ` T. Kurt Bond
     [not found]     ` <CAN1EhV8xRWBa1JAn4jnbee3v_0ZJ6zmugJx70TuOQFB2po5orQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-12-04 19:10       ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]         ` <087f1f46-16b4-480b-ad78-0b50cabac705n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-04 19:50           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]             ` <67a01480-0d92-4846-bb35-e5f49a80ebb5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-04 20:46               ` T. Kurt Bond
     [not found]                 ` <CAN1EhV_ZgP+ntmt-AGzie5Rn3eoxGGfEEF5MWLmp+pb6sH6acA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-12-06  6:11                   ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                     ` <ba4cdd48-2209-4951-a61a-5f200593fab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-12-06 16:57                       ` T. Kurt Bond
     [not found]                         ` <CAN1EhV_DTbCzmDBwd9nwXcD0JVdJJL8kSt5+g8rterSqN70VOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-12-06 18:32                           ` jlr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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