groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mmse] Adding a footnote yields a infinite loop.


From: hbezemer
Subject: Re: [mmse] Adding a footnote yields a infinite loop.
Date: Sun, 20 Nov 2022 12:37:56 +0100
User-agent: s-nail v14.9.24

"G. Branden Robinson" <g.branden.robinson@gmail.com> wrote:

Hi Branden,

Thanks for the fix.

A4 is de facto the standard for all documents in Europe.
(Since A4 and letter don't differ that much in size, I mostly use the default 
although the documents get printed on A4 paper.)

regards!

Hans

I've seen the line you've changed when looking for the error, but did not 
noticed the missing unit.
> Hi Hans,
> 
> At 2022-11-19T21:42:41+0100, hbezemer--- via wrote:
> > I noticed that when using mmse it seems to give an error when adding a
> > footnote.  Groff terminates with the following error message:
> > "fatal error: input stack limit exceeded (probable infinite loop)"
> > I can reproduce it with:
> > groff -Tpdf -mmse SE.groff > SE.pdf
> 
> I was able to reproduce it too.  Thanks!
> 
> Here's a fix.
> 
> diff --git a/contrib/mm/mse.tmac b/contrib/mm/mse.tmac
> index dedfb10bb..8184b1434 100644
> --- a/contrib/mm/mse.tmac
> +++ b/contrib/mm/mse.tmac
> @@ -43,7 +43,7 @@ http://savannah.gnu.org/bugs/?group=groff.
>  .po \n[@po]u
>  .pl \n[@pl]u
>  .
> -.nr pg*footer-size 4\"                  1v+footer+even/odd footer+1v
> +.nr pg*footer-size 4v\"                  1v+footer+even/odd footer+1v
>  .\"------------------------------------------------
>  .\" Dokumentnamn
>  .ds LetDNAMN
> 
> The problem is that someone (presumably macro package author Jörgen
> Hägg) left the scaling unit off of the `pg*footer-size` register
> assignment, so the size used for the page footer was 4 basic units
> instead of 4 vees.  The former value is too small by five orders of
> magnitude (a factor of twelve thousand).
> 
> I hadn't really looked at mse.tmac before but I observe that it forces
> the page dimensions (and offset) to fit, I think, A4 paper in portrait
> format if they are not already set via the L, W, and O registers.  I
> suspect that will need to change to work more smoothly with groff's
> papersize.tmac macro file.
> 
> I may need to add a comment about this (in English :-/) to the
> groff_mmse(7) page.
> 
> In the meantime a good way to render documents requiring mmse will be as
> follows.
> 
> $ groff -dpaper=a4 -mm -mmse -P -p -P a4 lorem-svenska.mm
> 
> If a different paper format is desired, setting the aforementioned
> command-line registers will be important, so add the following flags.
> 
>   -rLxx -rWyy -rOzz
> 
> ...where xx is the paper length, yy the line length, and zz the page
> offset.  Use of scaling units ('c' for centimeters will be common, I
> reckon) is recommended.
> 
> I'm attaching my own reproducer for your convenience.  Its mostly
> equivalent to yours.
> 
> Regards,
> Branden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]