You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tight and loose lists are a concept in CommonMark inherited from the original Markdown spec by Gruber:
A list is loose if any of its constituent list items are separated by blank lines, or if any of its constituent list items directly contain two block-level elements with a blank line between them. Otherwise, a list is tight. (The difference in HTML output is that paragraphs in a loose list are wrapped in <p> tags, while paragraphs in a tight list are not.)
In the Markdown package for TeX, tight/loose lists produce different renderers when the option tightLists is enabled, as it is by default. In contrast, if the tightLists option is disabled, all lists produce the same renderers as loose lists would if the option were enabled.
The definition of tight/loose lists is based solely on the absence or presence of blank lines between list items. However, it is often useful to place extra blank lines between the items of a tight list for readability purposes.
Furthermore, in CommonMark, tight lists can contain nested loose lists. This behavior can be counterintuitive, as tight and loose lists are typically used to typeset lists with short items and lists with longer, more complex items, respectively. Nesting a detailed list within a simple one is generally considered poor practice in typesetting.
Proposal
This Markdown Enhancement Proposal (MEP) introduces a new option to make tight lists sticky. Sticky tight lists would only become loose when any of their list items contain two or more block-level elements, except when there are only two block-level elements and the second block-level element is a nested tight list.
Syntax
Assigning the value sticky to the tightLists option would make tight lists sticky. This is in contrast to the values true or commonmark, which would enable the current CommonMark tight/loose lists, and to the value false, which would disable the distinction between tight/loose lists.
Examples
The following LaTeX code would produce a tight list:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Rationale
Tight and loose lists are a concept in CommonMark inherited from the original Markdown spec by Gruber:
In the Markdown package for TeX, tight/loose lists produce different renderers when the option
tightLists
is enabled, as it is by default. In contrast, if thetightLists
option is disabled, all lists produce the same renderers as loose lists would if the option were enabled.The definition of tight/loose lists is based solely on the absence or presence of blank lines between list items. However, it is often useful to place extra blank lines between the items of a tight list for readability purposes.
Furthermore, in CommonMark, tight lists can contain nested loose lists. This behavior can be counterintuitive, as tight and loose lists are typically used to typeset lists with short items and lists with longer, more complex items, respectively. Nesting a detailed list within a simple one is generally considered poor practice in typesetting.
Proposal
This Markdown Enhancement Proposal (MEP) introduces a new option to make tight lists sticky. Sticky tight lists would only become loose when any of their list items contain two or more block-level elements, except when there are only two block-level elements and the second block-level element is a nested tight list.
Syntax
Assigning the value
sticky
to thetightLists
option would make tight lists sticky. This is in contrast to the valuestrue
orcommonmark
, which would enable the current CommonMark tight/loose lists, and to the valuefalse
, which would disable the distinction between tight/loose lists.Examples
The following LaTeX code would produce a tight list:
The following LaTeX code would produce two nested tight lists:
The following LaTeX code would produce a top-level loose list with a nested tight list:
The following LaTeX code would produce two nested loose lists:
Beta Was this translation helpful? Give feedback.
All reactions