6

This is my first post here, so if you have any improvements in general on how to format questions, let me know.

I am trying to create 2 columns (I have used minipages to define width) and then have a list on the left side and numbered list on right side.

However, when writing longer passages of text on the right side, it affects how the left side list lines up, and i would prefer them to work independently, so that the titles are on the same line.

In addition, if you know how to extend the length of the vline by a small margin to go below the last point of the numbered list, it would be appreciated.

Thank you in advance

\section*{Title}

\begin{minipage}{0.3\textwidth}%
\underline{\textbf{Title A}}
\begin{itemize}[leftmargin=*,noitemsep]
    \item A
    \item B
    \item C
\end{itemize}
\end{minipage}%
\hfill\vline\hfill
\begin{minipage}{0.6\textwidth}%
\underline{\textbf{Title B}}
\begin{enumerate}[leftmargin=*,noitemsep]
\item Longer text causes issues as it pushes the itemize list downwards and now the point and number don't align as well as the underlined titles aren't aligning either
\item B
\item C
\end{enumerate}
\end{minipage}%

enter image description here

1
  • 1
    Welcome to TeX.SE. Using \begin{minipage}[t] should align the titles. Adding a \strut on the last line will extend the vertical rule. FYI, while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Jan 28 at 3:01

1 Answer 1

5

Set the minipages to have a [t]op anchor point, and add a strut on the first and last lines:

enter image description here

\documentclass{article}

\usepackage{enumitem}

\newcommand{\addtopstrut}{\rule[5pt]{0pt}{.7\baselineskip}}%
\newcommand{\addbottomstrut}{\rule[-5pt]{0pt}{0pt}}%

\begin{document}

\section*{Title}

\begin{minipage}[t]{0.3\textwidth}%
  \addtopstrut\underline{\textbf{Title A}}
  \begin{itemize}[leftmargin=*,noitemsep]
    \item A
    \item B
    \item C\addbottomstrut
  \end{itemize}
\end{minipage}%
\hfill\vline\hfill
\begin{minipage}[t]{0.6\textwidth}%
  \addtopstrut\underline{\textbf{Title B}}
  \begin{enumerate}[leftmargin=*,noitemsep]
    \item Longer text causes issues as it pushes the itemize list downwards and now the point and 
      number don't align as well as the underlined titles aren't aligning either
    \item B
    \item C\addbottomstrut
  \end{enumerate}
\end{minipage}%

\end{document}
1
  • Thank you so much
    – Karlsen97
    Jan 28 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.