DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:lists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
faq:lists [2015-04-06 12:30] 123.201.214.16faq:lists [2020-04-13 15:03] (current) – [Multiline List Items] Lizat
Line 1: Line 1:
 ====== Working with Lists ====== ====== Working with Lists ======
 + 
 ===== Multiline List Items ===== ===== Multiline List Items =====
 :?: How can I add a code block or multiple lines in a list item? :?: How can I add a code block or multiple lines in a list item?
Line 5: Line 6:
 :!: The list syntax expects you to put each item in a single line and you may not interrupt numbered lists or the index will restart at 1. This makes it impossible to add tables into a list item for example. However you can add code/file block or line breaks in a list item. For code blocks make sure they start on the same line as your item, for linebreaks use the forced line break syntax ''%%\\%%''. :!: The list syntax expects you to put each item in a single line and you may not interrupt numbered lists or the index will restart at 1. This makes it impossible to add tables into a list item for example. However you can add code/file block or line breaks in a list item. For code blocks make sure they start on the same line as your item, for linebreaks use the forced line break syntax ''%%\\%%''.
  
-Here's an example:l;lkkl+Here's an example:
  
 <file> <file>
Line 28: Line 29:
  
 You can use the same trick to include other syntax like tables into a list by using the [[plugin:wrap]] plugin to wrap your table.  You can use the same trick to include other syntax like tables into a list by using the [[plugin:wrap]] plugin to wrap your table. 
 +
 +To add a blank line between number list items do this:
 +
 +<code>
 +  - Ordered List Item1 \\ \\           //(line break, linebreak, space)
 +  - Ordered List Item2
 +  - Ordered List Item3 
 +</code>
 +Which results in this:
 +  - Ordered List Item1 \\ \\ 
 +  - Ordered List Item2
 +  - Ordered List Item3
 +
 +For visual clarity you may prefer to add a non-breaking space after the line breaks e.g. 
 +<code>\\ \\~~</code>
 +where '~~' is defined in as a non-breaking space in conf/entities.conf
  
 ===== Continue List Numbering ===== ===== Continue List Numbering =====
faq/lists.txt · Last modified: 2020-04-13 15:03 by Lizat

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki