Table of Contents

part of the GtC documentation

Linebreaks and spaces

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:

Blank spaces

These make a difference, 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 displayed.

I can put in many spaces without altering the way the text is displayed.

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

  1. you want it to be formatted as code (see above)
  2. 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.

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.