"man" likes to do underscoring and bolding in a way that works when you print (well, on some printers, anyway) the file and is mostly ignored when you display it on the screen. This is so common that pagers like "more" are likely to notice it and make it work on the screen as well.

The trick is to use backspace or carriage return to put multiple characters in the same spot. So you'd write "_\b3" ("\b" is backspace) to have "3" underlined and you'd write "3\b3" to have "3" bold and "_\b3\b3" to have it bold and underscored. Dealing with multi-char sequences is slightly trickier but still pretty easy in Perl.

Note that "\b" won't work in anything I can think of other than Perl. So if this wasn't a Perl question, you'll need to look up how to write backspace or carriage return in what you are using.

There are also nodes here (see Super Search) that describe how to transform such overlapping text into other formats...

- tye        


In reply to Re: Bold text (man) by tye
in thread Bold text by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.