On Sun, May 21, 2023 at 02:52:02AM -0500, G. Branden Robinson wrote: > Hi all, > > For just over 23 years, since commit e9b0d52dec, our Texinfo manual has > claimed that temporary indentation is ignored when lines are being > centered with the `ce` request. > > But that is not the case in groff 1.22.4 or Git HEAD, and it's not true > of DWB 3.3 troff or Heirloom Doctools troff, either. > > It's not ignored by `rj` either. > > I'll be pushing a commit to comment out this incorrect statement, rather > than deleting it, because I think perhaps we should change this > behavior. > > Most of the time I don't think it is what a user would expect. > > If you do use it, you have to double the amount of the temporary > indentation to get what you would expect. (The temporary indentation > gets cut in half as part of the centering arithmetic, I think.) > > Also, you can't use a negative temporary indentation (if doing so > completely eats up more than the the normal indentation). groff warns; > the others don't, but all lay out the output identically. > > $ cat ce2.roff > .ce 4 > foo > .ti -3n > bar > .ti 6n > baz > qux > > $ DWBHOME=. ./bin/nroff ce2.roff |cat -s # or... > $ ./bin/nroff ce2.roff |cat -s # Heirloom, or... > $ nroff ./EXPERIMENTS/ce2.roff | cat -s # groff 1.22.4 > foo > bar > baz > qux > > groff's warning, seen with '-wrange': > troff: ./EXPERIMENTS/ce2.roff:3: warning: total indent cannot be negative > > What should be done?
The false statement in "doc/groff.texi" should be removed. If an indent is there, it affects finding the middle of a text in the output line. One example does not proof anything. Expectations are imaginations. #### .nr length \n(.lu/1n Line length is \n[length]n .br .nr QQ 9*\w'0'u 12345678901234567890123456789012345678901234567890123456789012345678901234567890 \h'\n(QQu'1\h'\n(QQu'2\h'\n(QQu'3\h'\n(QQu'4\h'\n(QQu'5\h'\n(QQu'6\h'\n(QQu'7\h'\n(QQu'8 .br .ce 4 foo .\".ti -3n barbar .ti 6n baz qux .pl \n(nlu Result: troff:../testen/prof.temp.indent:5: warning [p 1, 0.2i]: cannot break line troff:../testen/prof.temp.indent:6: warning [p 1, 0.3i]: cannot break line Line length is 65n 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1 2 3 4 5 6 7 8 foo barbar baz qux #### Ignoring indent does not make sense.