-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LaTeX writer: fix spacing issue with list in definition list.
When a list occurs at the beginning of a definition list definition, it can start on the same line as the label, which looks bad. Fix that by starting such lists with an `\item[]`.
- Loading branch information
Showing
2 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
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} | ||
\item[Definition] | ||
\begin{enumerate} | ||
\def\labelenumi{\arabic{enumi}.} | ||
\tightlist | ||
\item[] | ||
\item | ||
list | ||
\item | ||
list | ||
\end{enumerate} | ||
\end{description} | ||
``` | ||
|
||
``` | ||
% pandoc -t latex | ||
Definition | ||
: Foo | ||
1. list | ||
2. list | ||
^D | ||
\begin{description} | ||
\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} | ||
\item[Definition] | ||
\begin{itemize} | ||
\tightlist | ||
\item[] | ||
\item | ||
list | ||
\item | ||
list | ||
\end{itemize} | ||
\end{description} | ||
``` | ||
|