0

This question already has an answer here:

\documentclass{scrbook}

\usepackage[english]{babel}

\usepackage[listings]{classicthesis} % or \usepackage{listings} - also causes the error
\usepackage{arsclassica}

\begin{document}

\paragraph{a~b}

\end{document}

The above code causes an error:

! Undefined control sequence.
<<inserted text>> az;
                   b
l.10     \paragraph{ab~cd}

After removing any one of three lines with packages: babel, listings or arsclassica, document compiles successfully.

What is important, changing ~ to  makes the code working again. Similarly, putting ~ outside disposition commands (\paragraph{}, \section{} etc.) to the text body also works.

I cannot trace the source of the error further.

Is it possible to use these three packages together in some way?

marked as duplicate by egreg babel Feb 26 '18 at 8:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

This is a known bug in listings. As Joseph Wright's answer states:

Add

 \lccode`\~=0\relax 

after loading listings to fix the problem:

\documentclass{scrbook}

\usepackage[english]{babel}

\usepackage[listings]{classicthesis} % or \usepackage{listings} - also causes the error
\lccode`\~=0\relax % <-- the fix
\usepackage{arsclassica}

\begin{document}

\paragraph{a~b}

\end{document}

Not the answer you're looking for? Browse other questions tagged or ask your own question.