7

How can I type this in latex ? I can only do 1 column

\begin{itemize}
\item Module
\item Loss
\end{itemize}

enter image description here

AML
  • 2,265
Kong
  • 2,313

3 Answers3

7

My way would be:

\documentclass{article}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\begin{itemize}
\item test
\item test 2
\end{itemize}
\vfill\null
\columnbreak
\begin{itemize}
\item test 3
\item test 4
\item test 5
\end{itemize}
\vfill\null
\end{multicols}
\end{document}

leading to enter image description here

Hendrix13
  • 105
Shade
  • 443
  • 2
  • 10
5

To keep the items in each list together in the source, I suggest using minipage.

enter image description here

You can adjust the widths (currently set at 4cm) if you prefer the two lists be closer or farther apart. Note the [t] option, which aligns the minipages at the top rather than the default center.

\documentclass{article}

\begin{document}

\begin{minipage}[t]{4cm}
    \underline{Abstract Classes}
    \begin{itemize}
        \item Module
        \item Loss
    \end{itemize}
\end{minipage}
\begin{minipage}[t]{4cm}
    \underline{Inherited Classes}
    \begin{itemize}
        \item MSELoss
        \item ReLu, Tanh
        \item Linear
        \item Sequential
    \end{itemize}
\end{minipage}

\end{document}

If you want the bullets to be flush left and the spacing reduced between the items (as in your example) you can use the enumitem package

\usepackage{enumitem}

and then add options at the beginning of each list:

\begin{itemize}[leftmargin=*,noitemsep]

enter image description here

Sandy G
  • 42,558
3

I believe this is closer to what you're looking for, bullets within a tabular environment. My answer is based on this answer.

\documentclass{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
    \newcommand{\tabitem}{~~\llap{\textbullet}~~}

\begin{document}
  \begin{tabular}{ll}
    \underline{Abstract Classes} & \underline{Inherited Classes} \\[.5\normalbaselineskip]
    \tabitem Module & \tabitem MSELoss \\
    \tabitem Loss   & \tabitem ReLu, Tanh \\
                    & \tabitem Linear \\
                    & \tabitem Sequential \\
  \end{tabular}
\end{document}

enter image description here

AML
  • 2,265