Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using Tex Live, under Ubuntu 11.11, and Texmaker to create LaTeX source files. Sometimes I edit these files with Krviewer from Krusader, but I pay attention to use the input encoding latin10 (or ISO 8859-16). My layout keyboard is Romanian standard, which correctly produces Romanian diacritics with comma below (as in latin10).

In the document preamble I use

\usepackage[romanian]{babel}
\usepackage[latin10]{inputenc}
\usepackage[T1]{fontenc}         

The output pdf file correctly renders the characters, with comma below, but thy are not find by the search engine and they are not copied correctly to the keyboard. For example: if I copy the word știință it will paste s , tiint , ă, this being the reason why it wont't be found by the search engine of the pdf reader.

Any suggestions, please?

share|improve this question

1 Answer 1

Unfortunately, the T1 encoding doesn't have the Romanian characters s and t with comma below, so they are faked by placing a comma under a normal s or t.

This has the consequence that the characters "ș" and "ț" are not really there.

A possible workaround (but with many limitations), is to switch to UTF-8 and use the accsupp package:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[romanian]{babel}
\usepackage[unicode]{hyperref}
\usepackage{newunicodechar}
\usepackage{accsupp}

% Define code for the Romanian characters
\newunicodechar{Ș}{%
  \BeginAccSupp{method=hex,unicode,ActualText=0218}%
    \textcommabelow S%
  \EndAccSupp{}%
}
\newunicodechar{ș}{%
  \BeginAccSupp{method=hex,unicode,ActualText=0219}%
    \textcommabelow s%
  \EndAccSupp{}%
}
\newunicodechar{Ț}{%
  \BeginAccSupp{method=hex,unicode,ActualText=021A}%
    \textcommabelow T%
  \EndAccSupp{}%
}
\newunicodechar{ț}{%
  \BeginAccSupp{method=hex,unicode,ActualText=021B}%
    \textcommabelow t%
  \EndAccSupp{}%
}
\makeatletter
\ProvideTextCommandDefault\textcommabelow[1]
  {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth
     \raise-.31ex\hbox{\check@mathfonts
                       \fontsize\ssf@size\z@
                       \math@fontsfalse\selectfont,}\hidewidth}\egroup}
\makeatother

\begin{document}

știință

\end{document}

If you compile this (saved in UTF-8) encoding, then some PDF viewers (I tried Adobe Reader 9) will recognize the characters.

share|improve this answer
2  
Might moving to utf-8 (perhaps with Xe/LuaTeX) solve this? –  Brent.Longborough Jan 27 '12 at 23:03
    
Xe/LuaTeX would be a solution, of course. –  egreg Jan 27 '12 at 23:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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