Handling Line Breaks: Difference between revisions
re-org |
m update |
||
Line 14: | Line 14: | ||
'''Single line breaks will be ignored'''. | '''Single line breaks will be ignored'''. | ||
== Placing double line breaks will do the trick == | === Placing double line breaks will do the trick === | ||
To force the paragraph to end, simply place a double line break in your text, like this: | To force the paragraph to end, simply place a double line break in your text, like this: | ||
Line 29: | Line 29: | ||
A shiny new paragraph! Remember to put '''double line breaks''' where you need it. | A shiny new paragraph! Remember to put '''double line breaks''' where you need it. | ||
Dumdidum. | Dumdidum. | ||
== <nowiki><br></nowiki> == | |||
Inside a list you cannot place double line-breaks, because that will cause the list numbering to restart. Use <nowiki><br></nowiki>> for this, it can be used in other places like inside table, headlines etc. See [[Creating_Lists]] for an example. | |||
== <nowiki><</nowiki>hr> == | |||
<nowiki><hr></nowiki> will create a horizontal line like this: | |||
<hr> | |||
See above :) | |||
The same can be achieved by <nowiki>----</nowiki> (four dashes): | |||
---- | |||
== Floating elements == | |||
Sometimes you want to add images that "float" right or left of the text. This works great, until the next headlines comes, and if the image is much higher than the text, the headline will also appear next to the image, instead of below it. | |||
'''Example:''' | |||
---- | |||
[[Image:Trans_0013.jpg|right|320px]] | |||
This is a short text that floats left of the image.<br>And another line. | |||
=== This is an example headline === | |||
And this is some example text. | |||
---- | |||
{{clear}} | |||
To stop the floating, use the template '''<nowiki>{{clear}}</nowiki>''' before the text that should no longer float (see the [http://wiki.thedarkmod.com/index.php?title=Handling_Line_Breaks&action=edit source code of this article] on how): | |||
---- | |||
[[Image:Trans_0013.jpg|right|320px]] | |||
This is a short text that floats left of the image.<br>And another line. | |||
{{clear}} | |||
=== This is an example headline === | |||
And this is some example text. | |||
---- | |||
{{clear}} | |||
{{tutorial-wiki|sort=Line breaks}} | {{tutorial-wiki|sort=Line breaks}} |
Latest revision as of 13:04, 23 March 2012
Single line breaks will be ignored
If your text contains nothing but single line breaks the Wiki will put everything in a single paragraph, like this:
This is an example for text that has no double line breaks. Single line breaks all along. Will this text be separated in any way? No it won't. Single line breaks all along the way. Dumdidum. '''Single line breaks will be ignored'''.
And this is what it will look like:
This is an example for text that has no double line breaks. Single line breaks all along. Will this text be separated in any way? No it won't. Single line breaks all along the way. Dumdidum. Single line breaks will be ignored.
Placing double line breaks will do the trick
To force the paragraph to end, simply place a double line break in your text, like this:
This is an example for text that indeed has double line breaks. Will this text be separated in any way? Yes it will, right here. A shiny new paragraph! Remember to put '''double line breaks''' where you need it. Dumdidum.
And this is what it will look like:
This is an example for text that indeed has double line breaks. Will this text be separated in any way? Yes it will, right here.
A shiny new paragraph! Remember to put double line breaks where you need it. Dumdidum.
<br>
Inside a list you cannot place double line-breaks, because that will cause the list numbering to restart. Use <br>> for this, it can be used in other places like inside table, headlines etc. See Creating_Lists for an example.
<hr>
<hr> will create a horizontal line like this:
See above :)
The same can be achieved by ---- (four dashes):
Floating elements
Sometimes you want to add images that "float" right or left of the text. This works great, until the next headlines comes, and if the image is much higher than the text, the headline will also appear next to the image, instead of below it.
Example:
This is a short text that floats left of the image.
And another line.
This is an example headline
And this is some example text.
To stop the floating, use the template {{clear}} before the text that should no longer float (see the source code of this article on how):
This is a short text that floats left of the image.
And another line.
This is an example headline
And this is some example text.