n-t-roff / heirloom-doctools

The Heirloom Documentation Tools: troff, nroff, and related utilities
http://n-t-roff.github.io/heirloom/doctools.html
Other
127 stars 23 forks source link

.lpfx example in the manual #105

Open nbuwe opened 3 years ago

nbuwe commented 3 years ago

When you format the troff manual the documentation for .lpfx in section 20 is formatted with the sample prefix applied to the first line as well, i.e.

``.lpfx string off off E ...

This was typeset without the prefix on that first line in an older version (the preformatted PS manual I grabbed a few years ago), the prefix was applied only from the second "Explanation" line onward.

I'm not sure if this change was intended or not, but IMHO the new version is visually confusing.

reffort commented 3 years ago

I seem to recall that this is due to a bug in the way .lpfx works in paragraph mode, and that it works correctly in single-line mode (but I'm not sure about that because I have a nagging feeling that there is a problem when the first line begins with a quotation mark).

The only use for .lpfx I am aware of is for a very, very obsolete form of quotation. Perhaps it would be acceptable to use single-line mode to format the explanation for .lpfx and include a note that it is only supported with single-line justification.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Saturday, April 3, 2021 5:24 PM, Valery Ushakov @.***> wrote:

When you format the troff manual the documentation for .lpfx in section 20 is formatted with the sample prefix applied to the first line as well, i.e.

``.lpfx string off off E ...

This was typeset without the prefix on that first line in an older version (the preformatted PS manual I grabbed a few years ago), the prefix was applied only from the second "Explanation" line onward.

I'm not sure if this change was intended or not, but IMHO the new version is visually confusing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nbuwe commented 3 years ago

What I also missed on the cursory look is that not only the prefix is printed before .lpfx at the left, but the first line of the description is also indented for what seems to be the prefix width, i.e.


  Set the line prefix...
``string is then ...
``well as ...
nbuwe commented 3 years ago

Perhaps it would be acceptable to use single-line mode to format the explanation for .lpfx

Ah, that paragraph actually already has .ad b/.ad p around it.

reffort commented 3 years ago

I'm not near a machine where I can try this out (and I don't have a recent copy of the code, anyway), but I think if global paragraph adjustment is switched off by inserting .padj 0 before the .ad b line, the paragraph will format like it did before.

A second experiment would be to turn on paragraph adjustment for one paragraph by changing .ad b to .ad pb, with .padj 0 still in place (.ad pb works a little different than .padj). To format the remainder of the document correctly, a .padj line would need to inserted after the paragraph.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Monday, April 5, 2021 10:12 PM, Valery Ushakov @.***> wrote:

Perhaps it would be acceptable to use single-line mode to format the explanation for .lpfx

Ah, that paragraph actually already has .ad b/.ad p around it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

nbuwe commented 3 years ago

I think if global paragraph adjustment is switched off by inserting .padj 0 before the .ad b line, the paragraph will format like it did before.

It does indeed. It additionally needs .nh or the paragraph is hyphenated (which looks really weird with .lpfx).

A second experiment would be to turn on paragraph adjustment for one paragraph by changing .ad b to .ad pb, with .padj 0 still in place

That one does not seem to work.