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

2020-08-05 Thread Steve Izma
On Tue, Aug 04, 2020 at 08:20:54PM -0500, Dave Kemper wrote: > Subject: Re: Groff vs Heirloom troff (was Re: Quick question: how to do > .index in groff?) > > On 7/31/20, Steve Izma wrote: > > When I adjust the kerning (or mortising, if necessary) > > in values

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

2020-08-05 Thread John Gardner
In all fairness, the only thing stopping me from attempting this is my lack of confidence (and general dislike) of C++. Eventually, I might take a crack… probably in an effort to marry the miracle called variable fonts with my love of Troff, fuelled by my lifelong obsession

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

2020-08-05 Thread Ingo Schwarze
Hi, Dave Kemper wrote on Tue, Aug 04, 2020 at 08:17:25PM -0500: > On 7/31/20, Peter Schaffter wrote: >> Several years ago, I fielded the idea that, instead of chasing after >> the Grail of paragraph-at-once, groff's line-formatting algorithm be >> improved instead. I worked on systems that used

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

2020-08-04 Thread Dave Kemper
On 7/31/20, Steve Izma wrote: > When I adjust the kerning (or mortising, if necessary) > in values of one-hundredth or one-thousandth of a point, Everything I've found online says that mortising is another (less common) term for kerning, but you're using them here as if they're different processe

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

2020-08-04 Thread Dave Kemper
On 7/31/20, Peter Schaffter wrote: > Several years ago, I fielded the idea that, instead of chasing after > the Grail of paragraph-at-once, groff's line-formatting algorithm be > improved instead. I worked on systems that used the formatting > strategy I proposed > > https://lists.gnu.org/archi

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

2020-08-01 Thread Pierre-Jean Fichet
Steve Izma wrote: > > As a simple curiosity, to help me improve my typographic eye, could > > you please explain me in which situation you need a higher resolution? > > For almost everything I typeset, especially books and > newsletter-type publications, I always at least a few places > where I ne

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

2020-08-01 Thread Pierre-Jean Fichet
Hello alls, Peter Schaffter wrote: > On Fri, Jul 31, 2020, Steve Izma wrote: > > ...I would like to caution people who think that the > > implementation of that algorithm [Knuth-Plass] in groff is going > > to lessen the effort that goes into high-quality typography. > > Again, I agree. That's q

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

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: 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 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

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 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: 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: 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 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-30 Thread B 9
"Denis M. Wilson" wrote: > Sorry, the macros I've written are .strchr and .strrchr. > > .index should not be too hard using direct method (KMP is too > complicated). I may have time to try, no promises... Thank you. I had a mistaken presumption that it was something people would've already solv

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

2020-07-27 Thread Denis M. Wilson
Sorry, the macros I've written are .strchr and .strrchr. .index should not be too hard using direct method (KMP is too complicated). I may have time to try, no promises... On Sat, 25 Jul 2020 17:42:17 -0700strrchr B 9 wrote: > "Denis M. Wilson" wrote: > > > To implement .index as a macro one

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

2020-07-26 Thread Dave Kemper
On 7/26/20, John Gardner wrote: > What I find laughable as that neither of them support right-to-left > languages, Good point. I wonder why this never came up during the mission-statement discussion; it seems like another major expansion that ought to be a long-term goal.

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

2020-07-26 Thread Marc Chantreux
hello, as a newcomer user but involved to other open source projects, i'm hooked by this: > software to have. Neatroff comes to the rescue on that front, so... we're > basically looking at unifying *three* major implementations. ;-) i guess the number of contributors of all those projects is not

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

2020-07-26 Thread John Gardner
> > That groff cannot do the first at all, and requires external helpers > (one of them not even shipped with the package) for the latter two, > ironically makes it look more outdated than its "heirloom" counterpart. What I find laughable as that neither of them support right-to-left languages, w

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

2020-07-26 Thread Morten Bo Johansen
On 2020-07-26 Dave Kemper wrote: > It doesn't so much let groff natively understand modern fonts as > convert those fonts into a form groff does understand (Type 1 > PostScript) and install them in a place groff checks automatically. > By default this requires root privs, though if you don't have

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

2020-07-26 Thread Dave Kemper
On 7/26/20, Richard Morse wrote: > Which is the external helper that lets it natively understand modern fonts? > That would be huge! Yeah, it's confusingly part of the mom macro package documentation, even though it's a general-purpose groff script. See http://www.schaffter.ca/mom/mom-06.html#in

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

2020-07-26 Thread Richard Morse
> On Jul 26, 2020, at 8:24 AM, Dave Kemper wrote: > > Anyone interested in groff's long-term goals should check out its > mission statement > (http://www.gnu.org/software/groff/groff-mission-statement.html), > crafted after much discussion on this list several years ago. Three > core improvement

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

2020-07-26 Thread Dave Kemper
> > By the way, is it a goal of groff to support the Heirloom Troff extensions? > > Nope, more like the other way around. Groff is the dominant Troff > implementation these days, so it behoves Heirloom Troff to support the more > commonly-used extensions. It's not a question of which implementatio

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

2020-07-26 Thread Denis M. Wilson
Hello On Sun, 26 Jul 2020 11:05:38 +1000 John Gardner wrote: > > > > but I guess that's an indication I'm thinking about things in the > > wrong way. > > > Possibly. What exactly have you been using `.index` for? > > By the way, is it a goal of groff to support the Heirloom Troff > extensio

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

2020-07-25 Thread Bjarni Ingi Gislason
A version of an index macro is in the file "contrib/hdtbl/hdmisc.tmac-u", or "/usr/share/groff/1.22.4/tmac/hdmisc.tmac". Its name is "t*index". It needs a correction, see for example groff bug #54538. -- Bjarni I. Gislason

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

2020-07-25 Thread John Gardner
> > but I guess that's an indication I'm thinking about things in the wrong > way. Possibly. What exactly have you been using `.index` for? By the way, is it a goal of groff to support the Heirloom Troff extensions? Nope, more like the other way around. Groff is the dominant Troff implementati

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

2020-07-25 Thread B 9
"Denis M. Wilson" wrote: > To implement .index as a macro one could consider using .substring > together with the Knuth-Morris-Pratt algorithm. I've done simpler > things eg the equivalent of The C library substr(). Thank you. Would you be willing to share your strstr() macro? I'm surprised nob

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

2020-07-24 Thread Denis M. Wilson
To implement .index as a macro one could consider using .substring together with the Knuth-Morris-Pratt algorithm. I've done simpler things eg the equivalent of The C library substr(). Denis On Thu, 23 Jul 2020 16:13:41 -0700 B 9 wrote: > Heirloom Troff has a handy string search function calle

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

2020-07-24 Thread John Gardner
> > Indexing is quite complicated Denis: he's not referring to *content* indexing, but a Heirloom Troff request named `.index` which should arguably be named `.indexof` instead. It simply returns the index of a substring if found within a larger string, presumably returning -1 to indicate nothing

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

2020-07-24 Thread Denis M. Wilson
I have an indexing package which uses 'makeindex', and the results are good. Indexing is quite complicated. If you care to look at the source it is in Index,pkg part of http://www.oxytropis.plus.com/groff/markup-1.0.7a.tar.gz Denis On Thu, 23 Jul 2020 16:13:41 -0700 B 9 wrote: > Heirloom Troff h

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

2020-07-23 Thread John Gardner
You might be able to achieve this using Groff's .while, .length, and .substring requests. Not sure what use-case a substring's index could be in Roff though... On Fri, 24 Jul 2020 at 09:13, B 9 wrote: > Heirloom Troff has a handy string search function called .index which > works like this: > >

Quick question: how to do .index in groff?

2020-07-23 Thread B 9
Heirloom Troff has a handy string search function called .index which works like this: .index R xx string The position where string occurs in xx is stored in register R. It doesn't seem to work yet in Groff, but I'm hoping somebody has a macro that implements .index. Thanks, --b9