octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wiki: syntax highlight


From: Juan Pablo Carbajal
Subject: Re: Wiki: syntax highlight
Date: Fri, 9 Mar 2012 10:00:15 +0100

2012/3/8 Carnë Draug <address@hidden>:
> On 8 March 2012 14:03, Juan Pablo Carbajal <address@hidden> wrote:
>> On Thu, Mar 8, 2012 at 9:34 AM, Juan Pablo Carbajal <address@hidden> wrote:
>>> On Thu, Mar 8, 2012 at 8:48 AM, Fredrik Lingvall
>>> <address@hidden> wrote:
>>>> On 03/08/12 02:17, John W. Eaton wrote:
>>>>>
>>>>> On  8-Mar-2012, Joanna Cheng wrote:
>>>>>
>>>>> | I don't have shell access; the right person to talk to about extension
>>>>> | installation is jwe.
>>>>>
>>>>> And you need to give me precise instructions, including URLs for where
>>>>> I can find extensions, etc.
>>>>>
>>>>> jwe
>>>>
>>>> This is what I did (on our Gentoo box):
>>>>
>>>> 1) Download the extension:
>>>> http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
>>>>
>>>> 2) Uncompress it in the extensions folder (the path below is for Gentoo)
>>>>
>>>>  ~ # tar -xzf SyntaxHighlight_GeSHi-MW1.18-r90546.tar.gz -C
>>>> /var/www/localhost/htdocs/mediawiki/extensions
>>>>
>>>> 3) Edit the
>>>>  
>>>> /var/www/localhost/htdocs/mediawiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
>>>> file
>>>>
>>>> On line 270 change (to enable the dashed box):
>>>>
>>>>
>>>> $css[] = "\tline-height: normal; border: 0px none white;";
>>>>
>>>> to
>>>>
>>>>
>>>> $css[] = "\tline-height: normal; border: 1px dashed #2f6fab;";
>>>>
>>>>
>>>> I would prefer some more space between the text and the dashed box (eg.,
>>>> similar to<pre>) but my php skills are rather limited.
>>>>
>>>> /Fredrik
>>>>
>>>>
>>>>
>>>
>>> Hi,
>>>
>>> @jwe: Do you need more information?
>>> http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Installation
>>> http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Configuration
>>>
>>>
>>>
>>> --
>>> M. Sc. Juan Pablo Carbajal
>>> -----
>>> PhD Student
>>> University of Zürich
>>> http://ailab.ifi.uzh.ch/carbajal/
>>
>> I just noticed that Carnë may have templates for code, since he has
>> edited the tutorial.
>> @Carnë: Is it ok to add the mediaWiki extension?
>
> It would be great yest. But I don't think GeSHi has support for octave
> code so someone would have to add it. Since the wiki has templates for
> code blocks and lines, the best place to use the synatx highlight
> would be in these 2 pages:
>
> http://octave.org/wiki/index.php?title=Template:Code
> http://octave.org/wiki/index.php?title=Template:Codeline
>
> and wiki editors would use these Templates rather than blocks
> themselves. This should make the wiki look more consistent.
>
> The list of all current templates is here
> http://octave.org/wiki/index.php?title=Category:Templates
>
> Carnë

Thanks Carnë, I will use the templates from now on.

Regarding the syntaxhighlight. The extension highlights matlab nicely
(wikipedia as well, via <source>). I guess is a matter of adapting
what you have created for the gtksourceview octave lang file and
making a new language definition. What do you think?

Could the current Code template use the highlight extension
internally? Then if we change it in the future everything will change
accordingly.



-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]