My document is a list of entries. Here is an example with three entries:
All entries have a title and two subtitles. These are followed by text, bullet points or a combination of the two. Note that I would like a big gap between different entries and a smaller one between the subtitles and the rest of each entry.
I have defined a \newcommand
called \NewEntry
to specify the information that goes into each entry:
\newcommand{\NewEntry}[4]{
{\setlength{\parskip}{20pt}
#1 \\
#2 - #3 \\[3pt]}
#4 \par
}
Calling this command with the code presented at the end, leads to the following output:
This is satisfactory, apart from the space between the subtitles and the first bullet item in the third entry, which is too big. I asked how to solve this in a previous question, without providing the general context. From the answers, it was clear that the extra space is a result of combining \itemize
(which starts at a new line by default) with the \\
in my \NewEntry
code. Also, some answers explicitely said or implied that there may be a better way to structure my document and suggested that I provide the context, which is what I have tried to do here.
I am looking forward to suggestions about the best way to deal with this problem (including structural changes).
A MWE follows:
\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\setlength{\parindent}{0pt}
\newcommand{\NewEntry}[4]{
{\setlength{\parskip}{20pt}
#1 \\
#2 - #3 \\[3pt]}
#4 \par
}
\begin{document}
\NewEntry{TITLE}{SUBTITLE 1}{SUBTITLE 2}
{\lipsum[13]}
\NewEntry{TITLE}{SUBTITLE 1}{SUBTITLE 2}
{Some Text
\begin{itemize}[nosep]
\item First Item
\item Second Item
\end{itemize}
}
\NewEntry{TITLE}{SUBTITLE 1}{SUBTITLE 2}
{\begin{itemize}[nosep]
\item First Item
\item Second Item
\end{itemize}
}
\end{document}
\\
is almost always wrong outside e.g.tabular
andarray
environments. Why aren't you using\section
,\subsection
etc.? What's wrong with the space between the subtitles exactly?\NewEntry
contains three 'explicit' instructions to TeX that you want it to add space: after[4]{
, after{20pt}
, and after[3pt]}
. You might want to read this question and its answers.