Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

bolding words within format

by c (Hermit)
on Sep 04, 2001 at 18:26 UTC ( [id://110039]=perlquestion: print w/replies, xml ) Need Help??

c has asked for the wisdom of the Perl Monks concerning the following question:

i am using format to place output into columns which is working very nicely, however i would like to bold a field. is there a module that could simplify this or do i need to get into using latex for modifications such as this?

humbly -c

Replies are listed 'Best First'.
Re: bolding words within format
by stefan k (Curate) on Sep 04, 2001 at 18:35 UTC
    If you're living in an ANSI Terminal (like xterm) you could use ansi escape sequences:
    print "The following text will be"; print "\033[1m"; # bold on print " bold "; print "\033[m"; # bold off print "\n";
    You may find a bash prompt howto on your system where many such sequences are described: On my system it's called Bash-Prompt-HOWTO.

    Regards... Stefan
    you begin bashing the string with a +42 regexp of confusion

      The only problem with ansi escape chars is that many things read them as normal chars, but since they are non-printing they throw some things off, since it sees the string as longer than it actually prints... I'm not sure if format knows better or not, but I doubt it... just something good to know.

                      - Ant
                      - Some of my best work - Fish Dinner

Re: bolding words within format
by Sifmole (Chaplain) on Sep 04, 2001 at 18:30 UTC
    The bolding of words has nothing to do with format directly. You will need some form of markup such as latex to do this. Of course the bolding will only be viewable in an application that understands the markup you decide to use.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://110039]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found