I have the next document:
\documentclass[12pt]{article}
\usepackage[english, ukrainian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\setdescription{style=nextline, font=\mdseries, align=left}
\setdescription[2]{style=nextline, font=\mdseries, align=left}
\newcommand{\code}[1]{{\tt #1}}
\begin{document}
\begin{description}
\item[\code{int} (value type)]
\begin{description}
\item[\code{int = a}]
Значення не змінюється.
\item[\code{ref int = a}]
Значення змінюється.
\item[\code{int = new int; int = a}]
Значення не змінюється.
\item[\code{ref int = new int; int = a}]
Значення змінюється.
\end{description}
\item[\code{struct} (value type)]
\begin{description}
\item[\code{struct = a}]
Значення не змінюється.
\item[\code{ref struct = a}]
Значення змінюється.
\item[\code{struct = new struct; struct = a}]
Значення не змінюється.
\item[\code{ref struct = new struct; struct = a}]
Значення змінюється.
\end{description}
Так як \code{struct} це тип-значення то поведінка аналогічна до типу \code{int}.
\item[\code{int[]} (reference type)]
\begin{description}
\item[\code{int[] = a}]
Значення змінюється.
\item[\code{ref int[] = a}]
Значення змінюється.
\item[\code{int[] = new int[]; int[] = a}]
Значення змінюється.
\item[\code{ref int[] = new int[]; int[] = a}]
Значення змінюється.
\end{description}
\item[\code{string} (reference type)]
\begin{description}
\item[\code{int[] = a}]
Значення не змінюється.
\item[\code{ref int[] = a}]
Значення змінюється.
\item[\code{int[] = new int[]; int[] = a}]
Значення не змінюється.
\item[\code{ref int[] = new int[]; int[] = a}]
Значення змінюється.
\end{description}
\end{description}
\end{document}
It produces almost what I want:
But notice the first nested description: the \item[\code{int = a}]
must go to new line but it follows the \item[\code{int} (value type)]
for some reason. How to make it appear on new line? I tried to find something about it in enumitem docs but I couldn't.