[vtkusers] Examples on the wiki, this is how to highlight the relevant lines
Francois Bertel
francois.bertel at kitware.com
Fri Jan 29 14:01:17 EST 2010
An alternative might be to break down the source code.
I just changed http://www.vtk.org/Wiki/VTK/Examples/Visualization/PointSize
so that the source code is broken down into three pieces (as an
experiment to another alternative):
<source lang="cpp">
first part here
</source>
<source lang="cpp" highlight="1">
actor->GetProperty()->SetPointSize(3);
</source>
<source lang="cpp">
3rd part here
</source>
On Fri, Jan 29, 2010 at 1:50 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Fri, Jan 29, 2010 at 12:19 PM, Aashish Chaudhary
> <aashish.chaudhary at kitware.com> wrote:
>> Awesome!!.. I could see some great use for this..
>>
>>
>>
>> On Fri, Jan 29, 2010 at 11:56 AM, Francois Bertel
>> <francois.bertel at kitware.com> wrote:
>>>
>>> Hello,
>>>
>>> The following GeSHi highlighting package is available on the vtk wiki,
>>> see the documentation here:
>>> http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
>>>
>>> It allows to highlight some lines in the code.
>>>
>>> For example, I just changed the PointSize example code section to
>>> start with <source lang="cpp" highlight="24"> to tell the wiki to
>>> highlight code line number 24.
>>>
>>> You can see the result here:
>>> http://www.vtk.org/Wiki/VTK/Examples/Visualization/PointSize
>>>
>>> Cheers.
>>>
>>> --
>>> François Bertel, PhD | Kitware Inc. Suite 204
>>> 1 (518) 371 3971 x113 | 28 Corporate Drive
>>> | Clifton Park NY 12065, USA
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | R&D Engineer
>> | Kitware Inc.
>
>
> Francois,
>
> This is an excellent idea. My only concern is having to explicitly
> state the lines by number. For example, when I was looking at some of
> your changes, I said "oh, some of these smart pointer definitions are
> probably more than 80 chars, let me break the line". Clearly, this
> messed up the highlighting. Is there anything you can suggest that
> would prevent this type of issue?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
More information about the vtkusers
mailing list