**This is an old revision of the document!**
part of the GtC documentation
Linebreaks and spacing
Try out all these techniques below in the playground.
In HTML, the line breaks and paragraph breaks are coded explicitly, so it doesn't matter how you actually set out your file. It's very different in all lightweight markup languages, and this is one of the main causes of not getting the page to show as you intend. So here is what we hope is most useful for editing our wiki pages.
Be careful about blank lines
This is one of the main causes of pages not showing up properly. In particular:
- DokuWiki lists must not have a blank line before them
- Markdown lists do need blank lines before
- both should have blank lines after them
- Blank lines are needed before Markdown-style headings: no harm in having them in any case
Blank spaces
In particular, at the beginning or end of lines. They don't matter usually in the middle of text.
In the middle of text
I can put in many spaces without altering the way the text is shown.
Of course, they do matter when you are expressly wanting them, as with <code> sections:
<code>a b c de f</code> comes out as
a b c de f
and exactly the same for <file>:
a b c de f
but also when the line starts with two or more spaces:
a b c de f
which takes us on to the next section.
At the start of a line
In DokuWiki, there must normally be no blank spaces at the start of a line, unless
- you want it to be formatted as code (see above)
- you want to create a list where the number of spaces links to how deep the list item is (see lists)
and here on this wiki, which is based in DokuWiki, the Markdown rules don't apply. MediaWiki is also picky about spaces starting lines.
At the end of a line; and linebreaks
Here it's the other way round. Native DokuWiki doesn't care if there are extra spaces at the end of a line.
But Markdown does, and so, with our Markdown plugin, it does matter.
Any line with two or more spaces at the end causes a linebreak.
Even for short lines.
Like these above.
While Markdown breaks lines if there are spaces at the end, DokuWiki breaks lines explicitly
when there are double backslashes \\ at the end
or before a space.
Like this
and this
and this
up to here.
As these two conventions don't conflict, both of them work here.