6

I am having trouble with the "libertine" font package using TexLive 2014. A PDF file generated will display properly, including interword spaces, but when I save from Acrobat to some other format (such as .txt or .rtf) there are no interword spaces. The only spaces appear where lines in the PDF file are broken. This is true with pdflatex and lualatex, with T1 and OT1 font encoding, and with different versions of Acrobat.

I don't have this problem with other fonts, including CM and Charter. Is there a simple fix for this?

Edited to include this code example:

\documentclass{article}
\usepackage{libertine}
\usepackage{lipsum}
\setlipsumdefault{1}
\begin{document}
\lipsum
\end{document}
2
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Commented Jul 20, 2014 at 21:58
  • Would you please accept the answer of egreg, if \pdfinterwordspaceon answers your question? I'm really interested: tex.stackexchange.com/q/186553/4736
    – Keks Dose
    Commented Jul 21, 2014 at 12:27

1 Answer 1

11

This is perhaps one of the cases where the new primitive

\pdfinterwordspaceon

can be useful. If I run

\documentclass{article}

\pdfinterwordspaceon

\usepackage{libertine}
\usepackage{lipsum}
\setlipsumdefault{1}
\begin{document}
\lipsum
\end{document}

and save to text from Adobe Reader, the spaces show.

2
  • Thanks for the reply, egreg, but it did not work for me. With the line you added, it sees the text as a picture when saving to .txt (so nothing is saved). When saving to .doc and .rtf formats it recognizes the presence of text, but the result is the same as before, i.e. the same spacing problem. Perhaps the problem is that I am running the full Acrobat (creator) software rather than the reader. Has anyone else had this problem? I couldn't find a report. I wonder if this is an issue that should be addressed to the Libertine creators? Commented Jul 21, 2014 at 20:11
  • The above example does not work for me too and I do run the Acrobat DC Professional. However, when I export to Word or when I copy-paste the text in Acrobat DC or SumatraPDF the spaces are there.
    – tanGIS
    Commented Apr 1, 2020 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .