Book Image

LaTeX Cookbook

By : Stefan Kottwitz
Book Image

LaTeX Cookbook

By: Stefan Kottwitz

Overview of this book

LaTeX is a high-quality typesetting software and is very popular, especially among scientists. Its programming language gives you full control over every aspect of your documents, no matter how complex they are. LaTeX's huge amount of customizable templates and supporting packages cover most aspects of writing with embedded typographic expertise. With this book you will learn to leverage the capabilities of the latest document classes and explore the functionalities of the newest packages. The book starts with examples of common document types. It provides you with samples for tuning text design, using fonts, embedding images, and creating legible tables. Common document parts such as the bibliography, glossary, and index are covered, with LaTeX's modern approach.You will learn how to create excellent graphics directly within LaTeX, including diagrams and plots quickly and easily. Finally, you will discover how to use the new engines XeTeX and LuaTeX for advanced programming and calculating with LaTeX. The example-driven approach of this book is sure to increase your productivity.
Table of Contents (19 chapters)
LaTeX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Enabling the searching and copying of ligatures


In certain cases, two or more consecutive characters are joined to a single glyph. This is called a ligature. LaTeX commonly does it for ff, fi, fl, ffi, ffl, and more, depending on the font. That's because font makers designed specific glyphs for certain character combinations.

While it looks fine in print and on screen, there is a caveat—if you copy text from the produced PDF file into another document, such as to a text document or a Word file, the ligatures may appear broken.

Another problem is searching for words containing ligatures in PDF files, which can simply fail as the ligature "ff" is not equivalent to the letter combination "ff".

We will now fix that.

How to do it...

We stick to the commonly used pdfLaTeX. There are several possible ways to fix it. The first way is this:

  1. Insert the glyphtounicode.tex file into your document's preamble:

    \input{glyphtounicode}
  2. In the next line, activate the required pdfTeX feature:

    \pdfgentounicode=1

How...