What tags to use for code within the Wiki.

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply

What tag or template should we use for the wiki?

Poll ended at Sun Feb 22, 2015 6:35 pm

<pre>
0
No votes
<syntaxhighlight>
0
No votes
{{Code}}
1
100%
Other (post option as a reply)
0
No votes
 
Total votes: 1
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

What tags to use for code within the Wiki.

Post by drei »

We've been discussing this issue for a while now(threads 21&t=8921 & 21&t=9631) , so it seems appropriate we vote for what we should do with further code/scripts that are added to the wiki.

Comparison of tags: Here


Summarizing the issues so far:
For pre:
  • Problems with code wrapping on certain screen sizes and devices.
For syntaxhighlight:
  • Problems with code wrapping on certain screen sizes and devices.
  • Specifying a language other than Python results in a tiny letter size and font. This issue is due to a problem with the Geshi css sheet
For {{Code}}:
  • Using the | (pipe) character breaks the template. A workaround is using {{!}} (correct me if I'm wrong)
  • Shares the same problem as syntaxhighlight when decliaring a language different from Python. This is due to the nature of the template, it acts as a wrapper of the syntaxhighlight command.
---Edit 9/02/2015---
Modified to include ediloren's comment about Code and syntaxhighlight.
Last edited by drei on Tue Feb 10, 2015 2:44 am, edited 1 time in total.
Need help? Feel free to ask, but please read the guidelines first
mario52
Veteran
Posts: 4692
Joined: Wed May 16, 2012 2:13 pm

Re: What tags to use for code within the Wiki.

Post by mario52 »

hi
personnaly, I do not vote you have to find the most constructive solution to ease the wiki
the best solution since there mainly Python (here we do not C ++) and a few line Bash is easiest <syntaxhighlight>
this is not a game
speech is the owners
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
ediloren
Posts: 210
Joined: Wed May 08, 2013 9:23 pm
Location: Italy
Contact:

Re: What tags to use for code within the Wiki.

Post by ediloren »

One note on my side: <syntaxhighlight> and {{Code}} have the same issues with font, as actually {{Code}} is a wrapper for <syntaxhighlight> with some options set as default, see my post

Ciao
Enrico
Post Reply