8

I want to highlight a Swedish word with \hl{en kassör}, but the word kassör just disappears and only en is highlighted.

I use the pdfLaTex compiler in v2 Overleaf. I use the following code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{color, soul}

\begin{document}

\begin{itemize}
  \item bla bla bla:
    \begin{itemize}
        \item \hl{(1) en kassör}
    \end{itemize}
\end{itemize}

\end{document}

Output:

enter image description here

6

soul is only for ascii fonts. for extension with non ascii characters as are in Swedish and many other languages, is intended the package soulutf8:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{color, soulutf8}

\begin{document}
\begin{itemize}
  \item bla bla bla:
    \begin{itemize}
        \item \hl{(1) en kassör}
    \end{itemize}
\end{itemize}
\end{document}

enter image description here

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.