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 am compiling this tex file

\documentclass{article}
\usepackage{hfoldsty}
\begin{document}
1 $1$
\end{document}

with pdflatex and open the resulting pdf with evince. If I search the digit one (1), it finds only the second one which is in upper case and not in "old style".

I tried

\input{glyphtounicode.tex}
\pdfgentounicode=1
\pdfglyphtounicode{textoneoldstyle}{0031}

but that didn't change anything. Also the packages cmap and mmap do not help which is expected, as far as I understand, because hfoldsty provides a virtual font with which these packages do not work.

Could you please tell me how I can find the old syle 1 in the pdf?

share|improve this question
    
Welcome to tex.sx! Usually, we don't put a greeting or a "thank you" in our posts. While it might seem strange at first, it is not a sign of a lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  doncherry Jun 5 '11 at 20:44
1  
I expanded the body of your file to 1 and $1$, compiled it with pdfTeX 1.40.12 by MiKTeX 2.9, opened it with Adobe Reader 10.0.1 on Win7 and was able to find both 1's via Ctrl+F. A general suggestion: Use lmodern (updated Computer Modern fonts) and cfr-lm for old style digits, as those use better quality Type 1 fonts instead of Type 3 fonts. (cf. also tex.stackexchange.com/q/14274/4012) –  doncherry Jun 5 '11 at 20:52
1  
@doncherry: Adobe reader uses some (fragile) heuristics that in this case do the right thing. In general (especially for non-Adobe viewers) it's better to have the proper glyphs listed in the tounicode table. –  Lev Bishop Jun 6 '11 at 0:09
add comment

1 Answer

up vote 5 down vote accepted

You were almost there. Change your textoneoldstyle to oneoldstyle and it should work.

By the way, glyphtounicode.tex already has \pdfglyphtounicode{oneoldstyle}{F731}, where unicode F731 is in the Private Use Area, hence the strangeness. I'm not sure what the logic behind this is, and whether glyphtounicode.tex is maintained by anyone to whom you can report a bug.

Update: I spoke with Eddie Kohler, author of lcdf typetools. He will be distributing an extensively updated version of glyphtounicode.tex with the next versions of typetools. He gave me a copy of the file and this problem with old-style figures being listed in the Private Use Area is fixed in this version.

share|improve this answer
add comment

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.