1

My documents aren't copyable or searchable with the Apple pdf engine when using fontspec. using cmap doesn't help.

\documentclass[oneside, 12pt]{book}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Adobe Garamond Pro}
\begin{document}
\chapter{Fontspec Doesn't Work}

This text doesn't copy correctly.

\end{document}

Is this a known issue?


My OS is Mac OSX 10.11.6 El Capitan. The problem is worse with the built-in viewer in Texpad, second worse in Preview, and nonexistant in Adobe Reader. I am using LuaTeX 0.95.0 and XeTeX 3.14159265-2.6-0.99996


Log:

/Library/TeX/texbin/xelatex -file-line-error -interaction=nonstopmode -synctex=1 -output-directory=/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp main.tex

This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/bk12.clo)) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)) (/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1enc.def) (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1lmr.fd)) (/usr/local/texlive/2016/texmf-dist/tex/xelatex/xunicode/xunicode.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3enc.def (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1lmss.fd)) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-def/xetex.def)))) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.aux) (/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3cmr.fd)
Chapter 1.
[1] (/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.aux) )
Output written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.pdf (1 page).
SyncTeX written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.synctex.gz.
Transcript written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.log.


/Library/TeX/texbin/xelatex -file-line-error -interaction=nonstopmode -synctex=1 -output-directory=/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp main.tex

This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/bk12.clo)) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)) (/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1enc.def) (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1lmr.fd)) (/usr/local/texlive/2016/texmf-dist/tex/xelatex/xunicode/xunicode.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3enc.def (/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu1lmss.fd)) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-def/xetex.def)))) (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.aux) (/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3cmr.fd)
Chapter 1.
[1] (/Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.aux) )
Output written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.pdf (1 page).
SyncTeX written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.synctex.gz.
Transcript written on /Users/bfh/OneDrive/Documents/Thesis/MWE/.texpadtmp/main.log.
  • I've edited in the basic info: I wonder if we might have a screenshot of what does get copied? Any chance of the .log file from the example in the question? – Joseph Wright Mar 7 '17 at 7:00
  • iÆ Ç©xÇ ¨¾©Æ½’Ç §¾¿y §¾ÅÅ©§Çl is the text copied from 'This text doesn't copy correctly.' – BFH Mar 7 '17 at 7:04
  • is text doesn’t copy correctly. is what's copied in preview. The Th ligature isn't properly handled. – BFH Mar 7 '17 at 7:14
  • 3
    Can you check which fonts the document uses? Or put the pdf somewhere for inspection? – Ulrike Fischer Mar 7 '17 at 7:30
  • 3
    Can you edit your MWE so that compiling just that code demonstrates the problem? If your MWE uses font X, then font X must include a character which causes problems and you need that character in your example. If the Th isn't a problem with TNR because TNR doesn't have the ligature, the MWE can't demonstrate the problem. – cfr Mar 8 '17 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.