You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Lana Frost <La...@Sun.COM> on 2009/12/09 19:55:56 UTC

Italics in code lines

Hi,

Is it possible in JSPwiki to include italicized font in a code sample?

What I want is this

$ cd /install-dir//bin

What I've tried is this:

{{{
$ cd ''install-dir''/bin
}}}

but the quotes are returned literally, so:

$ cd ''install-dir''/bin

Is there a way to do this?

Thanks,
Lana


Re: Italics in code lines

Posted by Dirk Frederickx <di...@gmail.com>.
Of course, you can further exploit the powers of css:

%%(white-space:pre; ) $ cd ''install''-dir/bin More __markup__ lines here.
/%
and if you want to give it the look of a {{{ }}} block :

%%(margin:1em 1.5em;padding:0.5em;background:#f9f9f9; border:1px solid
#ddd;)
%%(white-space:pre; ) $ cd ''install''-dir/bin More __markup__ lines here.
/% /%


dirk

On Wed, Dec 9, 2009 at 10:10 PM, Bob Paige <bo...@gmail.com> wrote:

> I'm using JSPWiki 2.6.3 and this solution doesn't *quite* work. The
> box is not spaced properly, is not indented, and the font is not
> Courier.
>
> Is this solution specific to a newer version of JSPWiki?
>
> --
> Bobman
>
> On Wed, Dec 9, 2009 at 3:45 PM, Janne Jalkanen <Ja...@ecyrd.com>
> wrote:
> >
> > How about using the CSS directly?
> >
> > %%(white-space:pre;border:1px solid #ddd;)
> > cd ''install''-dir/bin
> > %%
> >
> > You can add as much css as you want, or you can create your own style in
> a
> > local CSS file and refer to it as
> >
> > %%code
> > cd ''install''-dir/bin
> > %%
> >
> > /Janne
> >
> > On Dec 9, 2009, at 22:20 , Lana Frost wrote:
> >
> >> Thanks Dirk,
> >>
> >> That works but unfortunately most of our code samples span multiple
> lines
> >> so I was hoping to be able to use the code block.
> >>
> >> Thanks,
> >> Lana
> >>
> >> Dirk Frederickx wrote:
> >>>
> >>> Lana,
> >>>
> >>> You could do something like this:
> >>>
> >>> {{$ cd ''install''-dir/bin}}
> >>>
> >>>
> >>> dirk
> >>>
> >>>
> >>> On Wed, Dec 9, 2009 at 7:55 PM, Lana Frost <La...@sun.com> wrote:
> >>>
> >>>
> >>>> Hi,
> >>>>
> >>>> Is it possible in JSPwiki to include italicized font in a code sample?
> >>>>
> >>>> What I want is this
> >>>>
> >>>> $ cd /install-dir//bin
> >>>>
> >>>> What I've tried is this:
> >>>>
> >>>> {{{
> >>>> $ cd ''install-dir''/bin
> >>>> }}}
> >>>>
> >>>> but the quotes are returned literally, so:
> >>>>
> >>>> $ cd ''install-dir''/bin
> >>>>
> >>>> Is there a way to do this?
> >>>>
> >>>> Thanks,
> >>>> Lana
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >
> >
>

Re: Italics in code lines

Posted by Bob Paige <bo...@gmail.com>.
I'm using JSPWiki 2.6.3 and this solution doesn't *quite* work. The
box is not spaced properly, is not indented, and the font is not
Courier.

Is this solution specific to a newer version of JSPWiki?

-- 
Bobman

On Wed, Dec 9, 2009 at 3:45 PM, Janne Jalkanen <Ja...@ecyrd.com> wrote:
>
> How about using the CSS directly?
>
> %%(white-space:pre;border:1px solid #ddd;)
> cd ''install''-dir/bin
> %%
>
> You can add as much css as you want, or you can create your own style in a
> local CSS file and refer to it as
>
> %%code
> cd ''install''-dir/bin
> %%
>
> /Janne
>
> On Dec 9, 2009, at 22:20 , Lana Frost wrote:
>
>> Thanks Dirk,
>>
>> That works but unfortunately most of our code samples span multiple lines
>> so I was hoping to be able to use the code block.
>>
>> Thanks,
>> Lana
>>
>> Dirk Frederickx wrote:
>>>
>>> Lana,
>>>
>>> You could do something like this:
>>>
>>> {{$ cd ''install''-dir/bin}}
>>>
>>>
>>> dirk
>>>
>>>
>>> On Wed, Dec 9, 2009 at 7:55 PM, Lana Frost <La...@sun.com> wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> Is it possible in JSPwiki to include italicized font in a code sample?
>>>>
>>>> What I want is this
>>>>
>>>> $ cd /install-dir//bin
>>>>
>>>> What I've tried is this:
>>>>
>>>> {{{
>>>> $ cd ''install-dir''/bin
>>>> }}}
>>>>
>>>> but the quotes are returned literally, so:
>>>>
>>>> $ cd ''install-dir''/bin
>>>>
>>>> Is there a way to do this?
>>>>
>>>> Thanks,
>>>> Lana
>>>>
>>>>
>>>>
>>>
>>>
>
>

Re: Italics in code lines

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
How about using the CSS directly?

%%(white-space:pre;border:1px solid #ddd;)
cd ''install''-dir/bin
%%

You can add as much css as you want, or you can create your own style  
in a local CSS file and refer to it as

%%code
cd ''install''-dir/bin
%%

/Janne

On Dec 9, 2009, at 22:20 , Lana Frost wrote:

> Thanks Dirk,
>
> That works but unfortunately most of our code samples span multiple  
> lines so I was hoping to be able to use the code block.
>
> Thanks,
> Lana
>
> Dirk Frederickx wrote:
>> Lana,
>>
>> You could do something like this:
>>
>> {{$ cd ''install''-dir/bin}}
>>
>>
>> dirk
>>
>>
>> On Wed, Dec 9, 2009 at 7:55 PM, Lana Frost <La...@sun.com>  
>> wrote:
>>
>>
>>> Hi,
>>>
>>> Is it possible in JSPwiki to include italicized font in a code  
>>> sample?
>>>
>>> What I want is this
>>>
>>> $ cd /install-dir//bin
>>>
>>> What I've tried is this:
>>>
>>> {{{
>>> $ cd ''install-dir''/bin
>>> }}}
>>>
>>> but the quotes are returned literally, so:
>>>
>>> $ cd ''install-dir''/bin
>>>
>>> Is there a way to do this?
>>>
>>> Thanks,
>>> Lana
>>>
>>>
>>>
>>
>>


Re: Italics in code lines

Posted by Lana Frost <La...@Sun.COM>.
Thanks Dirk,

That works but unfortunately most of our code samples span multiple 
lines so I was hoping to be able to use the code block.

Thanks,
Lana

Dirk Frederickx wrote:
> Lana,
>
> You could do something like this:
>
> {{$ cd ''install''-dir/bin}}
>
>
> dirk
>
>
> On Wed, Dec 9, 2009 at 7:55 PM, Lana Frost <La...@sun.com> wrote:
>
>   
>> Hi,
>>
>> Is it possible in JSPwiki to include italicized font in a code sample?
>>
>> What I want is this
>>
>> $ cd /install-dir//bin
>>
>> What I've tried is this:
>>
>> {{{
>> $ cd ''install-dir''/bin
>> }}}
>>
>> but the quotes are returned literally, so:
>>
>> $ cd ''install-dir''/bin
>>
>> Is there a way to do this?
>>
>> Thanks,
>> Lana
>>
>>
>>     
>
>   


Re: Italics in code lines

Posted by Dirk Frederickx <di...@gmail.com>.
Lana,

You could do something like this:

{{$ cd ''install''-dir/bin}}


dirk


On Wed, Dec 9, 2009 at 7:55 PM, Lana Frost <La...@sun.com> wrote:

> Hi,
>
> Is it possible in JSPwiki to include italicized font in a code sample?
>
> What I want is this
>
> $ cd /install-dir//bin
>
> What I've tried is this:
>
> {{{
> $ cd ''install-dir''/bin
> }}}
>
> but the quotes are returned literally, so:
>
> $ cd ''install-dir''/bin
>
> Is there a way to do this?
>
> Thanks,
> Lana
>
>