show text in italics.

V

Vamsi Krishna

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.
 
J

James Coglan

[Note: parts of this message were removed to make it a legal post.]

2008/7/18 Vamsi Krishna said:
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.



See this wikipedia article: http://en.wikipedia.org/wiki/ANSI_color

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
http://github.com/jcoglan
 
P

Paul Smith

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

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.



--
Paul Smith
DCI Level 2 Judge, Bath FNM Organiser

Upcoming events in Bath -
July 26th Eventide Launch Party

(e-mail address removed)
 
V

Vamsi Krishna

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





--
Paul Smith
DCI Level 2 Judge, Bath FNM Organiser

Upcoming events in Bath -
July 26th Eventide Launch Party

(e-mail address removed)



In the coonsole as well in an rhtml.
 
R

reuben doetsch

[Note: parts of this message were removed to make it a legal post.]

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

Reuben Doetsch
 
D

Dave Bass

reuben said:
in rhtml just surround the text with
either <em></em> or <i></i> tags

Ahem... if you want italics, use <i>. If you want emphasis, use <em>.

This may be too subtle a distinction for most folk. "They both look the
same in my browser!" ;-)

Dave
 
V

Vamsi Krishna

Dave said:
Ahem... if you want italics, use <i>. If you want emphasis, use <em>.

This may be too subtle a distinction for most folk. "They both look the
same in my browser!" ;-)

Dave



Thaks all of u ...... i'm trying to print at console....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top