on master help sign in
doc: reST-primer -- imrpove desription of definition lists

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commitc8645d6e376ba5a072be370d12efdec298f4e3ad authorMarkus Heiser <markus.heiser@darmarit.de> dateMon 23 Dec 2019, 09:37 (7 years ago) parentd3e4e81
1 file changed+51−13
docs/dev/reST.rst+51−13
docs/dev/reST.rst+51−13
@@ -574,32 +574,70 @@ List markup (:duref:`ref <bullet-lists>`) is simple:
574574Definition list
575575---------------
576576
577−.. sidebar:: definition term
577+.. sidebar:: Note ..
578578
579− Note that the term cannot have more than one line of text.
579+ - the term cannot have more than one line of text
580580
581−Definition lists (:duref:`ref <definition-lists>`) are created as follows:
581+ - there is **no blank line between term and definition block** // this
582+ distinguishes definition lists (:duref:`ref <definition-lists>`) from block
583+ quotes (:duref:`ref <block-quotes>`).
584+
585+Each definition list (:duref:`ref <definition-lists>`) item contains a term,
586+optional classifiers and a definition. A term is a simple one-line word or
587+phrase. Optional classifiers may follow the term on the same line, each after
588+an inline ' : ' (**space, colon, space**). A definition is a block indented
589+relative to the term, and may contain multiple paragraphs and other body
590+elements. There may be no blank line between a term line and a definition block
591+(*this distinguishes definition lists from block quotes*). Blank lines are
592+required before the first and after the last definition list item, but are
593+optional in-between.
594+
595+Definition lists are created as follows:
582596
583597.. code:: reST
584598
585− term (up to a line of text)
586− Definition of the term, which must be indented
599+ term 1 (up to a line of text)
600+ Definition 1.
601+
602+ See the typo : this line is not a term!
603+
604+ And this is not term's definition. **There is a blank line** in between
605+ the line above and this paragraph. That's why this paragraph is taken as
606+ **block quote** (:duref:`ref <block-quotes>`) and not as term's definition!
607+
608+ term 2
609+ Definition 2, paragraph 1.
610+
611+ Definition 2, paragraph 2.
587612
588− and can even consist of multiple paragraphs
613+ term 3 : classifier
614+ Definition 3.
589615
590− next term
591− Description.
616+ term 4 : classifier one : classifier two
617+ Definition 4.
592618
593619.. admonition:: definition list
594620 :class: rst-example
595621
596− term (up to a line of text)
597− Definition of the term, which must be indented
622+ term 1 (up to a line of text)
623+ Definition 1.
624+
625+ See the typo : this line is not a term!
626+
627+ And this is not term's definition. **There is a blank line** in between
628+ the line above and this paragraph. That's why this paragraph is taken as
629+ **block quote** (:duref:`ref <block-quotes>`) and not as term's definition!
630+
631+
632+ term 2
633+ Definition 2, paragraph 1.
634+
635+ Definition 2, paragraph 2.
598636
599− and can even consist of multiple paragraphs
637+ term 3 : classifier
638+ Definition 3.
600639
601− next term
602− Description.
640+ term 4 : classifier one : classifier two
603641
604642
605643Quoted paragraphs