Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overfull \vbox with \footparagraphX enabled #256

Closed
stenskjaer opened this issue Mar 20, 2015 · 19 comments
Closed

Overfull \vbox with \footparagraphX enabled #256

stenskjaer opened this issue Mar 20, 2015 · 19 comments
Labels

Comments

@stenskjaer
Copy link
Contributor

Am I the only one who is stuggling with overfull \vboxes on almost every page as soon as I enable \footparagraphX?

Take this example:

\documentclass[12pt]{article}

\usepackage{libertine}
\usepackage{eledmac}
\footparagraph{A}

\begin{document}
\beginnumbering

%  Repeat ad nauseam to fill up a couple of pages
\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\endnumbering
\end{document}

This produces an output with vbox overflows on almost every page (if not every except the last). Setting \preXnotes above the default only aggravates the problem.
As soon as I turn of the paragraphed footnotes, there are no overfull pages. It surprises me that I can't find anything on this, since it seems to be a quite general problem, but maybe I'm doing something wrong.

maieul added a commit that referenced this issue Mar 20, 2015
@maieul
Copy link
Owner

maieul commented Mar 20, 2015 via email

@stenskjaer
Copy link
Contributor Author

Sure. A not so minimal MWE to fill up a couple of pages.

\documentclass[12pt]{article}

\usepackage{libertine}
\usepackage{eledmac}
\footparagraph{A}

\begin{document}
\beginnumbering

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend

\pstart 
immobili, hoc esset aut propter indigentiam motoris aut mobilis. Si
propter indigentiam motoris, aut ergo \edtext{propter
  indigentiam}{\Afootnote{\emph{om.} M}} motoris primi aut
appropriati. Non propter indigentiam motoris simpliciter primi quia,
cum primus motor sit virtutis infinitae in motu suo, nullo indiget,
nec appropriati <quia>, cum \edtext{sit}{\Afootnote{sunt M}}
substantia separata, perfectionem suam
\edtext{recipit}{\Afootnote{recipiat MP}} a motore simpliciter
primo. Videtur igitur quod in motu suo <a> nullo inferiori dependeat,
quare etc. Nec propter indigentiam \edtext{mobilis}{\Afootnote{motoris
    M}} quia, cum mobile sit continuum et aeternum, a nihilo dependet,
et maxime non indigebit aliquo quod est infra eum et ab eo causatum
est.  
\pend


\endnumbering
\end{document}

@maieul
Copy link
Owner

maieul commented Mar 21, 2015

and why is it problematic for you to have overfull vbox ? that is directly link to the way footparagraph works, and it will be more complex to suppress them than to keep them...

@stenskjaer
Copy link
Contributor Author

Well, doesn't the overfull \vbox mean that the layout breaks the "frame" of the page? This means that the text block flows into the margins (in this case the bottom margin) and interferes with the footer.
To put it short: It breaks the layout.

I don't want it to suppress the warning, but to adjust the text on the page according to the apparatus size to avoid the overfull box.
Any changes to \footfudgefiddle have no influence (I'm unsure if it should).

I realize that this might be a very fundamental problem. If there is no easy solution, I'll work around the problem instead.
But am I wrong to consider this layout violation a problem?

@maieul
Copy link
Owner

maieul commented Mar 21, 2015

it's quite complex. In many time, it mean that. But not in the present case.

The problem is here:

  • when the paragragraphed notes are inserted, their "height" is lineheight_number of lines. So if you have one half line, it is linehieght_1,5. This height is decreased to the page goal for TeX.
  • when the paragrahed notes are printed, their height is lineheight+number of lines ROUND to the top. So that is linehieght*2.

So there is a difference : that is why we have this overfull vbox.

But that doesn't matter in the present case: while the overfull is lesser than a baselineskip, there will be only one too much line in notes.

Use \usepackage{showframe} to see the problem.

There is no way to solve this issue, except maybe with the future longparagraphnotes, but I have still something to test

@stenskjaer
Copy link
Contributor Author

Thank you for the explanation.

Some notes based on my experiments with this phenomenon:

  • Don't use KOMA-script and try setting the margins with geometry at the same time. This is contrary to the idea of the KOMA-script packages and creates consistent overflows, sometimes of several lines. If you need the KOMA-script functions, but not the typearea-philosophy, use \usepackage{scrextend} instead.
  • Setting the type size to 12pt rather than 11pt creates more overflows -- also more than a single line (expected behavior?). Setting \preXnotes above default setting seems to make this worse.

When you set the type size to 11pt in the document class, this problem is limited to a tolerable level.

But just a quick (probably stupid) question: Why not just calculate the "height" of the paragraphed notes as lineheight * round_up(number of lines)?

@maieul
Copy link
Owner

maieul commented Mar 21, 2015

  1. I don't use komascript never. I don't see the link with this problem.
  2. that is normal that the problem is worse with \preXnotes, because you add more space.

What we don't use round before? that is quite complex and need to know how TeX insertion word.

When you add a note (normal, not paragraphed) you use \insert command.

That does three things:

  • put the note in a vbox.
  • add this vbox to a special memory of TeX
  • decrease the vbox height of the \pagegoal dimen.

So I I have this note
AAA

or this note

AAAAA AAA AAA

In all case I decrease the \pagegoal of \baselineskip (at the note size).

But the problem is for paragraphed notes. With normal footnote, all note is a vbox. To have paragraphed notes, we must do something strange : create a \hbox without line break, and call it as argument of \footins. That prevent to have paragraph break between notes. However, such hbox must be set to the approximatly vsize really occupied. That why we use a conversion to force the height of the hbox and ensure the \pagegoal will be well decreased. So we CAN'T round, because in this case we will decrease the \pagegoal too speed.

There is many problem with paragraphed hbox, the first of them is the fact that such box can't be broken�

I try a new way, but it's more complex that I thought

@stenskjaer
Copy link
Contributor Author

As I said, I have limited the problem somewhat by not using scrartcl and setting the text in 11pt. Now it works o.k.

I think the problem gets worse when you try to define page margins with geometry while using KOMA-script packages, because they assume a different page layout approach. Usually you can do that without too much trouble, but in this specific situation the conflict seems to aggravate the problem. But I'm just guessing.

But anyway, I noticed the desciption of the paragraphing approach in the handbook (§24.5), and I see that the problem is complex. If you can find a solution, it would be wonderful, but don't let it destroy your weekend for my sake.

Thanks for your great work!

@maieul
Copy link
Owner

maieul commented Mar 21, 2015

as I say, I don't use koma and and I can't say. I use only standard class, that is cleaner

@maieul
Copy link
Owner

maieul commented Mar 21, 2015

I think the \footlongparagraph tool in the current branch should be useful for you. I have not yet added \footlongparagraphX.

@stenskjaer
Copy link
Contributor Author

Well, I don't have a problem with long paragraphs (I only have short critical notes), and #247 does not change anything with the overfull vboxes. Should it do that?

@maieul
Copy link
Owner

maieul commented Mar 22, 2015

hum, I made a mistake. This problem could not be solved. But as I have explained, the "only" risk is to have one line too much at the bottom. not more

@maieul
Copy link
Owner

maieul commented Jul 8, 2015

as said in #334, you should play with footfudglefiddle.

@ralessi
Copy link
Contributor

ralessi commented Jul 9, 2015

@stenskjaer: \footfudgefiddle{} must be set before any \footparagraph{X} setting. Otherwise it is ignored.

@maieul
Copy link
Owner

maieul commented Jul 9, 2015 via email

@ralessi
Copy link
Contributor

ralessi commented Jul 9, 2015

Another point which has to be documented (see #324 ).

@maieul
Copy link
Owner

maieul commented Aug 28, 2015

@stenskjaer could you read my last comment on #334 (comment)

and send feedback

@stenskjaer
Copy link
Contributor Author

@maieul: A combination of \footfudgefiddle{} and \AtBeginDocument{\maxhnotesX{0.33\textheight}} mentioned in #334 seems to solve the overfull \vboxes, but now I see a problems with the space between lemmas that I have never seen before. Notice the whitespace before notes for lines 57 and 67 in this example:
skaermbillede 2015-08-31 kl 09 36 32

@maieul
Copy link
Owner

maieul commented Aug 31, 2015

strane space indeed. COuld open an issue with a mWE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants