4

How to make this format???

enter image description here

I use the multicols in overleaf, code is below.

\begin{multicols}{2}
\footnotesize
\begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\setlength{\parskip}{0pt}
\item zero operation
\item skip connection
\item 3x3 max pooling
\item 3x3 conv
\item 3x3 conv, repeat 2
\item 3x3 separable conv
\item 3x3 separable conv, repeat 2
\item 3x3 dilated separable conv, dilation=2
\item 3x3 dilated separable conv, dilation=4
\item 3x3 dilated separable conv, dilation=2, repeat 2
\end{itemize}
\end{multicols}

But only got:

enter image description here

How to make the both two column and one column format?

  • Your top picture doesn't fit the code you display below (like there is no word "identity" in the code. Besides it is not a full working example that can be processed but just a snipped. Your code asks for 2 columns for all items (balanced) and that is what the picture below produces. Are you asking that whenever an item is longer than a line it should become single column automatically? Or what? – Frank Mittelbach Oct 17 at 10:24
5

This uses the tabto package, wrapped into a macro \indentitem, with a settable parameter \myindent.

As MadyYuvi notes, any line break in the right-hand bullets will not align with the right column, but reset to the left. I did this because I had the impression that, in such cases, the OP would choose to set the item as a single line, in essence, only using the itemize split for short items.

\documentclass{article}
\usepackage{tabto,enumitem}
\newcommand\myindent{1.5in}
\newcommand\indentitem{\tabto{\myindent}$\bullet$\hspace{\labelsep}}
\begin{document}
\footnotesize
\begin{itemize}[itemsep=0pt, parsep=0pt]
\item zero operation 
\indentitem 3x3 separable conv, repeat 2 
\item skip connection 
\indentitem 3x3 max pooling 
\item 3x3 conv 
\indentitem 3x3 conv, repeat 2 
\item 3x3 separable conv 
\item 3x3 dilated separable conv, dilation=2 
\item 3x3 dilated separable conv, dilation=4 
\item 3x3 dilated separable conv, dilation=2, repeat 2 
\end{itemize} 
\end{document}

enter image description here

  • Sorry to point out that, if any turnover comes for the \indentitem then it will not align properly... – MadyYuvi Oct 16 at 13:11
  • @MadyYuvi If, by "turnover", you mean line break, then you are correct...margin will reset to the left. However, based on the OP's question, I gather that in such cases, he would set the item to the whole line. I will edit to point this out, though. – Steven B. Segletes Oct 16 at 13:14
  • Yes, I meant linebreak only... – MadyYuvi Oct 16 at 13:15
  • Thanks for making a note on my point.... – MadyYuvi Oct 16 at 13:19
5

With the help of hlist package, can meet the expectation:

\documentclass{book}
\usepackage{hlist}
\begin{document}


\hlist[label={\textbullet}]2
\hitem zero operation
\hitem skip connection
\hitem 3x3 max pooling
\hitem 3x3 conv
\hitem 3x3 conv, repeat 2
\hitem 3x3 separable conv
\hitem 3x3 separable conv, repeat 2
\hitem(2) 3x3 dilated separable conv, dilation=2
\hitem(2) 3x3 dilated separable conv, dilation=4
\hitem(2) 3x3 dilated separable conv, dilation=2, repeat 2
\endhlist


\end{document}

Output:

enter image description here

3

Two other solutions: with the tasks package, and another the shortlst package. The latter is not part of any distribution, for licensing reasons. Based on it, I defined a tabitemize environment, using two keys: nc for the number of columns 'defaults to 3), and il for the interlining (defaults to 1.5).

For longer items, that must spread through columns, you can use \task* in the place of \task with the first package. Spreading is automatic with the second package.

\documentclass{article}

\usepackage{tasks}
\usepackage{shortlst, xkeyval, setspace}

\settasks{before-skip =\smallskipamount}

\makeatletter
\newcounter{ncol}
\define@key{lex}{nc}[3]{\setcounter{ncol}{#1}}%% 3 columns by default
\define@key{lex}{il}[1.5]{\def\@intln{#1}}% interlining![1]
\newenvironment{tabitemize}[1][]{%
\setkeys{lex}{nc,il,#1}
\settowidth{\labelwidth}{\mbox{\textbullet)}}
\setlength{\leftmargini}{2em}%\setlength{\itemsep}{0pt}
\setlength{\shortitemwidth}{\dimexpr\linewidth/\value{ncol}-\labelwidth-2\labelsep\relax}%
\setstretch{\@intln}
\begin{shortitemize}}%
{\end{shortitemize}
 }%

\begin{document}

\begin{tasks}[style=itemize, after-item-skip=-1ex](2)
\task zero operation
\task skip connection
\task $3×3$ max pooling
\task $3×3$ conv
\task $3×3$ conv, repeat 2
\task $3×3$ separable conv
\task* $3×3$ separable conv, repeat 2
\task* $3×3$ dilated separable conv, dilation=2
\task* $3×3$ dilated separable conv, dilation=4
\task* $3×3$ dilated separable conv, dilation=2, repeat 2
    \end{tasks}

\vspace{1cm}
  \begin{tabitemize}[nc=2, il=1]
\item zero operation
\item skip connection
\item $3×3$ max pooling
\item $3×3$ conv
\item $3×3$ conv, repeat 2
\item $3×3$ separable conv
\item $3×3$ separable conv, repeat 2
\item $3×3$ dilated separable conv, dilation=2
\item $3×3$ dilated separable conv, dilation=4
\item $3×3$ dilated separable conv, dilation=2, repeat 2
\end{tabitemize}

\end{document} 

enter image description here

  • One of a nice suggestion...Hats off... – MadyYuvi Oct 17 at 9:06

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.