LaTeX forum ⇒ General ⇒ Encoding problems with PDF (when cut-n-paste Word) Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
jimisola
Posts: 22
Joined: Sat Feb 02, 2008 2:54 am

Encoding problems with PDF (when cut-n-paste Word)

Hi!

I'm writing a thesis using (pdf)LaTeX and someone else is going to use part of my text in their report.

However, when using regular cut-n-paste from Acrobat Reader to Word the Swedish characters Ã¥Ã¤Ã¶ are totally different and makes cut-n-paste more or less useless. The same goes for when I use "File -> Save As Text" in Acrobat Reader.

My LaTeX document contains the following regards charsets/languages etc:

\usepackage[swedish]{babel} % FÃ¶r svensk avstavning och svenska rubriker (t ex "innehÃ¥llsfÃ¶rteckning)
\usepackage[latin1]{inputenc}


My Windows version is English as well as Word, but Ã¥Ã¤Ã¶ has never been a problem before.
My friend has the same problem on his computer with quite similar Windows/Word configuration.

If anyone has an idea on how to work around this I'd appreciate it a lot as we are in a hurry.

Regards,
Jimisola

LaTeXguide.org • LaTeX-Cookbook.net

jimisola
Posts: 22
Joined: Sat Feb 02, 2008 2:54 am

Re: Encoding problems with PDF (when cut-n-paste Word)

\usepackage[T1]{fontenc} % for cut-n-paste to work

Using cp1252 instead of latin1 might also be better when using Windows (MikTeX).

\usepackage[cp1252]{inputenc} & or latin1

However, the pdf document generated with T1 fontenc has a much lighter (not as dark) text than the pdf generated without T1.
Why is this? Can use T1 and still get the darker text?

Stefan Kottwitz
Posts: 9794
Joined: Mon Mar 10, 2008 9:44 pm

Encoding problems with PDF (when cut-n-paste Word)

Hi Jimisola,

is the text quality lower after changing to T1 font encoding?
You can compare the fonts, if you open T1 and not-T1 both with the adobe reader and look into document properties, fonts. The fonts should be type 1, not type 3 (bitmap).
If that is the case, then you may consider installing the cm-super package, it contains T1 encoded computer modern fonts of type 1.

Stefan

jimisola
Posts: 22
Joined: Sat Feb 02, 2008 2:54 am

Re: Encoding problems with PDF (when cut-n-paste Word)

Stefan,

You were right on. The T1 version used type 3 and my system was missing cm-super. After installing it text quality went back to normal.

Thank you!

Jimisola

Sianis
Posts: 3
Joined: Sun Aug 03, 2008 9:09 pm

Encoding problems with PDF (when cut-n-paste Word)

Hello!

I have same problem under Ubuntu with TexLive and Kile. I write in hungarian.

\documentclass[a4paper,11pt]{article}
\def\magyarOptions{defaults=prettiest}
\def\magyarOptions{hyphenation=huhyphn}
\usepackage[magyar]{babel}
\usepackage{t1enc}
\usepackage[latin2]{inputenc}
\usepackage{indentfirst}
\frenchspacing
\usepackage{times}
\title{Nyári gyakorlat jegyzőkönyv}
\author{Nyitrai István}

Result of the pdflatex:
Looks like everything is ok, but not.

Nyári gyakorlat jegyzőkönyv - after copy and paste - Nyári gyakorlat jegyz˝okönyv

Thanks for help.

Stefan Kottwitz
Posts: 9794
Joined: Mon Mar 10, 2008 9:44 pm

Encoding problems with PDF (when cut-n-paste Word)  Topic is solved

Hi Sianis,

t1enc is obsolete, times too. Instead of t1enc use fontenc, times is replaced by mathptmx.
\usepackage{t1enc}
\usepackage{times}


write
\usepackage[T1]{fontenc}
\usepackage{mathptmx}

But, to improve copy&paste, you may have to use a different font. Try for instance \usepackage{lmodern} instead of times or mathptmx. If you want to keep a Times like font try TeX Gyre Termes.

Stefan

Sianis
Posts: 3
Joined: Sun Aug 03, 2008 9:09 pm

Re: Encoding problems with PDF (when cut-n-paste Word)

Hi!

lmodern and tgtermes can generate better PDF with good and pastable fonts. PDF title still bad, but this isn't important.

dnet
Posts: 1
Joined: Wed Apr 18, 2012 1:51 pm

Encoding problems with PDF (when cut-n-paste Word)

I found this thread and had the same problem with Hungarian accents in PDF title, but managed to solve it. If anyone else arrives on this post from a search engine, here's the solution: use separate usepackage and hypersetup lines like the following, and it works.

\usepackage[unicode]{hyperref}
\hypersetup{pdftitle={Árvíztűrő tükörfúrógép}}