3

babel-swedish redefines \- so that it allows hyphenation in the rest of the word. To me, this seems ill-advised. How can I undo this in my preamble?

The redefinition is done as below:

\addto\extrasswedish{\babel@save\-}
\addto\extrasswedish{\def\-{\allowhyphens
\discretionary{-}{}{}\allowhyphens}}

A minimal document that shows the behavior could be

\documentclass{article}
\usepackage[swedish]{babel}
\textwidth=1pt
\parindent=0pt
\begin{document}
  xxx general\-sekreterare
\end{document}

1 Answer 1

3

Rather than remove the part from \extrasswedish, you can override it.

\documentclass{article}
\usepackage[swedish]{babel}
\textwidth=1pt
\parindent=0pt

\NewCommandCopy{\latexdiscretionary}{\-}
\addto\extrasswedish{\RenewCommandCopy{\-}{\latexdiscretionary}}

\begin{document}

xxx general\-sekreterare

\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 .