Re: the Courier font family and nroff history

2024-04-12 Thread James K. Lowden
On Fri, 12 Apr 2024 01:27:54 -0500 "G. Branden Robinson" wrote: > Yes, I reckon trapping into the kernel for every byte (or pair of > bytes) written to the screen would indeed have eaten all your > performance, and been pointless when there was no access protection in > any part of the address sp

Re: the Courier font family and nroff history

2024-04-11 Thread James K. Lowden
On Fri, 22 Mar 2024 22:12:05 -0500 "G. Branden Robinson" wrote: > However, if the user told CONFIG.SYS to load ANSI.SYS, > it would, because that module interposed itself before the BIOS call > that talked to the display, and interpreted them, driving the > CGA/EGA/VGA hardware appropriately. No

Re: [PATCH v2] src/: ceil_prime(): Add function to get the lowest prime not smaller than n

2024-03-13 Thread James K. Lowden
On Wed, 13 Mar 2024 13:00:57 -0500 "G. Branden Robinson" wrote: > > If the user is creating, let us say, unnecessary or > > counterproductive overhead by calling for a map of size 1, is that > > ever a problem in practice? > > It was easier to "ban" it as silly (an invalid option argument valu

Re: [PATCH v2] src/: ceil_prime(): Add function to get the lowest prime not smaller than n

2024-03-13 Thread James K. Lowden
On Wed, 13 Mar 2024 06:52:10 -0500 "G. Branden Robinson" wrote: > A hash table (or map) of size 1 is not a hash table, it's a list. A container does not change its type based on its size. I don't know what you're trying to fix here, but it sounds unimportant. If the user is creating, let us

Re: [idea] troff -Troff

2024-02-19 Thread James K. Lowden
On Sun, 18 Feb 2024 17:14:37 -0600 "G. Branden Robinson" wrote: > > For example, would a man(7) parser need to recognize groff(7) > > requests? > > Ingo Schwarze is well placed to answer that, Looking at it more closely, perhaps I see what concerns you. It's not parsing the man page. It's

Re: [idea] troff -Troff

2024-02-18 Thread James K. Lowden
On Fri, 16 Feb 2024 10:49:52 -0600 "G. Branden Robinson" wrote: > That's before lex. That's even before yacc. That's before the first > editions of major texts in parser theory now taught to computer > science undergraduates were even written. Yes, but that overstates the case. We're talking

Re: [idea] troff -Troff

2024-02-18 Thread James K. Lowden
On Sun, 18 Feb 2024 09:37:10 -0500 Douglas McIlroy wrote: > Translation involves parsing input into an AST according to one > grammar and unparsing to generate output according to another. > Chomsky's work uses transformational grammars primarily for > generation. I'm not aware of any implementa

Re: .Li in mdoc(7), was: `\c`, mdoc(7), and man(7) extension macros

2023-11-12 Thread James K. Lowden
On Fri, 10 Nov 2023 18:08:51 -0600 "G. Branden Robinson" wrote: > > it's not a "symbol", in that it doesn't stand for anything but > > itself. > > (Careful now, or the shambling zombie of Jacques Derrida is going to > kick down the door and subject us all to a fate worse than being > subjected t

Re: .Li in mdoc(7), was: `\c`, mdoc(7), and man(7) extension macros

2023-11-10 Thread James K. Lowden
On Tue, 7 Nov 2023 23:46:43 +0100 Ingo Schwarze wrote: > The standard way to write this is: > > .Op Fl D Ar name Ns Op = Ns Ar value ... > .Ar is an in-line macro. Consequently, its scope only extends > to the next macro on the same input line or to the end of the > input line, whicheve

Re: `\c`, mdoc(7), and man(7) extension macros (was: [PATCH 1/2] man*/: srcfix)

2023-11-05 Thread James K. Lowden
On Fri, 27 Oct 2023 01:27:53 +0200 Ingo Schwarze wrote: > .Li very rarely useful and already deprecated I use it all the time. For example, .Sh SYNOPSIS .Nm .Op Fl D Ns Ar name Ns Oo Li = Ns Ar value Oc The = is not an argument. It's a literal; that is, it stands for itself.

Re: geometric primitives (was: interviews with groff developers)

2023-08-07 Thread James K. Lowden
On Mon, 7 Aug 2023 10:44:44 -0500 "G. Branden Robinson" wrote: > But groff does support "boxes", if you will. Cunnigham's Law strikes again! > \D'p h1 v1 ... hn vn' > Draw polygon with vertices at drawing position and each > point in sequence. GNU troff closes the polygon by

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

2023-08-07 Thread James K. Lowden
On Fri, 4 Aug 2023 15:40:30 +0200 Alejandro Colomar wrote: > I also dislike the idea of C++ deprecating macros. IMO, they had to > do it because they bloated the language so much with dubious features > that make macros (and other C features) be unsafe. The need for macros in C++ is greatly d

Re: interviews with groff developers

2023-08-07 Thread James K. Lowden
On Sat, 5 Aug 2023 21:52:26 -0400 Douglas McIlroy wrote: > I can edit the content of figures, which I believe is impossible in > PDF. One use of this capability is to overcome a > deficiency in pic: filling polygons. I'm surprised you're forced to edit the object code. What is missing in the p

Re: graphical manuals

2023-07-22 Thread James K. Lowden
On Fri, 21 Jul 2023 22:33:09 -0500 Nate Bargmann wrote: > Looking at the railroad diagram, I wonder if there are enough drawing > characters in UTF-8 that they could be used for the diagrams rather > than generating image files that would likely not be useful for > terminal output. Thanks for

Re: graphical manuals

2023-07-16 Thread James K. Lowden
On Sat, 15 Jul 2023 16:20:14 -0400 "T. Kurt Bond" wrote: > The pikchr program was inspired by pic, and is somewhat compatible, > and can output SVG. > > https://pikchr.org/home/doc/trunk/homepage.md > https://pikchr.org/home/doc/trunk/doc/differences.md Thanks for that. That suggests I'd be fo

graphical manuals

2023-07-15 Thread James K. Lowden
I have a public groff demonstration project. Its purpose is to show the world what groff + mandoc can produce in terms of technical documentation, and to show ourselves what it cannot do. I'd like to ask first for suggestions on how to bring it up to the state of the art. Then see what we can do

Re: Using tbl(1) for structure definitions

2022-08-13 Thread James K. Lowden
On Fri, 12 Aug 2022 17:41:40 +0200 Ingo Schwarze wrote: > The reason is not that mandoc tbl(7) to HTML conversion is bad but > that a structure display *is not tabular data*. Ingo's point is irrefutable. Whenever a technology is used toward an unintended end, problems inevitably arise. (I excl

Re: using groff/troff in producing academic journals

2022-08-13 Thread James K. Lowden
On Thu, 11 Aug 2022 12:31:51 +1000 (AEST) Damian McGuckin wrote: > On Wed, 10 Aug 2022, Larry McVoy wrote: > > > I emailed ra...@inputplus.co.uk who owns troff.org to see if he > > wanted to host papers. troff.org looks pretty dead so we shall > > see. If he is still there, that would be a gre

Re: Counterexamples in C programming and library documentation (was: [PATCH v3] NULL.3const: Add documentation for NULL)

2022-08-09 Thread James K. Lowden
On Tue, 2 Aug 2022 14:06:45 -0500 "G. Branden Robinson" wrote: > (the "root of all evil" thing), which also got stuffed into > Donald Knuth's mouth Knuth did say it. Please see " Structured Programming with go to Statements" mentioned in "ACM Computing Surveys Vol. 6, No. 4" at htt

Re: Zero Width Space (was Re: How to print a literal '.' as the first character in a line?)

2022-06-05 Thread James K. Lowden
On Sat, 4 Jun 2022 15:53:25 -0500 "G. Branden Robinson" wrote: > Hi James, Hi Brandon, We seem to come at this question from different persepectives. I'm going to try to bring you over to mine. > This is like saying that all states in a finite state machine (FSM) > are equivalent. It's j

Re: Zero Width Space (was Re: How to print a literal '.' as the first character in a line?)

2022-06-04 Thread James K. Lowden
On Thu, 5 May 2022 03:40:27 -0500 Dave Kemper wrote: > To cite the example that originally launched this thread, the old > docs termed the \& a "zero width space," which Branden has changed to > the "non-printing input break." It may not roll off the tongue as > easily, but it's more precise and

Re: Use `strsave()`, not `strdup()`.

2021-11-14 Thread James K. Lowden
On Tue, 9 Nov 2021 20:17:56 +1100 "G. Branden Robinson" wrote: > We can either: > * Use a nonstandard allocator; or > * Handle exceptions. Hi Brandon, If it's C++, you have only one choice: handle exceptions. Otherwise, you're using so little of the language that you might as well use C.

Re: Sed failure in contrib/sboxes on MacOS

2021-10-31 Thread James K. Lowden
On Sun, 31 Oct 2021 10:02:20 +0100 Andreas Kusalananda Kähäri wrote: > It doesn't say anything about #! in shell scripts and it say nothing > about the location of the sh shell interpreter or the existance of > the /bin directory. "It's very provoking to be called an egg ? very!"

Re: SEE ALSO fails

2021-10-30 Thread James K. Lowden
On Sat, 30 Oct 2021 14:48:46 -0700 Larry McVoy wrote: > If James is suggesting that dangling links are not helpful, I find > the opposite to be true. I too have benefited from pursuing hints I found in SEE ALSO, even for uninstalled software. I remember one weekend searching to for a free impl

Re: SEE ALSO fails

2021-10-30 Thread James K. Lowden
On Sat, 30 Oct 2021 19:53:13 +0200 Ingo Schwarze wrote: > >> .Sh SEE ALSO > >> .Xr mg 1 , > >> .Xr vi 1 , > >> .Xr editline 3edit , > >> .Xr el_wgets 3 , > >> .Xr el_wpush 3 , > >> .Xr el_wset 3 , > >> .Xr editrc 5edit > > > What, I wonder, is "mg"? > > > > $ man mg > > No manual entr

Re: Sed failure in contrib/sboxes on MacOS

2021-10-30 Thread James K. Lowden
On Wed, 27 Oct 2021 20:15:28 +1100 John Gardner wrote: > There's already a deprecation warning in-place warning users against > relying on the existence of /bin/bash or the assumption that /bin/sh > == /bin/bash. Every so often I get a +10 bump on SO for my answer about writing a portable shell

SEE ALSO fails

2021-10-30 Thread James K. Lowden
A longstanding complaint of mine regarding Linux man pages is that they frequently have broken SEE ALSO references. I wonder if there's not something the groff project could do to encourage packaging systems to avoid such errors. Today's page in question is edltline(3), the BSD complement to re

Re: Sed failure in contrib/sboxes on MacOS

2021-10-30 Thread James K. Lowden
On Wed, 27 Oct 2021 18:11:36 +1100 "G. Branden Robinson" wrote: Thanks for the explanation. > There are multiple competing implementations of all of these except > Perl (which competes mostly with its own release history). Heh. I have occassionally been bitten by mawk/gawk differences. One I

Re: Sed failure in contrib/sboxes on MacOS

2021-10-26 Thread James K. Lowden
On Wed, 27 Oct 2021 00:17:49 +1100 "G. Branden Robinson" wrote: > [1] The system groff is 1.19.2. For someone who's been living on > groff Git HEAD for four years, it's a severely disorienting > experience. Nearly every machine I use required me to build groff from source, because I like gropdf

Re: [PATCH] *.man: Break URIs at points specified by the Chicago Style

2021-10-18 Thread James K. Lowden
On Mon, 18 Oct 2021 16:34:17 +1100 "G. Branden Robinson" wrote: > URIs can be lengthy; rendering them can result in jarring adjust? >ment or variations in line length, or troff warnings when a > hy? perlink is longer than an output line. The application of non- >printing brea

Re: We have OSC 8 terminal hyperlink support now

2021-10-04 Thread James K. Lowden
On Sun, 3 Oct 2021 00:57:35 +1000 "G. Branden Robinson" wrote: > There is the question of what to do if a man page cross reference is > ambiguous, perhaps due to a plethora of installed pages on the system. > (For example, I might have the Linux man-pages open(2) on my system as > well as the Ope

Re: groff's C++ dialect (was: Plan 9 man added a new macro for man page references)

2021-08-26 Thread James K. Lowden
On Sat, 14 Aug 2021 01:57:49 +1000 "G. Branden Robinson" wrote: > A tradition, acquired at tremendous cost, has grown up > around C++ over the past couple of decades that a project in the > language is unmanageable and unmaintainable if you don't > articulate--and stick to--the subset of it that

Re: troff Memorandum Macros documentation derived from the paper "MM - Memorandum Macros"

2021-07-21 Thread James K. Lowden
On Wed, 21 Jul 2021 00:51:42 +1000 "G. Branden Robinson" wrote: > This is where one of the requests you seldom need comes in. :-D Thanks, Branden. That looks familar, so I probably read about "af" at some point, maybe in Kernighan's Troff User Manual. > Our groff(7) man page in Git HEAD has

Re: troff Memorandum Macros documentation derived from the paper "MM - Memorandum Macros"

2021-07-20 Thread James K. Lowden
On Mon, 19 Jul 2021 18:41:16 -0500 Nate Bargmann wrote: > if I would get use out of > either mm or ms for single page letters and some short documents I think the answer to that question might be Yes. I'm a tenderfoot among the troff graybeards here, having written my first troff document in

Re: Macros for printing envelopes?

2021-07-16 Thread James K. Lowden
On Fri, 16 Jul 2021 12:44:04 -0400 Peter Schaffter wrote: > On Thu, Jul 15, 2021, Nate Bargmann wrote: > > As I see it, with groff I can easily create files for addresses I > > use often and should be able to code a script that accepts those > > one-off addresses. > > I use this strategy with th

Re: pdfroff and tables of contents

2021-07-16 Thread James K. Lowden
On Fri, 16 Jul 2021 04:48:03 +1000 "G. Branden Robinson" wrote: > XN is not a part of any _ms_ implementation I'm aware of, not even > groff's. It does not appear in 4.2BSD ms or Version 10 Research Unix, > either. > > In the groff system, XN is defined in spdf.tmac Why not just fold spdf.tmac

Re: groff supports Italian input documents now

2021-07-06 Thread James K. Lowden
On Sat, 3 Jul 2021 12:50:07 +1000 "G. Branden Robinson" wrote: > The groff locale (the default input language) is now determined using > the system locale. The LC_ALL and LANG environment variables are > checked, in that order. If set, the value's first two characters > determine the grof

Re: WAYTO: indexed man pages

2021-06-02 Thread James K. Lowden
On Mon, 31 May 2021 14:48:42 -0400 Douglas McIlroy wrote: > > Now that I think of it, the current system is makewhatis/apropos. I > > often get a ton of noise entries, usually perl modules, but maybe > > there?s a way around that. > > apropos whatever | grep -v '(3p' That's what we have, but i

WAYTO: indexed man pages

2021-05-29 Thread James K. Lowden
gromunity: In working with my GUI man page viewer (not ready for its first audition yet) I found myself asking how indexes could be implemented in current and future man systems, and what groff would have to produce for a viewer to provide an index affordance. What follows is my analysis of where

Re: Why no cd(1) man page in Ubuntu? (was: man-intro)

2021-05-29 Thread James K. Lowden
On Sun, 23 May 2021 13:55:58 +1000 "G. Branden Robinson" wrote: > But as a Unix expert of long pedigree (unfurled above), you must > surely already appreciate why "cd" in particular is a tricky case. > > Commands get man pages. So do library functions, system calls, device > interfaces, and fil

Re: Auto-resize paper size during document run?

2021-05-26 Thread James K. Lowden
On Wed, 26 May 2021 21:01:33 +0200 Oliver Corff wrote: > Of course, I can typeset the table separately and assemble the pdf > pages by hand, but a solution totally controlled from within the > groff file would be great. Not an answer, but in ancient times, your output would have gone a printer,

Re: man-intro (was: getting more out of man pages with less(1) )

2021-05-17 Thread James K. Lowden
On Mon, 17 May 2021 16:24:34 +1200 "Michael Kerrisk (man-pages)" wrote: > > Maybe Michael or Alejandro can advise regarding where they think a > > good place for a man page utilization tutorial would be. > > If any place, I think intro(1) would be most appropriate, or, > failing that, an initial

Re: Modernising UNIX manpages.

2021-04-25 Thread James K. Lowden
On Fri, 23 Apr 2021 02:57:25 +0200 JM Marcastel wrote: I think you're confusing two things: the capability of mdoc and groff, and the user's experience. Don't worry; you're not the first! > If all that can be done in mdoc, then fine, I am willing to give a > try? even if a little frustrated by

Re: adjustment of text blocks in tables (was: long nroff tables)

2021-01-21 Thread James K. Lowden
On Thu, 21 Jan 2021 14:46:24 +1100 "G. Branden Robinson" wrote: > It would be really nice if tbl(1) could output HTML itself. Hmm, from 10,000 feet that doesn't look terribly hard. Certainly tbl input provides all the requisite information needed for an HTML table. mandoc claims to do it alread

Re: long nroff tables

2021-01-20 Thread James K. Lowden
On Wed, 20 Jan 2021 18:00:39 +0100 Oliver Corff wrote: > try this: > > TS H Hi Oliver, Thanks for the suggestion. I'm still stuck for the "right" way, but it turns out lengthening the logical page does the trick: .pl 100i I didn't find a way to avoid diving down into troff request

long nroff tables

2021-01-20 Thread James K. Lowden
How do I show "infinite" tables in nroff? When the tbl output doesn't fit on one "page", I get: $ nroff -t foo error: page 2: table will not fit on one page; use .TS H/.TH with a supporting macro package I don't understand how man/mdoc arrange for nroff to display one long page (e.g., for "man

Re: End-of-sentence spacing

2020-12-22 Thread James K. Lowden
On Tue, 22 Dec 2020 16:21:35 +1100 "G. Branden Robinson" wrote: > If a second argument is never given to the 'ss' request, GNU > 'troff' separates sentences as AT&T 'troff' does. I think "never" is a long time. Would this be better? If a second argument is not provided to the 's

Re: End-of-sentence spacing

2020-12-19 Thread James K. Lowden
On Sat, 19 Dec 2020 20:18:19 + Karthik Suresh wrote: > I think it's also the advice Brian Kernighan gives about breaking > at natural phrase points in the text as we tend to edit a phrase at a > time. I hadn't heard that. Do you know where you read it? A had a college professor who claim

Re: One groff file outputting multiple pdfs?

2020-11-20 Thread James K. Lowden
On Thu, 19 Nov 2020 18:15:32 -0500 Richard Morse wrote: > This would simplify a lot of things, because this kind of thing could > be easily be put into the roff file when I?m generating that. Good, so if .OUT is your marker, here's a working script: #! /usr/bin/awk -f /^[.]OUT/ { if( outp

Re: One groff file outputting multiple pdfs?

2020-11-19 Thread James K. Lowden
On Thu, 19 Nov 2020 15:41:42 -0500 Richard Morse wrote: > The roff file is being generated by a program, and for a few reasons, > it would be much easier to have the program generate one output file, > and then run Groff on the single file. Is there someway, perhaps > using the mysterious ?I/O? r

Re: [DRAFT] Revised groff ms manual for review

2020-11-03 Thread James K. Lowden
On Sat, 31 Oct 2020 20:40:44 +1100 "G. Branden Robinson" wrote: > Anyway, I'd appreciate feedback, positive or negative Although a little chatty in places, it's a good starting point. One difficulty (as ever) is defining the audience. To what degree is the reader expected to know troff itsel

smart quotes and dumb

2020-11-03 Thread James K. Lowden
There's been a lot of discussion lately about the interpretation of quotes and hyphens. I'm finding it hard to follow because there are many parts: fonts, devices, macro packages, and implementations. Also years, and recent commits. I think some have espoused the behavior that the interpretati

Re: [groff] 03/09: tmac/an-old.tmac: Stop remapping ` and '.

2020-11-03 Thread James K. Lowden
On Mon, 2 Nov 2020 23:24:49 +1100 John Gardner wrote: > nobody in their right mind would deliberately write source-code in a > proportional typeface, so we can trust the use of Georgia or > Helvetica to indicate body text?stuff for reading and styling. The C++ Annotated Reference Manual sets sou

Re: UTP Revisited: scoping the project

2020-10-22 Thread James K. Lowden
On Tue, 20 Oct 2020 21:16:45 +0200 Marc Chantreux wrote: > > I?ve not used another editor where you can pipe chunks of text *ad > > hoc* through scripts or even awk/perl one-liners. > > except ed, sam (AFAIR), and every vi clones i used. In emacs, you select the chunks of text, press M-|, and t

Re: Learning troff - where to start?

2020-10-14 Thread James K. Lowden
On Wed, 14 Oct 2020 11:13:39 -0400 Federico Lucifredi wrote: > > For man pages, what you need is knowledge of the man macro package, > > originally written by James Clark [...] > > I removed the ?originally? bit, which I believe corrects the flaw (if > I am reading you correctly). If I may,

Re: (off topic?) Docbook? Re: manlint?

2020-10-08 Thread James K. Lowden
On Thu, 8 Oct 2020 02:38:04 +0200 Ingo Schwarze wrote: > * texinfo2mdoc(1) is by far the most experimental of the three. >It has never been used in production. Feeded real-world documents, >i would expect that it probably mishandles part of the input. Noted, and thanks. If I go down t

Re: (off topic?) Docbook? Re: manlint?

2020-10-07 Thread James K. Lowden
On Wed, 7 Oct 2020 22:52:03 +0200 Jan Stary wrote: > > > That is the simplest and most obvious thing to do; > > > it is up to the presentation author to prescribe a style > > > to h1's of class Sh (or refer to a specific one by its id). > > > > What tool does that, btw? > > http://mandoc.bsd.

Re: (off topic?) Docbook? Re: manlint?

2020-10-07 Thread James K. Lowden
On Mon, 5 Oct 2020 18:48:27 +0200 Jan Stary wrote: > In the mdoc source, it's .Sh DESCRIPTION; that's it. > if Sh sections get turned into h1's (which is a decision in itself), > all this does is it gives these h1's a class="Sh" and an id. > > That is the simplest and most obvious thing to do; >

Re: (off topic?) Docbook? Re: manlint?

2020-10-05 Thread James K. Lowden
On Sun, 4 Oct 2020 20:46:20 +0200 Ingo Schwarze wrote: > You are discussing a problem that has been solved years ago, and > the solution has proven very successful in practical use: mdoc(7) > style is that you *never* specify the class manually but the macro > name *is* the class. Ingo, I'm ne

Re: (off topic?) Docbook? Re: manlint?

2020-09-29 Thread James K. Lowden
On Tue, 29 Sep 2020 19:20:46 +1000 "G. Branden Robinson" wrote: > At 2020-09-27T18:30:41-0400, James K. Lowden wrote: > > Any suggestions on how -ms macros could be compatibly extended to > > include classes and IDs? I've always found that aspect of my > > &

Re: (off topic?) Docbook? Re: manlint?

2020-09-27 Thread James K. Lowden
On Sun, 27 Sep 2020 00:14:47 -0400 Larry Kollar wrote: > Complain about Markdown all you will, and use weird-arse corner cases > to show it?s Bad, but GFM can handle a lot of everyday text. If you limit the feature set to what markdown does, -ms macros are readable too. It's a little tricky to

Re: (off topic?) Docbook? Re: manlint?

2020-09-18 Thread James K. Lowden
On Wed, 16 Sep 2020 10:22:29 -0400 "James K. Lowden" wrote: > > > this *isn't* the same to me: attributes are for metadata and tag > > > contents are for data > > That's right. If XML attributes were always used to describe the > *tags*, and not t

Re: (off topic?) Docbook? Re: manlint?

2020-09-16 Thread James K. Lowden
On Wed, 16 Sep 2020 03:25:54 +1000 John Gardner wrote: > That's what I mean: there isn't always an obvious distinction between > data and metadata. For structured HTML-like documents, it's common to > see attributes used for anything not seen by readers (i.g., > "metadata"). For general purpose d

Re: Future of groff Texinfo manual (was: documentation of hyphenation)

2020-06-30 Thread James K. Lowden
On Tue, 30 Jun 2020 03:08:04 +1000 "G. Branden Robinson" wrote: > At 2020-06-14T14:40:44+1000, John Gardner wrote: > > Why are we using Info, again? Was it because of GNU policy? > > Yes. https://www.gnu.org/prep/standards/standards.html#GNU-Manuals > > Aside from the mandate of the source doc

Re: Future of groff Texinfo manual (was: documentation of hyphenation)

2020-06-30 Thread James K. Lowden
On Mon, 29 Jun 2020 20:36:31 +0200 Ingo Schwarze wrote: > I don't see any practical relevance to the question where exactly the > boundary between the "user manual" and the "reference manual" part > is. I'm not sure what you're saying. If you mean you don't know how you would divide the curre

Re: Groff macro to make .UR and .UE links clickable in PDF?

2020-06-17 Thread James K. Lowden
On Wed, 17 Jun 2020 08:59:17 +0200 Jan Stary wrote: > > This would be an ideal solution, if it is possible with groff. When > > I must have a URL visible in the text, I'd love for it to be in > > small text as a footnote. How hard is it to add footnotes to a > > package like mdoc in groff? > >

Re: Why are Groff's macro packages not PDF-aware by default?

2020-06-16 Thread James K. Lowden
On Mon, 15 Jun 2020 21:24:23 +1000 John Gardner wrote: > Modifying the macro packages to use these features wouldn't be hard. > It's simply a matter of > > .if '\*(.T'pdf' .if d pdfmark \{\ > > .pdfmark ? > > .\} +1 I'm glad B 9 asked the question, because I've been meaning to try to syn

Re: Groff macro to make .UR and .UE links clickable in PDF?

2020-06-16 Thread James K. Lowden
On Tue, 16 Jun 2020 13:36:41 +0200 Jan Stary wrote: > > Third, and worst of all, it then prints out the entire URL without > > wrapping, exceeding the right margin for long URLs. > > How do you suggest a long URL should be typeset? > It's an honest question: I don't know. It seems weird > to e.g

Re: Potential enhancements to install-font.sh from https://www.schaffter.ca/mom/bin/install-font.sh

2020-04-29 Thread James K. Lowden
On Tue, 28 Apr 2020 17:45:46 -0400 Peter Schaffter wrote: > > Also, wouldn't this script be useful to include in the groff > > distribution? > > I'm inclined to think so, however it contains non-portable bashisms > and so might not be appropriate. The script was a quick and dirty > solution to

infinite page length?

2020-04-29 Thread James K. Lowden
I don't understand how man(1) suppresses pagination. Is there any simple trick to viewing -ms documents in nroff without page boundaries? I didn't find it in the papersize documentation. Proof that I read it, I found a typo: The value of the papersize file can be overrideen

Re: Cannot find the module of ?pfbtops"

2019-12-02 Thread James K. Lowden
On Mon, 02 Dec 2019 16:19:09 + Deri wrote: > Mageia, which is based on RedHat, there are five rpms:- > > groff > groff-doc > groff-for-man > groff-perl > groff-x11 Wow, what a waste of effort. The whole of groff weighs in at a handful of megabytes, a rounding error for Firefox or TeX. I

Re: Two questons: Norwgegian characters and space when switching typeface

2019-11-06 Thread James K. Lowden
On Mon, 4 Nov 2019 08:08:57 +0100 Xianwen Chen (???) wrote: > (See for example, > I. ABC > ) > > Now, this will produce a space between ABC and ). Is there some way > that I can get rid of the space there? If you're using the ms macros, the advice provided is more complicated than necessary. T

Re: [groff] Small general question concerning ms macro package

2019-08-22 Thread James K. Lowden
On Thu, 22 Aug 2019 22:33:54 +0200 Andreas Kusalananda Kähäri wrote: > Yes, > > $ man groff_ms | grep -c QS > 3 > > $ groff --version > GNU groff version 1.22.4 I'm so far behind! I'm using only 1.22.3. I'm suprised there are new macros in ms. --jkl

Re: [groff] Small general question concerning ms macro package

2019-08-22 Thread James K. Lowden
On Wed, 21 Aug 2019 15:15:19 -0400 "T. Kurt Bond" wrote: > And it has .QS/.QE, which get the indent from the QI register It does? $ man groff_ms | grep -c QS 0 --jkl

Re: [groff] 04/05: {g, n}roff.1.man: Give assistance to pager users.

2019-07-03 Thread James K. Lowden
On Wed, 3 Jul 2019 10:25:23 +1000 (AEST) Damian McGuckin wrote: > Back in those days, terminals ran at 30-240 characters per second. > Not all that fast. Actually 300 characters per second, i.e. 300 baud, > was slowww! I remember being blown away by 9600 baud terminals. Right. If you hooked up

Re: [groff] 04/05: {g, n}roff.1.man: Give assistance to pager users.

2019-07-03 Thread James K. Lowden
On Wed, 3 Jul 2019 07:08:44 +1000 John Gardner wrote: > Really? That's interesting. What did do? On the terminal > emulators I have on hand at the moment, none of them are responding > or behaving differently. Same thing it still does do, because outside of the GUI all we do is emulate 1970s ha

Re: [groff] Found this gem on Google Images:

2019-05-30 Thread James K. Lowden
On Thu, 30 May 2019 17:39:52 +1000 John Gardner wrote: > Who knew the C/A/T could print on ceramic mugs Oh! So *that's* what they mean by 3-D printing! --jkl

Re: [groff] [patch] do not strip mdoc macros

2019-03-17 Thread James K. Lowden
On Fri, 15 Mar 2019 16:03:28 + Ralph Corderoy wrote: > > Of course it's a valid comparison. Which sed or awk or shell script > > is distributed in a stripped/compressed form? Do they store their > > AST somewhere, so as to avoid recompilation? They do not. Just as > > with groff, every pa

Re: [groff] [patch] do not strip mdoc macros

2019-03-15 Thread James K. Lowden
On Fri, 15 Mar 2019 00:12:29 + Ralph Corderoy wrote: > > It would follow from Bjarni's argument, if accepted, that it is > > objectively correct (a strong claim!) to install programs in > > scripting languages on user systems only after first stripping > > comments from them (or perhaps even

Re: [groff] Announcement and call for project submissions

2019-01-31 Thread James K. Lowden
On Wed, 30 Jan 2019 22:58:54 +0100 Ingo Schwarze wrote: > That's a clear case of a cultural clash. While i (not that surprising > for an OpenBSD developer) like a concise and direct communication > style that doesn't use polite circumlocutions, i do realize that > such a style can cause communic

Re: [groff] Regularize (sub)section cross references.

2018-12-17 Thread James K. Lowden
On Mon, 17 Dec 2018 07:25:00 +1100 John Gardner wrote: > Plus it's easier to search for a section name if you know in advance > it'll always be in uppercase True then and true now. Look at the bash manual. EXPANSION is a section; Brace Expansion a subsection. Looking for "expansion" insensiti

Re: [groff] Asynchronous events

2018-12-12 Thread James K. Lowden
On Wed, 12 Dec 2018 03:32:11 +0100 Ingo Schwarze wrote: > * ERRORS. >Most system call pages and many library function pages have >this section, but the information being complete is the >exception rather than the norm. Even in OpenBSD. That's especially true for network functions.

Re: [groff] mom manpage

2018-12-05 Thread James K. Lowden
On Tue, 4 Dec 2018 15:16:50 -0500 Peter Schaffter wrote: > When I analyze my initial impression of manpages, I see that it > was a clash between approaching computing from the humanities, > as a non-programming user, versus approaching computing from the > sciences, as a programmer. I don't thin

Re: [groff] grohtml shortcomings

2018-12-05 Thread James K. Lowden
On Tue, 4 Dec 2018 05:40:58 +0100 Ingo Schwarze wrote: > For PDF output, by all means, use groff, it is much, much better > than mandoc for that. For mdoc to HTML, don't. Ingo, my colleague says the man macros EX and EE aren't supported on the version of FreeBSD he uses, which I assume is using

[groff] grohtml shortcomings

2018-12-03 Thread James K. Lowden
I converted the Heimdal kf.1 page to html recently, and found what I consider to be problems with both appearance and HTML style. https://github.com/heimdal/heimdal/blob/1d4ebc0df798cb1d8edca910b806e55c6c19bccb/appl/kf/kf.1 GNU groff version 1.22.3 Command: groff -man -T html man1/kf.1

Re: [groff] Groff & tbl as a report generator

2018-07-24 Thread James K. Lowden
On Tue, 24 Jul 2018 12:26:57 -0500 Blake McBride wrote: > Then, a few years ago, I thought of generating groff/tbl input > instead and then calling those tools to generate the final PDF output. You're not the only one. https://github.com/jklowden/sqlrpt I wrote it last year to make my use of S

Re: [groff] groff as the basis for comprehensive documentation?

2018-04-21 Thread James K. Lowden
On Sat, 21 Apr 2018 08:16:36 -0500 Nate Bargmann wrote: > > For lack of a better term, I think it's an abstraction mismatch. > > The ditroff language presupposes a dot-addressable canvas, onto > > which lines and strings of text are drawn. That model fits most > > printers (these days) and termi

Re: [groff] groff as the basis for comprehensive documentation?

2018-04-21 Thread James K. Lowden
On Sat, 21 Apr 2018 12:59:16 -0500 Nate Bargmann wrote: > But why do we focus on presentation when authoring a document? Because the document we see is what we're creating. The only purpose of the document is to be read, and appearance matters to the reader. The reader assuredly doesn't care

Re: [groff] groff as the basis for comprehensive documentation?

2018-04-19 Thread James K. Lowden
On Fri, 20 Apr 2018 01:44:06 +1000 John Gardner wrote: > > You might like to believe that eqn, tbl, and pic could be processed > > with grohtml > > I've seen grohtml's complexity and was bewildered. Hence why I > intend to write my own. The procedures for inferring structural or > semantic meta

Re: [groff] groff as the basis for comprehensive documentation?

2018-04-19 Thread James K. Lowden
On Mon, 16 Apr 2018 13:19:31 -0500 Nate Bargmann wrote: > I'm still undecided on the Texinfo part, though it may serve as the > portion that ties everything together. I have man pages for utility > programs of the project and will be writing man pages for the C > library. Being able to collate

Re: [groff] Merge conflict for "gnulib"

2018-02-03 Thread James K. Lowden
On Sat, 3 Feb 2018 15:08:41 + Bjarni Ingi Gislason wrote: > CONFLICT (submodule): Merge conflict in gnulib You can't have a conflict unless your local version contains changes not present in the version on origin master. If you don't care about those changes, you can remove the file, check

Re: [groff] [UTROFF] references, summary, index

2017-12-06 Thread James K. Lowden
On Wed, 06 Dec 2017 12:24:58 + Ralph Corderoy wrote: > > . sy echo \\*[sum-list] | sed -e "s/@@@/n./g" | > > iconv... > > It may be better to use `.write', if other troffs have that, rather > than allow the local echo(1) to perhaps interpret sum-list's content? Else:

Re: [groff] 04/04: tmac: Move macro diagnostics away from `quotes'.

2017-11-23 Thread James K. Lowden
On Wed, 22 Nov 2017 00:20:46 +0100 Tadziu Hoffmann wrote: > "English doesn't borrow from other languages. English follows > other languages down dark alleys, knocks them over and goes > through their pockets for loose grammar." That's clever, and was a bit true 5 centuries ago. Nowadays, Eng

Re: [groff] 04/04: tmac: Move macro diagnostics away from `quotes'.

2017-11-23 Thread James K. Lowden
On Tue, 21 Nov 2017 18:13:33 + Ralph Corderoy wrote: > I realised the `commonal > garden' phrase I often heard as a child was `common or garden' Then there's that famous hymn about a zoo animal, "Sadly, the cross-eyed bear". --jkl

Re: [Groff] problem with preconv and sample_docs.mom

2017-11-07 Thread James K. Lowden
On Sun, 05 Nov 2017 15:09:41 +0100 Bertrand Garrigues wrote: > + /* uchardet 0.0.1 could return an empty string instead of NULL */ > + if (charset && *charset) { > ret = (char *)calloc(strlen(charset) + 1, 1); > strcpy(ret, charset); >} As a logical matter, the calloc call should

Re: [Groff] devpdf U-fonts and Russian

2017-10-11 Thread James K. Lowden
On Sat, 07 Oct 2017 15:17:25 +0200 (CEST) Werner LEMBERG wrote: > Another important issue is security. PS, as a programming language, > allows far too much things. But PS, as a programming language, is under programmer control. To treat it as though it accepts input from untrusted anonymous so

Re: [Groff] Critique this bold-italic private macro for man pages

2017-05-03 Thread James K. Lowden
On Wed, 3 May 2017 22:06:10 +0200 (CEST) Carsten Kunze wrote: > There are ways to detect the formatter but a manpage must not do > this. Why not? ISTM we'd have better manpages if they weren't constrained to the rendering capability of a VT-100 terminal. For example, equations or pictures c

Re: [Groff] ASCII Minus Sign in man Pages

2017-05-03 Thread James K. Lowden
On Wed, 3 May 2017 13:42:55 -0400 Mike Bianchi wrote: > The - character exists on all keyboards. It is not labeled minus > or hyphen or endash. It generates the decimal 45 (hex 0x2D, octal > 055) character. That any *roff processor would give it a different > meaning is most unfortunate. IMO

Re: [Groff] Nesting font macros in man pages

2017-04-30 Thread James K. Lowden
On Fri, 28 Apr 2017 01:15:05 -0400 "G. Branden Robinson" wrote: > the benefit to the user is relatively few keystrokes above those > > needed for the text. > > Did you write your DocBook-based user guide in ed? > > Nothing has come close to saving me more keystrokes than at the > shell prompt

Re: [Groff] Nesting font macros in man pages

2017-04-27 Thread James K. Lowden
On Wed, 26 Apr 2017 09:46:43 -0400 "G. Branden Robinson" wrote: > 1. The slavish devotion to two-letter names for things, which like the >man macro package and the oldest parts of *roff itself, make it >self-anti-documenting. Having written one user guide in DocBook, I have to disagree

  1   2   >