12

I am using LaTeX in a portuguese document, with special characters such as tilde or cedilla. I have a sample document with the following content:

\documentclass{book}

\usepackage[utf8]{inputenc}

\begin{document}

é canção

\end{document}

My editor (TeXworks) is configured to use UTF8, and the resultant PDF shows the right result, as seen on the following image:

Generated PDF

My problem is: when I copy the text from the PDF I get weird characters, and not the text that is exhibited. How to overcome this?

Thanks.

1

1 Answer 1

8

You could use T1 font encoding with support for special characters:

\usepackage[T1]{fontenc}
5
  • This isn't working for me: I have \usepackage[T1]{fontenc} \usepackage{lmodern} both specified, but I still can't copy say, $\gamma$ out of the resulting PDF.
    – Canageek
    Commented Sep 28, 2011 at 18:09
  • 1
    @Canageek: $\gamma$ is not text, it's a math symbol of a math font. However,you could try the same if you use the Unicode text gamma γ.
    – Stefan Kottwitz
    Commented Sep 28, 2011 at 19:30
  • @StefanKottwitz Crud, that removes the ease of inserting greek characters from LaTeX as I have to go find a source for them then.
    – Canageek
    Commented Sep 28, 2011 at 20:28
  • @Canageek: get just one Greek alphabet, such as here, or use a Greek keyboard. If you really mean math font letters, I suggest you post a new question instead of a comment.
    – Stefan Kottwitz
    Commented Sep 28, 2011 at 20:44
  • related: tex.stackexchange.com/questions/1291/…
    – matth
    Commented May 9, 2012 at 18:26

You must log in to answer this question.

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