Follow-up Comment #2, bug #64531 (project groff):
> Am I missing a trick?
On the contrary, you've supplied a trick for avoiding the pothole. Not the
same as preventing the pothole, but much better than what I did back when I
fell into it.
___
> 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
> Why would you want a table *inside* a paragraph rather than
> starting a new paragraph after a table?
The table may be in a floating keep (e.g. .KF in -ms mmacros).
Then it's quite likely to pop up in the middle of a paragraph.
The suggestion to cause .TE to insert space would pose minimal
th
Branden,
Excellent fixes. Thank you!
Doug
>> Nevertheless, -ms is misinterpreting the output of eqn in this
>> case.
>
> It appears to be intentional. At least in groff's implementation
> of the ms macros, the first call to a paragraph macro is special,
> in that it terminates the front matter and begins the body text,
> and redefines a n
This groff -ms document:
.LP
The formula is
.EQ
x = 1
.EN
produces just what one expects. But if .LP is deleted,
the formula is displayed in line. This causes little
trouble in everyday life. Nevertheless, -ms is
misinterpreting the output of eqn in this case
groff(7) doesn't tell what the hyphenation modes are.
It directs you to info for the "gory details".
But info doesn't tell everything either. It omits .hy 0·
Mode bits 2, 4, and 8 turn off certain hyphenations.
A literal reading of info would have .hy 0 turn them on.
Since groff(7) is otherwise
> These changes may, must, shall, should be undone.
I'd like to think the message was postmarked April 1, but it wasn't.
> "and more recently, McIlroy referred to it as a ``living fossil''."
...
> "A living fossil" is a sign of a successful species (function).
> And now this species shall be "ca
Amen.
I had a comment drafted and almost ready to go
when Bjarni made it unnecessary.
Doug
Date: Thu, 2 Apr 2020 19:11:35 -0700
From: Larry McVoy
Agreed.
On Thu, Apr 02, 2020 at 09:11:50PM -0400, Mike Bianchi wrote:
> Bjarni,
> Nice, tight analysis and proposed solutions. Thank you.
>
I've been writing the ugly \s360 since ancient times. Groff still thinks
this means a 36-point 0. But man 7 groff says it means a 3-point 60:
\s±N Set/increase/decrease the point size to/by N scaled points; N is
a one-digit number in the range 1 to 9. Same as ps request.
B
Thanks for spotting the facts in info, a jungle I rarely
enter. Especially for groff, for which groff(7) is quite a
comprehensive reference.
The difference between \s39 and \s40 is a documented living
fossil!
Clearly this dates from the first CAT phototypesetter's limited
range of point sizes: 6
Does anyone else see the following behavior?
Version 1.22.4 handles \s correctly up to \s39, but
truncates a size of 40 or greater to its first
digit. Here are two screen shots, with ^D edited in
to show where input ends and output begins.
groff | tail -5
\s39 hello
^D
%%EndPageSetup
/F0 39/Times-
I run groff in windows (cygwin) and linux (redhat).
Groff's appearance in /usr/share is surprisingly
different in the two environments.
cygwin:
groff
1.22.4 current site-tmac
doc
groff-1.22.4
pic.ps
linux:
groff
1.22.3 current site-tmac
doc
Ralph pointed out that
groff -o /dev/null
does behave right. It sits there waiting for input.
Having been trained on the very first groff, I overlooked
the fact that this is the same as
groff -o/dev/null
separable parameters of flag arguments are a "modern"
innovation. Please excuse
For a good time, try
groff -o /dev/null
I have reported this to bug-groff
Doug
Why does this input echo "\w'0'"
.tm \w'0'
while this input echoes "5000"?
.nr w \w'0'
.tm \nw
Doug
.EQ
define f % $1 %
f("a,b")
.EN
draws a diagnostic from Gnu eqn: "newline before end of quoted text".
Remove the comma and all is well. Apparently the comma delimits
the first argument.
The program isn't totally naive about parsing arguments. It
does think that there's only one argument in the m
Subject: " Re: man Macro Package and pdfmark"
> Just don't do that. Never use low-level roff stuff in manual pages,
> don't even think about it. This makes your manual pages non-portable.
I can understand why playing with private aspects of the macro
package may be unportable. And it would be po
I almost agree with Ingo. A blank line in tbl is generally equivalent to
a table line in which all fields are empty. It is also generally equivalent
to .sp 1. These interpretations differ in the presence of .blm or .ns.
By decorating every table line with an initial \&, tbl has picked the
former in
> C is one of the worst possible foundation languages conceivable for
> automated formal verification
Yet the Mars rovers run on a wholly checked code base written
in C, subject to certain mechanically enforced restrictions on
coding style. I'm not aware of comparably challenging systems
having b
> Getting back on topic, are we sure we want to deviate from GNU pic's
> current behaviour without checking historical norms of other pics?
>
> $ printf '%s\n' \
> .PS 'print sprintf("%.17g %.0f% % %%", 3.14, 42, 99)' .PE |
> > pic >/dev/null
> 3.1401 42% % %%
>
> Th
The description of sprintf in the man page pic(1) does not
reveal that only a few format codes are permitted.
Eric Raymond's "Making Pictures With GNU PIC" says only
%,%e,%f,%g are permitted. But what does a bare % mean?
In fact pic rejects a bare %. However it does accept
%%, which is supposed
I have never used grotty. Reading the man page I wondered why one would
use it rather than nroff (which is absent from the SEE ALSO list).
Doug
> Just a small question. Do you agree with me that ms does not really
> have separate procedures for things like indent and text boxes.
Besides .RS/.RE it also has .QP
> EE This is a non-standard GNU extension. In mandoc(1), it does the
> same as the roff(7) fi request (switch to fill mode).
>
> EX This is a non-standard GNU extension. In mandoc(1), it does the
> same as the roff(7) nf request (switch to no-fill mode).
"Gnu extension" should be r
I agree with Ingo about proposed descriptions of \& and sentence
spaces. Elaboration is not explanation.
\& is simply a zero-length character. Its primary use is to disguise
sequences that groff would otherwise unwantedly interpret. For example,
"\&." at the beginning of an input line will be take
I agree with Ingo about proposed descriptions of \& and sentence
spaces. Elaboration is not explanation.
\& is simply a zero-length character. Its primary use is to disguise
sequences that groff would otherwise unwantedly interpret. For example,
"\&." at the beginning of an input line will be take
The difference between your example and Brian's is that in
yours, .2C mode starts mid-page while in his it starts at top
of page. The trouble will go away if put .ns before the first
.NH. The page-head macros do this automatically.
Doug
> I was wondering if some kind of pre-processor existed back in the time
Yes, "form" and "fed", a form-letter generator and editor, were in the 2nd
through 6th editions of Unix. Created by Bob Morris and Lorinda Cherry,
they were independent of roff, but could of course could produce roff
input. Y
> It is objectively correct to strip the macro files of bytes that are
> meaningless for the program "groff"
>
> It is objectively correct to _not_ strip the macro files of bytes
> that have a meaning for humans.
>
> So provide both versions.
The conclusion is compatible with the premises but does
> people aren't aware that their manpage formatter is
> catering to a particular font style that is no longer in
> common use. They just see that man(1) outputs "weird quotes."
As man pages are now, one will see weird quotes regardless
of how \(oq is rendered.
I checked /usr/share/man1/[a-c]* in
> https://github.com/bmatzelle/gow
I wasn't aware of GOW. A quick look at the contents suggests to
me that what's lightweight about it is the absence of gcc, bash,
and curses (though it includes "less", a poster child for
featuritis).
Am I selling it short?
Doug
Sorry for the false accusation about GOW lacking bash.
What it lacks is anything called sh. My roots are exposed.
I run groff on windows a lot, but via cygwin, which I
believe means that mainline POSIX stuff works. I am
inclined to think that if you like the groff toolset,
you are likely to want other Unix capability, too,
and thus gravitate towards facilities like cygwin.
I run groff on windows a lot, but via cygwin, which emulates
Unix. I am inclined to think that if you like the groff toolset,
you are likely to want other Unix capability, too, and thus
gravitate towards facilities like cygwin.
I take it that Keith uses groff on bare Windows without a
Unix veneer.
A diagnostic from gcc chimes in:
'mktemp' is deprecated: the use of `mktemp' is dangerous; use `mkstemp'
Doug
Ingo has recorded me as being opposed to rendering \(oq and \(cq
the same in -T ascii.
I had raised the issue of ` in m4 and shell scripts. However, it
is good practice to make examples by pasting in working code,
which can in turn be cut, especially from nroff-ed documents.
The rendering of \(oq
If I were conscientious in writing about m4, I might choose
to use \(oq and \(cq to assure pretty typesetting. It
would be a disaster to have both come out as apostrophes
in -T ascii. Knowing that, I could use \(aa and \(ga instead.
Still, this is a cautionary tale. What other sorts of
documents w
I just mistakenly hit control-D, sending a half-baked message. Please
ignore it. Full message will follow.
doug
The proposal to use the same character for left- and right-quote,
as is customary in C, would be devastating to m4.
The notion that it would make "kan pages look less antique"
I'm puzzled. How can one "modernize" ascii? Or to put the question
another way, what universally available character set does -T ascii
evoke?
doug
> Bash is a complex program, and the length of the manpage is
> entirely adequate.
It's adequate in the sense of being quite complete and accurate. It's
also verbose. The introductory paragraph is laudably crisp. But right
after that comes
-cIf the -c option is present, then commands are
> Without roff, Unix might well have disappeared.
The patent department and the AT&T president's office are the
only in-house examples I know where Unix was adopted because
of *roff.
The important adoptions, which led Berk Tague to found
a separate Unix Support Group, were mainstream telephone
ap
> if you are interested in my perspective - scrap the HTML documentation
> and fix the manpage. The reference manual - i.e. the manpage - is
> really important: when you use some software regularly, you use the
> reference manual all your life. Catering to the experienced user
> is most import
Regardless of standards considerations, if there's any advice
that needs to be hammered into man authors, it's to be concise
and accurate, but not pedantic. As Will Strunk commanded,
"Omit needless words."
The most needless words of all are promotional. No man page
should utter words like "powerfu
> a request that would print its argument with all hyphenation points visible
> ...
> it requires a contrivance to discover them
The second bit of the quote seems to answer the first: there's
no need for such a request because the function can be
accomplished fairly easily.
But I have no perspec
>> [randomly distributed padding] was even worse because it
>> led one to perceive false phrase boundaries at the wider spaces.
>> The text became maddening to read. Only then did I try alternating
>> left- and right-padding, which has stood the test of time.
> Huh. I wonder what it would have lo
Ancient history: when I wrote BCPL roff, I immediately noticed the
page-level density gradient from thick on the left to thin on the
right if padding spaces were inserted from the right. I next tried
randomly distributing the padding. This was even worse because it
led one to perceive false phrase
Alas, spooky.diff, allegedly at
http://lists.gnu.org/archive/html/groff/attachments/20180626/6721611f/attachment.diff
elicits 404 Not Found. It may be that some server or client is
allergic to unusual file extensions.
doug
ter or
the right end. The only added complexity I see is that
one must keep track of two lengths rather that just
one within each line.
Doug
Date: Wed, 2 May 2018 17:53:17 +0200
From: Ingo Schwarze
To: Doug McIlroy
Cc: groff@gnu.org
Subject: Re: [groff] mark/lineup in eqn
You may think that pile/
Indeed, you can tweak things pretty closely (but not exactly)
with , but it fails to express logical intent. Thus it
is brittle. If you want to change anything left of the = sign,
you have to do more twiddling (pun intended) to restore the
alignnment. Ditto if you change the document font.
I agree it lines things up right horizontally. What I complained
about is that (at least in -ms) a separate EQ-EN pair for each
line introduces extra vertical space, so the sequence does not
look like a coherent whole. The matrix trick gives a better
display, but sacrifices any connection with ordi
Ingo suggested a way to write two equations aligned
on equals signs, to look rather like this
shortid = expression1
longidentifier = expression2
Here's the code
.EQ
set column_sep 35
matrix {
rcol { xhortid above longidentifier }
ccol { = above = }
lcol { expression1 above exp
Sorry that my previous post was truncated. Here's what
I meant to say:
Fellow groffers, what do you think of generalizing the application
of "mark" and "lineup" in eqn to work in columns and piles as
well as in separately displayed equations.
A typical use of mark and lineup is to align = signs i
Fellow groffers, what do you think of generalizing the application
of "mark" and "lineup" in eqn to work in columns and piles as
well as in equations.
The typical use of mark and lineup is to align = signs in
a sequence of equations. If the = signs signify steps of
> > Would it hence be sensible to change PDFPIC to fit the description
Yes. This is clearly a bug, even if it's been around for years.
Doug
> Adding more invalid hyphenation points only happens if you use an incorrect
> (i.e., a too small) value for lefthyphenmin and/or righthyphenmin.
I do not profess to know anything about the hyphenatiion algorithm,
but this statement suggests to me that inconsistent ("incorrect")
combinations of h
The previous discussion that Branden cited offered no
significant data about the value of stripping.
I had given one example of a complicated scientific
paper with lots of pic, eqn, and tbl, typset with
the relatively simple -ms package. Stripping
made essentially no difference in the overall
run t
The last line of my email on the subject was omitted.
The sentence should have read:
But the stripper should not be dropped solely--or even partly--
to squash a bug, unless the bug is known to be in the stripper.
Doug
I wholeheartedly support eliminating the stripper. It's an
unnecessary step that complicates understanding and maintaining
the distribution package. And to an even greater degree it
obfuscates code that users (who have no interest in the arcana
of maintenance) may want to consult to unravel fine p
All these threads are tangled in my mind, so ...
-a: I use this quite regularly for quick peeks at line and page
breaks without the trouble of writing a file and looking at it
in another window. It is certainly the option I type most--the
rest are buried in shell scripts.
separate maintenance. ma
> The "can't transparently output node at top level" and "can't
> translate character code n to special character 'c' in transparent
> throughput" warnings occur when gropdf is gathering entries for the
> PDF outline. They have no effect on the output. I thought I'd
> documented that, but, appare
I am still puzzled about paragraph-at-a-time typesetting in groff.
How does Utroff deal with even simple changes of line length, e.g. for
flowing text around an image as in the following trivial example.
A robust version that allows for intervening page or paragraph
breaks would pose even more dif
> See `info groff Colors | less'
Also man groff_man. To see what's on offer nearby:
ls /usr/share/man/man7/groff*
It has been said that stripping tmac files improves their
perfomance. I tried it on s.tmac. It cuts the file by 48%.
But on a real-life groff file of considerable complexity
it saved less than 1% of cpu time.
This example suggests that stripping may be a frill that
makes groff maintenance more co
This discussion makes me wonder what the 3000-line perl script, grofpdf,
can do that a trivial shell script that calls groff and ps2pdf can't.
doug
The Fedora system I have access to lacks /usr/share/doc/groff, and
in particular the wonderful tutorial /usr/share/doc/groff/pic.ps.
Was that omitted from groff 1.22.3, or did it get dropped somewhere
in the chain of custody between there and here?
Another bit of evidence: in a cygwin installation
Ingo is right, of course. The inverted delta is read as grad when
it operates on a scalar function. The other readings (div, curl, laplacian)
are for that symbol in combination. But nabla-cross is never read
as "gradient times".
Doug
Please change "gradient" to a generic name. It is usually
read "del" or "nabla" and it is often symbolized "grad" or "div"
But "gradient", by picking out one meaning of several
(gradient, divergence, laplacian) can obscure, rather than
reveal, the meaning.
doug
It would be well to have the Linux manpages project on board for man macro
discussions. Is anyone from that project on this mailing list?
If not, they should probably be invited to participate. A job for Peter Shafter?
Doug
Branden wrote
Ingo's proposal would not mandate that + and \- come from the special
font.
It also would not mandate that \(pl and \(mi come from the current font.
--
I was previously told that \(mi is the true minus sign. But the
true minus sign, at least in my mind, must come from the cu
Originally \(pl and \(mi came from a fixed font (S) while + and \-
came from the current font. As I understand your comment, groff
has reversed this troff convention. Additionally groff interprets - as
a compromise HYPHEN-MINUS.
man groff_char, however, tells the original state of affairs. What i
> If you want a real minus sign (in particular in mathematical
> formular as opposed to in programming language source code),
> \- is not a good choise.
This statement baffles me. That is exactly what \- is supposed
to mean: the mathematical minus sign. In particular it is supposed
to match + in
> WOW. After 40 years they're not errors, merely idiosyncrasies.
> I admire your courage.
Merely senority. The eruption was triggered by my ineptness at
figuring out how an old pic script that literally contained 2d
could ever have worked. The idiosyncrasies are not part of my
mental working set
This pic fragment
d = 3
circle radius 2d
draws a circle of radius 2, not 6 as one might suppose. It is parsed as
circle radius 2 d
and the "irrelevant attribute" d is ignored.
In another context
d = 3
move 2d
the parsing results in a move of 2 then of d. Thu
> .TP
> .B \-scale \c
> .IR xfac [, yfac ]
Very clever. I wish I'd thought of it when I was editing
the v7 manual. Then it would have become a standard idiom.
Has nobody tried this during the nearly 40 years since?
Doug
>> I think it's pretty hopeless to ask for AI that can tell
>> whether a pasted symbol is a hyphen or a minus sign.
>> The answer is likely to depend on whether it is being
>> pasted into a program or into a document.
>
> Right. I'm happy for the typist to put in the effort. Perhaps I'm
> getting
I think it's pretty hopeless to ask for AI that can tell
whether a pasted symbol is a hyphen or a minus sign.
The answer is likely to depend on whether it is being
pasted into a program or into a document.
Doug
> I cannot see what you are doing wrong (why the \t is not seen as a tab)
>From the troff user's manual: "\t Non-interpreted horizontal tab"
Very helpful advice and explanation. Thank you.
Doug
It appears that a tilde (unicode 07E) input to groff -Tpdf comes
out as a diacritical (unicode 303). This happens even when the tilde
is entered as \N'126'.
How can I get 07E?
Doug
I can't help wondering to what extent the man pages for the current
versions reflect this ground truth.
doug
> I hacked the eqn preprocessor so that it will translate equations into
> LaTeX math.
That would be very useful for dealing with journals that insist
on making submissions their way--a great addition to the groff
suite. And now that you've shouwn the way, is there a chance for
rtf, too?
In -ms, I want a floating keep (KF-KE) to begin with 1-column,
then switch to 2-column text. Of course I want the keep to
float past the following text. It is OK, though, if the keep
does have to float to a new page, for the new page to contain
the kept text and nothing more.
In many tries, I have
> an example of some quite complicated page-formatting
> entirely composed using groff (with output to the PS
> device, and some embedded PostScript
I have made greeting cards for 30 years by cobbling together
groff, PostScript, C, Haskell, shell and physical cut-and-paste,
often with input from
While I didn't look at the sample page, I bethought myself how
one might go about setting up the fairly stereotyped NYT editorial
page. Yes, I could copy the page quite exactly, but that would be
something like hand-setting the lines. How would one handle the
weird column layout of the Letter secti
>>> The canonical documentation, BTW, are the groff info files
>> How ironic!
> I always tried to maintain well-written man pages that covers
> everything of groff
Yes. I am very glad for those pages. They are so good that I
had not been conscious of the info files, which you so aptly
call "ca
> The canonical documentation, BTW, are the groff info files
How ironic!
Doug
>> But it is not unnoticeable in case of unary minus.
>> Groff eqn treats
>> a~=~-b
>> as if it were binary, and inserts extra space between
>> the - and b.
>
> It does work with the following patch--for the mentioned cases.
> In case of a=c~-b then there is only space before the '-',
> so ei
I may have made this comment before. My apologies if
it's already on someone's to-do list.
Groff eqn, unlike the original Unix program, attempts to
vary spacing according to mathematical custom. Thus it
automatically adds apace around the equal sign in
a=b
while in the old days one had to
I found several old copies of tmac.s lying around in my files,
presumably modified for various special purposes.
They all contain not only QP-QE, but also an undocumented QS,
and a never-tested flag set by QP and unset by LP and PP.
It appears that QS was expected to be used when QE is not
immediat
>> The -ms macro QE typically draws a misleading diagnostic, "unbalanced QE".
>> This breaks old documents that expect QP-QE (quoted paragraph) to narrow
>> the text and then restore it. The groff QE does not restore.
>>
>> In fact, QE is aliased to RE, which means it will cause other trouble
>> fo
The -ms macro QE typically draws a misleading diagnostic, "unbalanced QE".
This breaks old documents that expect QP-QE (quoted paragraph) to narrow
the text and then restore it. The groff QE does not restore.
In fact, QE is aliased to RE, which means it will cause other trouble
for a quoted paragr
I was surprised to see atomic physics arise on this mailing list.
It took a while to realize that spdf, engraved in memory as the
energy-level sequence in a Bohr atom, has an alternate parsing
of general interest to groffers.
Doug
> As Dijkstra said of Algol, "an improvement over many of its successors"
In the interest of accuracy, Hoare said it in "Hints on programming
language design",
http://i.stanford.edu/pub/cstr/reports/cs/tr/73/403/CS-TR-73-403.pdf
His exact words were
"it was not only an improvement on its predeces
bin7yr_t7bqk3.bin
Description: Binary data
vertical position.
Doug McIlroy
The disappearance of some troff-related documents that had
been on line at Bell Labs was recently reported on this
list. That turns out to have been a bureaucratic snafu.
Plan 9 and v7 are back now. It is hoped that CSTRs will
follow.
Doug
Suppose one wants to control the shape of filled text so it
fits in a figure, for example a triangle or disc. In groff
one would set a trap to change indent and/or line length on
every line. The traps could be set all at once in advance,
or more elegantly by a self-resetting trap macro.
Examples
Peter wrote:
I've fixed the offending line in the Mission Statement pdf
Out of curiosity, what was the offense? Did some groff construct
lead to it?
Doug
1 - 100 of 151 matches
Mail list logo