# Tag Info

38

Using Luatex, you can insert color literals to highlight ligatures. Save this snippet as color-ligatures.lua: documentdata = documentdata or { } documentdata.color_ligatures = { } local color_ligatures = documentdata.color_ligatures color_ligatures.color = { r = 0xee/255, g = 0x31/255, ...

33

Here's a horrible, completely wrong way to get a "fj" ligature that will only work with Computer Modern. A proper way to solve the problem would be to get (or create) a font that has the ligature. Latin Modern may have this ligature in the future. \documentclass{article} \usepackage{xcolor} \newcommand{\fj}{% % Use the 'fi' ligature fi% % Erase the '...

31

cmap package was written to solve this problem. From the documentation: The cmap package is intended to make the PDF files generated by pdflatex "searchable and copyable" in acrobat reader and other compliant PDF viewers. Just put the line \usepackage{cmap} at the beginning of your preamble, and it will pre-load the needed CMap translations ...

27

The following is taken "verbatim" from the TeX Book (Chapter 9 TeX's Roman Fonts, p 51): Let's begin with the rules for the normal roman font (\rm or \tenrm); plain TeX will use this font for everything unless you specify otherwise. Most of the ordinary symbols that you need are readily available and you can type them in the ordinary way: There's ...

27

In LuaTeX you can intercept the input and change it before TeX sees it. This can be used to disable certain ligatures. Here is a proof of concept in ConTeXt. \usemodule[translate] \translateinput[selfish][self|*|ish] \translateinput[halflife][half|*|life] \starttext A selfish person has a small halflife. \enableinputtranslation A selfish person has a ...

27

-- and --- are TeX ligatures (like fl or fi). Disabling ligatures is one of the features of package microtype. You may deactivate all ligatures of all fonts: \documentclass{article} \usepackage{microtype} \DisableLigatures{} \begin{document} --- \end{document} or only the ligatures of the rm-family: \documentclass{article} \usepackage{microtype} \...

26

In my view, the following ligature suppression rules are needed. In order to enable the fi ligature, suppress the is, iv, and ix ligatures if is/iv/ix is preceded by f; In order to enable the sp and st ligatures, suppress the is ligature if is is followed by either p or t. In the jargon of Opentype fonts, fi is called a common ligature, and is, iv, and ix, ...

25

This is more a proof-of-concept than a real bulletproof style file, but it does what you request: The style file (filterltx.sty) \ProvidesPackage{filterltx} \RequirePackage{luatexbase,luacode} \begin{luacode*} do local replace = {} local filter = function ( buf ) local start,stop,init,pos local positions = {} for k,v in pairs(replace) do ...

23

Ligatures are generally considered a good thing, but if you really want to disable them and are using pdfLaTeX (or LuaLaTeX†), the microtype package can do this for you. If you load this package and add \DisableLigatures{encoding = *, family = * } to your preamble, all ligatures will disappear from your output. Here's an example (pdfLaTeX only): \...

22

You can only do it the other way round as described in the documentation of microtype. You can give a list of chars for which ligatures should be disabled: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{microtype} \DisableLigatures[f]{encoding = *, family = * } \begin{document} fi --- \end{document}

22

The following presents a solution for pdftex and Type 1 fonts. Since TeX does not offer any possibility to decompose a ligature into its constituent characters (this information is lost after they have been replaced by the ligature), we have to take the opposite approach: we loop over all glyph pairs in the fonts, typesetting them in a temporary box, and ...

22

The long tailed Q is not an independent glyph in Linux Libertine; it is actually bundled with the u in one single character. As a consequence, you have to create the glyph. I'm not an expert on Fontforge, but it is quite straightforward. Go to the font download page in sourceforge and get the source files; http://sourceforge.net/projects/linuxlibertine/...

21

It works if you switch the shorthand on before defining the command, or if you define the command after \begin{document} when shorthands are active. As Joseph commented, it's recommendable to switch it off immediately afterwards, so that the active shorthand doesn't affect other commands. \documentclass{article} \usepackage[ngerman]{babel} \shorthandon{"} \...

21

Try \pdfinclusioncopyfonts=1 From page 32 of the pdftex manual: \pdfinclusioncopyfonts (integer) If positive, this parameter forces pdfTEX to include fonts from a pdf file loaded with \pdfximage, even if those fonts are available on disk. Bigger files might be created, but included pdf files are sure to be embedded with the adequate fonts; ...

21

Some thing like this using feature files should work: First the feature file: # scripts and languages, if the font use others they should be defined here too languagesystem DFLT dflt; languagesystem latn dflt; # this undoes the effect of rare ligature on ft feature liga { sub f_t.alt by f t; } liga; # move rare ft to historic ligatures feature hlig { ...

21

Unicode mapping based on font encoding Packages cmap or mmap add information about glyph to Unicode conversions into the PDF file based on the used TeX encoding. The hooks into the font loading mechanism of LaTeX and should be used as early as possible, e.g.: \RequirePackage{mmap}% (\usepackage does not work before \documentclass) \documentclass{article} ...

21

Let's walk through all cases: Au{f}lage (or Auf{l}age or Auf{}lage}) (I) This does not break up the ligature at all in luatex, and in fact (contrary to widespread belief) has never reliably done so even in pre-luatex engines (eg. pdftex, tex). Auf"-lage (II) This shortcut from German babel inserts a hyphenation point allowing hyphenation in the ...

20

In typophile.com forum, user dudefellow kindly posted the following nice idea which is kind of what I'm trying to get from my question. Hence, I'm posting it as a demonstration of what I'm after. I would appreciate if we can limit the discussion to such propositions. It's more of a design question rather than the linguistic part as I've tried to clarify in ...

20

Firstly, you'll need to make sure that Fira Code is installed on your computer (which I'm sure you already do). The font features that Fira Code uses aren't actually listed as ligatures within the OTF, but seems to be fall under Contextuals. In order to use these font features, it is just a matter of enabling the appropriate contextuals: \documentclass{...

19


19

The TeXBook has this exercise: exercise Sometimes you run into a rare word like 'shelfful' that looks better as shelf{}ful without the ff ligature. How can you fool TeX into thinking that there aren't two consecutive f's in such a word? answer {shelf}ful or shelf{}ful, etc.; or even shelf\/ful, which yields a shelf/ful instead of a shelf{\...

18

The luatex-proof-of-concept I have promised is easier than I thought, because: \documentclass{article} \usepackage{fontspec} \setmainfont{Linux Libertine O} \begin{document} Whatt? \end{document} already uses the tt-ligature. But assume you want the fancy s_t ligature without enabling the Ligatures=Historic feature in fontspec, you can use a .fea-file: \...

18

Elaborating on my comment above, this seems like a bug in luaotfload when in node mode (the default font rendering mode which does more faithful OpenType processing), switching to base mode fixes it (a more limited rendering mode that tries to map OpenType font feature to legacy TeX ligaturing mechanism as far as possible), for example: % !TEX program = ...

18

Picking up a 500-year old idea...

18

From Buttericks Practical Typography: Lig­a­tures were in­vented to solve a prac­ti­cal type­set­ting prob­lem. In the days of metal fonts, cer­tain char­ac­ters had fea­tures that phys­i­cally col­lided with other char­ac­ters. To fix this, font mak­ers in­cluded lig­a­tures with their fonts, which com­bined the trou­ble­some let­ters into one piece of ...

18

Update 3/2019 The bug will be resolved with the next luaotfload update ============================================================== To expand a bit on Alan's answer: It is imho clearly a bug in the fontloader imported from context (you see the same in context if you set \automatichyphenmode=0). It only happens if the fonts are rendered with the mode=...

17

Find on your system the file tex-text.map and copy it in the working directory under the name bardzo.map (or whatever you want). Then append to it a line so that it looks like ; TECkit mapping for TeX input conventions <-> Unicode characters LHSName "TeX-text" RHSName "UNICODE" pass(Unicode) ; ligatures from Knuth's original CMR fonts U+002D U+002D ...

17

If you have a look at the microtype manual you will find: The box with the information "pdfTeX 1.30.0|LuaTeX 0.30" tells you, that disabling ligatures with microtype does only work for pdfTeX from version 1.30.0 or LuaTeX from 0.30. You are using XeTeX not pdfTeX, so microtype does not provide disabling ligatures. But fontspec does also provide features for ...

16

There is the perl program rmligs which does this job for German (German being a language where this is needed quite often). Unfortunately, the word list itself doesn't seem to be available. I also don't know how good the list is; it probably follows pre-reform orthographic rules. Maybe you can reach its author. There is a project for improved German ...

Only top voted, non community-wiki answers of a minimum length are eligible