# Avoid line break in section

I do have a section name with a pretty long name but which could "nicely" fit on one line. I was wondering, therefore, how I could avoid the line to break, perhaps using some space compression and/or line overflow.

\documentclass[12pt,article,oneside]{memoir}
\usepackage[margin=1in]{geometry}
\begin{document}
\mainmatter
\section{Convolutional artificial neural networks --- ConvNets}
\end{document}


Basically, I'd like to have a one-line title (I don't like how it looks like, and gaining an extra line would be also quite helpful).

• Please provide a minimal working example so that one can better assist you. – azetina Nov 11 '13 at 19:43
• Done. I thought my question was clear also without a working example (I'm just asking how to squeeze a multi line on one line). – Atcold Nov 11 '13 at 20:30
• That title doesn't fit on one line, so the only solution is to shorten it or use a smaller font. The memoir class has facilities for doing the latter: see \setsecheadstyle and similar macros. – Dan Nov 12 '13 at 7:17
• Could you explain where would you put \setsecheadstyle, please? – Atcold Nov 13 '13 at 18:10

If you really want this you could just stick the title in an \mbox:
\documentclass[12pt,article,oneside]{memoir}

• @Atcold It would probably look even worse than \mbox, I think. For that matter, the only way of doing that that I can think of just now would be to use \scalebox or \resizebox from the graphicx package to squeeze the text. There may of course be better ways. – Torbjørn T. Nov 13 '13 at 18:36
• @TorbjørnT. Thanks for the \mbox trick. This elegantly solves the issue provided the resulting title is marginally outside the text-area. – theOne Sep 1 '16 at 6:58