bugGNU roff - Bugs: bug #48835, tell people how to get...

 
 

bug #48835: tell people how to get "pre-formatted" text onto output devices

Submitter:  None
Submitted:  Sat 20 Aug 2016 03:50:15 PM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Documentation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 25 Jan 2022 04:41:03 PM UTC, comment #2: 

This seems like a documentation issue to me, more than anything else.

G. Branden Robinson <gbranden>
Group administrator
Sat 20 Aug 2016 04:46:42 PM UTC, comment #1: 

In regards to ps and pdf, (I don't know anything about html), spaces are not "printed" they are just measured gaps between items which are printed. In your example you are using the proportional Times Roman font - the default. The width of a space in this font is about one third of the width of the capitals you are using. If you edit your example and add a new line at the top:-

.fam C

Groff will now use a fixed pitch font (courier) where the width of the space is the same as the width of the capitals. You should now see the spacing as you expect. You will see exactly the same phenomenon if you copy your example text into a word processor and mark the text with a proportional font and then change it to a fixed width font.

Deri James <deri>
Group Member
Sat 20 Aug 2016 03:50:15 PM UTC, original submission:  

Terminal devices properly retain spaces when using .na or .nf, but when "groff -T DRIVER" is used and DRIVER is ps, html, or pdf spaces are not retained correctly in pre-formatted text. For example, using the following input file:

.nf

>  HH      HH  EEEEEEEEEE  LL          LL           OOOOOOOO
>  HH      HH  EEEEEEEEEE  LL          LL          OOOOOOOOOO
>  HH      HH  EE          LL          LL          OO     OOO
>  HH      HH  EE          LL          LL          OO    O OO
>  HHHHHHHHHH  EEEEE       LL          LL          OO   O  OO
>  HHHHHHHHHH  EEEEE       LL          LL          OO  O   OO
>  HH      HH  EE          LL          LL          OO O    OO
>  HH      HH  EE          LL          LL          OOO     OO
>  HH      HH  EEEEEEEEEE  LLLLLLLLLL  LLLLLLLLLL  OOOOOOOOOO
>  HH      HH  EEEEEEEEEE  LLLLLLLLLL  LLLLLLLLLL 

 
and "groff -T html" this text becomes

OOOOOOOO<p>&gt; HH HH EEEEEEEEEE LL LL OOOOOOOO <br>
&gt; HH HH EEEEEEEEEE LL LL OOOOOOOOOO <br>
&gt; HH HH EE LL LL OO OOO <br>
&gt; HH HH EE LL LL OO O OO <br>
&gt; HHHHHHHHHH EEEEE LL LL OO O OO <br>
&gt; HHHHHHHHHH EEEEE LL LL OO O OO <br>
&gt; HH HH EE LL LL OO O OO <br>
&gt; HH HH EE LL LL OOO OO <br>
&gt; HH HH EEEEEEEEEE LLLLLLLLLL LLLLLLLLLL OOOOOOOOOO <br>
&gt; HH HH EEEEEEEEEE LLLLLLLLLL LLLLLLLLLL OOOOOOOO</p>

where the text should be in a "<pre>" section or spaces should be retained with "&nbsp;" replaceing the spaces in such a region.




Anonymous

 

(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
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by deri (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-27 barx Carbon-Copy- Added barx
    2022-01-25 gbranden CategoryNone General
        Item GroupIncorrect behaviour Documentation
        Summarypreformatted text does not retain adjacent spaces using ps,pdf, html output devices tell people how to get "pre-formatted" text onto output devices

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code