Re: process man(7) (or any other package of macros) without typesetting

2023-08-17 Thread Lennart Jablonka
The problem is that at no point you can have the .roff source, after the man(7) macros have been expanded. Would it be possible to split the groff(1) pipeline to have one more preprocessor, let's call it woman(1) (because man(1) is already taken), so that it translates man(7) to roff(7)? I'd lik

[PATCH] grotty(1): Don’t mention -T latin1 twice.

2023-08-19 Thread Lennart Jablonka
Fixes: 52f661f080f9 ("[man page]: Parallelize output driver intros.") --- src/devices/grotty/grotty.1.man | 1 - 1 file changed, 1 deletion(-) diff --git a/src/devices/grotty/grotty.1.man b/src/devices/grotty/grotty.1.man index 41eabbcfa..24cea9801 100644 --- a/src/devices/grotty/grotty.1.man +++

[PATCH] [grotty]: Use terminfo.

2023-08-19 Thread Lennart Jablonka
This has nothing at all to do with making it easier to customize the look of man pages. Use of hardcoded SGR escape sequences persists as a fallback but should probably be dropped. If it stays, I’m unsure of the interface to grotty. The -T disabling the fallback seems hackish. Hyperlinks are st

Re: [PATCH] [grotty]: Use terminfo.

2023-08-20 Thread Lennart Jablonka
Quoth G. Branden Robinson: Hi Lennart, Thanks a lot for taking a stab at this! In lieu of a proper code review, I'll just riff on this to get the issues out before an audience. At 2023-08-19T20:08:06+0000, Lennart Jablonka wrote: This has nothing at all to do with making it easi

Re: '-' vs '\-' in TH (man(7))

2023-08-20 Thread Lennart Jablonka
Quoth Alejandro Colomar: $ grep -rn '^\.TH [^ ]*-' man* man5/proc_sysrq-trigger.5:7:.TH proc_sysrq-trigger 5 (date) "Linux man-pages (unreleased)" man7/man-pages.7:11:.TH man-pages 7 (date) "Linux man-pages (unreleased)" man7/iso_8859-10.7:6:.TH ISO_8859-10 7 (date) "Linux man-pages (unreleased)

[PATCH v2] [grotty]: Use terminfo.

2023-08-21 Thread Lennart Jablonka
This has nothing at all to do with making it easier to customize the look of man pages. Hyperlinks are still marked up using OSC 8, hoping that whatever terminal sits in front of the user interprets or ignores those. Terminfo naturally doesn’t have a capability for hyperlinks. Autoconf is not inf

Re: [PATCH] [grotty]: Use terminfo.

2023-08-21 Thread Lennart Jablonka
Quoth Lennart Jablonka: I _don't_ want to refactor grotty(1), as a single program, to support being built with or without terminfo. That way lies a rope bridge over a chasm belching flames hundreds of feet into the air, and its name is dlopen(). (Portability problems are what scare me.)

Re: [PATCH] [grotty]: Use terminfo.

2023-08-22 Thread Lennart Jablonka
Quoth Ingo Schwarze: Until it does, read "terminfo(3)" as "putp(3)". It's brings up the relevant page and is quicker to type anyway. Good advice. That conflicts with my sense of aesthetic. References should use the man page title. The correct way to refer to putp’s man page is something

Re: [PATCH v1 1/2] [troff]: Add lengthof() macro.

2023-08-26 Thread Lennart Jablonka
Quoth Alejandro Colomar: The good news is that I like the implementation. I just don't like the name. I have a sizeof_array() macro that does #define sizeof_array(a) (sizeof(a) + must_be_array(a)) That is, it calculates the size in bytes that the array takes up in memory.

Re: (Re)setting page and footnote numbers

2023-08-28 Thread Lennart Jablonka
Quoth Pippo Carmona: I am currently making a compilation of technical essays by merging multiple pdfs made with Groff. You can concatenate the troff output before post-processing. { troff -Tpdf a troff -Tpdf b } | gropdf >all.pdf However, one p

Re: [PATCH v2] [grotty]: Use terminfo.

2023-08-30 Thread Lennart Jablonka
Subject: [PATCH v2] [grotty]: Use terminfo. Branden: ENQ

Re: [PATCH v2] [grotty]: Use terminfo.

2023-09-01 Thread Lennart Jablonka
Quoth G. Branden Robinson: At 2023-09-01T12:47:58-0500, G. Branden Robinson wrote: I'm happy with this and will start merging. Any tweaks I make will be in a subsequent commit, unless merging it as-is breaks the build/tests, in which case I'll let you know. I'm letting you know. Thanks! I

Re: [PATCH v2] [grotty]: Use terminfo.

2023-09-01 Thread Lennart Jablonka
Quoth G. Branden Robinson: At 2023-08-21T21:40:18+, Lennart Jablonka wrote: This has nothing at all to do with making it easier to customize the look of man pages. Hyperlinks are still marked up using OSC 8, hoping that whatever terminal sits in front of the user interprets or ignores

Re: [PATCH v2] [grotty]: Use terminfo.

2023-09-02 Thread Lennart Jablonka
Quoth G. Branden Robinson: At 2023-09-01T22:03:54+, Lennart Jablonka wrote: In that way, tparm behaves as a variadic function in K&R C. Now, it doesn’t. We have a replacement, tiparm; alas, my OpenBSD box doesn’t have that yet. char *tiparm(const char *, ...); You hav

Re: Leaders

2023-09-02 Thread Lennart Jablonka
Quoth G. Branden Robinson: On second thought--in the form of empirical measurements rather than hand-waving conjecture--I think you've found a bug. How so? Consider the following input, which I've degraded to an ASCII spelling of "chateau" to permit some comparative analysis (keep reading).

Re: [PATCH v2] [grotty]: Use terminfo.

2023-09-02 Thread Lennart Jablonka
Quoth Lennart Jablonka: I wanna tell you: When manually testing, I found MR man page references followed by space to be followed by a backslash preceding the space and I found no OSC 8 emitted. Or similar. I’ll debug that later. While I know tty.cpp fairly well now, I have to admit the

Re: Leaders

2023-09-02 Thread Lennart Jablonka
Quoth G. Branden Robinson: At 2023-09-02T22:35:25+, Lennart Jablonka wrote: No, there aren’t. Your message does not contain the SOH bytes; you could as well put replacement “^A”s there. I was attempting to suggest their presence. My tone was too accusatory. Yes, you did do that

Re: Leaders

2023-09-03 Thread Lennart Jablonka
Quoth Peter Schaffter: On Sat, Sep 02, 2023, G. Branden Robinson wrote: > Question 2: > What is causing the erroneous justification of the third line? > There's more than enough room for "air" and some leader. There is not, in the example you provided. You set one tab stop, at the line length

Re: Leaders

2023-09-03 Thread Lennart Jablonka
Quoth Peter Schaffter: On Sat, Sep 02, 2023, Lennart Jablonka wrote: The point is that the width of the line of periods is determined by its position on the input line. That is confusing, yet it also doesn’t usually matter: You seldom use tabs or leaders in filled text. Actually, no. I

[PATCH v3] [grotty]: Use terminfo.

2023-09-04 Thread Lennart Jablonka
This has nothing at all to do with making it easier to customize the look of man pages. Hyperlinks are still marked up using OSC 8, hoping that whatever terminal sits in front of the user interprets or ignores those. Terminfo naturally doesn’t have a capability for hyperlinks. Autoconf is not inf

Re: Special characters

2023-09-21 Thread Lennart Jablonka
$ nroff -man < doc/CSV_XS.3 > doc/CSV_XS.man or $ nroff -mandoc < doc/CSV_XS.3 > doc/CSV_XS.man Used to render up to and including groff-1.22 $row\->[2] =~ m/pattern/ or next; as $row->[2] =~ m/pattern/ or next; but as of 1.23, generates $row->[2] =˜ m/pattern/ or next; which rend

Re: [PATCH v3] [grotty]: Use terminfo.

2023-09-21 Thread Lennart Jablonka
Date: Tue, 5 Sep 2023 02:09:29 + Subject: [PATCH v3] [grotty]: Use terminfo. ENQ

Re: [PATCH v3] [grotty]: Use terminfo.

2023-09-22 Thread Lennart Jablonka
Quoth G. Branden Robinson: ACK. I've gotten a bit sidetracked learning more about terminfo and ncurses...and a dreaded, predictable thing happened. I found the existing ncurses documentation frustrating and started rewriting it. (This is how groff got stuck with me.) https://lists.gnu.org/arc

Re: uppercase german umlaut

2023-12-28 Thread Lennart Jablonka
Quoth holger.herrl...@posteo.de: echo ä | gpic | hexStream 0x2e 0x69 0x66 0x20 0x21 0x64 0x50 0x53 | .if !dPS 0x20 0x2e 0x64 0x73 0x20 0x50 0x53 0x0a | .ds PS. 0x2e 0x69 0x66 0x20 0x21 0x64 0x50 0x45 | .if !dPE 0x20 0x2e 0x64 0x73 0x20 0x50 0x45 0x0a | .ds PE. 0x2e 0x6c 0x66 0x20 0x31 0x20

Re: Raw colored ASCII/UTF art for manpages

2023-12-28 Thread Lennart Jablonka
Quoth aackmann: It would be very nice to add raw ASCII/UTF art to manpages. That would make manpages very expressive, as package maintainers will be able to add ASCII/UTF diagrams and/or art. Imagine your manpage showing you a colored text chart, logo, and what not. Groff would add \e[0m to begin

Re: gpic and 8-bit characters (was: Proposed GNU troff behavior change: require end-of-input macros to exit)

2024-01-02 Thread Lennart Jablonka
Quoth G. Branden Robinson: So because both being above ASCII (8 bit area), I'm going to stop you right there. ASCII is not an 8-bit code. It is a 7-bit code, per USAS (later ANSI) X3.4-1968 and ECMA-6. https://ia800800.us.archive.org/35/items/enf-ascii-1968-1970/Image070917151315.pdf https:/

Re: Proposed GNU troff behavior change: require end-of-input macros to exit

2024-01-02 Thread Lennart Jablonka
Quoth hoh...@posteo.de: If gpic gets Ä (0xc3 0x84) it complains about 0x84. If gpic gets ä (0xc3 0xa4) it does not complain about 0xa4. gpic says: "invalid input character". So because both being above ASCII (8 bit area), what makes 0x84 wrong? It seems that 0x84 is located in a control area w

Re: [TUHS] Re: Original print of V7 manual? / My own version of troff

2024-01-18 Thread Lennart Jablonka
Quoth John Gardner: Thanks for reminding me, Branden. :) I've yet to get V7 Unix working with the latest release of SimH, so that's kind of stalled my ability to develop something in K&R-friendly C. I went ahead and write a little C/A/T-to-later-troff-output converter in v7-friendly and C89-c

Re: [TUHS] Re: Original print of V7 manual? / My own version of troff

2024-01-22 Thread Lennart Jablonka
Quoth G. Branden Robinson: I went ahead and write a little C/A/T-to-later-troff-output converter in v7-friendly and C89-conforming C: https://git.sr.ht/~humm/catdit This is an exciting prospect but I can't actually see anything there. I get an error. "401 Unauthorized You don't have the nec

Re: [TUHS] Re: Original print of V7 manual? / My own version of troff

2024-01-23 Thread Lennart Jablonka
Quoth Lennart Jablonka: and the character codes emitted are still those of the C/A/T, resulting in the wrong glyphs being used. The codes should probably be remapped by default, with a command-line option to restore the original ones. I would of course recommend writing out 'C' com

Re: [TUHS] Re: Original print of V7 manual? / My own version of troff

2024-01-23 Thread Lennart Jablonka
Quoth Lennart Jablonka: I’ve attached a PDF of our favourite table. Content-Type: application/pdf Content-Disposition: attachment; filename="table1.pdf" Content-Transfer-Encoding: quoted-printable Oops. That should be application/postscript and table1.ps.

Re: [PATCH v3] [grotty]: Use terminfo.

2024-02-05 Thread Lennart Jablonka
Quoth G. Branden Robinson: ACK. I've gotten a bit sidetracked learning more about terminfo and ncurses...and a dreaded, predictable thing happened. I found the existing ncurses documentation frustrating and started rewriting it. (This is how groff got stuck with me.) https://lists.gnu.org/arc

[PATCH] [eqn]: Don’t place undue expectation on libc.

2024-02-20 Thread Lennart Jablonka
At that place, eqn has included the header . As part of the C++ standard library, provides a bunch of stuff, including atexit, in the global scope; it need not provide that stuff in namespace std. See https://eel.is/c++draft/support.c.headers.other --- src/preproc/eqn/main.cpp | 2 +- 1 file ch

Re: [PATCH v3] [grotty]: Use terminfo.

2024-02-20 Thread Lennart Jablonka
Quoth G. Branden Robinson: You know, just in case you want to take another look at that patch I sent a while ago. For grotty. To use terminfo. […] So I will take another look, yes. I guess then I’ll re-start pinging you every other week or so. Or were you expecting me to re-send the patc

Re: [PATCH v3] [grotty]: Use terminfo.

2024-02-26 Thread Lennart Jablonka
Quoth G. Branden Robinson: I'm attaching my progress so far. Nice! I guess I’ll drop a few comments on it. (Uncommented hunks omitted.) --- a/src/devices/grotty/tty.cpp +++ b/src/devices/grotty/tty.cpp @@ -916,8 +920,86 @@ printer *make_printer() return new tty_printer(); } -static voi

HEAD build failure with OpenBSD yacc

2024-03-04 Thread Lennart Jablonka
Hi Branden! With commit 7b47855abd65 ("Update gnulib submodule."), groff doesn’t build anymore with OpenBSD yacc, even with the std::atexit thing fixed. Gnulib headers pretending to be C standard library headers (lib/sys/types.h and the like) started requiring to be included after config.h.

Re: HEAD build failure with OpenBSD yacc

2024-03-06 Thread Lennart Jablonka
Quoth G. Branden Robinson: Thanks for the report. I confess I have no clear idea how to address this problem. Is OpenBSD's yacc the same as byacc (with which I've had many successful builds, including one of HEAD just now), or different? OpenBSD’s yacc is indeed Berkeley yacc, byacc. It is n

[PATCH] doc/groff.texi.in: Define the centimeter.

2024-03-07 Thread Lennart Jablonka
I think it’s more fun this way. --- doc/groff.texi.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/groff.texi.in b/doc/groff.texi.in index dda99b83a..56fdce530 100644 --- a/doc/groff.texi.in +++ b/doc/groff.texi.in @@ -6015,7 +6015,8 @@ Inch; defined as 2.54@tie{}centi

[PATCH] [grotrin] Add post-processor for groff input.

2024-03-09 Thread Lennart Jablonka
This is useless. And also not what Alejandro wanted, presumably. Suggested-By: Alejandro Colomar --- I don’t wanna wait for April 1st. .gitignore| 1 + Makefile.am | 1 + src/devices/grotrin/.gitignore| 5 ++ src/devices/grotrin/grotrin.1

Re: Milestone reached: hyperlinked mdoc(7) documents in PDF

2024-03-17 Thread Lennart Jablonka
.Dd March 18, 2024 .Dt EMPTY-CALLED-AR .Os .Sh NAME .Nm empty-called-Ar .Nd a groff \-mdoc bug .Sh DESCRIPTION Empty called Ar: .No Ar That's it: This text right here shouldn't be oblique. .Pp I found this in your mandoc man page PDF in .Xr makewhatis 8 , as .Bd -literal -offset indent \&.Fl t Ar

Re: Milestone reached: hyperlinked mdoc(7) documents in PDF

2024-03-18 Thread Lennart Jablonka
Quoth G. Branden Robinson: There may be some malformedness here complicating matters. My example of .No Ar is not malformed: The No there is useless, yes, but that shouldn’t break anything. The warning is a warning of the uselessness, not a warning of unspecifiedness. I simply wanted to po

Re: HEAD build failure with OpenBSD yacc

2024-03-19 Thread Lennart Jablonka
Quoth G. Branden Robinson: Popping the stack from history, I cannot reproduce this problem building on OpenBSD 7.4. Bison is installed and found by groff's configure script. It's not my machine; I don't have superuser privileges. Yes, it works using bison. Even without root access, you can u

Re: mandoc(1)'s man pages, groffed, and Project KIC (was: Milestone reached: hyperlinked mdoc(7) documents in PDF)

2024-03-19 Thread Lennart Jablonka
Quoth G. Branden Robinson: And the page numbers reset at the start of each section. Which they shouldn’t do—the book is one unit; it should get its own page numbers. And in other books, you don’t usually see page numbers per chapter. This was a bug in me, not in groff. I forgot to specify `-r

Re: HEAD build failure with OpenBSD yacc

2024-03-19 Thread Lennart Jablonka
Quoth G. Branden Robinson: Yes, but do look at yacc’s output, eqn.cpp. Using OpenBSD’s yacc, eqn.cpp starts with this: #include #include #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYLEX yylex() #define YYEMPTY -1

Re: mandoc(1)'s man pages, groffed, and Project KIC (was: Milestone reached: hyperlinked mdoc(7) documents in PDF)

2024-03-19 Thread Lennart Jablonka
Quoth Dave Kemper: On Tue, Mar 19, 2024 at 1:28 PM Lennart Jablonka wrote: replace Courier by a non-fixed-width type face, because we really don’t need to emulate the nonsense typewriters do in print. True if it were emulating only typewriters, but fixed-width fonts are still very common in

Re: the Courier font family and nroff history (was: mandoc(1)'s man pages, groffed, and Project KIC)

2024-03-22 Thread Lennart Jablonka
Quoth G. Branden Robinson: At 2024-03-19T19:59:58+, Lennart Jablonka wrote: Right. We can emulate the nonsense typewriter /emulators/ do. I do think that we shouldn’t do that, either. I would not describe character-cell video terminals as "typewriter emulators" precisely be

Re: An extremely lazy proposal

2024-03-22 Thread Lennart Jablonka
Quoth Oliver Corff via: Reply-to: Oliver Corff This might not be the greatest of ideas. An MUA might just decide to reply to you only, instead of to you and the list. Dear All, recently I compiled, and re-compiled, and again recompiled a set of various documents with different tables, e

Re: Proposed v2: revised man(7) synopsis macros

2024-04-26 Thread Lennart Jablonka
Quoth G. Branden Robinson: I have been dissatisfied with groff man(7)'s SY and YS macros for a long time. My primary grievance is one that has frustrated its uptake by documenters of libraries: the macros are designed for synopsizing Unix commands, not C library functions. After working on the

Re: man(7) <-> mdoc(7) (approximate) correspondence table?

2024-04-27 Thread Lennart Jablonka
'\" t . .\" SPDX-FileCopyrightText: 2024 Lennart Jablonka .\" SPDX-LicenseIdentifier: BlueOak-1.0.0 .\" https://blueoakcouncil.org/license/1.0.0 . .Dd April 27, 2024 .Dt MDOC-MAN-CMP 7 .Os .Sh NAME .Nm mdoc-man-cmp .Nd a little comparison of \-mdoc and \-man macros .

Re: Documenting a set of functions with -man

2024-06-21 Thread Lennart Jablonka
Quoth Anton Shepelev: What is the covenstional way of documenting a set of C functions with -man? Have you any recommendations or examples about typesetting function declaraions, their return types and aruguments in a classic man-page? The .SY macro does not seem to work well for C, because its

Re: [PATCH v3] [grotty]: Use terminfo.

2024-07-28 Thread Lennart Jablonka
ENQ

Re: .CW usage by a new user

2024-09-05 Thread Lennart Jablonka
>I am using the MS macro in groff and with the .CW I saw that I could not >add a phrase with quotes, well I could write .CW “test” but I can't do >something like: .CW “”test“” what should I do so that the quotes can be >seen with .CW? The most direct way to pass ASCII double quotes as arguments is

Re: Doubts about a typo fix

2022-12-25 Thread Lennart Jablonka
Quoth G. Branden Robinson: > I believe Solaris troff to be fossilized Yes and no. Solaris 10 is no longer supported after January 2024, so if it and all the other traditional troffs die out by 2024 we can stop worrying about this then. That may in fact prove out; the only _currently-maintained

Re: Viewing PDFs. (Was: Happy new Sun)

2022-12-27 Thread Lennart Jablonka
Quoth G. Branden Robinson: And... But ok you are the maintainer and can do whatever you want, and break downstream people any way you like, Stop whining. You sound like humm. At the risk of implying that there are people that do complain in that way, I want to distance myself from excessiv

Re: Manual page sections shouting

2023-01-10 Thread Lennart Jablonka
Quoth G. Branden Robinson: _If_ we added yet another groff extension to man(7), analogous to mdoc(7)'s `Sx`, we could support hyperlinks directly to man page sections and subsections. (On terminals, we'd still need a way to mark locations in the page text as link targets, and for it to be practi

Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4

2023-04-06 Thread Lennart Jablonka
Quoth Michał Kruszewski: I would like to have simple structure: custom cover page -> ToC -> custom page -> text. The easiest way to do all these things is to split the document in multiple ones. Have one troff document for the cover page. There is little reason for it to use ms. Have one d

Re: A file suffix for troff's output. (Was: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4)

2023-04-10 Thread Lennart Jablonka
Quoth DJ Chase: $ file chapter.set chapter.set: ditroff output text for PostScript, ASCII text Wouldn’t “.ditroff” be more appropriate? file tells you that chapter.set contains the ouput of ditroff, not ditroff itself. So no, both .set (which I find agreeable) and .trout are

Re: a bold challenge for anti-deviationists

2023-05-15 Thread Lennart Jablonka
Quoth G. Branden Robinson: My questions/challenges for the reader are: A. In which of the five do you expect to see "ABC" emboldened? B. In which of the five do you expect to see the special characters emboldened? Groff 1.22.4, plan9port troff, Heirloom troff, and 2.11BSD¹ troff all beha

[PATCH] groff(1): Don't try to view HTML with xdvi.

2023-07-10 Thread Lennart Jablonka
--- src/roff/groff/groff.1.man | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roff/groff/groff.1.man b/src/roff/groff/groff.1.man index 754857c26..e71a74248 100644 --- a/src/roff/groff/groff.1.man +++ b/src/roff/groff/groff.1.man @@ -760,7 +760,7 @@ $ \c $ \c .B echo \[d

Re: boldface, italics, spaces and ellipses in synopses of commands, and *nix history

2023-07-31 Thread Lennart Jablonka
I’d argue that’s acceptable for those utilities adhering to the POSIX Utility Syntax Guidelines; that is, those that just use getopt. And thus, foobar [-v ...] -v ... Be more verbose. This options can be specified multiple times to increase the verbosity lev

Re: Man page customization after 1.23?

2023-08-03 Thread Lennart Jablonka
Quoth Nate Bargmann: seems to work as expected, at least on my Arch. However, I don't see that OSC 8 links work in evince. Hmmm. OSC is a kind of control sequence, OSC 8 is the way with which we get links to a terminal. Links in PDFs are interesting, but the correct term is not “OSC 8.”

new tbl segfault

2024-10-05 Thread Lennart Jablonka
commit a91cd457d95e4e6b67adf3d00185598afccfc87d Author: G. Branden Robinson Date: Thu Sep 26 16:50:58 2024 -0500 [tbl]: Warn on unreliable escape seqs in entries. […] diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/t

Re: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]

2025-01-05 Thread Lennart Jablonka
[replying to two messages] Quoth onf: On Sat Jan 4, 2025 at 7:37 AM CET, G. Branden Robinson wrote: At 2025-01-04T01:23:02+0100, onf wrote: […] > My impression of Plan 9's troff is that it's a poorly maintained > descendant of DWB troff that's used only to format manpages. It’s not only use

Re: [PATCH v3] [grotty]: Use terminfo.

2025-01-05 Thread Lennart Jablonka
ENQ