5

This is a follow-up question to UTF8 for listings

With these MWE I will not see the german umlauts in the resulted pdf (XeLaTeX was used):

\documentclass{article}
\usepackage{verbments}
\begin{document}
\begin{pyglist}[encoding=utf-8,language=text]
Test äöü Test
\end{pyglist}
\end{document}

What should I do to support UTF-8 in verbments?

7
  • It doesn't compile in my system.
    – cacamailg
    Apr 22, 2013 at 12:51
  • I use Debian and I have to install python-pygments first. To compile, I use xelatex -shell-escape inputtest.tex
    – Micha
    Apr 22, 2013 at 13:01
  • Since I cannot install that package in my machine, I found a solution to deal with UTF-8 and listings here tex.stackexchange.com/questions/24528/… (see the best answer).
    – cacamailg
    Apr 22, 2013 at 13:29
  • 2
    load the package fontspec which should be loaded by default of you use LuaLaTeX or XeLaTeX. Apr 22, 2013 at 19:55
  • 1
    As Marco Daniel observes, you must load fontspec for the thing to work.
    – egreg
    Apr 22, 2013 at 20:36

1 Answer 1

3

Your issue isn't related to verbments. It's a font issue related to German umlauts. XeLaTeX uses utf-8 as default but the predefined font doesn't support this. A look in the log file shows for the following example:

\documentclass{article}
%\usepackage{fontspec}
\begin{document}
Test äöü Test
\end{document}

related part of the log-file:

Missing character: There is no ä in font cmr10!
Missing character: There is no ö in font cmr10!
Missing character: There is no ü in font cmr10!

To work with German umlauts you have to load the package fontspec which should be loaded normally. See: Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX

You must log in to answer this question.

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