7

I have an enumerate-list and want to make the first item in this list (including the number) italic. It seems like I can make everything italic except the first number - otherwise the whole list crashes. Here are some minimum examples:

This one works

\documentclass[]{scrartcl}
\begin{document}
\section{Test}
\begin{enumerate}
    \item \textit{dsfdsf
    \item adsadasd}
\end{enumerate}
\end{document}

This one also

\documentclass[]{scrartcl}
\begin{document}
\section{Test}
\begin{enumerate}
    \item dsfdsf
    \textit{\item adsadasd}
\end{enumerate}
\end{document}

But this one doesn't

\documentclass[]{scrartcl}
\begin{document}
\section{Test}
\begin{enumerate}
    \textit{\item dsfdsf
    \item adsadasd}
\end{enumerate}
\end{document}

Why does the last one crash the list and what could be workarounds? Thanks!

migrated from stackoverflow.com Oct 29 '14 at 18:44

This question came from our site for professional and enthusiast programmers.

9

First \items are processed a little differently. Rather change the font shape using a switch:

enter image description here

\documentclass{scrartcl}
\begin{document}
\section{Test}
\begin{enumerate}
  {\itshape\item dsfdsf}
  \item adsadasd
\end{enumerate}
\end{document}

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.