Re: Format inline code

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

 



Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
---

Hi Michael,

This is not a patch.
But I sent you a full page to better see what we're talking about.

Here are, as subsections of EXAMPLES,
A (.RS/.RE after first .TP paragraph) and
B (.RS/.RE Always)
from last email.

As for using .RS/.RE for single paragraphs,
we could do as in C:
{} for multi-line ifs/loops -> .RS/.RE for multiple paragraphs.
just indent for single-line ifs/loops -> .IP for single paragraphs.

Your thoughts?

Thanks,

Alex

 man7/test_man_format.7 | 132 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100644 man7/test_man_format.7

diff --git a/man7/test_man_format.7 b/man7/test_man_format.7
new file mode 100644
index 000000000..6fc7ae974
--- /dev/null
+++ b/man7/test_man_format.7
@@ -0,0 +1,132 @@
+.\" %%%LICENSE_START(VERBATIM)
+.\" Do whatever the heck you want with it.
+.\" %%%LICENSE_END
+.\"
+.\"
+.TH TEST_MAN_FORMAT 7 2020-11-06 "Linux" "Linux Programmer's Manual"
+.SH NAME
+test_man_format \- playground page to test formatting
+.SH DESCRIPTION
+Please, modify the source of this page to see the output changes.
+.SH EXAMPLES
+.SS .RS/.RE after first .TP paragraph
+.TP
+HEADW
+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.
+.RS
+.PP
+Augue interdum velit euismod in pellentesque.
+Tristique senectus et netus et malesuada fames ac turpis egestas.
+Gravida arcu ac tortor dignissim convallis.
+.PP
+.RS +4n
+.EX
+int
+main(int argc, char *argv[])
+{
+     return 0;
+}
+.EE
+.RE
+.RE
+.TP
+HEADW
+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.
+.RS
+.PP
+Augue interdum velit euismod in pellentesque.
+Tristique senectus et netus et malesuada fames ac turpis egestas.
+Gravida arcu ac tortor dignissim convallis.
+.IP +4n
+.EX
+int
+main(int argc, char *argv[])
+{
+     return 0;
+}
+.EE
+.RE
+.TP
+HEADW
+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
+.\" We could use .RS+.PP/.RE here, but as an analogy to C's one-line if's,
+.\" we could also use .IP for simplicity when there is only one
+.\" paragraph affected.
+Augue interdum velit euismod in pellentesque.
+Tristique senectus et netus et malesuada fames ac turpis egestas.
+Gravida arcu ac tortor dignissim convallis.
+.TP
+HEADW
+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.
+.SS .RS/.RE Always
+.TP
+HEADW
+.RS
+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.
+.PP
+Augue interdum velit euismod in pellentesque.
+Tristique senectus et netus et malesuada fames ac turpis egestas.
+Gravida arcu ac tortor dignissim convallis.
+.PP
+.RS +4n
+.EX
+int
+main(int argc, char *argv[])
+{
+     return 0;
+}
+.EE
+.RE
+.RE
+.TP
+HEADW
+.RS
+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.
+.PP
+Augue interdum velit euismod in pellentesque.
+Tristique senectus et netus et malesuada fames ac turpis egestas.
+Gravida arcu ac tortor dignissim convallis.
+.IP 4
+.EX
+int
+main(int argc, char *argv[])
+{
+     return 0;
+}
+.EE
+.RE
+.TP
+HEADW
+.RS
+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.
+.RE
+.SH SEE ALSO
+.BR man (1),
+.BR man2html (1),
+.BR groff (7),
+.BR groff_man (7),
+.BR man (7),
+.BR man-pages (7),
+.BR mdoc (7)
-- 
2.28.0




[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