bugGNU roff - Bugs: bug #54894, doc/groff.texi: clarify \p escape

 
 

bug #54894: doc/groff.texi: clarify \p escape

Submitter:  Dave <barx>
Submitted:  Thu 25 Oct 2018 12:34:00 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Documentation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Jun 2022 05:36:25 PM UTC, comment #4: 


commit 8ae30a9113a39c0280f3d831b7390c643e1a9072
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Oct 25 17:26:47 2018 -0400

    Clarify meaning of \p escape.

    Also make more explicit that line adjustment for the .brp request and \p
    escape depends on the current adjustment mode.

    * doc/groff.texi: Clarify that \p has effect at the next word
      boundary.  Thanks to Dave <barx> for pointing out the issue and
      providing elucidating language.

    * man/groff.7.man: Similar, but terser.

    Fixes https://savannah.gnu.org/bugs/index.php?54894.

    Also:

    * doc/groff.texi:
      + Fix subject/verb agreement: "TeX have" -> "TeX has".
      + Add Emacs fill-column to local variables.
      + Add Vim modeline.


G. Branden Robinson <gbranden>
Group administrator
Thu 25 Oct 2018 11:15:01 PM UTC, comment #3: 

That was quick!  Thank you for figuring out that it needed more comprehensive wording (I'd forgotten about the non-adjustment case) and finding the man page that also needed the update.

Dave <barx>
Group Member
Thu 25 Oct 2018 08:33:13 PM UTC, comment #2: 

\p seems to respect the adjustment setting just fine.

(file #45297, file #45298)

G. Branden Robinson <gbranden>
Group administrator
Thu 25 Oct 2018 08:19:37 PM UTC, comment #1: 

Sounds good to me.

We/I should also fix man/groff.7.man, which simply says "Break and spread output line".

I assume "spreading" (adjustment) is not done if it's switched off the time \p is encountered.

G. Branden Robinson <gbranden>
Group administrator
Thu 25 Oct 2018 12:34:00 PM UTC, original submission:  

In doc/groff.texi, .brp and \p are documented together, but the text as written really only applies to .brp.

It says that either one will "cause a break."  For \p, the most straightforward reading of this phrase would mean the \p itself becomes a breakpoint.

But this is not what it does in practice.  I presume groff's behavior is correct, and the documentation in error (or, at least, not very clear), because groff's behavior matches the documentation (and behavior) of Heirloom troff, which states that a \p "imbedded or attached to a word" will "cause a break at the end of the word."  doc/groff.texi should also spell this out clearly.

Thus I propose adding the following two sentences to clarify \p's behavior: "With \p, this break will happen at the next word boundary.  The \p itself is removed entirely, adding neither a break nor a space where it appears in input; it can thus be placed in the middle of a word to cause a break at the end of that word."

If no one has comments or improvements on this wording, I'll create a patch to make this change.

Dave <barx>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45297:  brp.trf added by gbranden (950B - application/octet-stream - adjustment experiment with \p (troff source and PostScript))
file #45298:  brp.ps added by gbranden (7KiB - application/postscript - adjustment experiment with \p (troff source and PostScript))
file #45296:  brp.diff added by gbranden (465B - text/x-patch - proposed man page patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by barx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-15 gbranden CategoryNone Core
    2018-10-25 gbranden Open/ClosedOpen Closed
    2018-10-25 gbranden StatusConfirmed Fixed
        Assigned toNone gbranden
        Planned ReleaseNone 1.22.4
    2018-10-25 gbranden Attached File- Added brp.trf, #45297
        Attached File- Added brp.ps, #45298
    2018-10-25 gbranden Attached File- Added brp.diff, #45296
    2018-10-25 gbranden StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code