Format inline code

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

 



Hey Michael,

I tried to reply to the old thread where we talked about it,
but I couldn't find it.
I think it was in a thread of some patch for system_data_types,
so I didn't know how to filter for it :/

So let's start a clean thread for that.

Currently, man-pages(7) proposes:

=================
.PP
.in +4n
.EX
int
main(int argc, char *argv[])
{
    return 0;
}
.EE
.in
.PP
=================

I think you said that it doesn't always work.

I don't agree with that:
If you correctly use .RS/.RE instead of misusing .IP,
I think it will work always.

I mean, if you have a block that is indented,
I propose to use .RS/.RE for the whole block,
instead of .IP for every paragraph
(if you use .IP, then yes,
that construct needs to be modified to use it too).
An implementation of what I mean is system_data_types.7.

If you think it would still fail in some scenario,
please show me.

Another problem of that construct is that it uses naked .in.
I agree with it.

How about the following?:

=================
.PP
.RS +4n
.EX
int
main(int argc, char *argv[])
{
    return 0;
}
.EE
.RE
.PP
=================

I don't know if that syntax is correct,
but I tried it, and it seems to work.

AFAIK, it will _always_ work
as long as blocks are correctly indented using .RS/.RE,
and it uses man macros only.

Any thoughts?


Thanks,

Alex



[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