7

Is there a reason why the following verbatim section doesn't work as expected:

\begin{verbatim}
© copyright blahblah .....
\end{verbatim}

In fact I get: Âl’ copyright blah blah

Instead of the nice ©.

I will use the (c) notation, but anyway if you have a better solution, it will be welcome.


Full MWE demonstrating problem:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\begin{verbatim}
© copyright blahblah .....
\end{verbatim}
\end{document}
14

fontenc package deals with font encodings in the output file (pdf generally). But the font encodings in the input file are handled by inputenc package. Adding \usepackage[utf8]{inputenc} solves the problem.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}        %%<---- add this
\begin{document}
  \begin{verbatim}
     © copyright blahblah .....
  \end{verbatim}
\end{document}

enter image description here

Bonus There is a special offer for now ;)

To get rid of the warnings regarding font substitutions (and have some aesthetic looks), you may prefer to use some font like libertine:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\begin{document}
  \begin{verbatim}
     © copyright blahblah .....
  \end{verbatim}
\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.