# breaking line after “and” in cleveref

Cleveref formats a long list of references to theorem-like environments as "Thm. 1, Prop. 2, ..., and Cor. 3". Is there a way to generally allow a line break after "and"? The line breaks between "Thm.", "Prop.", "Cor.", etc., and the following numbers should stay forbidden.

For example, in the code below, the line

No sex, but an overly, very clever space-filling text. (Thm. 1.1.1 and Cor. 1.2.1.10).

runs into the page margin, which is not what I wish.

\documentclass{article}
\usepackage{cleveref}
\usepackage{lipsum}
\newtheorem{thmSS}{Theorem}[subsection]
\crefname{thmSS}{Thm.}{Thms.}
\begin{document}
\section{Clever section title}
\lipsum[1]
No sex, but an overly, very clever space-filling text. (\cref{mythm,mycor}).
\lipsum[1]
\subsection{Clever subsection title}
\begin{thmSS}\label{mythm}Clever theorem\end{thmSS}
\subsection{Another clever subsection title}
\subsubsection{Clever subsubsection title}
\end{document}


I would not like to use \begin{sloppypar}...\end{sloppyppar}, since it introduces a line break before "and", making the spaces between the words visually too long.

The conjunction between both is a command that you can redefine (\crefpairgroupconjunction). It should be done after \begin{document} (or through \AtBeginDocument), if babel is involved you should do it in the language settings. But redefining it and so removing the nonbreakspace won't help much in your case, TeX will still not break, you need e.g. some \emergencystretch too:

\documentclass{article}
\usepackage{cleveref}
\usepackage{lipsum}
\newtheorem{thmSS}{Theorem}[subsection]
\crefname{thmSS}{Thm.}{Thms.}
\begin{document}
\renewcommand\crefpairgroupconjunction{ and  }
\section{Clever section title}
\lipsum[1]
{\emergencystretch2em No sex, but an overly, very clever space-filling text. (\cref{mythm,mycor}).\par}
\lipsum[1]
\subsection{Clever subsection title}
\begin{thmSS}\label{mythm}Clever theorem\end{thmSS}
\subsection{Another clever subsection title}
\subsubsection{Clever subsubsection title}
\end{document}


• Yes and no (spaces are imho needed but the number don't matter). – Ulrike Fischer May 18 '17 at 23:06

For the occasional unbreakable space to remove, you can redefine locally \crefpairgroupconjunction:

No sex, but some overly, very clever space-filling text.
\begingroup\renewcommand\crefpairgroupconjunction{ and }(\cref{mythm,mycor})\endgroup.


• @LeonMeier Finer control introduced – egreg May 18 '17 at 22:30
• @LeonMeier I get the same output as before. – egreg May 18 '17 at 22:50
• @LeonMeier No other change. – egreg May 18 '17 at 23:12