Fonts & Character SetsHow do I produce Spanish for accented char?

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
mvaled
Posts: 2
Joined: Thu Feb 04, 2010 11:48 pm

How do I produce Spanish for accented char?

Post by mvaled »

Hi all,

I've been using latex regularly for over a year. I write mostly in Spanish using the babel package for ease of typing. I also use the inputenc package to type in UTF-8 encoding.

I have just notice that I can't copy and paste accented words from the PDF.

If I write something like: "También constituye una muestra ...", then when I copy from the resulting PDF and paste I get something like:

Code: Select all

Tambi ́n constituye una muestra
     e
Notice the tilde over the "n" is not a single glyph, but two overlapping ones; and the "e" has been placed on the following line.

Any ideas how to produce the "real" é?

Best regards,
Manuel.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
mvaled
Posts: 2
Joined: Thu Feb 04, 2010 11:48 pm

Re: How do I produce Spanish for accented char?

Post by mvaled »

I've just hit my head with fontenc and all my problems were down to 0.

Thanks.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

How do I produce Spanish for accented char?

Post by localghost »

You need to enable Cork Encoding (T1 encoding) by means of the fontenc package to get that feature.

Code: Select all

\documentclass[11pt,a4paper,spanish]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\begin{document}
  También constituye uña muestra
\end{document}
If that doesn't help, try additionally the cmap package.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply