vamsi
July 18, 2008, 2:48pm
1
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.
vamsi
July 18, 2008, 3:11pm
2
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
July 18, 2008, 3:20pm
3
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
vamsi
July 18, 2008, 4:37pm
4
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.
vamsi
July 18, 2008, 6:35pm
5
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]
vamsi
July 18, 2008, 4:25pm
6
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]
vamsi
July 21, 2008, 3:02pm
7
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!”
Dave
Thaks all of u … i’m trying to print at console…
vamsi
July 18, 2008, 7:35pm
8
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!”
Dave