public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Re-open #2889? Or create a new bug?
@ 2016-05-02 14:57 kurt.pfeifle via pandoc-discuss
       [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-05-03 10:27 ` Ulrike Fischer
  0 siblings, 2 replies; 9+ messages in thread
From: kurt.pfeifle via pandoc-discuss @ 2016-05-02 14:57 UTC (permalink / raw)
  To: pandoc-discuss


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

I don't know if (or how) I could re-open issue #2889, or wether I should 
start a new issue.

However, I'm experiencing the same (I think) page-overflowing bug as in 
issue #2889. In my case I've been using no images, no floats and no tables 
(unlike the OP for issue #2889), only headlines so far without any 
paragraph texts (since this/was is the early drafting of a longer document).

Please have a look again. My last comment on (now closed) issue #2889 
provides more details, including a link to a Gist containing a Markdown 
example triggering the bug.

(This is in no way important to me because I guess the bug doesn't show up 
once more text paragraphs are there, and I would know how to work around 
it. However, the bug may show up un-expectedly at places where the Markdown 
isn't as "extreme" as it is in my example. Or the real reason for the bug 
being triggered by images, floats and tables on a single page may have been 
wrongly assessed.)

-- 
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/6f5f70b7-802d-4fcb-ba05-e211149c890a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Re-open #2889? Or create a new bug?
       [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-05-02 15:36   ` John MacFarlane
       [not found]     ` <20160502153607.GB43753-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  2016-05-02 15:52   ` John Muccigrosso
  2016-05-02 16:33   ` Joost Kremers
  2 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2016-05-02 15:36 UTC (permalink / raw)
  To: kurt.pfeifle via pandoc-discuss

It seems to be a LaTeX issue, not a pandoc issue.

If you want, you could use pandoc to produce a LaTeX file,
reproduce the problem using pdflatex, and post to, say,
the tex stackexchange site to see if they have any
suggestions.


+++ kurt.pfeifle via pandoc-discuss [May 02 16 07:57 ]:
>   I don't know if (or how) I could re-open issue #2889, or wether I
>   should start a new issue.
>   However, I'm experiencing the same (I think) page-overflowing bug as in
>   issue #2889. In my case I've been using no images, no floats and no
>   tables (unlike the OP for issue #2889), only headlines so far without
>   any paragraph texts (since this/was is the early drafting of a longer
>   document).
>   Please have a look again. My last comment on (now closed) issue #2889
>   provides more details, including a link to a Gist containing a Markdown
>   example triggering the bug.
>   (This is in no way important to me because I guess the bug doesn't show
>   up once more text paragraphs are there, and I would know how to work
>   around it. However, the bug may show up un-expectedly at places where
>   the Markdown isn't as "extreme" as it is in my example. Or the real
>   reason for the bug being triggered by images, floats and tables on a
>   single page may have been wrongly assessed.)
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/6f5f70b7-802d-4fcb-
>   ba05-e211149c890a%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


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

* Re: Re-open #2889? Or create a new bug?
       [not found]     ` <20160502153607.GB43753-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
@ 2016-05-02 15:44       ` kurt.pfeifle via pandoc-discuss
  0 siblings, 0 replies; 9+ messages in thread
From: kurt.pfeifle via pandoc-discuss @ 2016-05-02 15:44 UTC (permalink / raw)
  To: pandoc-discuss


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



On Monday, May 2, 2016 at 5:36:22 PM UTC+2, John MacFarlane wrote:
>
> It seems to be a LaTeX issue, not a pandoc issue. 
>
> If you want, you could use pandoc to produce a LaTeX file, 
> reproduce the problem using pdflatex, and post to, say, 
> the tex stackexchange site to see if they have any 
> suggestions. 
>

Ok, thanks -- will do.


-- 
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/ea9af09c-231f-42c9-83b0-a81fcf877344%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Re-open #2889? Or create a new bug?
       [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-05-02 15:36   ` John MacFarlane
@ 2016-05-02 15:52   ` John Muccigrosso
  2016-05-02 16:33   ` Joost Kremers
  2 siblings, 0 replies; 9+ messages in thread
From: John Muccigrosso @ 2016-05-02 15:52 UTC (permalink / raw)
  To: pandoc-discuss


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

On Monday, May 2, 2016 at 10:57:22 AM UTC-4, kurt.p...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org wrote:
>
> I don't know if (or how) I could re-open issue #2889, or wether I should 
> start a new issue.
>
> However, I'm experiencing the same (I think) page-overflowing bug as in 
> issue #2889. In my case I've been using no images, no floats and no tables 
> (unlike the OP for issue #2889), only headlines so far without any 
> paragraph texts (since this/was is the early drafting of a longer document).
>
> Please have a look again. My last comment on (now closed) issue #2889 
> provides more details, including a link to a Gist containing a Markdown 
> example triggering the bug.
>
> (This is in no way important to me because I guess the bug doesn't show up 
> once more text paragraphs are there, and I would know how to work around 
> it. However, the bug may show up un-expectedly at places where the Markdown 
> isn't as "extreme" as it is in my example. Or the real reason for the bug 
> being triggered by images, floats and tables on a single page may have been 
> wrongly assessed.)
>

I hit this too at some point, doing the same thing you are, I think, 
creating an outline. IIRC, the problem is that headings can't have a page 
break after them, so without paragraph text, you never get a break. 
Discussion is here 
<https://groups.google.com/d/msg/pandoc-discuss/vAfu7w2TfFU/pIbEmIrCBwAJ>.

-- 
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/97ba7ab4-c0be-46f8-bad3-997604b91a81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Re-open #2889? Or create a new bug?
       [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-05-02 15:36   ` John MacFarlane
  2016-05-02 15:52   ` John Muccigrosso
@ 2016-05-02 16:33   ` Joost Kremers
       [not found]     ` <87mvo8zafi.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2016-05-02 16:33 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Mon, May 02 2016, kurt pfeifle via pandoc-discuss wrote:
> I don't know if (or how) I could re-open issue #2889, or wether I should 
> start a new issue.
>
> However, I'm experiencing the same (I think) page-overflowing bug as in 
> issue #2889. In my case I've been using no images, no floats and no tables 
> (unlike the OP for issue #2889), only headlines so far without any 
> paragraph texts (since this/was is the early drafting of a longer document).

I'd say this is not the same bug, since the original bug is related to
longtable, which your document doesn't use.

In fact, the effect you're seeing is probably not even a LaTeX bug but a
result of the fact that headings aren't supposed to be at the bottom of
the page. (La)TeX enforces this by putting a heavy penalty on inserting
a page break right after a heading. Normally, this has the effect of
moving the heading to the next page, but in your case, the algorithm is
confused, because there's no text before the heading (which has no
penalty against inserting a page break), but rather another heading,
which comes with the same heavy penalty against breaking the page right
after it.

In effect you're creating a series of text elements that do not allow
any page breaks between them. The only way to deal with this is to put
them all on the same page, even if this means overflowing the page.

A workaround is to put a \newpage after each heading, or some dummy
text, or even just a hard space. This is not something Pandoc can fix,
and fixing it in (La)TeX might even be undesirable if it increases the
possibility of headings appearing at the bottom of a page.


-- 
Joost Kremers
Life has its moments


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

* Re: Re-open #2889? Or create a new bug?
       [not found]     ` <87mvo8zafi.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2016-05-02 18:00       ` BP Jonsson
  0 siblings, 0 replies; 9+ messages in thread
From: BP Jonsson @ 2016-05-02 18:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Den 2016-05-02 kl. 18:33, skrev Joost Kremers:
> A workaround is to put a \newpage after each heading, or some dummy
> text, or even just a hard space. This is not something Pandoc can fix,
> and fixing it in (La)TeX might even be undesirable if it increases the
> possibility of headings appearing at the bottom of a page.

It can be fixed with a simple pandoc filter (not to be run on the 
final document!)

It inserts a raw latex block containing the command 
`\pagebreak[2]` after every heading, without the need to hardcode 
them in the source.

\pagebreak[2] is what you want here. It 'suggests' a pagebreak 
with a not too low penalty, and does not insert any extra space

/bpj

````python
#!/usr/bin/env python

"""
heading-breaks.py

A pandoc filter which inserts a raw \pagebreak[2] after headings,
so that LaTeX breaks pages between headings in outlines.
"""

import pandocfilters as pf

pagebreak = pf.RawBlock( 'latex', '\\pagebreak[2]' )

def filter_func(key, val, fmt, meta):
     if 'Header' != key:
         return None
     return [pf.Header(*val),pagebreak]


if __name__ == "__main__":
     pf.toJSONFilter(filter_func)
````


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

* Re: Re-open #2889? Or create a new bug?
  2016-05-02 14:57 Re-open #2889? Or create a new bug? kurt.pfeifle via pandoc-discuss
       [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-05-03 10:27 ` Ulrike Fischer
       [not found]   ` <1m7ye3farembp.dlg-bMiYgyzgJ3Ab1SvskN2V4Q@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Ulrike Fischer @ 2016-05-03 10:27 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Am Mon, 2 May 2016 07:57:22 -0700 (PDT) schrieb kurt.pfeifle via
pandoc-discuss:

> I don't know if (or how) I could re-open issue #2889, or wether I should 
> start a new issue.
> 
> However, I'm experiencing the same (I think) page-overflowing bug as in 
> issue #2889. 

There are lots of (different) ways to get overfull pages. One is to
assemble enough material without legal break point.

http://tex.stackexchange.com/a/57861/2388




-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/


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

* Re: Re-open #2889? Or create a new bug?
       [not found]   ` <1m7ye3farembp.dlg-bMiYgyzgJ3Ab1SvskN2V4Q@public.gmane.org>
@ 2016-05-03 18:39     ` John MACFARLANE
       [not found]       ` <20160503183915.GB21146-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MACFARLANE @ 2016-05-03 18:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You could always put

    <!-- TODO -->

under each heading.

+++ Ulrike Fischer [May 03 16 12:27 ]:
>Am Mon, 2 May 2016 07:57:22 -0700 (PDT) schrieb kurt.pfeifle via
>pandoc-discuss:
>
>> I don't know if (or how) I could re-open issue #2889, or wether I should
>> start a new issue.
>>
>> However, I'm experiencing the same (I think) page-overflowing bug as in
>> issue #2889.
>
>There are lots of (different) ways to get overfull pages. One is to
>assemble enough material without legal break point.
>
>http://tex.stackexchange.com/a/57861/2388
>
>
>
>
>-- 
>Ulrike Fischer
>http://www.troubleshooting-tex.de/
>
>-- 
>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/1m7ye3farembp.dlg%40nililand.de.
>For more options, visit https://groups.google.com/d/optout.


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

* Re: Re-open #2889? Or create a new bug?
       [not found]       ` <20160503183915.GB21146-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2016-05-05 18:30         ` BP Jonsson
  0 siblings, 0 replies; 9+ messages in thread
From: BP Jonsson @ 2016-05-05 18:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Den 2016-05-03 kl. 20:39, skrev John MACFARLANE:
> You could always put
>
>     <!-- TODO -->
>
> under each heading.

That doesn't help since the HTML comments aren't echoed in any way 
in the LaTeX output!


     $ pandoc -w latex
     # This is a heading

     <!-- TODO -->

     # This is another heading

     <!-- TODO -->
     ^D
     \section{This is a heading}\label{this-is-a-heading}

     \section{This is another heading}\label{this-is-another-heading}

By contrast the filter I suggested does work well without the need 
to put any ad hoc content in the file, temporary or not.  I 
(programmatically) made a markdown file with 200 level one 
headings separated by two empty lines each, then produced PDFs 
with and without the filter using both xelatex and pdflatex. The 
results speak for themselves: without the filter you get a single 
page with only as many of the headings as fit into it. With the 
filter you get several pages with as many headings as fit into 
each, with a page break following. The contents of the markdown 
file were the same in both cases.

>
> +++ Ulrike Fischer [May 03 16 12:27 ]:
>> Am Mon, 2 May 2016 07:57:22 -0700 (PDT) schrieb kurt.pfeifle via
>> pandoc-discuss:
>>
>>> I don't know if (or how) I could re-open issue #2889, or wether
>>> I should
>>> start a new issue.
>>>
>>> However, I'm experiencing the same (I think) page-overflowing
>>> bug as in
>>> issue #2889.
>>
>> There are lots of (different) ways to get overfull pages. One is to
>> assemble enough material without legal break point.
>>
>> http://tex.stackexchange.com/a/57861/2388
>>
>>
>>
>>
>> --
>> Ulrike Fischer
>> http://www.troubleshooting-tex.de/
>>
>> --
>> 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/1m7ye3farembp.dlg%40nililand.de.
>>
>> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2016-05-05 18:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 14:57 Re-open #2889? Or create a new bug? kurt.pfeifle via pandoc-discuss
     [not found] ` <6f5f70b7-802d-4fcb-ba05-e211149c890a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-02 15:36   ` John MacFarlane
     [not found]     ` <20160502153607.GB43753-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-05-02 15:44       ` kurt.pfeifle via pandoc-discuss
2016-05-02 15:52   ` John Muccigrosso
2016-05-02 16:33   ` Joost Kremers
     [not found]     ` <87mvo8zafi.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2016-05-02 18:00       ` BP Jonsson
2016-05-03 10:27 ` Ulrike Fischer
     [not found]   ` <1m7ye3farembp.dlg-bMiYgyzgJ3Ab1SvskN2V4Q@public.gmane.org>
2016-05-03 18:39     ` John MACFARLANE
     [not found]       ` <20160503183915.GB21146-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2016-05-05 18:30         ` BP Jonsson

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