bugGNU roff - Bugs: bug #62691, [troff] character translations...

 
 

bug #62691: [troff] character translations should be associated with the environment

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Fri 01 Jul 2022 04:53:15 AM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature change Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 05 May 2023 01:48:33 AM UTC, comment #4: 

http://lists.gnu.org/r/groff/2023-04/msg00273.html and a couple of its follow-ups discuss this change (though the thread began as a discussion about bug #55155).

Dave <barx>
Group Member
Sun 23 Oct 2022 08:18:45 PM UTC, comment #3: 


comment #2:

> Would this be a new .tr-like request that would define per-environment character translations, or are you looking to alter the behavior of the existing (three) .tr(s)?  'Cause I can see how someone might be dismayed by the results in your example, but I can also see how someone might want the translation to be global.  Consider a user who finds \[oq] and \[cq] both clunky to type and ugly in text, and also knows they'll never use curly braces in their document.  They'd likely want a mapping of the latter to the former to apply everywhere.
>


> .tr {\[oq]}\[cq]
> .ev title
> .tl ''The {header}''
> .ev
> This is in {single quotes.}


It is a distinction I am considering creating.  `char` mappings would be global, `tr` mappings would be per-environment.

G. Branden Robinson <gbranden>
Group administrator
Tue 11 Oct 2022 04:32:48 AM UTC, comment #2: 

Would this be a new .tr-like request that would define per-environment character translations, or are you looking to alter the behavior of the existing (three) .tr(s)?  'Cause I can see how someone might be dismayed by the results in your example, but I can also see how someone might want the translation to be global.  Consider a user who finds \[oq] and \[cq] both clunky to type and ugly in text, and also knows they'll never use curly braces in their document.  They'd likely want a mapping of the latter to the former to apply everywhere.


.tr {\[oq]}\[cq]
.ev title
.tl ''The {header}''
.ev
This is in {single quotes.}


Dave <barx>
Group Member
Sun 09 Oct 2022 03:45:09 AM UTC, comment #1: 

Bug #57836 also seeks to make certain global state information environment-specific.

Dave <barx>
Group Member
Fri 01 Jul 2022 04:53:15 AM UTC, original submission:  

The purpose of the character translation feature appears to be make input more straightforward.  If that is true, then it should be tied to the environment; if a page header or footer, for instance, intrudes, it should not necessarily be affected by the translation.

Here's an example.


$ cat EXPERIMENTS/tl-and-ev.groff
.de header
.  ev title
.  tl ''-%-''
.  ev
..
.wh 0 header
.pl 5v
.ti 5n
Hello, world!
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab
illo inventore veritatis et quasi architecto beatae vitae dicta sunt,
explicabo.  Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur
aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione
voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum,
.\" Let's pretend we find hyphens hard to type.  Also remap the hyphen
.\" itself to make my point about environmments.
.tr @--@
quia dolor sit amet consectetur adipiscivelit, sed quia non@numquam eius
modi tempora incidunt, ut labore et dolore magnam aliquam quaerat
voluptatem.
Ut enim ad minima veniam, quis nostrum exercitationem ullam
corporis suscipitlaboriosam, nisi ut aliquid ex ea commodi consequatur?
Quis autem vel eum iure reprehenderit, qui inea voluptate velit esse,
quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo
voluptas nulla pariatur?  At vero eos et accusamus et iusto odio
dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti
atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati
cupiditate non@provident, similique sunt in culpa, qui officia deserunt
mollitia animi, id est laborum et dolorum fuga.  Et harum quidem rerum
facilis est et expedita distinctio.  Nam libero tempore, cum soluta
nobis est eligendi optio, cumque nihil impedit, quo minus id, quod
maxime placeat, facere possimus, omnis voluptas assumenda est, omnis
dolor repellendus.  Temporibus autem quibusdam et aut officiis debitis
aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae
sint et molestiae non@recusandae.  Itaque earum rerum hic tenetur a
sapiente delectus, ut aut reiciendis voluptatibus maiores alias
consequatur aut perferendis doloribus asperiores repellat.


Output:


$ nroff EXPERIMENTS/tl-and-ev.groff
                               ‐1‐
     Hello,  world!   Sed  ut perspiciatis, unde omnis iste natus
error sit voluptatem accusantium doloremque laudantium, totam rem
aperiam eaque ipsa, quae ab illo inventore veritatis et quasi ar‐
chitecto beatae vitae dicta sunt,  explicabo.   Nemo  enim  ipsam
                               ‐2‐
voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed
quia consequuntur magni dolores eos, qui ratione voluptatem sequi
nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor
sit amet consectetur adipiscivelit, sed quia non‐numquam eius mo‐
                               @3@
di  tempora  incidunt, ut labore et dolore magnam aliquam quaerat
voluptatem.  Ut enim ad minima  veniam,  quis  nostrum  exercita‐
tionem  ullam  corporis suscipitlaboriosam, nisi ut aliquid ex ea
commodi consequatur?  Quis autem vel eum iure reprehenderit,  qui
                               @4@
inea  voluptate velit esse, quam nihil molestiae consequatur, vel
illum, qui dolorem eum fugiat, quo voluptas nulla  pariatur?   At
vero  eos  et  accusamus  et  iusto odio dignissimos ducimus, qui
blanditiis praesentium voluptatum deleniti atque  corrupti,  quos
                               @5@
dolores  et  quas  molestias excepturi sint, obcaecati cupiditate
non‐provident, similique sunt in culpa, qui officia deserunt mol‐
litia animi, id est laborum et dolorum fuga.  Et harum quidem re‐
rum facilis est et expedita distinctio.  Nam libero tempore,  cum
                               @6@
soluta  nobis est eligendi optio, cumque nihil impedit, quo minus
id, quod maxime placeat, facere possimus, omnis voluptas assumen‐
da  est,  omnis dolor repellendus.  Temporibus autem quibusdam et
aut officiis debitis aut rerum necessitatibus saepe  eveniet,  ut
                               @7@
et  voluptates  repudiandae  sint  et  molestiae  non‐recusandae.
Itaque earum rerum hic tenetur a sapiente delectus,  ut  aut  re‐
iciendis  voluptatibus  maiores alias consequatur aut perferendis
doloribus asperiores repellat.


I haven't yet looked at how hard this would be to implement.  Presumably someone will want to argue about it first.  :)

G. Branden Robinson <gbranden>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by barx
  • -email is unavailable- added by gbranden (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-03 barx Carbon-Copy- Added barx

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code