Hi Bento,

At 2024-05-15T14:53:32-0300, Bento Borges Schirmer wrote:
> Hi people,
> 
> I started to replicate the SBC template found here:
> 
> https://www.sbc.org.br/documentos-da-sbc/summary/169-templates-para-artigos-e-capitulos-de-livros/878-modelosparapublicaodeartigos
> 
> I'm using mm, but then I stumbled upon a problem: indentation, such as
> setting the number register Pi, can only be specified in ens!
> Meanwhile, the template requires 1.27 centimeters. It is a funny
> broken number, but anyway.
> 
> Unaware of this, I tried to specify ".nr Pi 1.27c", and then groff
> would scream several times with:
> 
> troff:body.mm:55: warning [p 1, 6.9i]: cannot break line
> troff:body.mm:70: warning [p 1, 9.1i]: cannot break line
> ...and so forth
> 
> Unless there is a workaround, I'll try some other macro package.

It seems that this behavior is for compatibility with DWB mm.

But I wouldn't worry about it.  Whoever is evaluating your paper will
likely never notice that you failed to set the indentation to 1.27cm.

I explain why in the attached mm document, with renderings from DWB 3.3
mm and groff mm.

> This is not really a question, let's say I'm just chatting and
> speaking my thoughts out loud! I'm open to suggestions and directions
> hehe.

My advice is to not bother setting the register `Pi`, for the reason
explained in the document.

However, I did not expect this behavior.  I had thought that one of the
thinks Jörgen Hägg did when writing his reimplementation of AT&T mm was
to leverage GNU troff's flexibility when using scaling units in numeric
expressions.

But maybe that was hard in this case (and if so, likely others in mm--it
uses _lots_ of registers), since Pi is just a "dumb register"; its value
is converted to basic units as soon as it is assigned to, and the
formatter has no way of knowing what scaling unit was applied by the
user at the time it was assigned.

ms and mm have a kludge in place regarding type sizes and scaled points
(details are in the man pages), but that is only feasible because users
of these packages do not employ 1,000-point type.

The memorandum macros have a strong bias in favor of ens for all
horizontal measurements and vees for all vertical ones.  Perhaps
amusingly, I recently changed GNU mm to be even more rigid about this.

o The m (mm) macro package's `DS` macro now interprets its third
  argument (a right-hand indentation) in ens by default, for consistency
  with the rest of the package.  This is a difference from DWB mm (which
  passed the value unprocessed to the `ll` request, which itself uses
  ems), and groff mm's own historical behavior, which used basic units.

That change is forthcoming in groff 1.24.

Regards,
Branden
.P
Hello, world!
This paragraph is probably not indented.
.P 1
But this one is,
by
.IR mm 's
default.
But we're going to change the indentation to
.B 1.27c
(centimeters).
.nr Pi 1.27c
.P 1
Let's see how well that worked.
.nr Pi 5
.P 1
Not well!
What if we convert centimeters to ens in a temporary register?
.nr cn 1c/1n \" ens per centimeter
.nr Pi \n(cn
.P 1
How's that for indentation?
.nr Pi 5
.P 1
How's
.B this
for indentation (back at the default)?
They look the same because 1.27 cm = (2.54 / 2) cm.
2.54 cm is one inch.
That is in fact the
.I definition
of the inch.
The default paragraph indentation in
.I mm
(and in much other U.S. formal writing)
is one half inch\(emor 1.27 cm.

Attachment: indentation-mm-dwb.ps
Description: PostScript document

Attachment: indentation-mm-groff.ps
Description: PostScript document

Attachment: signature.asc
Description: PGP signature

Reply via email to