mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-03 06:05:45 +00:00
If the `four_space_rule` extension is not enabled, figure out the indentation needed for child blocks dynamically, by looking at the first nonspace content after the `:` marker. Previously the four-space rule was always obeyed. Remove the old `compact_definition_lists` extension. This was neded to preserve backwards compatibility after pandoc 1.12 was released, but at this point we can get rid of it. T.P.Extensions: remove `Ext_compact_definition_lists` constructor for `Extension` [API change]. Fix tight/loose detection for definition lists, to conform to the documentation. Closes #10889.
71 lines
978 B
Markdown
71 lines
978 B
Markdown
This inserts an empty `\item[]` when a list occurs at the
|
|
beginning of a definition list definition; otherwise the list
|
|
may start on the line with the label, which looks terrible.
|
|
See https://tex.stackexchange.com/questions/192480/force-itemize-inside-description-onto-a-new-line
|
|
|
|
```
|
|
% pandoc -t latex
|
|
Definition
|
|
: 1. list
|
|
2. list
|
|
^D
|
|
\begin{description}
|
|
\tightlist
|
|
\item[Definition]
|
|
\hfill
|
|
\begin{enumerate}
|
|
\def\labelenumi{\arabic{enumi}.}
|
|
\tightlist
|
|
\item
|
|
list
|
|
\item
|
|
list
|
|
\end{enumerate}
|
|
\end{description}
|
|
```
|
|
|
|
```
|
|
% pandoc -t latex
|
|
Definition
|
|
: Foo
|
|
|
|
1. list
|
|
2. list
|
|
^D
|
|
\begin{description}
|
|
\tightlist
|
|
\item[Definition]
|
|
Foo
|
|
|
|
\begin{enumerate}
|
|
\def\labelenumi{\arabic{enumi}.}
|
|
\tightlist
|
|
\item
|
|
list
|
|
\item
|
|
list
|
|
\end{enumerate}
|
|
\end{description}
|
|
```
|
|
|
|
```
|
|
% pandoc -t latex
|
|
Definition
|
|
: - list
|
|
- list
|
|
^D
|
|
\begin{description}
|
|
\tightlist
|
|
\item[Definition]
|
|
\hfill
|
|
\begin{itemize}
|
|
\tightlist
|
|
\item
|
|
list
|
|
\item
|
|
list
|
|
\end{itemize}
|
|
\end{description}
|
|
```
|
|
|