0

Recently I uploaded a LaTeX generated PDF to an educational site which uses an internal PDF viewer (crocodoc). However, when displayed, many letters where missing. As far as I can tell it is mostly letters "f" that is missing.

In my preamble I wrote the following code:

\documentclass[11pt,a4paper]{article}

\usepackage[utf8]{inputenc}

\usepackage{fullpage}   
\usepackage[T1]{fontenc}  
\usepackage{lmodern}  
\usepackage[linktoc=none]{hyperref}  
\usepackage{caption}  
\usepackage{subcaption}  
\usepackage{amsmath,amssymb,bm, accents}  
\usepackage{pgfplots}

\usepackage{parskip}

Any idea what might cause this display error?

closed as unclear what you're asking by Keks Dose, Werner, Au101, Ronny, ebosi Nov 3 '16 at 16:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    It would help if you posted a screenshot of the viewer output so we can see which letters are missing. – Null Oct 28 '16 at 16:51
  • If you compile the document on your device locally, does it contain all and everything that you expect to be displayed? – Keks Dose Oct 28 '16 at 16:54
  • This is the topic starter writing. I merged my previous stackexchange accounts with tex.stackexchange and I am now unable to add a comment (due to low rep). By closer inspection I notice that it is only letters "f" and "fi" that is missing (as adressed above). When I compile the document there is no missing letters and everything looks fine, so it is only in the internal PDF viewer that the letters disappear. Unfortunately I have no way to carry out any test, as I am unable to upload anything to the educational site unless a task is open. So I can't tell if the microtype package and the soluti – Fabric Oct 28 '16 at 17:57
  • does this happen with other services and/or PDF viewers? – naphaneal Oct 28 '16 at 22:31
  • I voted to close, see the OP's answer below ( tex.stackexchange.com/a/336453/4736 ). – Keks Dose Nov 3 '16 at 15:04
2

Try this: In your Preamble, place this code

\begingroup
\catcode`\_=12
\pdfglyphtounicode{f_f}{0066 0066}
\pdfglyphtounicode{f_i}{0066 0069}
\pdfglyphtounicode{f_l}{0066 006C}
\pdfglyphtounicode{f_f_i}{0066 0066 0069}
\pdfglyphtounicode{f_f_l}{0066 0066 006C}
\endgroup

It won't hurt, and it might help. If it does not work... C'est la vie. If it works, it tells the PDF reader software how to look up certain ligatures.

Historically, the f f ligature was a specific character ff, with its own unicode point. Same with fi. But in modern Open Type method, the ligature names are likely to be f_f and f_i, and do not have specific code points. The software is supposed to understand.

1

Lower case "f" is part of many ligatures, that is, special character combinations like "fi" or "ffi". Maybe that is what is causing the problem. You can test by suppressing ligatures manually:

affinity        % should give a ligature
af{}f{}inity    % should not give a ligature

If the letters in the second version show up, you can suppress ligatures globally using the microtype package:

\usepackage{microtype}
\DisableLigatures{encoding = *, family = * }

Update: I read your answer/comment, and I comment here, since I have exactly the same account merging problem ;) Maybe for posterity it might be useful if you report back after you have carried out the test (whenever that may be).

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