[Tex/LaTex] Finding/Removing ligature from Tex

ligaturespdftexwinedt

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).

\documentclass{article}
\begin{document}
fi
\end{document}

Best Answer

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

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

%% use this in your preamble
\usepackage{newunicodechar}
\newunicodechar{ff}{ff}
\newunicodechar{fi}{fi}
\newunicodechar{fl}{fl}
\newunicodechar{ffi}{ffi}
\newunicodechar{ffl}{ffl}
%% end of common ligatures

\begin{document}
ff fi fl ffi ffl
\end{document}

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.

Related Question