Is there anyway to find and remove ligatures from tex file? Sometimes when I copy/paste a text to Winedt, it shows perfect, but when I compile it to Pdf, some issues appear, e.g. finding becomes nding.

I am wondering if there is any way to search and find these characters?

Here is an example file (needs utf8 encoding).

  • To be clear, are you saying that you copy 'finding' from a pdf into winedt and it displays ok, but problems occur when you compile the resulting code? If so, do you get any warnings in the log file? Jun 2, 2014 at 12:38
  • I don't think that is a winedt problem, but your used font and its ability to use ligatures. Try to paste the characters in a plaintext-editor (like notepad) instead winedt, I bet there are no ligatures.
    – musicman
    Jun 2, 2014 at 13:23
  • No, when I copy finding from word to latex, it won't appear correctly when it is compiled. I have to delete fi and type it again to fix it. I realise when this happens, fi is as one character and not two! So I'd like to know if there is anyway to search and find these characters in Winedt? (of course, nothing wrong with Win edt)
    – NESHOM
    Jun 2, 2014 at 13:32
  • i assume you're talking about copying from a tex-sourced pdf, rather than a "tex file" (such as .tex or .dvi). if i'm right, i guess you need the cmap or mmap packages. [note, i'm not clear about the difference between those two, and would welcome enlightenment.] Jun 2, 2014 at 13:45
  • so no way to just find and remove them from tex file?
    – NESHOM
    Jun 2, 2014 at 14:10

2 Answers 2


This is commonly due to bad font information, but is solvable. The ligatures that can give problems are , if a modern font is used.

You can solve at once your problem with


%% use this in your preamble
%% end of common ligatures

ff fi fl ffi ffl

The relevant code is between the two %% prefixed lines. Just keep it at hand and paste it when needed.

enter image description here

A “search and replace” can be better, for the production version of the document.


If you add \usepackage[utf8]{inputenc} to your preamble, the ligatures in the code will generate errors. There may be a lot, but there are (I think) only a few distinct cases. With inputenc in your preamble, run pdflatex. It will stop on the first ligature, and entering 'e' should take you to it. Copy the ligature and do a global find and replace, e.g. changing to fi. Repeat for the other ligatures and the problem is solved. Not entirely automatic, but it shouldn't take too long.

  • 1
    – egreg
    Jun 2, 2014 at 16:30
  • @egreg --- Nice. I didn't know that one. Jun 2, 2014 at 16:33
  • I am supposed to know about the package. ;-)
    – egreg
    Jun 2, 2014 at 16:40

Your Answer

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

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