Show text in italics

Hi ,

well, is there any logic to display a text in italics in ruby.

like a simple program that shows text in italics?

ex: def text
puts" hi to all"
end
puts text

so i need to display "hi to all " in italics.

i know there is not. but want to try, and please reply if u know …
thanks.

2008/7/18 Vamsi K. [email protected]:

so i need to display "hi to all " in italics.

See this wikipedia article: ANSI escape code - Wikipedia

In theory you could do

puts “\e[3mhi to all\e[0m”

But apparently italics is not widely supported. Bold and underline seem
to
work in my Ubuntu terminal (\e[1m and \e[4m respectively).

James

  • Vamsi K., 2008-07-18, 21:43:

ex: def text
puts" hi to all"
end
puts text

so i need to display "hi to all " in italics.

Italics are not available, other kinds of highlighting are (bold,
underlined, colour, etc.). Read

man console_codes

for details. ECMA-48 ones usually work on Windows as well. If you do
not have the man page simply use an online version of it;

http://www.google.com/search?q=console_codes

finds many of them.

Josef ‘Jupp’ Schugt

Paul S. wrote:

Where are you displaying the text? At the console? In a window? Using
shoes?

On Fri, Jul 18, 2008 at 1:43 PM, Vamsi K.
[email protected] wrote:

so i need to display "hi to all " in italics.

i know there is not. but want to try, and please reply if u know …
thanks.

Posted via http://www.ruby-forum.com/.


Paul S.
DCI Level 2 Judge, Bath FNM Organiser

Upcoming events in Bath -
July 26th Eventide Launch Party

[email protected]

In the coonsole as well in an rhtml.

For console impossible, but in rhtml just surround the text with either
or tags, since rhtml is converted to html any tags
around
the word will be shown.

Reuben Doetsch

On Fri, Jul 18, 2008 at 9:32 AM, Vamsi K.
[email protected]

Where are you displaying the text? At the console? In a window? Using
shoes?

On Fri, Jul 18, 2008 at 1:43 PM, Vamsi K.
[email protected] wrote:

so i need to display "hi to all " in italics.

i know there is not. but want to try, and please reply if u know …
thanks.

Posted via http://www.ruby-forum.com/.


Paul S.
DCI Level 2 Judge, Bath FNM Organiser

Upcoming events in Bath -
July 26th Eventide Launch Party

[email protected]

Dave B. wrote:

reuben doetsch wrote:

in rhtml just surround the text with
either or tags

Ahem… if you want italics, use . If you want emphasis, use .

This may be too subtle a distinction for most folk. “They both look the
same in my browser!” :wink:

Dave

Thaks all of u … i’m trying to print at console…

reuben doetsch wrote:

in rhtml just surround the text with
either or tags

Ahem… if you want italics, use . If you want emphasis, use .

This may be too subtle a distinction for most folk. “They both look the
same in my browser!” :wink:

Dave