omd2tex.objects.list module#
- class omd2tex.objects.list.List(text: str, depth: int, number: int = 0, complete: bool = False, reference=None)[source]#
Bases:
BaseClass- to_latex_item() str[source]#
Render a single list item to LaTeX.
- Returns:
LaTeX string representing the list item content.
- to_latex() str[source]#
Render the list and merged nested items to LaTeX.
- Returns:
LaTeX string for the list content, including merged sublists when present.
- append(item: List) None[source]#
Append another list item at the same depth.
- Parameters:
item – List item to append; must match depth.
- Returns:
None
- Raises:
TypeError – If item type or depth is incompatible.
- static append_items(items: list) list[source]#
Group consecutive list items of equal depth.
- Parameters:
items – Sequence of parsed elements possibly containing List instances.
- Returns:
List with grouped List items aggregated by depth.
- merge(item: List) None[source]#
Merge a deeper nested item under the current list element.
- Parameters:
item – Nested List item.
- Returns:
None
- Raises:
TypeError – If provided item is not deeper than the current one.
- class omd2tex.objects.list.Enumerate(text: str, depth: int, number: int = 0, complete: bool = False, reference=None)[source]#
Bases:
List