Re: Quick question: how to do .index in groff?

2020-07-31 Thread John Gardner
If it DOES get implemented in Groff, please name it `.indexof`. The name `.index` is so horribly misleading I'm almost tempted to submit a PR just to rename it. On Fri, 31 Jul 2020, 2:41 pm B 9, wrote: > "Denis M. Wilson" wrote: > > > Sorry, the macros I've written are .strchr and .strrchr. > >

Re: Quick question: how to do .index in groff?

2020-07-31 Thread Tadziu Hoffmann
> If it DOES get implemented in Groff, please name it `.indexof`. > The name `.index` is so horribly misleading I'm almost tempted > to submit a PR just to rename it. Why not ".strpos"?

Re: Quick question: how to do .index in groff?

2020-07-31 Thread Denis M. Wilson
On Fri, 31 Jul 2020 15:11:15 +0200 Tadziu Hoffmann wrote: > > If it DOES get implemented in Groff, please name it `.indexof`. > > The name `.index` is so horribly misleading I'm almost tempted > > to submit a PR just to rename it. > > Why not ".strpos"? > or ".strstr" as in the C library?

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Larry Kollar
> It's not a question of which implementation has the bigger market > share, but which has the richer feature set. Currently each of them > can do things the other can't. There’s `.if [.g]` and `.if [.neat]` to test for a Groff or Neatroff environment, respectively. Presumably, Heirloom has a si

Re: \: re-enables hyphenation--should it?

2020-07-31 Thread Larry Kollar
It’s a space, which I would presume ends a word. A zero-width space, by definition, but still a space. I think I’ve run into the same issue, and put \% after the space to prevent hyphenation without thinking much about it. — Larry > On Jul 24, 2020, at 11:40 PM, G. Branden Robinson > wrote: >

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Pierre-Jean Fichet
Hello Larry, hello alls, Larry Kollar wrote: > I’m using neatroff for printed fiction, because it directly supports TrueType > (including font features like small caps and extended ligatures) and > paragraph- > at-once justification. Still, I chafe at its low resolution (1/720in vs > Groff’s >

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Steve Izma
On Fri, Jul 31, 2020 at 08:52:59PM +0200, Pierre-Jean Fichet wrote: > Subject: Re: Groff vs Heirloom troff (was Re: Quick question: how to do > .index in groff?) > > Larry Kollar wrote: > > I’m using neatroff for printed fiction,... > > (including font features like small caps and extended > > l

Re: \: re-enables hyphenation--should it?

2020-07-31 Thread Dave Kemper
On 7/31/20, Larry Kollar wrote: > It’s a space, which I would presume ends a word. A zero-width space, > by definition, but still a space. I suppose that depends where you're getting your definition. The groff(7) man page and the Texinfo manual define \: as a "zero-width break point," which does

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Dave Kemper
On 7/31/20, Steve Izma wrote: > I found that the TeX paragraph-at-a-time justification had to > be scrutinized and adjusted just as much as my groff work. The > trade-off to getting better word spacing was that often TeX just > failed and overset lines. Do you know if either of the roffs that hav

Re: Groff should not permit ANSI escapes using \N'27'

2020-07-31 Thread Dave Kemper
On 7/27/20, John Gardner wrote: > Raw escape characters (U+001B) get stripped from source-code during > formatting, but inserting one is still possible using \N'27': > > \N'27'[4mI don't remember underlining this.\N'27'[0m > > This has potential security implications for people using `less -R` (an

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Larry Kollar
Dave Kemper wrote: > On 7/31/20, Steve Izma wrote: >> I found that the TeX paragraph-at-a-time justification had to >> be scrutinized and adjusted just as much as my groff work. The >> trade-off to getting better word spacing was that often TeX just >> failed and overset lines. > > Do you kno

Re: \: re-enables hyphenation--should it?

2020-07-31 Thread Larry Kollar
On Jul 31, 2020, at 6:41 PM, Dave Kemper wrote: > > On 7/31/20, Larry Kollar wrote: >> It’s a space, which I would presume ends a word. A zero-width space, >> by definition, but still a space. > > I suppose that depends where you're getting your definition. The > groff(7) man page and the Te

Re: \: re-enables hyphenation--should it?

2020-07-31 Thread Dave Kemper
On 7/31/20, Larry Kollar wrote: > So you've tried using \& in place of \: to control breaking? Does it work > better? \& has no effect on breaking (nor is it documented to). "Zero-width space" is kind of a misnomer for it, I guess. CSTR #54 called it a "zero width filler character"; the term "z

paragraph-at-once justification (was Groff vs Heirloom troff)

2020-07-31 Thread Doug McIlroy
> often Tex just failed and overset lines. Yes, TeX's curious policy of doing something terribly if it can't be done well has led me to turn on \sloppy mode by default, because "sloppy" is better than wrong. Which brings me to another probable quibble with Knuth- Plass. The "simple optimal text f

Re: \: re-enables hyphenation--should it?

2020-07-31 Thread Peter Schaffter
On Fri, Jul 31, 2020, Dave Kemper wrote: > \& has no effect on breaking (nor is it documented to). "Zero-width > space" is kind of a misnomer for it, I guess. CSTR #54 called it a > "zero width filler character"; the term "zero-width space" for it > seems specific to the Texinfo document. Surely

Re: Groff vs Heirloom troff (was Re: Quick question: how to do .index in groff?)

2020-07-31 Thread Peter Schaffter
On Fri, Jul 31, 2020, Steve Izma wrote: > For almost everything I typeset, especially books and > newsletter-type publications, I always at least a few places > where I need to use track kerning on a paragraph in order to get > good word spacing and to shorten or lengthen paragraphs in order > to a