2

I constructed my own list longmainenum which has bold item labels. Now when referencing them with cleveref's \crefI want to have the bold font removed. A minimal example:

\documentclass{scrartcl}
\usepackage{cleveref, enumitem}

\newlist{longmainenum}{enumerate}{1}
\setlist[longmainenum]{label=\textbf{(\alph*)}}

\creflabelformat{longmainenumi}{\textmd{#1}}

\begin{document}

\begin{longmainenum}
    \item\label{here} Something.
    \item More.
\end{longmainenum}

\labelcref{here}.

\end{document}

Unfortunately, I cannot remove the bold font with \textmd. It still remains bold face. (Oddly enough, when I try to add an additional font command like, e.g., \textit, it works.)

6

Font command like \textit and \textbf can add up, but \textmd and \textbf exclude each other and so the inner one wins. In your case I would simply set the font with the font command.

\documentclass{scrartcl}
\usepackage{cleveref, enumitem}

\newlist{longmainenum}{enumerate}{1}
\setlist[longmainenum]{label=(\alph*),font=\bfseries}

\creflabelformat{longmainenumi}{#1}

\begin{document}

\textmd{\textbf{blalba}}

\begin{longmainenum}
    \item\label{here} Something.
    \item More.
\end{longmainenum}

\labelcref{here}.

\end{document}

(Actually I would avoid bold labels. Imho they don't look good.)

  • Thanks. In my case, they are used to distinguish several parts of a theorem-like "Remark", where bold face makes sense (as the "Remark" is bold itself). – Deniz Nov 4 '13 at 10:31
  • 1
    Ulrike's answer implicitly fixes the source of your problem: the font should not be a part of the label (which is just (\alph*) in the answer), but of the list formatting. You should do the same with the parentheses, if you'll want to refer to the item without them. (E.g., how will you format a range like (13-15)? – alexis Nov 4 '13 at 14:33

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.