Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but rather actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want it highlighting on the template page itself, use <includeonly> tags around the <source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but rather actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Thanks for the quick reply Daniel. Sorry, the nowiki tags were there as a result of my experimenting. I replaced them with includeonly tags but you can see the result is now different but still not correct. Any more ideas?
David On Fri, Oct 1, 2010 at 11:53 AM, Daniel Bishop aerosatar@gmail.com wrote:
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want it highlighting on the template page itself, use <includeonly> tags around the
<source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but rather actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi David,
Is there a specific reason why you don't want the syntax highlighting on the template page? If not, I would suggest leaving out the includeonly tags entirely and just letting the source tag do its thing.
If there is, you might try putting <noinclude></noinclude> in the middle of the source tag (to "break" it in the template), but I'm not entirely certain that will work either.
Certainly the easiest, and most reliable, way is to just let the tags resolve on the template page.
Regards, Daniel
On 1 October 2010 16:58, David Doria daviddoria@gmail.com wrote:
Thanks for the quick reply Daniel. Sorry, the nowiki tags were there as a result of my experimenting. I replaced them with includeonly tags but you can see the result is now different but still not correct. Any more ideas?
David On Fri, Oct 1, 2010 at 11:53 AM, Daniel Bishop aerosatar@gmail.com wrote:
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want
it
highlighting on the template page itself, use <includeonly> tags around
the
<source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but rather actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I am not trying to do anything special - I just want the "easy, reliable" way to work :) I have removed all the tags (this is what I tried at the very beginning) and you can see that the template is not completed (the {{{ }}}} is visible on the UseCMakeListsTemplate page). See what I mean?
Thanks,
David
On Fri, Oct 1, 2010 at 12:05 PM, Daniel Bishop aerosatar@gmail.com wrote:
Hi David,
Is there a specific reason why you don't want the syntax highlighting on the template page? If not, I would suggest leaving out the includeonly tags entirely and just letting the source tag do its thing.
If there is, you might try putting <noinclude></noinclude> in the middle of the source tag (to "break" it in the template), but I'm not entirely certain that will work either.
Certainly the easiest, and most reliable, way is to just let the tags resolve on the template page.
Regards, Daniel
On 1 October 2010 16:58, David Doria daviddoria@gmail.com wrote:
Thanks for the quick reply Daniel. Sorry, the nowiki tags were there as a result of my experimenting. I replaced them with includeonly tags but you can see the result is now different but still not correct. Any more ideas?
David On Fri, Oct 1, 2010 at 11:53 AM, Daniel Bishop aerosatar@gmail.com wrote:
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want
it
highlighting on the template page itself, use <includeonly> tags around
the
<source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but
rather
actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi David,
Ok, a couple of questions.
1) Do you have the latest version of the extension? (available at http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi)
2) Have you tried using the <syntaxhighlight> tag, as the extension's documentation states that the <source> tag is deprecated.
Regards, Daniel
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of David Doria Sent: 01 October 2010 17:10 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Escaping highlighting tags
I am not trying to do anything special - I just want the "easy, reliable" way to work :) I have removed all the tags (this is what I tried at the very beginning) and you can see that the template is not completed (the {{{ }}}} is visible on the UseCMakeListsTemplate page). See what I mean?
Thanks,
David
On Fri, Oct 1, 2010 at 12:05 PM, Daniel Bishop aerosatar@gmail.com wrote:
Hi David,
Is there a specific reason why you don't want the syntax highlighting on the template page? If not, I would suggest leaving out the includeonly tags entirely and just letting the source tag do its thing.
If there is, you might try putting <noinclude></noinclude> in the middle of the source tag (to "break" it in the template), but I'm not entirely certain that will work either.
Certainly the easiest, and most reliable, way is to just let the tags resolve on the template page.
Regards, Daniel
On 1 October 2010 16:58, David Doria daviddoria@gmail.com wrote:
Thanks for the quick reply Daniel. Sorry, the nowiki tags were there as a result of my experimenting. I replaced them with includeonly tags but you can see the result is now different but still not correct. Any more ideas?
David On Fri, Oct 1, 2010 at 11:53 AM, Daniel Bishop aerosatar@gmail.com wrote:
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want
it
highlighting on the template page itself, use <includeonly> tags around
the
<source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but
rather
actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Daniel,
My system admin installed the latest version of GeSHi so I can now replace my <source> tags with <syntaxhighlight> tags. However, I'm having the same problem:
Here is the template: http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/Template:VTKCMakeListsAnd the attempted usage: http://www.vtk.org/Wiki/VTK/Sandbox
http://www.vtk.org/Wiki/VTK/SandboxAny ideas why the template {{{1}}} does not get replaced, but rather is just displayed as {{{1}}}?
Thanks,
David
On Fri, Oct 1, 2010 at 12:59 PM, Daniel Bishop aerosatar@gmail.com wrote:
Hi David,
Ok, a couple of questions.
- Do you have the latest version of the extension? (available at
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi)
- Have you tried using the <syntaxhighlight> tag, as the extension's
documentation states that the <source> tag is deprecated.
Regards, Daniel
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of David Doria Sent: 01 October 2010 17:10 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Escaping highlighting tags
I am not trying to do anything special - I just want the "easy, reliable" way to work :) I have removed all the tags (this is what I tried at the very beginning) and you can see that the template is not completed (the {{{ }}}} is visible on the UseCMakeListsTemplate page). See what I mean?
Thanks,
David
On Fri, Oct 1, 2010 at 12:05 PM, Daniel Bishop aerosatar@gmail.com wrote:
Hi David,
Is there a specific reason why you don't want the syntax highlighting on the template page? If not, I would suggest leaving out the includeonly tags entirely and just letting the source tag do its thing.
If there is, you might try putting <noinclude></noinclude> in the middle of the source tag (to "break" it in the template), but I'm not entirely certain that will work either.
Certainly the easiest, and most reliable, way is to just let the tags resolve on the template page.
Regards, Daniel
On 1 October 2010 16:58, David Doria daviddoria@gmail.com wrote:
Thanks for the quick reply Daniel. Sorry, the nowiki tags were there as a result of my experimenting. I replaced them with includeonly tags but you can see the result is now different but still not correct. Any more ideas?
David On Fri, Oct 1, 2010 at 11:53 AM, Daniel Bishop aerosatar@gmail.com wrote:
Hi,
Take the <nowiki></nowiki> tags out of your template. If you don't want
it
highlighting on the template page itself, use <includeonly> tags around
the
<source> tags instead.
Regards, Daniel
On 1 October 2010 16:37, David Doria daviddoria@gmail.com wrote:
Hi all, I am trying to make a template which contains syntax highlighting.
I made a template:
http://www.vtk.org/Wiki/Template:VTKCMakeLists
I then tried to use this template with: {{VTKCMakeLists|Thing1|Thing2}}
But you can see here: http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
that it does not trigger the source code to be highlighted, but
rather
actually includes the source tag as part of the text on the page. Is there any way to do this?
Thanks!
David _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
David Doria wrote:
Hi Daniel,
My system admin installed the latest version of GeSHi so I can now replace my <source> tags with <syntaxhighlight> tags. However, I'm having the same problem:
Here is the template: http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/Template:VTKCMakeListsAnd the attempted usage: http://www.vtk.org/Wiki/VTK/Sandbox
http://www.vtk.org/Wiki/VTK/SandboxAny ideas why the template {{{1}}} does not get replaced, but rather is just displayed as {{{1}}}?
Thanks,
David
Because it is a function tag instead of a parser function. {{#tag:syntaxhighlight|{{{1}}} }} would do it, but I'm not sure if lang="cmake" can be provided that way.
I don't understand where to put that {{#tag:syntaxhighlight|{{{1}}} }} ? I tried replacing a {{{1}}} with it, but it is just displayed as the {{{1}}} was before: http://www.vtk.org/Wiki/Template:VTKCMakeLists
Thanks,
David
On Wed, Nov 3, 2010 at 5:13 PM, Platonides Platonides@gmail.com wrote:
David Doria wrote:
Hi Daniel,
My system admin installed the latest version of GeSHi so I can now
replace
my <source> tags with <syntaxhighlight> tags. However, I'm having the
same
problem:
Here is the template: http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/Template:VTKCMakeListsAnd the attempted usage: http://www.vtk.org/Wiki/VTK/Sandbox
http://www.vtk.org/Wiki/VTK/SandboxAny ideas why the template {{{1}}}
does
not get replaced, but rather is just displayed as {{{1}}}?
Thanks,
David
Because it is a function tag instead of a parser function. {{#tag:syntaxhighlight|{{{1}}} }} would do it, but I'm not sure if lang="cmake" can be provided that way.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Thu, Nov 4, 2010 at 7:13 AM, Platonides Platonides@gmail.com wrote:
Because it is a function tag instead of a parser function. {{#tag:syntaxhighlight|{{{1}}} }} would do it, but I'm not sure if lang="cmake" can be provided that way.
Yes, {{#tag:source|{{{2}}}|lang={{{1}}}}}.
Revelant bug report is here: https://bugzilla.wikimedia.org/show_bug.cgi?id=25547
-peachey
Hm, but I don't need the paramter to be inside the <> of the tag (like this : <source lang="{{{1}}}). Instead, I just need
<source lang="cmake"> {{{1}}} </source>
It sounded like this should work?
David
On Wed, Nov 3, 2010 at 8:06 PM, K. Peachey p858snake@yahoo.com.au wrote:
On Thu, Nov 4, 2010 at 7:13 AM, Platonides Platonides@gmail.com wrote:
Because it is a function tag instead of a parser function. {{#tag:syntaxhighlight|{{{1}}} }} would do it, but I'm not sure if lang="cmake" can be provided that way.
Yes, {{#tag:source|{{{2}}}|lang={{{1}}}}}.
Revelant bug report is here: https://bugzilla.wikimedia.org/show_bug.cgi?id=25547
-peachey
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Thu, Nov 4, 2010 at 11:50 AM, David Doria daviddoria@gmail.com wrote:
Hm, but I don't need the paramter to be inside the <> of the tag (like this : <source lang="{{{1}}}). Instead, I just need
<source lang="cmake"> {{{1}}} </source>
It sounded like this should work?
David
you would do "{{#tag:source|{{{1}}}|lang=cmake}}" then. -Peachey
It still doesn't do anything: http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate
Also, what about if I want http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate<source lang="cmake"> something {{{1}}} something else </source>
I don't understand the syntax of the #tag.
Thanks,
David
On Thu, Nov 4, 2010 at 1:38 AM, K. Peachey p858snake@yahoo.com.au wrote:
On Thu, Nov 4, 2010 at 11:50 AM, David Doria daviddoria@gmail.com wrote:
Hm, but I don't need the paramter to be inside the <> of the tag (like
this
: <source lang="{{{1}}}). Instead, I just need
<source lang="cmake"> {{{1}}} </source>
It sounded like this should work?
David
you would do "{{#tag:source|{{{1}}}|lang=cmake}}" then. -Peachey
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
BesuglovS explained the solution on the wiki. The template must look like this:
{{#tag:syntaxhighlight | PROJECT({{{1}}})
ADD_EXECUTABLE({{{1}}} {{{1}}}.cxx)
|lang=cmake}}
Thanks all!
David
On Thu, Nov 4, 2010 at 7:58 AM, David Doria daviddoria@gmail.com wrote:
It still doesn't do anything: http://www.vtk.org/Wiki/Template:VTKCMakeLists http://www.vtk.org/Wiki/VTK/Sandbox/UseCMakeListsTemplate Also, what about if I want
<source lang="cmake"> something {{{1}}} something else </source> I don't understand the syntax of the #tag. Thanks,
David
On Thu, Nov 4, 2010 at 1:38 AM, K. Peachey p858snake@yahoo.com.au wrote:
On Thu, Nov 4, 2010 at 11:50 AM, David Doria daviddoria@gmail.com wrote:
Hm, but I don't need the paramter to be inside the <> of the tag (like this : <source lang="{{{1}}}). Instead, I just need
<source lang="cmake"> {{{1}}} </source>
It sounded like this should work?
David
you would do "{{#tag:source|{{{1}}}|lang=cmake}}" then. -Peachey
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org