Re: .RS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/20 8:57 PM, Alejandro Colomar (man-pages) wrote:
> Hi Branden and Michael,
> 
> Okay, after some testing:
> 
> * [.in 4] simply doesn't seem to work at all.
> * [.RS 4] and [.RS +4n] seem to be equivalent.
> * [.RS 4] is different (worse) than [.in +4n]
>           in some very specific scenario:
> 
> [[
> .IP * 2
> Lorem ipsum dolor sit amet, consectetur adipiscing elit,
> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
> nisi ut aliquip ex ea commodo consequat.
> .\""""""""""""""""""""""""""""""""""""""""""
> .IP		\" Indent is 2n after this
> .in +4n		\" Indent is 6n after this
> .EX
> I am indented 6n from normal paragraphs.
> .EE
> .in		\" Return to normal
> .\"""""""""""""""""""""""""""""""""""""""""""
> .IP *
> Augue interdum velit euismod in pellentesque.
> Tristique senectus et netus et malesuada fames ac turpis egestas.
> Gravida arcu ac tortor dignissim convallis.
> .\"""""""""""""""""""""""""""""""""""""""""""
> .IP		\" Indent is 2n after this
> .RS 4		\" Indent is _4n_ after this
> .EX
> I am indented 4n from normal paragraphs!!!
> .EE
> .RE		\" Return to normal
> .\"""""""""""""""""""""""""""""""""""""""""""
> ]]
> 
> This happens in perf_event_open.2,
> where [.in +4n] is used,
> and when I changed it to [.RS/.RE] I saw this change in behavior.
> 
> Do you know why is that?

Hmmm -- I don't know. I was going to ask, doesn't s/>RS 4/.RS +4n/
fix the problem? But I see that it does not.

By the way, your comments (\") actually cause the rendered
output to change, as far as I can see! In particular,
the \" on the final .RE leads to some strangeness:

[[
.IP * 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.
.\""""""""""""""""""""""""""""""""""""""""""
.IP             \" Indent is 2n after this
.in +4n         \" Indent is 6n after this
.EX
I am indented 6n from normal paragraphs.
.EE
.in             \" Return to normal
.\"""""""""""""""""""""""""""""""""""""""""""
.IP *
Augue interdum velit euismod in pellentesque.
Tristique senectus et netus et malesuada fames ac turpis egestas.
Gravida arcu ac tortor dignissim convallis.
.\"""""""""""""""""""""""""""""""""""""""""""
.IP             \" Indent is 2n after this
.RS 4
.EX
I am indented 4n from normal paragraphs!!!
.EE
.RE             \" nom
.\"""""""""""""""""""""""""""""""""""""""""""
.PP
Augue interdum velit euismod in pellentesque.
]]

Gives:

[[
       * Lorem  ipsum dolor sit amet, consectetur adipiscing elit, sed do
         eiusmod tempor incididunt ut labore et dolore magna aliqua.   Ut
         enim  ad minim veniam, quis nostrud exercitation ullamco laboris
         nisi ut aliquip ex ea commodo consequat.

             I am indented 6n from normal paragraphs.

       * Augue interdum velit euismod in pellentesque.  Tristique  senec‐
         tus et netus et malesuada fames ac turpis egestas.  Gravida arcu
         ac tortor dignissim convallis.

           I am indented 4n from normal paragraphs!!!

Augue interdum velit euismod in pellentesque.
]]

No indent at all on the final line!

Thanks,

Michael
-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux