precision of bc/dc and properties of logarithms (was: neatroff for Russian)

2023-04-27 Thread G. Branden Robinson
[dropped Oliver from CC] Hi Alex, At 2023-04-28T01:41:20+0200, Alejandro Colomar wrote: > > $ python3 -c "import math; print(math.log(1114112, 2))" > > 20.087462841250343 > > You don't need python3 for that: > > $ echo 'l(1114112) / l(2)' | bc -l > 20.08746284125033940845 > > You

Re: [mom] R_MARGIN ignored

2023-04-27 Thread G. Branden Robinson
At 2023-04-27T21:18:52-0400, Peter Schaffter wrote: > On Thu, Apr 27, 2023, Frederic Chartier wrote: > > I'm having trouble controlling the margins with -mom... L_MARGIN > > is honoured but R_MARGIN is ignored. I must be doing something > > wrong, but what ? > > You're not doing anything wrong.

Re: [mom] R_MARGIN ignored

2023-04-27 Thread Peter Schaffter
On Thu, Apr 27, 2023, Frederic Chartier wrote: > I'm having trouble controlling the margins with -mom... L_MARGIN > is honoured but R_MARGIN is ignored. I must be doing something > wrong, but what ? You're not doing anything wrong. It's a bug. Not sure when it crept in, but the fix is simple.

Re: Warn on semantic newlines

2023-04-27 Thread Bjarni Ingi Gislason
On Thu, Apr 27, 2023 at 11:49:07AM +0200, Alejandro Colomar wrote: > [CC -= Ingo, as requested] > > Hi Bjarni, > > On 4/27/23 03:40, Bjarni Ingi Gislason wrote: > > > > "groff" is not the right tool for such things, but "grep" is. > > It could work for an initial implementation. It would

Re: neatroff for Russian. (Was: Questions concerning hyphenation patterns for non-Latin languages, e.g. Russian)

2023-04-27 Thread Alejandro Colomar
Hi Branden, On 4/27/23 05:07, G. Branden Robinson wrote: > [0] If you're like me, the idea of a "20.1-bit" quantity sounds weird. > You can't encode a tenth of a bit in a single logic gate, or one > position in a machine register. The key is to think in terms of > information theory,

Re: groff injects blank page

2023-04-27 Thread Carlos
On Thu, Apr 27, 2023 at 02:34:27PM -0400, Carlos wrote: > On Thu, Apr 27, 2023 at 10:37:29AM -0500, G. Branden Robinson wrote: > > At 2023-04-27T11:06:20-0400, Carlos wrote: > > > On Mon, Apr 24, 2023 at 05:24:00PM -0500, G. Branden Robinson wrote: > > > > mso is a request, and it is documented in

Re: groff injects blank page

2023-04-27 Thread Carlos
On Thu, Apr 27, 2023 at 10:37:29AM -0500, G. Branden Robinson wrote: > At 2023-04-27T11:06:20-0400, Carlos wrote: > > On Mon, Apr 24, 2023 at 05:24:00PM -0500, G. Branden Robinson wrote: > > > mso is a request, and it is documented in groff(7) like other > > > requests. > > > > > > I might have

[mom] R_MARGIN ignored

2023-04-27 Thread Frederic Chartier
I'm having trouble controlling the margins with -mom, especially the right one. Consider this input : .PAPER A4 .PRINTSTYLE TYPESET .L_MARGIN 1c .R_MARGIN 1c .DOCHEADER OFF .FOOTERS .FOOTER_ON_FIRST_PAGE .START .PP Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some

Re: neatroff for Russian.

2023-04-27 Thread Ralph Corderoy
Hi Oliver, > I am not familiar with modern incarnations of C/C++. Is there really > no char data type that is Unicode-compliant? IIRC, neatroff gets by quite happy using C's char and UTF-8 encoding. -- Cheers, Ralph.

Re: groff injects blank page

2023-04-27 Thread G. Branden Robinson
At 2023-04-27T11:06:20-0400, Carlos wrote: > On Mon, Apr 24, 2023 at 05:24:00PM -0500, G. Branden Robinson wrote: > > mso is a request, and it is documented in groff(7) like other > > requests. > > > > I might have time to follow up on the rest later, but I will note > > briefly that "Ignored

Re: groff injects blank page

2023-04-27 Thread Carlos
On Mon, Apr 24, 2023 at 05:24:00PM -0500, G. Branden Robinson wrote: > Hi Carlos, > > At 2023-04-24T11:17:08-0400, Carlos wrote: > > On Mon, Apr 24, 2023 at 12:44:38AM -0500, G. Branden Robinson wrote: > > > The `cR` register is documented in groff_man(7). The `ps4html` > > > register is...not

Re: Warn on mid-input line sentence endings

2023-04-27 Thread G. Branden Robinson
We're re-covering some familiar ground here. I have a few points I'd like to make. 1. "Semantic newlines" is a terrible term. We should abandon it at once. The detection of sentence boundaries is not restricted to newlines, and you *don't* want to warn on _those_, but on the ones

Re: Warn on semantic newlines

2023-04-27 Thread Alejandro Colomar
[I just realized groff@ was removed; adding back] Hi Ingo, On 4/27/23 15:34, Ingo Schwarze wrote: [...] > That's only supported for mdoc(7) so far, not for man(7): [...] > The reason is that the mandoc(1) message system strives for low noise, Ahhh, now I remember we already talked about this

Re: Warn on semantic newlines

2023-04-27 Thread Douglas McIlroy
I oppose loading groff down with AI. Recall the angst of \s, where \s30 summoned huge type and \s40 tiny. I have enough battles with Word and its imitators trying to outguess me*, or with Tex throwing a tantrum about paragraphs that it deems unaesthetic. I am much happier with groff, which in

[bug #64114] [pdfpic] when falling back to EPS, should create file in temporary directory, but doesn't

2023-04-27 Thread G. Branden Robinson
Update of bug #64114 (project groff): Status:None => Postponed ___ Follow-up Comment #1: Oy, vey, I need to implement basename(1) in *roff. I think I'll stick this behind bug #62264.

[bug #62264] string iteration handles escape sequences inconsistently (want `for` request)

2023-04-27 Thread G. Branden Robinson
Follow-up Comment #2, bug #62264 (project groff): I had wondered idly if we needed a reverse iterator. I thought, "surely not". I'm thinking again. See bug #64114, where I want to traverse backward along a string and truncate it (toward the front) upon first hitting a slash. Another

mdoc(7): Lk

2023-04-27 Thread Alejandro Colomar
Hi Branden and Ingo! Here's some difference between man(7) and mdoc(7). Lk doesn't enclose the URI within <>, nor use italics or bold. By comparison, man(7)'s UR encloses the URI (but doesn't use ':'). I think man(7) behavior is more reasonable, according to URI(7). Also, mandoc(1) behaves

Re: Warn on semantic newlines

2023-04-27 Thread Alejandro Colomar
[CC -= Ingo, as requested] Hi Bjarni, On 4/27/23 03:40, Bjarni Ingi Gislason wrote: > > "groff" is not the right tool for such things, but "grep" is. It could work for an initial implementation. It would only have some false positives for things like defining your own macros at the top of a