It is currently Mon Oct 20, 2014 5:35 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri May 23, 2008 2:13 pm 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
I'm trying to write a Wiki page and want to put some code in. I've seen that these tags are used;

<code>
</code>

However, although I can see this working for Francis's pages I cannot get it to work for mine. the following;

<code>
hello
world

</code>

Just doesn't work, comes out just printing "hello world" with no borders or anything. It's driving me spare. I can copy and paste Francis' example and that's fine but if I try editing what Francis has done it stops displaying correctly, even just putting a line at the top of his code.

I'm really really puzzled, is it anything to do with carriage returns (that I may be invisibly copying from Francis example) but are not being entered when I type in manually.

Help please :)

Also are their any good offline Wiki Editors to make editing Wiki pages easier ? When I tried looking for one I was unsure if it'd work with this Wiki engine.


Top
 
PostPosted: Fri May 23, 2008 4:44 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Steve,

Ignore the <code> tags, they're superfluous in Francis' wikicode.

By simply indenting each line with a space, the text is stopped from being reformatted (it still interprets Wiki markup and special characters, like &rarr;):

hello

world

Alternatively, the <pre> tags will also stop the text being reformatted, but will instead ignore Wiki markup (but not special characters, like &rarr;):

<pre>
hello
world
</pre>

Useful link on Wikitext, the markup language, found through the Help page here:

http://meta.wikimedia.org/wiki/Help:Wikitext

They might exist, but I've not personally gone looking for an off-line editor, persay, though someone may also have written a definition language template for syntax colouring in popular programming editors (maybe Notepad++?) - you'd have to look. I think I've heard you might be able to use TiddlyWiki as an off-line wiki and then synchronise it with an online MediaWiki wiki, such as ours, using plugins - though I've never tried it.

Sam.


Top
 
PostPosted: Fri May 23, 2008 9:45 pm 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Thanks Sam,

No time till Sunday or Monday now to add my article but that's a great help, I've always found Wiki pages hard to work out, that guide will come in handy.

I'd have never dreamt of just starting with a space char !


Top
 
PostPosted: Mon May 26, 2008 4:16 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
My code was inserted straight from spooled programs so automatically had a space character prefixed to each line. I guess my pages just worked by luck! :D

I didn't know that the [code] tags were not needed, but to be honest I prefer them so that it is clearer while editing to see what is what.

Kind regards,

Francis.


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron