[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

show text in italics.

Vamsi Krishna

7/18/2008 12:43:00 PM

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.
--
Posted via http://www.ruby-....

6 Answers

James Coglan

7/18/2008 1:06:00 PM

0

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

2008/7/18 Vamsi Krishna <vamsikrishna.naidu@gmail.com>:

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

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

Paul Smith

7/18/2008 2:20:00 PM

0

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

On Fri, Jul 18, 2008 at 1:43 PM, Vamsi Krishna
<vamsikrishna.naidu@gmail.com> wrote:
> 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.
> --
> Posted via http://www.ruby-....
>
>



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

Upcoming events in Bath -
July 26th Eventide Launch Party

paul@pollyandpaul.co.uk

Vamsi Krishna

7/18/2008 2:33:00 PM

0

Paul Smith 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 Krishna
> <vamsikrishna.naidu@gmail.com> 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-....
>>
>>
>
>
>
> --
> Paul Smith
> DCI Level 2 Judge, Bath FNM Organiser
>
> Upcoming events in Bath -
> July 26th Eventide Launch Party
>
> paul@pollyandpaul.co.uk



In the coonsole as well in an rhtml.
--
Posted via http://www.ruby-....

reuben doetsch

7/18/2008 4:30:00 PM

0

[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

On Fri, Jul 18, 2008 at 9:32 AM, Vamsi Krishna <vamsikrishna.naidu@gmail.com>
wrote:

> Paul Smith 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 Krishna
> > <vamsikrishna.naidu@gmail.com> 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-....
> >>
> >>
> >
> >
> >
> > --
> > Paul Smith
> > DCI Level 2 Judge, Bath FNM Organiser
> >
> > Upcoming events in Bath -
> > July 26th Eventide Launch Party
> >
> > paul@pollyandpaul.co.uk
>
>
>
> In the coonsole as well in an rhtml.
> --
> Posted via http://www.ruby-....
>
>

Dave Bass

7/18/2008 5:30:00 PM

0

reuben doetsch wrote:
> 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
--
Posted via http://www.ruby-....

Vamsi Krishna

7/21/2008 12:58:00 PM

0

Dave Bass wrote:
> reuben doetsch wrote:
>> 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



Thaks all of u ...... i'm trying to print at console....
--
Posted via http://www.ruby-....