Can .substring be made to handle an empty result?

2021-03-26 Thread Jim Avera
I'm trying to use .substring to remove the first character of a string, leaving behind whatever follows, even if that is nothing (i.e. the string had only one character).   .substring str 1 or   .length n2 "\*[str]   .nr n2 -1   .substring str 1 \n[n2] (if n2 is omitted, it appears to defaul

Re: Warnings of dangling .el with bracket-less nesting

2021-03-19 Thread Jim Avera
On 3/19/21 7:32 AM, G. Branden Robinson wrote: It seems so. Would you be willing to file this report as a Savannah ticket? Done.   https://savannah.gnu.org/bugs/index.php?60260

Warnings of dangling .el with bracket-less nesting

2021-03-18 Thread Jim Avera
The following code operates correctly in all cases but warns about "unbalanced .el request" if either the first or second condition is true (with -w all). The warnings do not happen if the "else" statements are wrapped in \{\ ... \} but is this supposed to be necessary?   The conditionals all

Re: Is .rd implemented at all?

2020-12-17 Thread Jim Avera
FWIW, .rd does work in Ubuntu 20.04 -Jim $ echo ".rd" >/tmp/test.tr ; groff -Tascii /tmp/test.tr | cat -s foo bar [^D] foo bar

Re: How to make groff use local timezone?

2020-12-15 Thread Jim Avera
On 12/15/20 4:21 PM, Jim Avera wrote: In Ubuntu 20.04 `groff --version` says "version 1.22.4", but seems to ignore TZ... I downloaded the source for 1.22.4 and built it, and TZ works as expected. So Ubuntu (or Debian) must have somehow screwed with it.    I'll submit an Ub

Re: How to make groff use local timezone?

2020-12-15 Thread Jim Avera
At 2020-12-12T21:19:38-0800, Jim Avera wrote: I suspect groff is always in UTC (but haven't confirmed). No, that is not true, at least not in groff as provided by GNU.  A downstream distributor, like a GNU/Linux distribution, could alter this. Hmm.  In Ubuntu 20.04 `groff --version`

How to make groff use local timezone?

2020-12-12 Thread Jim Avera
The registers \n[mo] \n[dy] etc. seem to not respect the current time zone, and so (for example) the \*(DT string provided by -mm shows the wrong day for several hours each day. I suspect groff is always in UTC (but haven't confirmed).   Is this a bug or intended? How can I make mm's \*(DT s

Re: [Groff] .br after .box *invariably* generates an output line?

2013-02-28 Thread Jim Avera
groff -Tascii <<'EOF' .nf ^^^ This instruction causes the empty line. Just try to insert three `.br' lines to get three line breaks. [snip] Only use .nf while replaying a diversion (to avoid reformatting), not while defining it. Thanks for responding... I'm still not quite getting it, and hop

[Groff] .br after .box *invariably* generates an output line?

2013-02-15 Thread Jim Avera
#!/bin/sh # Question: Why is there a blank line in the output from the following? groff -Tascii <<'EOF' .nf Before the box. .box xxx .br .box .xxx After the box. EOF exit 0 => Before the box. After the box. I'm struggling to use .box and _always_ get a line of text in the diversion if