You can change \hsize
to \linewidth
inside multienumerate
, so the environment is aware of the current value for the line width (the package uses \textwidth
by default); the representation for the counter used can be changed ny redefining \labelenumi
. Another option, if your inner items are naturally balanced would be to use three columns built, for example with the multicol
package. The following example shows both alternatives:
\documentclass{article}
\usepackage{enumitem}
\usepackage{multienum}
\usepackage{multicol}
\begin{document}
\noindent Using \texttt{multienum}:
\begin{enumerate}
\item
\setlength\hsize{\linewidth}
\begin{multienumerate}
\setcounter{enumi}{0}
\renewcommand{\labelenumi}
{\addtocounter{enumi}{1}\alph{enumi}.}
\mitemxxx{Not}{Linear}{Not}
\end{multienumerate}
\end{enumerate}
\noindent Using \texttt{multicol}:
\begin{enumerate}
\item \begin{multicols}{3}
\begin{enumerate}
\item Not
\item Linear
\item Not
\end{enumerate}
\end{multicols}
\end{enumerate}
\end{document}
Perhaps the best option is to use the enumerate*
environment from the enumitem
package with the inline
package option and to control the spacing between items using \hfill
:
\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\noindent With \texttt{enumitem}:
\begin{enumerate}
\item
\begin{enumerate*}[itemjoin=\hfill]
\item Not
\item Linear
\item Not
\end{enumerate*}
\end{enumerate}
\end{document}
With the edit to the original question, a better option seems to be the use of a tabularx
environment (from the tabularx
package) of width equal to \linewidth
and with automatic cell numbering:
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\newcounter{row}
\renewcommand\therow{\alph{row}}
\begin{document}
\begin{enumerate}
\item
\begin{tabularx}{\linewidth}[t]{*{3}{>{\stepcounter{row}\makebox[1.8em][l]{(\therow)\hfill}}X}}
part 1 & part 2 & part 3\\
part 4 & part 5 & part 6\\
\end{tabularx}
\item
\setcounter{row}{0}
\begin{tabularx}{\linewidth}[t]{*{3}{>{\stepcounter{row}\makebox[1.8em][l]{(\therow)\hfill}}X}}
part 1 & part 2 & part 3\\
part 4 & part 5 & part 6\\
\end{tabularx}
\end{enumerate}
\end{document}
And, of course, if this structure is to be used several times, you can define a new environment to simplify the writting:
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\newcounter{row}
\renewcommand\therow{\alph{row}}
\newenvironment{rowenum}
{\setcounter{row}{0}%
\par\noindent\tabularx{\linewidth}[t]
{*{3}{>{\stepcounter{row}\makebox[1.8em][l]{(\therow)\hfill}}X}}%
}
{\endtabularx}
\begin{document}
\begin{enumerate}
\item Question 1 preamble
\begin{rowenum}
part 1 & part 2 & part 3 \\
part 4 & part 5 & part 6 \\
\end{rowenum}
\item Question 2 preamble
\begin{rowenum}
part 1 & part 2 & part 3 \\
part 4 & part 5 & part 6 \\
\end{rowenum}
\end{enumerate}
\end{document}
If you want to resume the numbering after a modification
\documentclass[fontsize=12pt, paper=a4]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{ngerman}
\begin{document}
\begin{enumerate}
\item bla \stepcounter{enumi}
\item[\theenumi--5.] bla bla \setcounter{enumi}{5}
\item bla bla bla
\end{enumerate}
\end{document}
Thanks to egreg and Mico for the correction/modification!
Best Answer
This can be easily done with
enumitem
and itslabel
option. Since the letter P is to be followed by a arabic number, the labelP\arabic*
is used.