Skip to content

Commit

Permalink
feat(packages): Remove arbitrary six-level maximum to list nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jun 5, 2024
1 parent 5c5912c commit ee76eab
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/lists/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ function package.doNestedList (_, listType, options, content)
local depth = SILE.settings:get("lists.current." .. listType .. ".depth") + 1

-- styling
local enumStyle = styles[listType][depth]
if not enumStyle then
SU.error("List nesting is too deep")
end
local enumStyle = styles[listType][(depth - 1) % 6 + 1]
-- options may override the default styling
enumStyle = pl.tablex.copy(enumStyle) -- shallow copy for possible overrides
if enumStyle.display then
Expand Down Expand Up @@ -305,8 +302,6 @@ Any other element causes an error to be reported, and any text content is ignore
\end{itemize}
\end{itemize}
The current implementation supports up to six indentation levels.
On each level, the indentation is defined by the \autodoc:setting{lists.itemize.leftmargin} setting (defaults to \code{1.5em}) and the bullet is centered in that margin.
Note that if your document has a paragraph indent enabled at this point, it is also added to the first list level.
Expand Down Expand Up @@ -335,8 +330,6 @@ The enumeration starts at one, unless you specify the \autodoc:parameter{start=<
\end{enumerate}
\end{enumerate}
The current implementation supports up to six indentation levels.
On each level, the indentation is defined by the \autodoc:setting{lists.enumerate.leftmargin} setting (defaults to \code{2em}).
Note, again, that if your document has a paragraph indent enabled at this point, it is also added to the first list level.
Expand Down

0 comments on commit ee76eab

Please sign in to comment.