LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: CaptainJester on September 13, 2004, 12:14:55

Title: WiKi formatting
Post by: CaptainJester on September 13, 2004, 12:14:55
The WiKi does not take well to displaying source code.  I can't figure out the pattern, but it switches between normal browser formatting and formatting like it is inside the <pre> tag.  Is there any way to fix this?  Right now the code looks pretty messy.
Title: WiKi formatting
Post by: garazdawi on September 13, 2004, 15:46:36
So far what I've done around sourcecode is to make a textbox(^text^) and then make the font monospaced(-+text+-), but a [source] tag would be really nice.

Ah and I noticed that you have created a kind of index for the Nehe stuff. If you look at Structures you can create your own automated hierarchical indexing indexing. I just created the starter of that structure and I'll fill it out if I get more time later...
Title: WiKi formatting
Post by: CaptainJester on September 13, 2004, 18:14:56
Thanks.

-+text+- did not work for monospace.  However there are 2 tags that will do it.

{MONO()}...{MONO} - will allow you to set the font to monospaced.

{CODE()}...{CODE} - is basically the <pre></pre> tag which keeps all formatting, but ignores any WiKi formatting.
Title: WiKi formatting
Post by: CaptainJester on September 13, 2004, 18:36:06
Another option that can work is to put a space in front of a single line that you want to be monospaced.  The WiKi will display the in a monospaced font and will treat all subsequent spaces as the & entity, so your spacing will be preserved.  Any WiKi formatting that needs to be applied needs to start on column 1.

Using the CODE tag seems to be better, because it shrinks the font so more can fit on a page before horizontal scrolling starts.
Title: WiKi formatting
Post by: garazdawi on September 13, 2004, 22:38:31
I didn't knwo about the {CODE} modifiers... that's really good to know.. I've been putting -+text+- on everyline of sourcecode so far and it's been a pain (although it's not all that much yet  :roll: ),