2

When using eg. the PaloAlto theme within Beamer, sections with names that consist of long words do not appear get hyphenated in the sidebar. Instead, they extend beyond the coloured area, which doesn't look particularly nice. Adding a manual hyphenation doesn't seem to change this. Is there a way to manually break the section names in the sidebar without explicit changing the titles themselves (even ... in the sidebar would look a lot better, in my opinion)?

Minimal working example:

\documentclass[]{beamer}
\mode<presentation>{
    \usetheme{PaloAlto}
    \usecolortheme{seahorse}
}

\hyphenation{T-h-i-s-i-s-m-y-r-e-a-l-l-y-l-o-n-g-s-e-c-t-i-o-n-n-a-m-e}

\begin{document}

    \section{Thisismyreallylongsectionname}

    \begin{frame}{foo}
        bar
    \end{frame}

\end{document}
4
  • You could manually do this \section{Thisismyreally\-longsectionname} Commented Nov 9, 2016 at 11:24
  • Thanks for the comment! I considered this (I tried to convey this with 'without explicit changing the titles'), but then the hyphen shows up wherever the section name appears (eg. in a 'beginning of a section' title slide), which also looks ugly. I'll probably go with this and just drop all the other instances where the section title appears unless there's a better solution.
    – starless
    Commented Nov 9, 2016 at 11:33
  • In contrast to - the \- does just suggest the point for hyphenation, it will not show up if there is enough space. Commented Nov 9, 2016 at 12:11
  • Well, that was much easier than I expected. I could've sworn it made a "-" appear in my title slide when I tried it- Thanks! Post that as an answer and I'll accept it.
    – starless
    Commented Nov 9, 2016 at 12:16

1 Answer 1

2

To manually suggest a hyphenation point, you can use\section{Thisismyreally\-longsectionname}

\documentclass[]{beamer}

\mode<presentation>{
    \usetheme{PaloAlto}
    \usecolortheme{seahorse}
}

\begin{document}

    \section{Thisismyreally\-longsectionname}

    \begin{frame}{foo}
        bar
    \end{frame}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .