Text FormattingExtra line between section heading and 2-column list

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
VivianU
Posts: 6
Joined: Tue Jul 28, 2020 6:28 pm

Extra line between section heading and 2-column list

Post by VivianU »

Hi,

I hope this is the right part of the forum for posting this question. I did my resume in LaTeX, and it looks pretty good for the most part. My only problem is a section with a 2-column list. The white space between the heading and the list is bigger than the white space between all other headings and their text.

Here's a screenshot. You can see that the section below this one has a normal gap.
2col-big-gap.gif
2col-big-gap.gif (14.87 KiB) Viewed 5007 times
Here's the code:

Code: Select all

\subsection*{Subjects}
	\begin{multicols}{2}
		\begin{asparaitem}[\textbullet]
			\item Arts and art history
			\item Biography
			\item Classics
			\item Computers
			\item Culture
			\item Cooking
			\item Deaf studies
			\item Environmental studies
			\item History
			\item Indigenous studies
			\item Literature
			\item Mathematics
			\item Medicine
			\item Nutrition
			\item Politics
			\item Psychology
			\item Science
			\item Self-help
		\end{asparaitem}
	\end{multicols}

\subsection*{Software}
	\textsc{Macrex}, Adobe InDesign, \LaTeX
It must have to do with the columns; when I comment out the "multicols" lines, the extra space disappears.

Is there any way around this? It's a small thing, but it bugs me a bit now that I've noticed it. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Extra line between section heading and 2-column list

Post by Bartman »

Please post a Infominimal working example that shows the problem. If I expand the source code to a full example, I don't see the extra space shown in the picture.
VivianU
Posts: 6
Joined: Tue Jul 28, 2020 6:28 pm

Extra line between section heading and 2-column list

Post by VivianU »

Thanks for responding Bartman. Here you go.

Code: Select all

\documentclass[11pt,letterpaper,oneside]{article}
\usepackage{multicol}
\usepackage{paralist}

\begin{document}

\subsection*{Subjects}
\begin{multicols}{2}
	\begin{asparaitem}[\textbullet]
		\item Arts and art history
		\item Biography
		\item Classics
		\item Computers
		\item Culture
		\item Cooking
		\item Deaf studies
		\item Environmental studies
		\item History
		\item Indigenous studies
		\item Literature
		\item Mathematics
		\item Medicine
		\item Nutrition
		\item Politics
		\item Psychology
		\item Science
		\item Self-help
	\end{asparaitem}
\end{multicols}

\subsection*{Software}
	\textsc{Macrex}, Adobe InDesign, \LaTeX

\end{document}
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Extra line between section heading and 2-column list

Post by Bartman »

If I understand the asparaitem environment correctly, you don't need the \textbullet command as an optional argument.

Your headings are set in small caps in your picture. This change of the default setting of the class probably takes place somewhere in the preamble. Maybe the reason for the extra space can be found there.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Extra line between section heading and 2-column list

Post by Stefan Kottwitz »

Hi Vivian!

multicol adds some extra spacing for separation. You can set it to zero, in your preamble:

Code: Select all

\setlength\multicolsep{0pt}
Stefan
LaTeX.org admin
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Extra line between section heading and 2-column list

Post by Ijon Tichy »

Stefan Kottwitz wrote: multicol adds some extra spacing for separation. You can set it to zero, in your preamble:

Code: Select all

\setlength\multicolsep{0pt}
And I would also recommend to set the heading via the optional argument of the multicols environment, because otherwise in some circumstances there could be a page break between the heading and the list. And it may also be useful to use the second optional argument to force at least two or three items to the same page as the heading:

Code: Select all

\documentclass[11pt]{article}% letterpaper and oneside are defaults of article
\usepackage{multicol}
\usepackage{paralist}

\setlength{\multicolsep}{0pt}% No extra space before and after multicols

\begin{document}

\begin{multicols}{2}[\subsection*{Subjects}]
% or: \begin{multicols}{2}[\subsection*{Subjects}][3\normalbaselineskip]
  \begin{asparaitem}[\textbullet]
  \item Arts and art history
  \item Biography
  \item Classics
  \item Computers
  \item Culture
  \item Cooking
  \item Deaf studies
  \item Environmental studies
  \item History
  \item Indigenous studies
  \item Literature
  \item Mathematics
  \item Medicine
  \item Nutrition
  \item Politics
  \item Psychology
  \item Science
  \item Self-help
  \end{asparaitem}
\end{multicols}

\subsection*{Software}
\textsc{Macrex}, Adobe InDesign, \LaTeX

\end{document}
See the first column of page 3 of the multicol manual for more information.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
VivianU
Posts: 6
Joined: Tue Jul 28, 2020 6:28 pm

Extra line between section heading and 2-column list

Post by VivianU »

Thanks Stefan, the \setlength command worked nicely.

Thanks for the suggestion, Ijon, I didn't know you could do that!

You're right, Bartman; I tried taking out \textbullet and there was no change. Good to know.
Post Reply