diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-08 23:28:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-08 23:28:46 +0000 |
commit | 1369b6127faf5fc1b705acd08b10068af65a5ab6 (patch) | |
tree | 77c2a89e14e2f8c3e545b89919e03af937357b68 /Master/texmf-dist | |
parent | 8615246bec536d5eb6457dbd01308c1766ef7d7e (diff) |
selnolig (8aug13)
git-svn-id: svn://tug.org/texlive/trunk@31390 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
17 files changed, 557 insertions, 226 deletions
diff --git a/Master/texmf-dist/doc/lualatex/selnolig/README b/Master/texmf-dist/doc/lualatex/selnolig/README index d0f703409f1..53e53f8eac9 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/README +++ b/Master/texmf-dist/doc/lualatex/selnolig/README @@ -1,7 +1,25 @@ -The selnolig package suppresses typographic ligatures selectively, i.e., based on predefined search patterns. The search patterns focus on ligatures deemed inappropriate because they span morpheme boundaries. For example, the word shelfful, which is mentioned in the TeXbook as a word for which the ff ligature might be inappropriate, is automatically typeset as shelf\/ful rather than as shel{ff}ul. +The selnolig package suppresses typographic ligatures selectively, i.e., based +on predefined search patterns. The search patterns focus on ligatures deemed +inappropriate because they span morpheme boundaries. For example, the word +*shelfful*, which is mentioned in the TeXbook as a word for which the ff +ligature might be inappropriate, is automatically typeset as shelf{}ful, +i.e., without the ff ligature. -For English and German language documents, the selnolig package provides extensive rules for the selective suppression of so-called "common" ligatures. These comprise the ff, fi, fl, ffi, and ffl ligatures as well as the ft and~fft ligatures. Other f-ligatures, such as fb, fh, fj and fk, are suppressed globally, while making exceptions for names and words of non-English/German origin, such as Kafka and fjord. +For English and German language documents, the selnolig package provides +extensive rules for the selective suppression of so-called "common" ligatures. +These comprise the ff, fi, fl, ffi, and ffl ligatures as well as the ft and +fft ligatures. Other f-ligatures, such as fb, fh, fj and fk, are suppressed +globally; however, the package provides exceptions for names and words of non- +English/German origin, such as fjord and Kafka. -For English language documents, the package further provides ligature suppression macros for a number of so-called "discretionary" or "rare" ligatures such as ct, st, and sp. +For English language documents, the package further provides ligature +suppression macros for a number of so-called "discretionary" or "rare" +ligatures, such as ct, st, and sp. + +The package's user guide is in the file selnolig.pdf. If you're not (yet) +familiar with this package, you may want to at least skim the user guide in +order to get a sense of how it may be used. + +The selnolig package requires use of the LuaLaTeX format provided by a recent +TeX distribution such as TeXLive2013, TeXLive2012, or MiKTeX2.9. -The selnolig package requires use of the LuaLaTeX format provided by a recent TeX distribution such as TeXLive2012 or 2013 and MiKTeX2.9.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/lualatex/selnolig/gpp-ft.fea b/Master/texmf-dist/doc/lualatex/selnolig/gpp-ft.fea index c2cbeab607f..d7422ed83cd 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/gpp-ft.fea +++ b/Master/texmf-dist/doc/lualatex/selnolig/gpp-ft.fea @@ -1,12 +1,13 @@ -# OpenType feature file to suppress the f_t.alt ligature -# provided by the font "Garamond Premier Pro". This -# feature file is employed by selnolig.tex, the user guide -# for the 'selnolig' package. +# OpenType feature file to suppress the "rare" f_t.alt +# ligature provided by the font "Garamond Premier Pro". +# This feature file is employed by selnolig.tex, the +# user guide for the 'selnolig' package. # Created by Mico Loretan, January 2013, based on -# important (crucial!) help from Khaled Hosny. +# important (crucial!) help provided by Khaled Hosny +# (see http://tex.stackexchange.com/q/89963/5001). # Scripts and languages -# If the font use others, they should be defined here too +# If the font uses others, they should be defined here too languagesystem DFLT dflt; languagesystem latn dflt; diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-bugreport.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-bugreport.tex index 3d0eb810adf..45d664c2817 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-bugreport.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-bugreport.tex @@ -1,5 +1,5 @@ % !TEX TS-program = lualatex -% selnolig-bugreport.tex, 2013/06/30 +% selnolig-bugreport.tex, 2013/08/08 \documentclass{article} \usepackage[margin=1in]{geometry} diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.pdf b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.pdf Binary files differindex 840f7a4a2bf..9e2eac900e3 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.pdf +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.pdf diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.tex index bd7e9a7c4e6..981520a1330 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.tex @@ -1,5 +1,5 @@ % !TEX TS-program = lualatex -\documentclass{article} +\documentclass[english]{article} % Test program: Apply the 'selnolig' package, with % 'english' language option set, to a list of English @@ -8,7 +8,7 @@ % in the companion file 'selnolig-english-wordlist.tex'. % % Author: Mico Loretan (loretan dot mico at gmail dot com) -% Date: 2013/06/30 +% Date: 2013/08/08 % Check first that we're running Lua(La)TeX. \usepackage{ifluatex} @@ -22,7 +22,7 @@ \usepackage[margin=1in]{geometry} -\righthyphenmin=2 % set this to either 3 (normal) or 2 + \usepackage{fancyvrb} @@ -48,9 +48,11 @@ {EB Garamond 12 Regular} \usepackage[document]{ragged2e} -\usepackage[english,hdlig,broadf]{selnolig} +\usepackage{babel} +\usepackage[hdlig,broadf]{selnolig} +\righthyphenmin=3 % set this to either 3 (normal) or 2 -\usepackage{showhyphens} +%\usepackage{showhyphens} \setlength\parindent{0pt} \parskip=0.3\baselineskip @@ -59,6 +61,7 @@ \title{selnolig-english-test\\ (Package version: \selnoligpackageversion; \selnoligpackagedate)} \author{\null} \date{} +\debugon \begin{document} \maketitle @@ -81,7 +84,7 @@ Appearance of ``discretionary'' ligatures & \emph{at} & \emph{et} & {\ebg\emph{sk}}& \emph{ll} & \emph{\uselig{ij}, st, ta}\\ Sample words with these ligatures & stay & act & spy - & \emph{was} & \emph{\mbox{is}thmus} & \emph{cat} & \emph{net} + & \emph{was} & \emph{\uselig{isthmus}} & \emph{cat} & \emph{net} & {\ebg\emph{ask}} & \emph{ill} & \emph{rijsttafel}\\ \end{tabular} @@ -90,10 +93,9 @@ Sample words with these ligatures \makeatletter \begin{tabular}{@{}ll} -Options and other parameters:\\ -\ \ \ Value of \texttt{\textbackslash righthyphenmin} parameter & \the\righthyphenmin\\ -\ \ \ Extent of suppressing f-ligatures: basic or broadf? & \if@broadfset broadf \else basic \fi \\ - +Package options and other parameters:\\ +\ \ \ \ \ Extent of suppressing f-ligatures: basic or broadf? & \if@broadfset broadf \else basic \fi \\ +\ \ \ \ \ Value of \texttt{\textbackslash righthyphenmin} parameter & \the\righthyphenmin\\ \end{tabular} \makeatother diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-wordlist.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-wordlist.tex index f69b0ea2aeb..cf95a53a124 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-wordlist.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-wordlist.tex @@ -1,7 +1,7 @@ % !TeX root = selnolig-english-test.tex % !TEX TS-program = lualatex -% Last updated: 2013/06/30 +% Last updated: 2013/08/08 % For use with the 'selnolig' package and the % driver program 'selnolig-english-test.tex'. @@ -214,18 +214,20 @@ asthma isthmus aesthetic \medskip -Other reasons for suppressing st ligature: +Second reason: avoid instances of st spanning a morpheme boundary painstaker painstaking dogstail crosstalk gastight distant distasteful distillation distemperate distended distort distract distraught distribute distributed distribution district distrust disturb +mistrust mistake mistaken + Maastricht -\emph{But}, do not suppress the st ligature for distelfink, castle forecastle, nestle wrestle, bristle bristletail epistle glisten gristle listen mistletoe thistle whistle, apostle jostle, bustle hustle rustle +\emph{But, do not suppress the st ligature for} castle forecastle, nestle wrestle, bristle bristletail distelfink epistle glisten gristle listen mistletoe thistle whistle, apostle jostle, bustle hustle rustle @@ -361,9 +363,7 @@ Note: The test words in the remainder of this document are generally set in \emp \bgroup \em -bathouse boathouse cathouse courthouse hothouse lighthouse nuthouse outhouse penthouse pilothouse pothouse - -guesthouse oasthouse pesthouse +bathouse boathouse cathouse courthouse guesthouse hothouse lighthouse nuthouse oasthouse outhouse penthouse pesthouse pilothouse pothouse bolthead cathead fathead flathead gilthead hothead lightheaded masthead meathead pithead pothead printhead softhead softheaded @@ -630,8 +630,8 @@ amethyst bellwether brethren ethical ethane ether ethnic ethyl lethal lethargic \egroup \medskip -Words for which the \emph{et}-ligature need \emph{not} be suppressed: -\emph{Beethoven prophethood sweetheart sweethearts } +Words for which \emph{et}-ligature needn't be suppressed: +\emph{Beethoven prophethood sweetheart sweethearts} \end{itemize} @@ -639,23 +639,24 @@ Words for which the \emph{et}-ligature need \emph{not} be suppressed: \subsection*{Cases of \emph{as}-, \emph{is}-, and \emph{us}-ligatures pre-empting use an \emph{sp}-ligature} \bgroup \em -asparagus aspect aspire Casper Caspar clasp gasp grasp hasp Jasper rasp raspberry wasp \emph{(but what to do about } asp?\emph{)} +asparagus aspect aspire Casper Caspar clasp gasp grasp hasp Jasper rasp raspberry wasp \emph{(but what to do about } asp\emph{?)} megaspores tetraspore crisp lisp whisper wisp +\ \ \ \emph{but:} disparity dispart mispackage misplace -\emph{but:} disparity dispart mispackage misplace +cusp tricuspid, auspicious suspect suspicious -auspicious cusp suspicious tricuspid \emph{but:} suspect suspend +\ \ \ \emph{but:} suspend suspense suspension etc. \egroup \subsection*{Cases of an \emph{et} ligature pre-empting a \emph{ta} ligature} -Note: It would appear that in all cases where an \emph{et} ligature should be suppressed in favor of a subsequent \emph{ta} ligature, the \emph{et} ligature spans a morpheme boundary and hence shouldn't be used anyway. Some examples: +Note: It appears to be the case that in all instances for which an \emph{et} ligature should be suppressed in favor of a subsequent \emph{ta} ligature, the \emph{et} ligature spans a morpheme boundary and hence shouldn't be used anyway. Some examples: \bgroup \em betake betatter bristletail caretaker cheetah @@ -667,7 +668,7 @@ whitetail wiretap \egroup \medskip -Note that the \emph{et}-ligature should not be suppressed \emph{globally} in favor of a subsequent \emph{ta} ligature, because of the following groups of words: +Note that the \emph{et}-ligature should not be suppressed \emph{globally} in favor of a subsequent \emph{ta} ligature because of the following groups of words: \bgroup \em \begin{itemize} diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.pdf b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.pdf Binary files differindex 5ea3b5fe7eb..88ba352ba1e 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.pdf +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.pdf diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.tex index 8a189efe685..83914090461 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-test.tex @@ -7,7 +7,7 @@ % of test words is in 'selnolig-german-wordlist.tex'. % % Author: Mico Loretan (loretan dot mico at gmail dot com) -% Date: 2013/06/30 +% Date: 2013/08/08 % Check first that we're running lua(la)tex. \usepackage{ifluatex} @@ -36,7 +36,7 @@ \usepackage{babel} \usepackage{selnolig} -\usepackage{showhyphens} +%\usepackage{showhyphens} \usepackage{multicol} \setlength\columnseprule{.4pt} \title{selnolig-german-test\\ (Package version: \selnoligpackageversion; \selnoligpackagedate)} @@ -48,7 +48,7 @@ \begin{tabular}{@{} *{9}{l} } Erscheinungsbild der f-Ligaturen - &ff &fi &fl &ffi &ffl &ft & \mbox{fj} &\mbox{fk}\\ + &ff &fi &fl &ffi &ffl &ft & \uselig{fj} &\uselig{fk}\\ Beispiele &Affe &finden &flink &offiziell &soufflieren & Luft & Sognefjord &Kafka\\ \end{tabular} diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-wordlist.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-wordlist.tex index 414614dc2e8..c065486a7f0 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-wordlist.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig-german-wordlist.tex @@ -1,7 +1,7 @@ % !TeX root = selnolig-german-test.tex % !TEX TS-program = lualatex -% Last updated: 2013/06/30 +% Last updated: 2013/08/08 % For use with the 'selnolig' package and the % driver program 'selnolig-german-test.tex'. diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig.pdf b/Master/texmf-dist/doc/lualatex/selnolig/selnolig.pdf Binary files differindex c9dffaa7585..ac72ec4a3db 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig.pdf +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig.pdf diff --git a/Master/texmf-dist/doc/lualatex/selnolig/selnolig.tex b/Master/texmf-dist/doc/lualatex/selnolig/selnolig.tex index 27107e83960..15438d3cf3b 100644 --- a/Master/texmf-dist/doc/lualatex/selnolig/selnolig.tex +++ b/Master/texmf-dist/doc/lualatex/selnolig/selnolig.tex @@ -9,9 +9,12 @@ % It has the status "maintained". % % Author: Mico Loretan (loretan dot mico at gmail dot com) -% Date: 2013/06/30 +% Date: 2013/08/08 -% Check first that we're running lua(la)tex. +% The file selnolig.tex contains the user guide to the +% selnolig package. + +% Can only compile this file if running Lua(La)TeX: \usepackage{ifluatex} \ifluatex\else \typeout{ =========================================} @@ -21,14 +24,14 @@ \endinput \fi -% Load fontspec and some font families +% Load fontspec and several font families \usepackage{fontspec} -\setmainfont[ FeatureFile= gpp-ft.fea, - Numbers = OldStyle, - Ligatures = {TeX, Common, Rare}, - BoldFont = {Garamond Premier Pro}, - ItalicFont = {Garamond Premier Pro Italic} ] +\setmainfont[FeatureFile= gpp-ft.fea, + Numbers = OldStyle, + Ligatures = {TeX, Common, Rare}, + BoldFont = {Garamond Premier Pro}, + ItalicFont = {Garamond Premier Pro Italic}] {Garamond Premier Pro} \setsansfont[Scale=MatchLowercase, @@ -37,15 +40,14 @@ \setmonofont[Scale=0.81, Ligatures = NoCommon] {Consolas} - \newfontfamily\ebg[ Numbers = OldStyle, Ligatures = {TeX, Common, Discretionary, Historic}, ItalicFeatures = {Scale = MatchLowercase}, ItalicFont = {EB Garamond 12 Italic}] {EB Garamond 12 Regular} \newfontfamily\sabon[Ligatures={Common,Rare,TeX}, - Scale=MatchLowercase] - {Sabon Next LT Pro} + Scale=MatchLowercase] + {Sabon Next LT Pro} \newfontfamily\blackletterfont[Ligatures=NoCommon] {UnifrakturMaguntia} @@ -53,15 +55,15 @@ % Load some more packages \usepackage{geometry} \usepackage[english=american]{csquotes} +\usepackage{tabularx,booktabs,ragged2e} + \usepackage[ngerman,english]{babel} \usepackage[ngerman,english,hdlig,broadf]{selnolig} -\debugon - -\hyphenation{ver-werf-lich kunst-stoff-lei-tung} +%\debugon -% Suppress st-ligature in some German words -% that occur in this document +% Suppress st-ligature in German words that occur in +% this user guide. \nolig{Kunststo}{Kuns|ts|to} % Kunststoff \nolig{Bausto}{Baus|to} % Baustoff \nolig{streif}{s|treif} % streifte @@ -72,14 +74,28 @@ \nolig{Wasserstoff}{Wassers|toff} \nolig{stiefl}{s|tiefl} % stiefle \nolig{straff}{s|traff} -\nolig{aufisst}{auf|iss|t} % suppress st liga as well. -% undo English/broadf \nolig{ffing}{ff|ing} rule: +\nolig{aufisst}{auf|iss|t} % suppress st liga as well +\nolig{löste}{lös|te} +\nolig{straße}{s|traße} +\nolig{steifbein}{s|teifbein} +\nolig{steiflehnig}{s|teiflehnig} +\nolig{strafbar}{s|trafbar} +\nolig{belustigt}{belus|tigt} +\nolig{höflichst}{höflichs|t} +\nolig{trittst}{tritts|t} +\nolig{vortrefflichsten}{vortrefflichs|ten} +\nolig{schnellste}{schnells|te} +\nolig{surftest}{surftes|t} +\nolig{bestanden}{bes|tanden} +\nolig{leistung}{leis|tung} + +% Undo broadf's \nolig{ffing}{ff|ing} rule for +% a couple of German words: \keeplig{ffingrig} \keeplig{ffinger} -\hyphenation{fünf-fing-rig} -% Load still more packages... +% Load a few more packages... \usepackage{microtype} \LoadMicrotypeFile{pad} \usepackage{multicol} @@ -103,7 +119,7 @@ \usepackage{fancyvrb} \DefineShortVerb{\|} -% "ogos for "LuaLaTeX" and "XeLaTeX" +% Logos for "LuaLaTeX" and "XeLaTeX" \usepackage{metalogo} \makeatletter \def\xl@drop@TeX@e{0.34ex} % default: 0.5ex @@ -112,14 +128,14 @@ \def\xl@kern@LaTeX@aT{-.16em} % default: -0.15ex \makeatother -% some frequently-used commands +% Some frequently-used commands \newcommand{\pkg}[1]{\textsf{#1}} \newcommand{\opt}[1]{\texttt{#1}} \newcommand{\cmmd}[1]{\texttt{\textbackslash #1}} \newcommand\utf{\textsc{utf-8}} -% Redefine the \appendix command +% Modify the \appendix command \let\oldappendix\appendix \renewcommand\appendix{% %\clearpage @@ -143,10 +159,10 @@ % used below are defined in 'selnolig.sty'. \title{The \selnoligpackagename\ package: \\ -Selective suppression of typographic ligatures\thanks{ +Selective suppression of typographic ligatures\thanks{ Current version: \selnoligpackageversion. Features of the \pkg{selnolig} package are subject to change without prior notice. \newline\hspace*{\parindent} -The main text font used in this document is \enquote{Garamond Premier Pro}. \enquote{\ebg EB Garamond} is used for words that involve the {\ebg\uselig{fb}, \uselig{fh}, \uselig{fj}, \uselig{fk}, \uselig{ffb}, \uselig{ffh}, \uselig{ffj}, \uselig{ffk}, and \emph{\uselig{sk}}} glyphs. \enquote{Common}, \enquote{discretionary}, and \enquote{historic} typographic ligatures are enabled for these fonts\textemdash \emph{and} are suppressed selectively using the rules of the \pkg{selnolig} package.}} +The main text font used in this document is Garamond Premier Pro. {\ebg EB Garamond} is used for words that use the {\ebg fb, fh, fj, fk, ffb, ffh, ffj, ffk, and \emph{sk}} ligatures. \enquote{Common}, \enquote{discretionary}, and \enquote{historic} typographic ligatures are enabled for these fonts\textemdash \emph{and} are suppressed selectively using the rules of the \pkg{selnolig} package.} } \author{Mico Loretan\thanks{ \href{mailto:loretan.mico@gmail.com}{loretan dot mico at gmail dot com}.}} @@ -157,24 +173,19 @@ The main text font used in this document is \enquote{Garamond Premier Pro}. \enq \VerbatimFootnotes \pagenumbering{roman} -% aside - for some reason, the \uselig macros in the -% footnote to the title don't work; need to bring in -% the "heavy artillery", viz., \selnoligoff and -% \selnoligon \selnoligoff \maketitle \selnoligon - \begin{abstract} -The \pkg{selnolig} package suppresses typographic ligatures selectively, i.e., based on predefined search patterns. The search patterns focus on ligatures deemed inappropriate because they span morpheme boundaries. For example, the word \opt{shelfful}, which is mentioned in the \TeX book as a word for which the \enquote{ff} ligature might be inappropriate, is automatically typeset as shelfful rather than as \uselig{shelfful}. +The \pkg{selnolig} package suppresses typographic ligatures selectively, i.e., based on predefined search patterns. The search patterns focus on ligatures deemed inappropriate because they span morpheme boundaries. For example, the word \opt{shelfful}, which is mentioned in the \TeX book as a word for which the ff~ligature might be inappropriate, is automatically typeset as shelfful rather than as \uselig{shelfful}. \newline\hspace*{\parindent} -For English and German language documents, the \pkg{selnolig} package provides extensive rules for the selective suppression of so-called \enquote{common} ligatures. These comprise the ff, fi, fl, ffi, and~ffl ligatures as well as the ft and~fft ligatures. Other f-ligatures, such as {\ebg\uselig{fb}, \uselig{fh}, \uselig{fj}} and {\ebg\uselig{fk}}, are suppressed globally, while making exceptions for names and words of non-English/German origin, such as {\ebg Kafka} and {\ebg fjord}. +For English and German language documents, the \pkg{selnolig} package provides extensive rules for the selective suppression of so-called \enquote{common} ligatures. These comprise the ff, fi, fl, ffi, and~ffl ligatures as well as the ft and~fft ligatures. Other f-ligatures, such as {\ebg\uselig{fb}}, {\ebg\uselig{fh}}, {\ebg\uselig{fj}} and {\ebg\uselig{fk}}, are suppressed globally, while making exceptions for names and words of non-English/German origin, such as {\ebg Kafka} and {\ebg fjord}. \newline\hspace*{\parindent} -For English language documents, the package further provides ligature suppression rules for a number of so-called \enquote{discretionary} or \enquote{rare} ligatures such as~ct, st, and~sp. +For English language documents, the package further provides ligature suppression rules for a number of so-called \enquote{discretionary} or \enquote{rare} ligatures, such as~ct, st, and~sp. \newline\hspace*{\parindent} -The \pkg{selnolig} package requires use of the \LuaLaTeX\ format provided by a recent \TeX\ distribution such as \TeX Live\,2012 or~2013 and MiK\TeX\,2.9. +The \pkg{selnolig} package requires use of the \LuaLaTeX\ format provided by a recent \TeX\ distribution, e.g., \TeX Live\,2013 and MiK\TeX\,2.9. \end{abstract} \tocloftpagestyle{empty} @@ -199,17 +210,17 @@ For both English and German language documents, the \pkg{selnolig} package provi For both English and German language documents, the {\ebg \uselig{fb}, \uselig{fh}, \uselig{fj}, and \uselig{fk}} ligatures are suppressed \emph{globally}; see also \cref{sec:global-nolig}. However, exceptions are provided in order not to suppress these ligatures for selected words of \emph{non-English\slash German} origin, such as {\ebg fjord, fjell, Prokofjew, and Kafka}. -For English language documents, the \pkg{selnolig} package recognizes an option called \opt{broadf}; if it is set, additional f-ligatures will be suppressed selectively. The package also features an option called \opt{hdlig} to provide selective ligature suppression for discretionary (aka rare) ligatures such as~ct, st, sp, {\ebg\emph{sk}}, \emph{th}, \emph{at}, \emph{et}, \emph{ll}, \emph{as}, \emph{is}, and~\emph{us}. No rules are currently provided to suppress historic\slash discretionary ligatures for German documents.\footnote{A remark on the classification of various forms of typographic ligatures in OpenType fonts: There appears to little terminological standardization as to which typographic ligatures are labelled \enquote{historic} and which ones are labelled \enquote{discretionary}. To wit, the fonts Latin Modern Roman, Garamond Premier Pro, and Hoefler Text report having \enquote{only} discretionary ligatures, whereas Junicode, Cardo, EB Garamond, and Palatino Linotype report having both historic and discretionary ligatures. Interestingly, none of these fonts report having ligatures classified as either \enquote{contextual} or \enquote{required}. } +For English language documents, the \pkg{selnolig} package recognizes an option called \opt{broadf}; if it is set, additional f-ligatures will be suppressed selectively. The package also features an option called \opt{hdlig} to provide selective ligature suppression for discretionary (aka rare) ligatures, such as~ct, st, sp, {\ebg\emph{sk}}, \emph{th}, \emph{at}, \emph{et}, \emph{ll}, \emph{as}, \emph{is}, and~\emph{us}. No rules are provided to suppress historic\slash rare ligatures for German documents.\footnote{A remark on the classification of various forms of typographic ligatures in OpenType fonts: There appears to little terminological standardization as to which typographic ligatures are labelled \enquote{historic} and which ones are labelled \enquote{discretionary}\slash\enquote{rare}. To wit, the fonts Latin Modern Roman, Garamond Premier Pro, and Hoefler Text report having \enquote{only} discretionary ligatures, whereas Junicode, Cardo, EB Garamond, and Palatino Linotype report having both historic and discretionary ligatures. Interestingly, none of these fonts report having ligatures classified as either \enquote{contextual} or \enquote{required}. } The \pkg{selnolig} package also provides supplemental hyphenation exception lists for both English and German language words. The words in these lists are generally composite and contain one or more typographic ligatures that should be suppressed. +The remainder of this document is organized as follows. \Cref{sec:hurry} provides brief instructions for loading the \pkg{selnolig} package and making one's document(s) suitable for compilation under \LuaLaTeX\ (if you haven't already done so). The package's overall approach to selective ligature suppression, which is based on morphemes (the components of a word that convey meaning), is explained in \cref{sec:approach}, the user macros are presented in \cref{sec:structure}, and options that affect the package's workings are explained in \cref{sec:options}. \Cref{sec:further} discusses further issues that may arise when looking to break up typographic ligatures. The package's ligature suppression rules for English and German documents are listed in \cref{sec:eng-listing,sec:germ-listing}. The code of the package's main ``style'' file, \pkg{selnolig.sty}, and Lua code, in \pkg{selnolig.lua}, are shown in \cref{sec:sty,sec:luacode}. In \cref{sec:budd}, the results of a simple, and by no means statistically representative, case study into the actual counts of ligature suppressions in two English novels (\emph{Call Of The Wild} and \emph{The Sea Wolf}) and one German novel (\emph{Die Buddenbrooks}) are reported. Unsurprisingly, morpheme-crossing ligatures occur far more frequently in the German novel\textemdash by a factor or more than 100! \Cref{sec:template} provides a suggested template for reporting bugs and other issues with the package. -\section{I'm in a hurry! How do I start using this package?} -\subsection[How do I load the selnolig package?]{How do I load the \pkg{selnolig} package?} +\section{I'm in a hurry! How do I start using this package?} \label{sec:hurry} -%\enlargethispage{0.5\baselineskip} +\subsection[How do I load the selnolig package?]{How do I load the \pkg{selnolig} package?} \begin{itemize} \item If your document is in English and you want to enable a \enquote{basic} set of rules to suppress f-ligatures selectively, load the package by issuing the following instruction in the preamble of your document: @@ -218,14 +229,13 @@ The \pkg{selnolig} package also provides supplemental hyphenation exception list \end{Verbatim} Synonymous options are \opt{UKenglish}, \opt{british}, \opt{USenglish}, \opt{american}, \opt{cana\-dian}, \opt{australian}, and \opt{new\-zea\-land}. -If you want to load a broader set of f-ligature suppression rules than the set that's enabled by default, be sure to also specify the option \opt{broadf}; see \cref{sec:eng-opt}. -If you enable \enquote{historic} and/or \enquote{discretionary} ligatures (e.g., ct, st, sp, \emph{th}, \emph{as}, \emph{is}, and~\emph{us}) for your document's text font(s), be sure to specify the option~\opt{hdlig} as well. The options \opt{hdlig} and \opt{broadf} may be specified independently. +If you want to load a set of f-ligature suppression rules that's broader than the set that's enabled by default, be sure to also specify the option \opt{broadf}; see \cref{sec:eng-opt}. If \enquote{historic} and/or \enquote{discretionary} ligatures (e.g., ct, st, sp, \emph{th}, \emph{as}, \emph{is}, and~\emph{us}) are enabled, be sure to specify the option~\opt{hdlig}. The options \opt{broadf} and \opt{hdlig} may be specified independently. \item If your document is written in German, load the package as follows: \begin{Verbatim} \usepackage[ngerman]{selnolig} \end{Verbatim} -Synonymous options: \opt{german}, \opt{austrian}, \opt{naustrian}, \opt{swissgerman}, and \opt{swiss}. +Synonymous language options are \opt{german}, \opt{austrian}, \opt{naustrian}, \opt{swissgerman}, and \opt{swiss}. \item If you load the package \emph{without} an explicit language option, i.e., as \begin{Verbatim} @@ -233,7 +243,7 @@ Synonymous options: \opt{german}, \opt{austrian}, \opt{naustrian}, \opt{swissger \end{Verbatim} but if one or more of the language options noted above are specified as options in the \cmmd{documentclass} instruction, \LaTeX\ will pass these options on to the \pkg{selnolig} package. -\item If no language options are set, either when the package is loaded or as options in the \cmmd{documentclass} instruction, you will need to provide your own ligature suppression rules. This approach may be called for if you write in a language other than German or English. +\item If no language options are set either when the package is loaded or as options in the \cmmd{documentclass} instruction, you will need to provide your own ligature suppression rules. This approach is called for if you write in a language other than German or English\textemdash the only two languages currently supported by the \pkg{selnolig} package\textemdash and are able to devise your own ligature suppression rules using \pkg{selnolig}'s \cmmd{nolig} and \cmmd{keeplig} macros. \end{itemize} @@ -247,7 +257,8 @@ but if one or more of the language options noted above are specified as options The ligature suppression macros of the \pkg{selnolig} package \emph{require} the use of \LuaLaTeX; they will not work under either pdf\LaTeX\ or \XeLaTeX.\footnote{If the \pkg{selnolig} package is not run under \LuaLaTeX, a warning message will be issued and only the package's supplemental hyphenation rules will be available to the user.} If you've been using pdf\LaTeX\ until now, the requirement to use \LuaLaTeX\ will likely force you to make some changes to your existing documents. Fortunately, these changes should be minor and straightforward to implement, because \LuaLaTeX\ is (for the most part) a strict superset of pdf\LaTeX. Almost all documents that compile correctly under pdf\LaTeX\ should also compile correctly under \LuaLaTeX. The most important changes you'll need to make are: \begin{enumerate} -\item Do not load the |inputenc| and |fontenc| packages. \item Load the |fontspec| package.\footnote{If the \pkg{selnolig} package is run under \LuaLaTeX\ but the \pkg{fontspec} package isn't loaded by the time the \Verb+\begin{document}+ statement is encountered, \pkg{selnolig} will terminate with an error message.} Then, use commands such as \cmmd{setmainfont} and \cmmd{setsansfont} to load the fonts you wish to use. +\item Do not load either the |inputenc| or the |fontenc| package. +\item Be sure to load the |fontspec| package,\footnote{If the \pkg{selnolig} package is run under \LuaLaTeX\ but the \pkg{fontspec} package isn't loaded by the time the \Verb+\begin{document}+ statement is encountered, \pkg{selnolig} will terminate with an error message.} and use \cmmd{setmainfont}, \cmmd{setsansfont}, and related commands to load the fonts you wish to use. \end{enumerate} \endgroup @@ -255,22 +266,22 @@ If you've been using pdf\LaTeX\ until now, the requirement to use \LuaLaTeX\ wil Depending on your \TeX\ distribution, the default font family used by \LuaLaTeX\ will be either Computer Modern or Latin Modern. If you wish to use a different font family, further font-related instructions will be required. \emph{How} to specify fonts and font families and set up various font-related options in \LuaLaTeX\ are topics that go far beyond the scope of this user guide. I urge you to become familiar with the very well-written \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fontspec/fontspec.pdf}{user guide} of the \pkg{fontspec} package. -You will also need to use a \TeX\ distribution that features a fairly recent version of \LuaLaTeX. \TeX Live 2013, \TeX Live\,2012, and MiK\TeX\,2.9 satisfy this requirement; versions of \TeX Live before 2011 probably do not. If you use a command-line interface to compile a document named, say, |myfile.tex|, type +You will also need to use a \TeX\ distribution that features a fairly recent version of \LuaLaTeX. \TeX Live\,\-2013, \TeX Live\,2012, and MiK\TeX\,2.9 satisfy this requirement; versions of \TeX Live before 2011 probably do not. If you use a command-line interface to compile a document named, say, |myfile.tex|, type \begin{Verbatim} lualatex myfile \end{Verbatim} -rather than either |latex myfile| or |pdflatex myfile|. If you use a text editing program with pull-down menus or buttons to invoke a suitable compiler, be sure to select |LuaLaTeX|. +rather than either |latex myfile| or |pdflatex myfile| to initiate compilation. If you use a text editing program with pull-down menus or buttons to invoke a suitable compiler, be sure to select |LuaLaTeX|. -The very first time one runs \LuaLaTeX\ on a document with a new set of fonts, the compilation speed will likely be quite slow, because \LuaLaTeX\ has to create various cache files to store font-related information. Subsequent compilation runs should be much faster. +The very first time one runs \LuaLaTeX\ on a document with a new set of fonts, the compilation speed will likely be quite slow, because \LuaLaTeX\ (actually, a package loaded by \LuaLaTeX) has to create various cache files to store font-related information. Subsequent compilation runs should be much faster. The answers to the questions \href{http://tex.stackexchange.com/q/28642/5001}{Frequently loaded packages: Differences between pdf\LaTeX\ and \LuaLaTeX?} and \href{http://tex.stackexchange.com/q/32295/5001}{Using Lua\TeX\ as a replacement for pdf\TeX}, both posted to \href{http://tex.stackexchange.com/}{tex.stackexchange.com}, provide very useful information for people who are new to \LuaLaTeX\ and are at least somewhat familiar with pdf\LaTeX's ways of getting things done. Another great resource for people who wish to become more familiar with \LuaLaTeX\ is \href{http://mirror.ctan.org/info/luatex/lualatex-doc/lualatex-doc.pdf}{A Guide to \LuaLaTeX} by Manuel Pégourié-Gonnard. \subsection{Anything else I need to do or know?} \label{sec:anythingelse} -For multilingual support, \LuaLaTeX\ and the \pkg{selnolig} package work well with the \href{http://www.ctan.org/pkg/babel}{\pkg{babel}} package. If your document loads the \pkg{babel} package, be sure to load the \pkg{selnolig} package \emph{after} the \pkg{babel} package, so that the supplemental hyphenation patterns provided by the \pkg{selnolig} package won't get clobbered by \pkg{babel}'s hyphenation settings.\footnote{The \pkg{selnolig} package is also compatible with the \href{http://www.ctan.org/pkg/hyphsubst}{\pkg{hyphsubst}} package (which, if used, should be loaded with a \Verb+\RequirePackage+ statement \emph{before} the \Verb+\documentclass+ instruction). With \TeX Live2013, it may also be possible to use the \pkg{polyglossia} package with \LuaLaTeX\ and hence with \pkg{selnolig}, but I haven't verified that this is the case.} +For multilingual support, \LuaLaTeX\ and the \pkg{selnolig} package work well with the \href{http://www.ctan.org/pkg/babel}{\pkg{babel}} package. If your document loads the \pkg{babel} package, be sure to load the \pkg{selnolig} package \emph{after} the \pkg{babel} package, so that the supplemental hyphenation patterns provided by the \pkg{selnolig} package won't get clobbered by \pkg{babel}'s hyphenation settings.\footnote{The \pkg{selnolig} package is also compatible with the \href{http://www.ctan.org/pkg/hyphsubst}{\pkg{hyphsubst}} package (which, if used, should be loaded with a \Verb+\RequirePackage+ statement \emph{before} the \Verb+\documentclass+ instruction). With \TeX Live\,2013, it may also be possible to use the \pkg{polyglossia} package with \LuaLaTeX\ and hence with \pkg{selnolig}, but I haven't verified that this is the case.} -\LuaLaTeX\ natively supports the so-called \utf\ input encoding scheme; in fact, it is also the \emph{only} input encoding scheme that \LuaLaTeX\ knows about. The \pkg{selnolig} package assumes that the \TeX\ files it operates on conform to this input encoding method. Nowadays, many modern \TeX-aware editors support \utf\ directly; \pkg{selnolig} should have no problems with \TeX\ files produced by these editors. Older files, however, may use other input encoding systems. If your input files currently use a different input encoding scheme, e.g., \textsc{latin1}, you must convert them to \utf. Several methods exist for changing a file's input encoding scheme; see the question \href{http://tex.stackexchange.com/q/87406/5001}{How to change a .tex file's input encoding system (preferably to \utf)?} and the associated answers on \url{tex.stackexchage.com} for some possibe methods. +\LuaLaTeX\ natively supports the so-called \utf\ input encoding scheme; in fact, it is also the \emph{only} input encoding scheme that \LuaLaTeX\ knows about. The \pkg{selnolig} package assumes that the \TeX\ files it operates on conform to this input encoding method. Nowadays, many modern \TeX-aware editors support \utf\ directly; \pkg{selnolig} should have no problems with \TeX\ files produced by these editors. Older files, however, may use other input encoding systems. If your input files currently use a different input encoding scheme, e.g., \textsc{latin1}, you must convert them to \utf. Several methods exist for changing a file's input encoding scheme, Please see the question \href{http://tex.stackexchange.com/q/87406/5001}{How to change a .tex file's input encoding system (preferably to \utf)?} and the associated answers on \url{tex.stackexchage.com} for some possible methods. If your document is written in German, it is assumed that all vowels with diereses (Umlaute) are entered as \Verb|ä|, \Verb|ö|, \Verb|ü|, etc.\ rather than, say, as \Verb|\"{a}|, \Verb|\"{o}|, and~\Verb|\"{u}| or (if you tend to use the \pkg{babel} \enquote{shortcuts}) as \Verb|"a|, \Verb|"o|, and~\Verb|"u|. Likewise, it's assumed that you enter the \enquote{eszett} (\enquote{scharfes~s}) character as~|ß| rather than as~|\ss|.\footnote{\TeX nically speaking, |selnolig| only requires the use of \Verb|ä|, \Verb|ö|, \Verb|ü|, etc.\ in the search strings of the ligature suppression rules.} It is also assumed that you use the triple-f (modern) spelling of words such as \texttt{Schifffahrt}, \texttt{Stofffarbe}, and \texttt{grifffest} and the double-t (modern) spelling of words such as |Mannschafttest|. @@ -280,136 +291,136 @@ Finally, all \pkg{babel}-style ``\Verb+"|+'' ligature-suppressing shortcuts shou -\section[The selnolig package's approach to breaking up ligatures]{The \pkg{selnolig} package's approach to breaking up ligatures} +\section[The selnolig package's approach to breaking up ligatures]{The \pkg{selnolig} package's approach to breaking up ligatures} \label{sec:approach} \subsection[Free, derivational, and inflectional morphemes]{Free, derivational, and inflectional morphemes, and their relationship to ligature suppression} -Good typography supports and enhances the readability of the typeset text. There are obviously a great many facets to how typography may contribute to good readability. One aspect is the ease with which readers can discern the \emph{meaning} of words. Because a typographic ligature groups two or more characters into a composite glyph, it is natural for the reader to \enquote{read} a ligature as forming a single unit and, moreover, to associate the ligature with some part of the word's meaning. Whereas this mental association of visual unity and meaning can be helpful when it comes to discerning the meaning of single-morpheme words,\footnote{Examples of single-morpheme words containing a ligature are off, fit, flat, office, baffle, left, act, cost, and spin.} it \emph{may} detract from the word's readability if the word is composite and the ligature happens to span a morpheme boundary. Ligatures that span a morpheme boundaries \emph{may} impair the word's readability if readers experience the need to do a \enquote{double take} to separate out the morphemes used in the composite word. +Good typography supports and enhances the readability of the typeset text. There are obviously a great many facets to how typography may contribute to good readability. One aspect is the ease with which readers can discern the \emph{meaning} of the typeset text and its constituent parts\textemdash words. Because a typographic ligature groups two or more characters into a composite glyph, it is natural for the reader to \enquote{read} a ligature as forming a single unit and, moreover, to associate the ligature with some part of the word's meaning. Whereas this mental association of visual unity and meaning can be helpful when it comes to discerning the meaning of single-morpheme words,\footnote{Examples of single-morpheme words containing a ligature are off, fit, flat, office, baffle, left, act, cost, and spin.} it \emph{may} detract from the word's readability if the word is composite and the ligature happens to span a morpheme boundary. Ligatures that span a morpheme boundaries \emph{may} impair the word's readability if readers experience the need to do a \enquote{double take} to separate out the morphemes used in the composite word. What exactly are morphemes? Briefly put, morphemes are the smallest linguistic units within a word that carry \emph{meaning}. Because words are, by definition, standalone units of text, each word contains at least one morpheme.\footnote{Please don't try to get me involved in a discussion of what it may mean to have words without meaning\dots} Morphemes are classified as \emph{free} if they can stand alone as words (e.g., cat, dog, sea, see), and as \emph{bound} if they can not. E.g., the letter~|s| in the words cats, dogs, and rivers indicates the plural forms of the associated nouns; because the |s| particle cannot stand alone as a (meaningful) word, it is a bound morpheme. +\enlargethispage{0.5\baselineskip} + Bound morphemes can be divided further into derivational and inflectional morphemes. A \emph{derivational} morpheme changes the meaning of the associated free morpheme in a fundamental way. E.g., the \enquote{un} in \enquote{untrue} reverses the meaning of the associated free morpheme \enquote{true}, and the \enquote{ful} in \enquote{shelfful} changes the word's meaning from a noun to a quantity measure (\enquote{two shelffuls of books on typography}). -An \emph{inflectional} morpheme signifies a less fundamental change in meaning. In nouns (and, depending on the language, adjectives as well), inflectional morphemes indicate plural forms (child vs. children, cat vs. cats) and other forms of declination.\footnote{In modern English, the virtually sole type of declination is to indicate plural status. In other languages, declination can also occur to indicate genitive, dative, accusative,~etc. forms of nouns \emph{and} adjectives. E.g., in German one says das schöne Kind, des schönen Kindes, dem schönen Kinde,~etc. The particles |en|/|es| and |en|/|e| represent inflectional morphemes associated with the genitive and dative forms.} In verbs, inflectional morphemes indicate conjugation, such as a change in tense or of the subject performing the action implied by the verb. E.g., call vs. called, walk vs. walked, and also \enquote{swim} vs. \enquote{swims}, etc. +An \emph{inflectional} morpheme signifies a less fundamental change in meaning. In nouns (and, depending on the language, adjectives as well), inflectional morphemes indicate plural forms (child vs. children, cat vs. cats) and other forms of declination.\footnote{In modern English, the virtually sole type of declination is to indicate plural status. In other languages, declination can also occur to indicate genitive, dative, accusative,~etc. forms of nouns \emph{and} adjectives. E.g., in German one says das schöne Kind, des schönen Kindes, dem schönen Kinde,~etc. The particles |en|/|es| and |en|/|e| represent inflectional morphemes associated with the genitive and dative forms of the nouns and adjectives.} In verbs, inflectional morphemes indicate conjugation, such as a change in tense or of the subject performing the action implied by the verb. E.g., call vs. called, walk vs. walked, and also \enquote{swim} vs. \enquote{swims}, etc. + +Words containing more than one morpheme can contain either \enquote{just} free morphemes\textemdash rooftop, newspaper, etc.\textemdash or free and bound morphemes joined together\textemdash untrue, shelfful, childish, etc. Bound morphemes in a word generally occur as prefixes or suffixes to the word's \enquote{main part} or \enquote{stem} (the free morpheme). Prefixes almost invariably represent derivational morphemes (e.g., untrue, review, perform). Suffixes, in contrast, can represent either derivational \emph{or} inflectional morphemes. For instance, the suffixes |like| and |less| in dwarflike and leafless are derivational morphemes, whereas the suffix~|ed| in hounded and laughed is an inflectional morpheme. -Words containing more than one morpheme can contain either \enquote{just} free morphemes\textemdash rooftop, newspaper, etc.\textemdash or free and bound morphemes joined together\textemdash untrue, shelfful, childish, etc. The bound morphemes in a word generally occur either as a prefix or a suffix to the word's \enquote{main part} or \enquote{stem} (the free morpheme). Prefixes almost invariably represent derivational morphemes (e.g., untrue, review, perform). Suffixes, in contrast, can represent either derivational or inflectional morphemes. For instance, the suffixes |like| and |less| in dwarflike and leafless are derivational morphemes, whereas the suffix~|ed| in hounded and laughed is an inflectional morpheme. +It is important to realize that not all ligatures that span morpheme boundaries are equally inimical to good readability. Consider, say, the word \emph{umbrellas}, which contains the ligature~\emph{as}. Note that this ligature crosses the morpheme boundary between the free morpheme \emph{umbrella} and the suffix~\emph{s}. Nevertheless, I'm quite confident that few will claim that the presence of the \emph{as} ligature detracts from the readability of the word \emph{umbrellas}. I believe there are two reasons why this particular word's readability is not impaired by the presence of a ligature that spans a morpheme boundary. First, the suffix~\emph{s} is an inflectional morpheme: it \enquote{merely} serves to change the noun's state from singular to plural; clearly, most of the composite word's meaning is conveyed by the free morpheme \emph{umbrella}. Second, the ligature occurs at the very \emph{end} of the word rather than, say, closer to the beginning or middle of the word. -It is important to realize that not all ligatures that span morpheme boundaries are equally inimical to good readability. Consider, say, the word \emph{umbrellas}, which contains the ligature~\emph{as}. Note that this ligature crosses a morpheme boundary, between the free morpheme \emph{umbrella} and the suffix~\emph{s}. Nevertheless, I'm quite confident that few will claim that the presence of the \emph{as} ligature detracts from the readability of the word \emph{umbrellas}. I believe there are two reasons why this particular word's readability is not impaired by the presence of a ligature that spans a morpheme boundary. First, the suffix~\emph{s} is an inflectional morpheme: it \enquote{merely} serves to change the noun's state from singular to plural; clearly, most of the composite word's meaning is conveyed by the free morpheme \emph{umbrella}. Second, the ligature occurs at the very \emph{end} of the word rather than, say, closer to the beginning or middle of the word. +The \pkg{selnolig} package adopts the following broad principles: First, ligatures that cross the boundaries of two free morphemes are always suppressed. Second, ligatures that cross the boundary between a free morpheme and a derivational morpheme are also suppressed\textemdash with certain exceptions that are explained below. Third, ligatures that span the boundary between a free morpheme and an inflectional morpheme are not suppressed. In \cref{sec:german-rules} below, the third principle is shown to be particularly relevant for decisions related to the (non)suppression of certain ft and fft ligatures in German texts. -The \pkg{selnolig} package adopts the following broad principles: First, ligatures that cross the boundaries of two free morphemes are always suppressed. Second, ligatures that cross the boundary between a free morpheme and a derivational morpheme are also suppressed\textemdash with certain exceptions. Third, ligatures that span the boundary between a free morpheme and an inflectional morpheme are not suppressed. As will be shown below, this third principle is particularly relevant for decisions related to the suppression (and non-suppression) of ft and fft ligatures in German texts. +Observe that morphemes (which convey meaning) need not coincide with \emph{syllables} (which convey pronunciation and sound). Indeed, a word can contain several syllables but consist of only one morpheme (e.g., apple, orange, banana), or it can consist of only one syllable but contain more than one morpheme (e.g., cats, dogs, reads, reeds, seas, and sees). The fact that a ligature may span a syllable boundary within a word does not, by itself, imply that this ligature should be suppressed. -It is worth observing that morphemes (which convey meaning) need not coincide with \emph{syllables} (which convey pronunciation and sound). Indeed, a word can contain several syllables but consist of only one morpheme (e.g., apple, orange, banana), or it can consist of only one syllable but contain more than one morpheme (e.g., cats, dogs, reads, reeds, seas, and sees). The fact that a ligature may span a syllable boundary within a word (and, possibly, a hyphenation point as well) does not, by itself, imply that this ligature should be suppressed. To wit, consider the German adjective \enquote{straff} and its associated forms straffe, straffer, straffen, etc.: the free morpheme in all of these words is |straff|, while the suffixes |e|, |er|, and |en| represent inflectional morphemes. Even though there's a syllable boundary between the two |f|s for all modified forms of the adjective straff, the ff-ligature is used for all forms because it doesn't span a \emph{morpheme} boundary. If TeX's hyphenation algorithm decides it needs to hyphenate the word straffen as s\kern0pt traf-fen to generate a good line break, it can do so\textemdash and break up the ligature in the process. There's no need, though, to break up a ligature pre-emptively just because the word might get hyphenated in the middle of the ligature. +\enlargethispage{1\baselineskip} +To wit, consider the German adjective \enquote{straff} and its associated forms straffe, straffer, straffen, etc.: the free morpheme in all of these words is |straff|, while the suffixes |e|, |er|, and |en| represent inflectional morphemes. Even though there's a syllable boundary between the two |f|s for all modified forms of the adjective straff, the ff-ligature is used for all forms because it doesn't span a \emph{morpheme} boundary. If TeX's hyphenation algorithm decides it needs to hyphenate the word straffen as s\kern0pt traf-fen in some paragraph to generate a well-typeset paragraph, it can of course do so\textemdash and break up the ligature in the process. There's no need, though, to break up a ligature pre-emptively just because the word \emph{might} get hyphenated. -\subsection{Ligature suppression rules: English language case} + +\subsection{Ligature suppression rules: English language case} \label{sec:english-rules} Unless the |broadf| option is set (see below), typographic ligatures are suppressed as follows: \begin{itemize} \item if two free morphemes are joined: \uselig{halfline} $\to$ halfline, \uselig{shelflife} $\to$ shelflife, \uselig{rooftop}~$\to$ rooftop, \uselig{halftone} $\to$ halftone, \uselig{wolftrap} $\to$ wolftrap, \uselig{houndstooth} $\to$ houndstooth, \uselig{arctan}\-gent~$\to$ arctangent, \uselig{newspaper}~$\to$ newspaper, \uselig{clothespin} $\to$ clothespin, \emph{se\uselig{as}trand} $\to$ \emph{seastrand}, etc. -\item if a prefix (usually either a free or a derivational morpheme) and main word are joined: \uselig{offload} $\to$ offload, \uselig{mistrust}~$\to$ mistrust, \uselig{display}~$\to$ display, etc. +\item if a prefix (usually either a free or a derivational morpheme) and main word are joined: \uselig{offload} $\to$ offload, \uselig{mistrust}~$\to$ mistrust, \uselig{display}~$\to$ display, \uselig{suspend}~$\to$ suspend, etc. + +\item if a main word and a suffix are joined, \emph{if} the suffix is a derivational morpheme that begins with either an~f or an~l other than \enquote{ly}: \uselig{shelfful}~$\to$ shelfful, \uselig{leafless} $\to$ leafless, \uselig{dwarflike}~$\to$ dwarflike, \uselig{leaflet}~$\to$ leaflet, etc. -\item if a main word and a suffix are joined, \emph{if} the suffix is a derivational morpheme that begins with an~f or an~l (other than \enquote{ly}): \uselig{shelfful}~$\to$ shelfful, \uselig{leafless} $\to$ leafless, \uselig{dwarflike}~$\to$ dwarflike, \uselig{leaflet}~$\to$ leaflet, etc. +\item The ft ligature is also suppressed in words that end in |fth|: \uselig{fifth}~$\to$ fifth, \uselig{twelfth}~$\to$ twelfth. Note that the particle |th| contained in these words is a derivational morpheme. Moreover, a font may provide a ligature for the \emph{th} character pair, in which case one should definitely use it for these words, i.e., typeset them as \emph{fifth} and \emph{twelfth} rather than as \emph{\uselig{fifth}} and \emph{\uselig{twelfth}}. Note that use of the trailing \emph{th} ligature necessitates the suppression of the leading\, \emph{ft} ligature. -\item The ft ligature is also suppressed in words that end in |fth|: \uselig{fifth}~$\to$ fifth, \uselig{twelfth}~$\to$ twelfth. Note that the particle |th| is a derivational morpheme. Moreover, in English the~|th| character pair is pronounced in a distinctive way. It thus seems inadvisable to obscure its presence with an ft ligature. \end{itemize} -In addition, if the \opt{broadf} option is set, the \pkg{selnolig} package will suppress +If the \opt{broadf} package option is set, the \pkg{selnolig} package will also suppress \begin{itemize} -\item fi and ffi ligatures that arise if the main word ends in~f and the suffix starts with an~i, regardless of whether the suffix is a derivational or an inflectional morpheme: elfin, selfish, golfing, surfing, beefier, fluffily, goofiness, standoffish, jiffies, buffiest,~etc. Setting the \opt{broadf} option also instructs \pkg{selnolig} to split up ffi ligatures in words such as fluffiness and fluffily; -\item fl and ffl ligatures in words such as chiefly, briefly, and gruffly; and -\item ft ligatures in words such as fifty and fiftieth.\footnote{If ligatures were not disabled for these words, they would be typeset as \uselig{chiefly}, \uselig{briefly}, \uselig{gruffly}, \uselig{fifty}, and \uselig{fiftieth}, respectively.} +\item fi and ffi ligatures if the main word ends in~f or~ff and the suffix starts with an~i, regardless of whether the suffix is a derivational or an inflectional morpheme: elfin, selfish, golfing, surfing, beefier, fluffily, fluffiness, goofiness, standoffish, jiffies, buffiest,~etc.; +\item fl and ffl ligatures in adverbs ending in |fly| and |ffly|, such as chiefly, briefly, and gruffly; and +\item ft ligatures in words such as fifty and fiftieth.\footnote{If the |broadf| option were \emph{not} set, these words would be typeset as \uselig{chiefly}, \uselig{briefly}, \uselig{gruffly}, \uselig{fifty}, and \uselig{fiftieth}, respectively.} \end{itemize} -Note that the option \opt{broadf} is \emph{not} enabled by default. This is because I believe that any gain in readability that might result from breaking up the f-ligatures caught by the rules enabled by the \opt{broadf} option would be minor and, importantly, outweighed by the visual clashes created by the unligated~f\kern0pt i, ff\kern0pt i, f\kern0pt l, and ff\kern0pt l glyphs. +Note that the option \opt{broadf} is \emph{not} enabled by default. This is because I believe that any gain in readability that might result from breaking up the f-ligatures caught by the rules enabled by the \opt{broadf} option would be minor and more than offset by the visual clashes created by unligated~f\kern0pt i, ff\kern0pt i, f\kern0pt l, and ff\kern0pt l glyphs. +If the \opt{hdlig} package option is set, two additional ligature-suppressing principles are activated: +\begin{itemize} +\item The st and sp ligatures are broken up for certain place names that end in |stown|, |ston| (but not \enquote{Houston}), and |sport|. Examples: Charleston and Hyannisport (not \uselig{Hyannisport}!). Likewise, the \emph{\uselig{\ebg sk}} ligature is broken up for place names such as \emph{\ebg Catskills} and \emph{\ebg Peekskill}. + +\item The~st and~sp ligatures are also suppressed for words with Greek roots that contain the \opt{sth} and \opt{sph} character triples, such as isthmus and atmosphere. Typesetting these words as \uselig{isthmus} and \uselig{atmosphere}, i.e., with the very distinctive looking st and sp ligatures, risks reducing their readability, because doing so would obscure the presence of the \opt{th} and \opt{ph} character pairs which derive from single Greek letters~$\theta$/$\vartheta$ and $\phi$/$\varphi$, respectively. For these words, then, it seems advisable to suppress the st and sp ligatures even though, strictly speaking, no morpheme-crossing issues are involved. +\end{itemize} -\subsection{Ligature suppression rules: German language case} +\subsection{Ligature suppression rules: German language case} \label{sec:german-rules} For German words, the following principles apply when it comes to deciding which ligatures to break up and which ones to permit. These rules are built mainly from statements found in the \emph{Duden} and various websites that have taken an interest in this subject, with adaptations for the ft and fft ligatures. \begin{itemize} -\item Case 1: Joining of two free morphemes: Ligatures are suppressed if they span the boundary of two \emph{free} morphemes. Examples: -Schil\uselig{fi}nsel $\to$ Schilfinsel, -%Zup\uselig{fi}nstrument $\to$ Zupfinstrument, +\item Case 1: Joining of two free morphemes: Ligatures are suppressed. Examples: +\uselig{Schilfinsel} $\to$ Schilfinsel, +%\uselig{Zupfinstrument} $\to$ Zupfinstrument, \uselig{Baustoffingenieur} $\to$ Baustoffingenieur, \uselig{Wasserstoffionen} $\to$ Wasserstoffionen; \uselig{Impffurcht} $\to$ Impffurcht, \uselig{Senffabrik} $\to$ Senffabrik, -Ab\-lau\uselig{fl}ogik $\to$ Ablauflogik, -Schor\uselig{ffl}ecken $\to$ Schorfflecken; +Ab\-\uselig{lauflogik} $\to$ Ablauflogik, +\uselig{Schorfflecken} $\to$ Schorfflecken; \uselig{fünffing}\-rig $\to$ fünffingrig; \uselig{Brieftaube} $\to$ Brieftaube, \uselig{elfteilig} $\to$ elfteilig, \uselig{Stofftasche} $\to$ Stofftasche, etc. -\item Case 2: Joining of a prefix (whether a free or a derivational morpheme) ending in~|f| and a main word (free morpheme) starting with~|b|, |f|, |h|, |i|, |j|, |k|, |l|, or~|t|. Ligatures are suppressed in this case as well. In German, by far the most common prefix that gives rise to the need to suppress various f-ligatures is the word \enquote{auf}, as in aufbrechen, auffassen, Aufführung, auffliegen, auffischen, aufhören, aufisst, aufjaulen, aufklingen, Auflage, Auftrag, auftreten, etc. +\item Case 2: Joining of a prefix (whether a free or a derivational morpheme) ending in~|f| and a main word (free morpheme) starting with~|b|, |f|, |h|, |i|, |j|, |k|, |l|, or~|t|: Ligatures are suppressed. In German, by far the most common prefix that gives rise to the need to suppress various f-ligatures is the word \enquote{auf}, as in aufbrechen, auffassen, Aufführung, auffliegen, auffischen, aufhören, aufisst, aufjaulen, aufklingen, Auflage, Auftrag, auftreten, etc. \item Case 3: Joining of a main word (free morpheme) ending in \enquote{f} or \enquote{ff} and a suffix (either a derivational or an inflectional morpheme) starting with \enquote{f}, \enquote{i}, \enquote{l}, or~\enquote{t}. \begin{itemize} -\item Case 3a: Suffixes that start with an \enquote{f}, e.g., |-fach| and |-faltig|. Examples: fünffach and zwölffaltig. The ff-ligature should be suppressed. +\item Case 3a: Suffixes that start with an \enquote{f}, e.g., |-fach| and |-faltig|: The ff-ligature is suppressed. Examples: fünffach and zwölffaltig. + +\item Case 3b: Suffixes (bound morphemes) that start with an \enquote{i}, such |-ig|, |-in|, and |-isch|: The~fi and~ffi ligatures are \emph{not} suppressed. Examples: streifig, äffisch, Chefin, Chefinnen. -\item Case 3b: Suffixes that start with an \enquote{i}, such |-ig|, |-in|, and |-isch|; these suffixes can be either derivational or inflectional morphemes. Examples: streifig, äffisch, Chefin, Chefinnen. The fi and ffi ligatures should \emph{not} be suppressed. +I haven't found a clear justification for this rule so far. I assume the rule is there because unligated f\breaklig i and ff\breaklig i character pairs are potentially sufficiently unsightly to make them stand out as an infraction against good typography that's even more grievous than having fi and ffi ligatures that span the boundary between a main word and a suffix. -I haven't found a clear justification for this rule so far. I assume it is there because unligated f\breaklig i character pairs may be sufficiently unsightly as to constitute an infraction against good typography that's even more grievous than having fi and ffi ligatures span the boundary between a main word and a suffix. +\item Case 3c: Suffixes (free or bound morphemes) that start with an \enquote{l}, e.g., |-lich|, |-ling|, |-lein| and |-los|: The fl-ligature is suppressed. Example words: trefflich, höflich, Prüfling, Köpflein, and s\breaklig traflos. -\item Case 3c: Suffixes (free or bound morphemes) that start with an \enquote{l}, e.g., |-lich|, |-ling|, |-lein| and |-los|. Example words: trefflich, höflich, Prüfling, Köpflein, and s\breaklig traflos. The fl-ligature is suppressed in all of these instances. +\item Interlude~I: In ambiguous cases that could give rise to fl-ligatures that involve certain suffixes, according to \emph{Duden} preference should be given to \enquote{how the syllables are pronounced and how a word would be hyphenated}, leading to a suppression of the fl-ligature. For instance, the fl-ligature is suppressed in Verzweiflung, Bezweifler, schweflig, and würflig. Note that the real suffixes in these words are |ung|, |er|, and~|ig|, respectively, rather than |lung|, |ler|, and~|lig|.\footnote{% +In my opinion, the rationale generally given for suppressing the fl-ligature in these cases\textemdash reliance on how the syllables are divided and how the composite words are hyphenated\textemdash is not entirely satisfactory. Morphologically speaking, the words Schwefel, Würfel, Zweifel, etc.\ contain two morphemes: a stem and the \emph{derivational} morpheme~|el|: \Verb+Schwef|el+, \Verb+Würf|el+, and \Verb+Zweif|el+, etc. It is therefore not necessary, in my opinion, to create a separate rule to justify the (non-)use of the fl-ligature in these cases. One could, instead, rely on the presence of two morphemes to motivate the suppression of the fl-ligature for words such as schweflig, teuflisch, würfle, and Verzweiflung, as their components are \Verb+schwef|[e]l|ig+, etc. -\item Interlude I: In ambiguous cases that could give rise to fl-ligatures that involve certain suffixes, preference should be given\textemdash according to \emph{Duden}\textemdash to \enquote{how the syllables are pronounced and how a word would be hyphenated}, leading to a suppression of the fl-ligature. For instance, the fl-ligature is suppressed in Verzweif\-lung, Bezweifler, schweflig, and würflig; note that the real suffixes in these words are |ung|, |er|, and |ig|, respectively, rather than |lung|, |ler|, and |lig|.\footnote{% -In my opinion, the rationale given for the suppression of the fl-ligature in these cases\textemdash reliance on how the syllables are divided and how the composite words are hyphenated\textemdash is not entirely satisfactory because, morphologically speaking, the words Schwefel, Würfel, Zweifel, etc.\ contain two morphemes: a stem and the \emph{derivational} morpheme~|el|: \Verb+Schwef|el+, \Verb+Würf|el+, and \Verb+Zweif|el+, etc. It is therefore not necessary, in my opinion, to create a separate rule to justify the (non-)use of the fl-ligature in these cases. One could, instead, rely on the presence of two morphemes to motivate the suppression of the fl-ligature for words such as schweflig, teuflisch, würfle, and Verzweiflung, as their components are \Verb+schwef|[e]l|ig+, etc. However, I believe it's fair to say that most modern German speakers would barely be aware of the fact that the |el| particle constitutes a separate morpheme in words such as Würfel and Griffel, and that they would be entirely unaware of its presence in words such as Schwefel and Zweifel. At any rate, the typographical convention \emph{not} to use the fl-ligature in words such as schweflig, Verzweiflung, and würflig does \emph{not} appear to be based on the fact that letters~f and~l in these words belong to different morphemes.} +It's fair to say, though, that most modern German speakers would be only vaguely cognizant of the fact that the~|el| particle constitutes a separate morpheme in words such as Würfel and Griffel, and that they would be entirely unaware of this fact for words such as Schwefel and Zweifel. To be sure, the typographical convention of \emph{not} using the fl-ligature in words such as schweflig, Verzweiflung, and würflig does \emph{not} appear to be based on the fact that letters~f and~l in these words belong to different morphemes.} -This convention may also be applied to justify the non-use of the fl-ligature in words such as knifflig and mufflig as well as in the present-tense/first-person-singular forms of verbs such as büffeln, löffeln, schaufeln, stiefeln, verteufeln, and zweifeln: they are typeset \emph{without} the fl- or ffl-ligature, i.e., as büffle, löffle, schaufle, stiefle, verteufle, and zweifle, respectively. +This convention may also be applied to justify the non-use of the fl-ligature in words such as knifflig and mufflig as well as in the present-tense\slash first-person-singular forms of the verbs büffeln, löffeln, schaufeln, stiefeln, verteufeln, and zweifeln: these form are typeset \emph{without} the fl/ffl-ligature, i.e., as büffle, löffle, schaufle, stiefle, verteufle, and zweifle, respectively. -\item Interlude II: If a word \emph{ends} with an |fl| character pair because an abbreviation is in effect, \emph{Duden} says it's OK to use the fl ligature even if the~f and~l characters belong to different morphemes. E.g., in the abbreviation \enquote{Aufl.}, the fl-ligature \emph{is} employed even though the ligature should not be used for the full, unabbreviated form of the word (\emph{viz.}, Auflage). +\item Interlude~II: If a word \emph{ends} with an |fl| character pair because an abbreviation is in effect, \emph{Duden} says it's OK to use the fl-ligature even if the~f and~l characters belong to different morphemes. E.g., in the abbreviation \enquote{Aufl.}, the fl-ligature \emph{is} employed even though the ligature should not be used for the full, unabbreviated form of the word (\emph{viz.}, Auflage). Although not mentioned explicitly by \emph{Duden}, I believe this convention may be extended to justify the use of the ff-ligature in the abbreviated word \enquote{Auff.} (full form: Aufführung\textemdash no ff ligature) and of the ft-ligature in \enquote{Auft.} (full form: Auftrag\textemdash no ft ligature either). -This convention further suggests (implies?) that it's permissible (a)~to use the ff ligature in surnames that end in ff, such as Orff and Hausdorff, and (b)~to use the ffi- and ffl-ligatures in abbreviated names such as Steffi and Steffl. +This convention further suggests (implies?) that it's permissible (a)~to use the ff ligature in surnames that end in ff, such as Orff and Hausdorff, and (b)~to use the ffi- and ffl-ligatures in abbreviated names, such as Steffi and Steffl. -\item Case 3d: Word stem (free morpheme) ending in~|f| and derivational or inflectional morphemes starting with~|t|. Unfortunately, not much official wisdom seems to exist to guide this case, possibly because in German ft and~fft ligatures are not (yet?) used as widely as are the other f-ligatures. The following rules should thus be understood to be somewhat provisional. +\item Case 3d: Word stem (free morpheme) ending in~|f| and derivational or inflectional morphemes starting with~|t|. Unfortunately, not much official wisdom seems to exist to guide this case, possibly because the ft and~fft ligatures are not (yet?) used as widely as are the other f-ligatures. The following rules should thus be understood to be somewhat provisional. \begin{itemize} -\item The convention mentioned in \enquote{Interlude II} above, about not breaking up an fl-ligature if it occurs at the very end of a word, may be adapted to the case of~ft and~fft ligatures: these ligatures are allowed \emph{if} they occur at the very ends of words (and at the ends syllables), as in verschärft, gestreift, gerafft, Dahingerafftsein, unbedarft, and Unbedarftheit. Note that in these cases, the ft and fft ligatures \emph{do} span a morpheme boundary: the letter~|t| is an \emph{inflectional} morpheme that indicates a form of conjugation of the associated verb (viz., past tense and/or past participle). +\item The convention mentioned in \enquote{Interlude II} above, about not breaking up an fl-ligature if it occurs at the very end of a word, applies to the case of~ft and~fft ligatures as well, i.e., they are not suppressed \emph{if} they occur at the very ends of words (or at the ends syllables), as in verschärft, gestreift, gerafft, Dahingerafftsein, unbedarft, and Unbedarftheit. -\item Should ft and fft ligatures be broken up in the past-tense and past-participle forms of verbs that do not end in~ft but, rather, in -fte, -ften, -ftes, -ftest, etc? Example words: |streifte|, |schlürftest|, and |rafften|. Because these suffixes are merely \emph{inflectional} rather than derivational morphemes, the \pkg{selnolig} package takes the approach of \emph{not} breaking up the~ft and~fft ligatures in these cases. Thus, the words will be typset as streifte, schlürftes\kern0pt t, and rafften rather than as streif\breaklig te, schlürf\breaklig tes\kern0pt t, and raff\breaklig ten.\footnote{I will concede, again, that I haven't yet come across any kind of authoritative discussion of this specific case. Should someone be able to furnish a good counterargument to the setting proposed here, I would be happy to change it.} +Note that in these cases the ft and fft ligatures \emph{do} span a morpheme boundary: the letter~|t| is an \emph{inflectional} morpheme that indicates a form of conjugation of the associated verb (viz., past tense and/or past participle). -\item It would also seem OK to use the ft-ligature in expressions such as \enquote{zu fünft} and \enquote{die zwölftschnells\kern0pt te Sprinterin Bayerns}: even though the |t| character represents a derivational morpheme, the ligature occurs at \emph{end} of the word or word fragment. In the case of the word \enquote{zwölftschnells\breaklig te}, the argument for keeping the ft ligature is based on the observation that the entire fragment \enquote{zwölft} serves a prefix to \enquote{schnells\kern0pt te}. +\item Should ft and fft ligatures be broken up in the past tense and past-participle forms of verbs that do not end in~ft but in -fte, -ften, -ftes, -ftest, etc? Example words: |streifte|, |schlürftest|, and |rafften|. Because these suffixes are merely \emph{inflectional} rather than derivational morphemes, the \pkg{selnolig} package does \emph{not} break up the~ft and~fft ligatures in these cases either. Thus, the words will be typset as streifte, schlürftes\kern0pt t, and rafften rather than as streif\breaklig te, schlürf\breaklig tes\kern0pt t, and raff\breaklig ten.\footnote{I haven't yet come across any kind of authoritative discussion of this specific case. Should someone be able to furnish a good counterargument to the setting proposed here, I would be happy to change the settings accordingly.} + +\item It would also seem OK to use the ft-ligature in expressions such as \enquote{zu fünft} and \enquote{die zwölftschnellste Sprinterin Bayerns}: Even though the |t| character here represents a derivational morpheme, the ligature occurs at very end of the word or word fragment. In the case of the word \enquote{zwölftschnellste}, the argument for keeping the ft~ligature is based on the fact that the entire fragment \enquote{zwölft} serves a prefix to \enquote{schnellste}. In contrast, the ft-ligature should \emph{not} be used in \enquote{Beethoven's Fünfte Sinfonie} and \enquote{zum elften Mal}. Observe that the argument in favor of breaking up the ft-ligature in the words \enquote{Fünfte} and \enquote{elften} is \emph{not} related to the fact that the words happen to have two syllables and that the syllables are divided between the letters~|f| and~|t|. \end{itemize} -\item Case 4: A free morpheme ends in~\enquote{ft} (e.g., Saft, Kraft, Luft, Duft, Haft, and Vernunft) and is joined either to another free morpheme or to a suffix representing either a derivational or an inflectional morpheme. Example words: \opt{Saftladen}, \opt{Säfte}, \opt{Kraftfahrzeug}, \opt{Luftagentur}, \opt{duftend}, \opt{bekräftigen}, \opt{Haftung}, and \opt{ver\-nünftig}. Because the |ft| character pair doesn't cross a morpheme boundary, the \pkg{selnolig} package does \emph{not} break up the ft ligature. Thus, the words are typeset as Saftladen, Säfte, Kraftfahrzeug, Luftagentur, duftend, bekräftigen, Haftung, and ver\-nünftig. The fact that a syllable boundary occurs between the letters~|f| and~|t| in some of these words should not affect the decision whether or not to employ the ligature. - +\item Case 4: A free morpheme \emph{ends} in~|ft| (e.g., Saft, Kraft, Luft, Duft, Haft, and Vernunft) and is joined either to another free morpheme or to a suffix that's a bound morpheme. Example words: \opt{Säfte}, \opt{Saftladen}, \opt{Kraftfahrzeug}, \opt{Luftagentur}, \opt{duftend}, \opt{bekräftigen}, \opt{Haftung}, and \opt{vernünftig}. Because the~|ft| character pair doesn't cross a morpheme boundary, the \pkg{selnolig} package does \emph{not} break up the~ft ligature. Thus, the words are typeset as Saftladen, Säfte, Kraftfahrzeug, Luftagentur, duftend, bekräftigen, Haftung, and vernünftig. The fact that a \emph{syllable boundary} occurs between the letters~|f| and~|t| in some of these words should not affect the decision whether or not to employ the ft (or~fft) ligature. \end{itemize} \end{itemize} -\section[Structure of the selnolig package]{Structure of the \pkg{selnolig} package} - -\subsection{Components of the package} - -The \pkg{selnolig} package has the following components: -\begin{itemize} -\item The main \enquote{driver} file is called \pkg{selnolig.sty}. It loads several other files and sets up the package's main user macros, \cmmd{nolig}, \cmmd{keeplig}, and \cmmd{breaklig}. These macros are explained in more detail in the following subsection. -\item The package's lua code is in the file \pkg{selnolig.lua}. -\item The ligature suppression rules for English and German language documents are contained in the files \pkg{selnolig-english-patterns.sty} and \pkg{selnolig-english-patterns.sty}. -\item Supplemental hyphenation exception patterns, mostly for composite words that involve ligatures that are suppressed by the package's \cmmd{nolig} rules, are contained in the files \pkg{selnolig-english-hyphex.sty} and \pkg{selnolig-english-hyphex.sty}. -\item The user guide\textemdash the document you're reading right now\textemdash is provided in the file \pkg{selnolig.pdf}; the associated source code is in the file \pkg{selnolig.tex}. -\item Ancillary files: the files \pkg{selnolig-english-test.tex} and \pkg{selnolig-german-test.tex} load the \pkg{selnolig} package as well as either \pkg{selnolig-english-wordlist.tex} or \pkg{selnolig-german-wordlist.tex}. They serve to demonstrate the output of the \pkg{selnolig} package when run on lists of English or German words that are candidates for non-use of ligatures. The files \pkg{selnolig-english-test.pdf} and \pkg{selnolig-german-test.pdf} contain the results of compiling the test programs. -Assuming your \TeX\ distribution is either \TeX Live or MiK\TeX, you can access these files by typing \Verb+texdoc selnolig-english-test+ or \Verb+texdoc selnolig-german-test+ at a command prompt. - -\end{itemize} - -\subsection{The package's user commands} \label{sec:syntax} +\section[Structure of the selnolig package]{Structure of the \pkg{selnolig} package} \label{sec:structure} -The file \pkg{selnolig.sty} should be loaded with a \cmmd{usepackage} statement, generally with one or more options; see \cref{sec:options} for a discussion of the available options. +\subsection{The main user commands} \label{sec:syntax} -After setting up several Boolean switches to structure the processing of options, the package loads the file \pkg{selnolig.lua}, which contains the package's lua code. The package then sets up several user macros. The four main user macros are \cmmd{nolig}, \cmmd{keeplig}, \cmmd{uselig}, and \cmmd{breaklig}; the first two are meant to be used on a document-wide basis, while the latter two should be used to meet \emph{ad~hoc} typesetting needs. +The four main user macros of the \pkg{selnolig} package are \cmmd{nolig}, \cmmd{keeplig}, \cmmd{uselig}, and \cmmd{breaklig}. The first two macros are meant to be used in the preamble, to set up ligature-suppression rules on a document-wide basis. The latter two may be used, as needed, within the body of the document on an \emph{ad~hoc} basis to override rules set up by \cmmd{nolig} and \cmmd{keeplig} instructions. @@ -422,8 +433,7 @@ The package's main user macro is called \cmmd{nolig}. Each \cmmd{nolig} instruct \end{Verbatim} suppresses the ff-ligature in words such as \enquote{shelfful}, \enquote{bookshelfful}, and \enquote{selffulfilling}. -It is possible to indicate more than one ligature suppression point in the second argument of a \cmmd{nolig} rule. For instance, one \emph{could} specify the rule \Verb+\nolig{Auflaufform}{Auf|lauf|form}+ to suppress both the fl- and the ff-ligature in the word Auflaufform (and its plural form, Auflaufformen). For added flexibility, though, the \pkg{selnolig} package actually uses two separate rules to suppress the two ligatures in this word; see also \cref{sec:debugon}. - +It is possible to indicate more than one ligature suppression point in the second argument of a \cmmd{nolig} rule. For instance, one \emph{could} specify the rule \Verb+\nolig{Auflaufform}{Auf|lauf|form}+ to suppress both the fl- and the ff-ligature in the word Auflaufform and its plural form, Auflaufformen. For added flexibility, though, the \pkg{selnolig} package actually uses two separate \cmmd{nolig} rules to suppress the two ligatures in this word; see also \cref{sec:debugon}. It is possible to use Lua-style wildcard characters in the search string, as long as these characters occur \emph{after} the non-ligation point. For example, the file \pkg{selnolig-german-patterns.sty} employs the rules \begin{Verbatim} @@ -432,7 +442,7 @@ It is possible to use Lua-style wildcard characters in the search string, as lon \end{Verbatim} to search for words that contain the strings \opt{Dorff} and \opt{dorff} followed by a letter in the set |aäeiloöruü|.\footnote{These particular search strings are used so as not to suppress the ff-ligatures in words that \emph{end} in either \opt{Dorff} or \opt{dorff}, such as is the case with the surnames Dorff and Hausdorff.} Incidentally, it is not absolutely necessary, in the second argument of the \cmmd{nolig} command, to provide any material \emph{after} the vertical bar that indicates the non-ligation point. However, the readability of your \cmmd{nolig} rules may suffer if you suppress that material. -If you examine the \cmmd{nolig} rules provided in the files \pkg{selnolig-german-patterns.sty} and \pkg{selnolig-english-patterns.sty}, you'll notice quickly that there's some redundancy built into the package's ligature suppression rules. For instance, the need to suppress the ff-ligature in the word \enquote{auffallen} is catered to both by \Verb+\nolig{auff}{auf|f}+ and by \Verb+\nolig{ffall}{f|fall}+. This redundancy is there by design, because not all words that might fit one pattern will also fit the other. Providing some redundancy of this type seems like a reasonable way to proceed. +If you examine the \cmmd{nolig} rules provided in the files \pkg{selnolig-german-patterns.sty} and \pkg{selnolig-english-patterns.sty}, you'll notice soon that there's some redundancy built into the package's ligature suppression rules. For instance, the need to suppress the ff-ligature in the word \enquote{auffallen} is catered to both by \Verb+\nolig{auff}{auf|f}+ and by \Verb+\nolig{ffall}{f|fall}+. This redundancy is there by design, because not all words that might fit one pattern will also fit the other. Providing some redundancy of this type seems like a reasonable way to proceed. The arguments of the \cmmd{nolig} and \cmmd{keeplig} commands are case-sensitive. @@ -440,55 +450,68 @@ The arguments of the \cmmd{nolig} and \cmmd{keeplig} commands are case-sensitive \label{sec:keeplig} -The instruction |\keeplig{<string>}| lets users override a \cmmd{nolig} rule selectively, i.e., words that contain fragment |<string>| will not see the corresponding \cmmd{nolig} rule enforced. For a \cmmd{keeplig} rule to work properly, its argument must be a string that includes \emph{as a subset} a string treated by one or more \cmmd{nolig} rules. +The macro |\keeplig{<string>}| allows users to create rules that override \cmmd{nolig} rules selectively: for words that contain fragment |<string>|, the corresponding \cmmd{nolig} rule will not be executed. For a \cmmd{keeplig} rule to work properly, then, the command's argument must be a string that includes \emph{as a subset} a string treated by one or more \cmmd{nolig} rules. -Having the macro \cmmd{keeplig} is very useful because it permits the specification of more general, i.e., less restrictive, \cmmd{nolig} rules; any Type-II errors that may arise from having \cmmd{nolig} rules whose scope may be insufficiently restrictive can be fixed by providing judiciously chosen \cmmd{keeplig} rules.\footnote{In the present context, a Type-II error is the suppression of a ligature that is, in fact, valid for the word at hand.} +Having the macro \cmmd{keeplig} is very useful because it permits users to specify fewer and more general, i.e., less restrictive, \cmmd{nolig} rules; any Type-II errors that may arise from having \cmmd{nolig} rules whose scope may be insufficiently restrictive can be fixed by providing judiciously chosen \cmmd{keeplig} rules.\footnote{In the present context, a Type-II error is the suppression of a ligature that is, in fact, valid for the word at hand.} -Consider the following example: If the \opt{ngerman} option is set, the package uses the rule +Consider the following example: If the \opt{ngerman} language option is set, the \pkg{selnolig} package uses the rule \begin{Verbatim} \nolig{flich}{f|lich} \end{Verbatim} -to break up the fl-ligature in words such as begrifflich, beruflich, brieflich, glimpflich, hilflich, höflich, käuflich, s\breaklig träflich, tariflich, trefflich, unerschöpflich, and verwerflich (and quite a few more such words), which all contain the suffix |lich|, a derivational morpheme. This \cmmd{nolig} rule also happens to catch the word \enquote{Lauflicht}, which contains the free morphemes |Lauf| and |licht|. +to break up the fl-ligature in words such as begrifflich, beruflich, brieflich, glimpflich, hilflich, höflich, käuflich, s\breaklig träflich, tariflich, trefflich, unerschöpflich, and verwerflich (and quite a few more such words), which all contain the suffix |lich|, a derivational morpheme. This \cmmd{nolig} rule, incidentally, also happens to catch the word \enquote{Lauflicht} (which contains the free morphemes |Lauf| and |licht|). -It so happens that the scope of this \cmmd{nolig} rule is too broad (or, if you will, insufficiently restrictive), as it also catches words such as \opt{Pflicht} and \opt{verpflichten} for which the fl-ligature should \emph{not} be suppressed. Rather than provide a large number of slightly more restrictive \cmmd{nolig} rules aimed at avoiding catching the Pflicht- and pflicht-words, the package provides the command +%\enlargethispage{1\baselineskip} + +It so happens that the scope of this \cmmd{nolig} rule is itself a bit too broad (or, if you will, insufficiently restrictive), as it also catches words such as \opt{Pflicht} and \opt{verpflichten} for which the fl-ligature should \emph{not} be suppressed. Rather than provide a large number of slightly more restrictive \cmmd{nolig} rules aimed at avoiding catching the Pflicht- and pflicht-words, the package provides the command \begin{Verbatim} \keeplig{flicht} \end{Verbatim} -This rule tells \pkg{selnolig} to override the action of the \Verb+\nolig{flich}{f|lich}+ rule for all words that contain the string \opt{flicht}. Most words affected by this \cmmd{keeplig} rule happen to contain the strings \enquote{Pflicht} and \enquote{pflicht}. Interestingly, this instruction also serves to preserve the fl-ligature in words such as \enquote{flicht} and \enquote{anflicht} (the third-person-singular forms of the verbs flechten and anflechten). +This rule tells \pkg{selnolig} to override the action of the \Verb+\nolig{flich}{f|lich}+ rule for all words that contain the string \opt{flicht}. Most words affected by this \cmmd{keeplig} rule happen to contain the strings \enquote{Pflicht} and \enquote{pflicht}. Interestingly, this rule also preserves the fl-ligature in words such as \enquote{flicht} and \enquote{verflicht} (the third-person-singular forms of the verbs flechten and verflechten). -Probably somewhat surprisingly, at least at first glance, it is \emph{not necessarily} the case that ligatures contained in the argument of a \cmmd{keeplig} rule will, in fact, be used in words that contain this search string. Why? It is because, as was noted above, \emph{more than one} \cmmd{nolig} rule can apply to a given word. Consider, for instance, the aforementioned word \opt{Lauflicht}: this word happens to be caught by two \cmmd{nolig} rules and one \cmmd{keeplig} rule (provided in the file \pkg{selnolig-german-patterns.sty}): +Probably somewhat surprisingly, at least at first glance, it is \emph{not necessarily} the case that ligatures contained in the argument of a \cmmd{keeplig} rule will in fact be used in words that contain the search string associated with the \cmmd{keeplig}. Why? It is because, as was noted above, \emph{more than one} \cmmd{nolig} rule can apply to a given word. Consider, for instance, the aforementioned word \opt{Lauflicht}: this word happens to be caught by two \cmmd{nolig} rules and one \cmmd{keeplig} rule (provided in the file \pkg{selnolig-german-patterns.sty}): \begin{Verbatim} \nolig{aufl}{auf|l} \nolig{flich}{f|lich} \keeplig{flicht} \end{Verbatim} -Observe that because the string |aufl| is \emph{not} a subset of the string |flicht|, the rule |\keeplig{flicht}| does not undo the action of the rule \Verb+\nolig{aufl}{auf|l}+. Hence, the word |Lauflicht| happily ends up being typeset as Lauflicht, i.e., \emph{without} an fl-ligature. +Observe that for the word |Lauflicht|, the rule \Verb+\keeplig{flicht}+ undoes the rule \Verb+\nolig{flich}{f|lich}+. However, because the string |aufl| is \emph{not} a subset of the string |flicht|, the rule |\keeplig{flicht}| doesn't undo the rule \Verb+\nolig{aufl}{auf|l}+. Hence, the word |Lauflicht| ends up being typeset\textemdash correctly\textemdash as Lauflicht, i.e., \emph{without} the fl-ligature. -Interestingly, the rule |\keeplig{flicht}| is a bit too broad as well, as it also catches the word \opt{Sumpf\-licht}, for which the fl-ligature \emph{should} in fact be suppressed (since the word is composed of two free morphemes, Sumpf and Licht). To address this situation, the file \pkg{selnolig-german-patterns.sty} also provides the rule \Verb+\nolig{Sumpfl}{Sumpf|l}+. This rule suppresses the fl-ligature for Sumpflicht as well as for Sumpflabkraut and Sumpfleiche (and the plural forms of these nouns). +Interestingly, the rule |\keeplig{flicht}| is itself a bit too broad because it improperly catches the composite noun |Sumpflicht|, for which the fl-ligature \emph{should} in fact be suppressed.\footnote{The free morphemes contained in the word |Sumpflicht| are |Sumpf| and |licht|\textemdash not |Sum| and |pflicht|!} To address this case, the file \pkg{selnolig-german-patterns.sty} provides the rule \Verb+\nolig{Sumpfl}{Sumpf|l}+; this \cmmd{nolig} rule overrides the action of the rule |\keeplig{flicht}| for the word Sumpflicht. It also serves to suppress the fl ligature in words such as Sumpflabkraut and Sumpfleiche. \subsubsection{The \cmmd{uselig} macro} \label{sec:uselig} -The \pkg{selnolig} package further provides the user command \cmmd{uselig}. It acts much like the \cmmd{keeplig} command, but serves to override the action of a \cmmd{nolig} rule purely on a one-off basis. E.g., the command \Verb+\uselig{fj}+ will typeset \enquote{\uselig{fj}} even though the rule \Verb+\nolig{fj}{f|j}+ is active; \emph{without} \cmmd{uselig}, you'd get \enquote{fj}. +The \pkg{selnolig} package further provides the user command \cmmd{uselig}. It acts much like the \cmmd{keeplig} command, but serves to override the action of a \cmmd{nolig} rule purely on a one-off basis. E.g., the command \Verb+\uselig{fj}+ will typeset \enquote{\uselig{fj}} even if the rule \Verb+\nolig{fj}{f|j}+, which suppresses the |fj| ligature on a global, i.e., document-wide basis, is active; \emph{without} \cmmd{uselig}, you'd get \enquote{fj}. -You should use \cmmd{uselig} instructions only for words and word fragments, but not for longer stretches of text. If you need to suspend the operation of the ligature suppression macros for longer stretches, including entire paragraphs or more, you should use the macros \cmmd{selnoligoff} and \cmmd{selnoligon}, which are described in more detail in \cref{sec:selnoligon}. +You should use \cmmd{uselig} instructions only for single words and word fragments; don't use them for longer stretches of text. If you need to suspend the operation of the ligature suppression macros for longer stretches, including entire paragraphs or more, you should use the macros \cmmd{selnoligoff} and \cmmd{selnoligon}, which are described in more detail in \cref{sec:selnoligon}. \subsubsection{The \cmmd{breaklig} macro} \label{sec:breaklig} -The macro \cmmd{breaklig}, which doesn't take an argument, is provided as a hopefully easy-to-remember version of the lower-level \LaTeX\ command ``\Verb+\-\hspace{0pt}+''. You should insert this macro in places where you want to break up a ligature on an ad-hoc basis and also wish to permit hyphenation. (To suppress a ligature on an ad-hoc basis \emph{without} introducing a potential hyphenation point, insert the instruction \enquote{\cmmd{kern0pt}}.) For instance, to suppress the {\ebg\emph{sk}} ligature in the word \Verb+groundskeeper+ on a one-off basis, one might enter it as \enquote{\Verb+grounds\textbackslash breaklig keeper+} to get \emph{\ebg groundskeeper} instead of \emph{\ebg \uselig{groundskeeper}}.\footnote{To suppress the {\ebg \emph{sk}} ligature for this word as well as for words such as \emph{\ebg greenskeeper} and \emph{\ebg miskeep} everywhere in the document, one could issue the directive \Verb+\nolig{skeep}{s|keep}+; the \pkg{selnolig} package provides just such a rule.} +The macro \cmmd{breaklig}, which doesn't take an argument, is provided as a hopefully easy-to-remember version of the lower-level \LaTeX\ command ``\Verb+\-\hspace{0pt}+''. You should insert this macro in places where you want to break up a ligature on an ad-hoc basis and also wish to permit hyphenation. (To suppress a ligature on an ad-hoc basis \emph{without} introducing a potential hyphenation point, insert the instruction \enquote{\cmmd{kern0pt}}.) For instance, to suppress the {\ebg\emph{sk}} ligature in the word \Verb+groundskeeper+ on a one-off basis, one might enter it as \enquote{\Verb+grounds\textbackslash breaklig keeper+} in order to obtain \emph{\ebg groundskeeper} rather than \emph{\ebg \uselig{groundskeeper}}.\footnote{To suppress the {\ebg \emph{sk}} ligature for this word as well as for words such as \emph{\ebg greenskeeper} and \emph{\ebg miskeep} everywhere in the document, one could issue the directive \Verb+\nolig{skeep}{s|keep}+; the \pkg{selnolig} package provides just such a rule.} -\subsection{Further steps in the package's startup process} +\subsection[Components of the selnolig package]{Components of the \pkg{selnolig} package} + +The \pkg{selnolig} package has the following components: +\begin{itemize} +\item The main \enquote{driver} file is called \pkg{selnolig.sty}. It loads several other files and sets up the package's main user macros, \cmmd{nolig}, \cmmd{keeplig}, \cmmd{uselig}, and \cmmd{breaklig}, explained in more detail in the preceding subsection. +\item The package's lua code is in the file \pkg{selnolig.lua}. +\item The ligature suppression rules for English and German language documents are contained in the files \pkg{selnolig-english-patterns.sty} and \pkg{selnolig-english-patterns.sty}. +\item Supplemental hyphenation exception patterns, mostly for composite words that involve ligatures that are suppressed by the package's \cmmd{nolig} rules, are contained in the files \pkg{selnolig-english-hyphex.sty} and \pkg{selnolig-english-hyphex.sty}. +\item The user guide\textemdash the document you're reading right now\textemdash is provided in the file \pkg{selnolig.pdf}; the associated source code is in the file \pkg{selnolig.tex}. +\item Ancillary files: the files \pkg{selnolig-english-test.tex} and \pkg{selnolig-german-test.tex} load the \pkg{selnolig} package as well as either \pkg{selnolig-english-wordlist.tex} or \pkg{selnolig-german-wordlist.tex}. They serve to demonstrate the output of the \pkg{selnolig} package when run on lists of English or German words that are candidates for non-use of ligatures. The files \pkg{selnolig-english-test.pdf} and \pkg{selnolig-german-test.pdf} contain the results of compiling the test programs. +Assuming your \TeX\ distribution is either \TeX Live or MiK\TeX, you can access these files by typing \Verb+texdoc selnolig-english-test+ or \Verb+texdoc selnolig-german-test+ at a command prompt. +\end{itemize} -After the user commands of the \pkg{selnolig} package have been set up, the remaining steps in the package's startup process depend on which language-related options, if any, were selected: +The \enquote{driver} file \pkg{selnolig.sty} starts by setting up several Boolean switches to structure the processing of options. It then loads the file \pkg{selnolig.lua}, which contains the package's lua code and loads the user macros described in the preceding subsection. The remaining steps in the package's startup process depend on which language-related options, if any, were selected: \begin{itemize} -\item If \emph{no} language-specific options are in effect, the setup process terminates. Users may, of course, still provide their own \cmmd{nolig} and \cmmd{keeplig} rules and insert \cmmd{uselig} and \cmmd{breaklig} instructions as needed. +\item If \emph{no} language-specific options are in effect, the setup process terminates. Users may, of course, provide their own \cmmd{nolig}, \cmmd{keeplig}, \cmmd{uselig}, and \cmmd{breaklig} instructions. \item If the \opt{english} option (or one of its synonymous options) is set, the files \pkg{selnolig-english-patterns.sty} and \pkg{selnolig-english-hyphex.sty} are loaded. The former file contains a detailed list of \cmmd{nolig} and \cmmd{keeplig} rules adapted to English language typographic usage; \Cref{sec:eng-listing} provides a complete listing of these rules. The latter file contains a list of hyphenation exceptions, mainly for words that contain one or more potential non-ligation points and for which \TeX's hypenation algorithm either misses valid hyphenation points or selects invalid hyphenation points; see \cref{sec:addlhyph} below. @@ -497,8 +520,7 @@ After the user commands of the \pkg{selnolig} package have been set up, the rema \item If the user specifies both the \opt{english} and \opt{ngerman} options (or some of their synonymous options), \emph{both} language-specific style files will be loaded. Under normal circumstances, a user will probably want to load only one or the other set of language-specific files, but not both. \end{itemize} -Here's an (admittedly imperfect) indication of just how much more complex the task is of creating a set of ligature suppression rules for German than it is for English: As of the mid-May 2013 version of the \pkg{selnolig} package, the \enquote{basic} set of English language ligature suppression rules for \enquote{common} f-ligatures consists of 32 \cmmd{nolig} and 17 \cmmd{keeplig} directives.\footnote{Including the rules that are activated if the |broadf| and |hdlig| options are both activated, the tally rises to about 420 \cmmd{nolig} and 52 \cmmd{keeplig} instructions.} In contrast, the set of German language ligature suppression rules for the \enquote{common} f-ligatures consists of roughly 700 \cmmd{nolig} and 335 \cmmd{keeplig} directives. - +The following is an admittedly rough and rather imperfect indication of just how much more complex the task is of creating a set of ligature suppression rules for German than it is for English: As of the mid-May 2013 version of the \pkg{selnolig} package, the \enquote{basic} set of English language ligature suppression rules for \enquote{common} f-ligatures consists of 32 \cmmd{nolig} and 17 \cmmd{keeplig} directives.\footnote{Including the rules that are activated if the |broadf| and |hdlig| options are both activated, the tally rises to about 420 \cmmd{nolig} and 52 \cmmd{keeplig} instructions.} In contrast, the set of German language ligature suppression rules for \enquote{common} f-ligatures consists of roughly 700 \cmmd{nolig} and~335 \cmmd{keeplig} directives. A ratio of roughly 1:20 in terms of detail and complexity! @@ -520,7 +542,7 @@ The English and German ligature suppression rules are listed in \cref{sec:eng-li \subsection{The \opt{noftligs} option} -By default, the \pkg{selnolig} package will load rules to suppress ft and fft ligatures selectively, for both English and German documents. In case you want to suppress these two ligatures \emph{globally} rather than selectively, you could specify the option \opt{noftligs} when loading the package. Doing so will make the package set up the simple rule \Verb+\nolig{ft}{f|t}+.\footnote{Especially for the German language case, suppressing ft and fft ligatures \emph{globally} will also speed up compilation, as the package will have roughly 180 \cmmd{nolig} and 60 \cmmd{keeplig} instructions fewer to load!} +By default, the \pkg{selnolig} package will load rules to suppress ft and fft ligatures selectively, for both English and German documents. In case you want to suppress these two ligatures \emph{globally} rather than selectively, you could specify the option \opt{noftligs} when loading the package. Doing so will make the package set up the simple rule \Verb+\nolig{ft}{f|t}+.\footnote{Especially for the German language case, suppressing ft and fft ligatures \emph{globally} will also speed up compilation, as the package will have roughly 180 \cmmd{nolig} and 60 \cmmd{keeplig} instructions fewer to load.} @@ -533,9 +555,9 @@ For English-language documents, only a fairly limited number of f-ligature suppr My choices regarding which f-ligature suppression rules belong to the \enquote{basic} and \enquote{broadf} groups are almost entirely pragmatic. They are certainly not based on any overriding English-language typographic principles (which, possibly, don't even exist). However, if anyone happens to have a strong view on whether either \emph{fewer} or \emph{more} f-ligature suppression rules should be included in the \enquote{basic} group\textemdash especially if you can provide references to such discussions in learned circles\textemdash I would love to hear from you. -Part 3 of the file \pkg{selnolig-english-patterns.sty}, which is enabled if the \opt{hdlig} option is set, provides ligature suppression rules for the ct, st, and sp ligatures. Examples are words such as arctangent (rather than \uselig{arctangent}), painstaking (rather than \uselig{painstaking}), and trespass (worse: \uselig{trespass}). The~st and~sp ligatures are also suppressed automatically for words with Greek roots that contain the \opt{sth} and \opt{sph} character triples, such as anaesthesia, isthmus, atmosphere and hemisphere. In such cases, I'd argue that using the distinctive-looking st and sp ligatures unnecessarily obscures the \opt{th} and \opt{ph} character pairs (which derive from the single Greek letters~$\theta$/$\vartheta$ and $\phi$/$\varphi$, respectively). Given that the \opt{ph} character pair is usually pronounced as~\enquote{\opt{f}}, I~contend that the readability of words that contain the character triple \opt{sph} would suffer considerably if they were typeset \emph{with} an~sp ligature, e.g., as \uselig{atmosphere} and \uselig{spherical}. +Part 3 of the file \pkg{selnolig-english-patterns.sty}, which is enabled if the \opt{hdlig} option is set, provides ligature suppression rules for the ct, st, and sp ligatures. Examples are words such as arctangent (not: \uselig{arctangent}), painstaking (not: \uselig{painstaking}), mistake (not: \uselig{mistake}), and trespass (not \uselig{trespass}). -Setting the \opt{hdlig} option also enables ligature suppression rules for additional discretionary ligatures such as \emph{th}, \emph{at}, and~\emph{et}. These ligatures might be deemed inappropriate for use in words such as \emph{\uselig{lighthouse}, \uselig{pothole}, \uselig{aromatherapy}, \uselig{albatross}, \uselig{ninety}, \emph{and} \uselig{nonetheless}}. With the \opt{hdlig} option set, these words will be typeset as \emph{lighthouse}, \emph{pothole}, \emph{aromatherapy}, \emph{albatross}, \emph{ninety}, and \emph{nonetheless}. Ligature suppression rules are provided for the following discretionary ligatures, which occur only in the \emph{italic} font shape of the font family used in this document: \emph{th}, \emph{at}, \emph{et}, \emph{as}, \emph{is}, \emph{us}, {\ebg \emph{sk}}, \emph{ll}, and~\emph{fr}. Part~3 of \cref{sec:eng-listing} lists these rules. +Setting the \opt{hdlig} option also enables ligature suppression rules for additional discretionary ligatures such as \emph{th}, \emph{at}, and~\emph{et}. These ligatures might be deemed inappropriate for use in words such as \emph{\uselig{lighthouse}, \uselig{pothole}, \uselig{aromatherapy}, \uselig{albatross}, \uselig{ninety}, \emph{and} \uselig{nonetheless}}. With the \opt{hdlig} option set, these words will be typeset as \emph{lighthouse}, \emph{pothole}, \emph{aromatherapy}, \emph{albatross}, \emph{ninety}, and \emph{nonetheless}. Ligature suppression rules are provided for the following discretionary ligatures, which occur only in the \emph{italic} font shape of the font families used in this document: \emph{th}, \emph{at}, \emph{et}, \emph{as}, \emph{is}, \emph{us}, \emph{ll}, \emph{fr}, and {\ebg \emph{sk}}. Part~3 of \cref{sec:eng-listing} lists these rules. Part 4 of the file \pkg{selnolig-english-patterns.sty}, which is also processed if the \opt{hdlig} option is set, deals with cases where one discretionary typographic literature, say \emph{as}, might pre-empt the use of a more appropriate but trailing typographic ligature, say \emph{st} or~\emph{sp}, in words such as \emph{f\uselig{as}t}~$\to$ \emph{fast} and \emph{cl\uselig{as}p}~$\to$ \emph{clasp}. Note that the issue being addressed in this part is not that of a ligature improperly spanning a morpheme boundary; instead, it is the possibility that \TeX\ might pre-empt one typographic ligature with another ligature within one and the same morpheme. This issue is discussed in more detail in \cref{sec:preempt} below. @@ -545,31 +567,33 @@ There may be pairs of composite words which look alike but are made up of two di For words such as these, software isn't smart enough to \enquote{discern} which possible meaning is intended.\footnote{It turns out that if the \opt{ngerman} option is set and the \pkg{babel} package is loaded as well, the \opt{selnolig} package will break up the fl ligature in \opt{Saufladen} but not the st ligature in \opt{Wachstube}, i.e., the words will be typeset as \enquote{Saufladen} and \enquote{Wachstube}, respectively. If that's \emph{not} what you want, you'll need to mark up the words explicitly as follows: \Verb+\uselig{Saufladen}+ and \Verb+Wachs\breaklig tube+.} Writers, of course, could (and should?) choose to insert explicit hyphen characters to indicate the intended meaning. -The preceding two examples involve pairs of free morphemes in both cases. Here's a composite word where one possible meaning involves a free morpheme and an inflectional morpheme (indicating the past-tense use of the verb), whereas the other meaning involves two free morphemes: \opt{Surftest}. Consider the questions, \enquote{Surftes\kern0pt t Du vergangene Woche in Hawaii?}, and \enquote{Hat die Athletin den Surf\breaklig tes\kern0pt t bes\kern0pt tanden?} Only in the second case is it clearly wrong to use the ft-ligature. +The preceding two examples each involve two pairs of free morphemes. Further, potentially more complicated, cases can occur. For instance, the composite word opt{Surftest} can have a meaning that involves a free morpheme and an inflectional morpheme (indicating the past-tense use of the verb), whereas the other meaning involves two free morphemes. Consider the questions \enquote{Surftest Du vergangene Woche in Hawaii?} and \enquote{Hat die Athletin den Surf\breaklig test bestanden?} In the second question, it's wrong to use the ft-ligature; the word \opt{Surftest} is therefore entered as ``|Surf\breaklig test|''. -An even more complicated example is the word \opt{Chefinnenleben}, which contains three morphemes. This word can be deconstructed either as \opt{Chefinnen-leben} (\enquote{lives of female bosses}) \emph{or} as \opt{Chef-innenleben} (\enquote{inner life, or lives, of a boss}). Thus, the word's middle particle\textemdash\enquote{innen}\textemdash can function both as a suffix (in this case, an inflectional morpheme) to \enquote{Chef} and as a free morpheme that modifies the third morpheme, \enquote{Leben}. Software isn't smart enough yet to discern on its own which usage is intended. +An even more complicated example is the word \opt{Chefinnenleben}, which contains three morphemes. This word can be deconstructed either as \opt{Chefinnen-leben} (\enquote{lives of female bosses}) \emph{or} as \opt{Chef-innenleben} (\enquote{inner life, or lives, of a boss}); the word's middle particle\textemdash\enquote{innen}\textemdash can function both as a suffix to \enquote{Chef} and as a prefix to~\enquote{Leben}, the word's third morpheme. Only in the second case is it wrong to use the fi-ligature. Software isn't smart enough yet to discern on its own which meaning is intended. -The rules of the \pkg{selnolig} package are set \emph{not} break up the fi-ligature in the shorter words Chefin and Chefinnen, in keeping with the principle that the fi-ligature is permitted for suffixes that start with an~\enquote{i}. In contrast, \pkg{selnolig} will break up the fi-ligature in the longer words Chefinnenleben and Chefinnenräume, because in these cases the working assumption is that \opt{innen} acts as a prefix of sorts to the third morpheme (Leben or Räume). If this is \emph{not} what you want, i.e., if you really do mean to refer to lives or spaces of female bosses, be sure to use \Verb+\uselig{fi}+ instructions to preserve the fi-ligatures. Better yet: write the words in question using explicit hyphens, i.e., as Chefinnen-Leben and Chefinnen-Räume. And, while you're at it, do consider writing the other forms as Chef-Innenleben and Chef-Innenräume. Your readers will thank you. +The rules of the \pkg{selnolig} package are set \emph{not} break up the fi-ligature in the shorter words Chefin and Chefinnen, in keeping with the principle that the fi-ligature is permitted for suffixes that start with an~\enquote{i}. In contrast, \pkg{selnolig} will break up the fi-ligature in the longer words Chefinnenleben and Chefinnenräume, because in these cases the working assumption is that \opt{innen} acts as a prefix to the third morpheme (Leben or Räume). If this is \emph{not} what you want, i.e., if you really do mean to refer to lives or spaces of female bosses, be sure to use \Verb+\uselig{fi}+ instructions to preserve the fi-ligatures. Better yet, use explicit hyphens: Chefinnen-Leben and Chefinnen-Räume. And, while you're at it, do consider writing the other forms as Chef-Innenleben and Chef-Innenräume. Your readers will thank you. -Summing up: There are words for which it's not possible to decide without knowledge of the context within which the word is used whether or not a given ligature should be enabled or suppressed. The best advice I can give is to stay on the lookout for such words and to take corrective action if you believe \pkg{selnolig}'s choice is the wrong one. +Summing up: There are words for which it's not possible to decide without knowledge of the context within which the word is use whether or not a given ligature should be suppressed. The best advice I can give is to be on the lookout for such words and to take corrective action if \pkg{selnolig}'s default choice is wrong. \subsection{How to provide additional ligature suppression patterns} -As already noted, it's not possible to claim that the non-ligation rules provided in \pkg{selnolig-english-patterns.sty} and \pkg{selnolig-german-patterns.sty} are complete or, for that matter, will \emph{ever} be complete. If you come across words containing ligatures that ought to be suppressed but aren't caught (yet) by the \pkg{selnolig} package, you could insert \cmmd{breaklig} instructions to suppress the ligatures on a case-by-case basis; conversely, if you discover an instance for which \pkg{selnolig} improperly breaks up a ligature, you could override that action by encasing the character pair (or triple) in an \cmmd{uselig} statement. Alternatively, you could create your owb \cmmd{nolig} and \cmmd{keeplig} rules to deal with the cases you've discovered on a document-wide basis.\footnote{A third option, naturally, is to bring this case to the attention of the maintainer of the \pkg{selnolig} package and ask him/her to update the package\dots} +As already noted, it's not possible to claim that the non-ligation rules provided in \pkg{selnolig-english-patterns.sty} and \pkg{selnolig-german-patterns.sty} are complete or, for that matter, will \emph{ever} be complete. If you come across words containing ligatures that ought to be suppressed but aren't caught (yet) by the \pkg{selnolig} package, you could do the following. First, you could insert \cmmd{breaklig} instructions to suppress the ligatures on a case-by-case basis; conversely, if you discover an instance for which \pkg{selnolig} improperly breaks up a ligature, you could override that action by encasing the character pair (or triple) in a \cmmd{uselig} statement. Second, you could create your own \cmmd{nolig} and \cmmd{keeplig} rules to deal with the cases you've discovered on a document-wide basis. A third option, naturally, is to bring this case to the attention of the maintainer of the \pkg{selnolig} package and ask him/her to update the package's ligature suppresssion rules\dots + +To give an extended example of how one might go about augmenting the set of ligature-suppression rules already provided by the \pkg{selnolig} package, suppose that you've been tasked with preparing a special edition of Thomas Mann's novel \emph{Der Tod in Venedig}. Suppose further that you have chosen to use an \enquote{Antiqua} (\enquote{Roman}) font\textemdash which, naturally, features a ligature for the ffl character triple\textemdash to typeset this special edition, because fewer and fewer people nowadays can manage to read with ease text set in a {\blackletterfont period-appropriate blackletter font}. During your preparations, you happen to notice (i)~that the novel contains the word \opt{inbegriffleitend}\footnote{This word really does occur in the aforementioned novel! This novel may very well also be the \emph{only place} ever where you'll encounter this word. I performed a Google search for the term \enquote{inbegriffleitend}; the only hits, apart from online editions of the novel itself, were the sites of a couple of French bloggers who agonized over how this word might possibly be translated from German to French\dots} and (ii)~that the \pkg{selnolig} package does not (yet) appear to provide a rule that suppresses the ffl-ligature for this word. -Suppose, say, that you've been tasked with preparing a special edition of Thomas Mann's novel \emph{Der Tod in Venedig}. Suppose further that you have chosen to use an \enquote{Antiqua} (\enquote{Roman}) font\textemdash which, naturally, features a ligature for the ffl character triple\textemdash to typeset the new edition, because fewer and fewer people nowadays can manage to read with ease text set in a {\blackletterfont period-appropriate blackletter font}. During these preparations, you happen to notice (i)~that the novel contains the word \opt{inbegriffleitend}\footnote{This word really does occur in the aforementioned novel! This novel may also be pretty much the only place ever where you'll encounter this word. I performed a Google search for the term \enquote{inbegriffleitend}; the only hits, apart from online editions of the novel itself, were the sites of a couple of French bloggers who agonized over how this word might possibly be translated from German to French\dots} and (ii)~that the \pkg{selnolig} package does not (yet) appear to include a rule that suppresses the ffl-ligature for this word. To address this problem\textemdash while simultaneously creating a search pattern that also catches inappropriate ffl-ligatures in the (hopefully quite a bit more common!) words \opt{Jugendtreffleiter} and \opt{Kunststoffleitung}\textemdash you could add the following \Verb+\nolig+ rule to your document's preamble: +To meet the need to suppress the ffl-ligature in \opt{inbegriffleitend}, you could insert a \cmmd{breaklig} instruction, i.e., enter it as ``\Verb|inbegriff\breaklig leitend|''. (Doing so isn't inefficient in the present example because the word \opt{inbegriffleitend} occurs exactly once in the novel.) Alternatively, you could devise a new \cmmd{nolig} rule to catch this word. For instance, you could add the following \cmmd{nolig} rule (to be inserted in your document's preamble, after the \pkg{selnolig} package has been loaded) to suppress the ffl ligature in \opt{inbegriffleitend} as well as in the far more common words \opt{Jugendtreffleiter} and \opt{Kunststoffleitung}: \begin{Verbatim} \nolig{ffleit}{ff|leit} \end{Verbatim} -With this rule in place, the words will be typeset as inbegriffleitend, Jugendtreffleiter, and Kunststoffleitung, respectively. Just in case this discussion has made you curious: the file \pkg{selnolig-german-patterns.sty} actually provides the even more general (i.e., less restrictive) rule \Verb+\nolig{fleit}{f|leit}+. +With this rule in place, the words will be typeset as inbegriffleitend, Jugendtreffleiter, and Kunststoffleitung, respectively. Just in case this discussion has made you curious: the file \pkg{selnolig-german-patterns.sty} provides the more general (i.e., less restrictive) rule \Verb+\nolig{fleit}{f|leit}+ to catch these words. -When designing your own \cmmd{nolig} and \cmmd{keeplig} rules, you would ideally create them in such a way that they're neither too specific and hence only apply to a very small set of words, nor too general and hence end up applying to words for which the rule isn't meant to apply at all. Of course, this may be easier said than done. Consider, say, what would happen if you came up with the rule +When designing your own \cmmd{nolig} and \cmmd{keeplig} rules, you would ideally do so in a way that ensures that the rules are neither too specific (and hence only apply to a very small set of words) nor too general (and hence end up applying to words for which the rule wasn't meant to apply). Of course, this may be easier said than done. Consider, say, what would happen if you came up with the rule \begin{Verbatim} \nolig{flei}{f|lei} \end{Verbatim} -This rule would certainly succeed in breaking up the fl ligature in the words inbegriffleitend, Jugendtreffleiter, and Kunststoffleitung as well as in Laufleis\breaklig tung, Häuflein, Kreislaufleiden, Scherflein, and many more. However, this rule would also \emph{incorrectly} break up the fl ligature in many other words as well, including f\kern0pt leissig\slash f\kern0pt leißig, f\kern0pt leischig, Hackf\kern0pt leisch, and Diplomf\kern0pt leißarbeit; I believe most readers would prefer to see these words typeset \emph{with} the fl-ligature, i.e., as fleissig\slash fleißig, fleischig,~etc. When in doubt, try to err on the side of making your \cmmd{nolig} rules a bit too restrictive. +This rule would certainly succeed in breaking up the ffl-ligature in the words inbegriffleitend, Jugendtreffleiter, and Kunststoffleitung. It will also break up the fl-ligature in Laufleistung, Häuflein, Kreislaufleiden, Scherflein, and many more words. However, this rule would also \emph{incorrectly} break up the fl-ligature in many other words, including f\kern0pt leissig\slash f\kern0pt leißig, f\kern0pt leischig, Hackf\kern0pt leisch, and Diplomf\kern0pt leißarbeit; I believe most readers would prefer to see these words typeset \emph{with} the fl-ligature, i.e., as fleissig\slash fleißig, fleischig,~etc. When in doubt, try to err on the side of making your \cmmd{nolig} rules a bit too restrictive. @@ -593,11 +617,11 @@ Or, suppose that you have a font that provides ligatures for the {\ebg \uselig{f \nolig{fj}{f|j} \nolig{fk}{f|k} \end{Verbatim} -In fact, these commands are activated automatically if the package's \opt{ngerman} or \opt{english} options are set. This is done because I was unable to come up with a single instance of a \emph{German} or \emph{English} language word involving these character combinations that doesn't also involve a morpheme boundary collision. +In fact, these commands are activated automatically if the \opt{ngerman} or \opt{english} language options are set. This is done because I was unable to come up with a single instance of a \emph{German} or \emph{English} language word involving these character combinations that doesn't also involve a morpheme boundary collision. -Of course, your document may contain words \emph{not} of German or English origin that contain some of these character pairs and do not involve a morpheme boundary crossing. For such words, it is not desirable to suppress the corresponding ligatures. One such word is \opt{Kafka}: one may not wish to suppress the {\ebg\uselig{fk}}-ligature for this specific word. The \pkg{selnolig} package provides \cmmd{keeplig} rules to preserve the {\ebg\uselig{fk}}-ligature in names such as {\ebg Kafka, Safka, Piefke, Potrafke, Sprafke, Shirafkan, Tirafkan}, and {\ebg Rifkin}.\footnote{Aside: It was Felix Lehmann's desire to preserve the {\ebg\uselig{fk}} ligature in the name \enquote{{\ebg Kafka}} that stimulated the creation of the package's \cmmd{keeplig} macro. Of course, once the \cmmd{keeplig} macro was created, all kinds of further uses were quickly discovered.} +Of course, your document may contain words \emph{not} of German or English origin that contain some of these character pairs and do not involve a morpheme boundary crossing; for such words, it is not desirable to suppress the corresponding ligatures. One such word is \opt{Kafka}: one may not wish to suppress the {\ebg\uselig{fk}}-ligature for this specific word. The \pkg{selnolig} package provides \cmmd{keeplig} rules to preserve the {\ebg\uselig{fk}}-ligature in names such as {\ebg Kafka, Safka, Piefke, Potrafke, Sprafke, Shirafkan, Tirafkan}, and {\ebg Rifkin}.\footnote{Aside: It was Felix Lehmann's desire to preserve the {\ebg\uselig{fk}} ligature in the name \enquote{{\ebg Kafka}} that stimulated the creation of the package's \cmmd{keeplig} macro. Of course, once the \cmmd{keeplig} macro was created, I quickly discovered all kinds of further uses for it.} -Your documents may also feature words of \emph{Nordic} origin that contain the \opt{fj} character pair, such as \opt{Sognefjord} and \opt{Dovrefjell}. Because the \opt{fj} character pair in these words does not span a morpheme boundary, the {\ebg\uselig{fj}}-ligature should not be broken up; i.e., the words should be typeset as {\ebg Sognefjord and Dovrefjell}, respectively. The package therefore provides \cmmd{keeplig} rules to take care of (a)~words that contain the particles {\ebg fjord, fjör, fjell, and fjäll} and (b)~names such as {\ebg Eefje, Sufjan, Prokofjew, and Astafjew}. +Your documents may also feature words of \emph{Nordic} origin that contain the \opt{fj} character pair, such as \opt{Sognefjord} and \opt{Dovrefjell}. Because the \opt{fj} character pair in these words does not span a morpheme boundary, the {\ebg\uselig{fj}}-ligature should not be broken up; i.e., the words should be typeset as {\ebg Sognefjord} and {\ebg Dovrefjell}, respectively. The package therefore provides \cmmd{keeplig} rules to take care of (a)~words that contain the particles {\ebg fjord, fjör, fjell}, and {\ebg fjäll} and (b)~names such as {\ebg Eefje, Sufjan, Prokofjew}, and {\ebg Astafjew}. A \enquote{rare} typographic ligature that may warrant global suppression, at least for English language documents, is~\uselig{\emph{ij}}.\footnote{For many fonts I'm familiar with, including the one used for this user guide, the |ij| character pair is available in the upright font shape as a \emph{digraph} rather than as a true, i.e., joined-up, ligature.} To the best of my knowledge, a morpheme boundary crossing occurs for all English language words that contain the~\opt{ij} character pair: \emph{antijam}, \emph{bijection}, \emph{demijohns}, and \emph{hijack}. By the logic set forth above, this ligature should therefore be suppressed for all of these words.\footnote{If this ligature weren't suppressed, the preceding words would be typeset as \emph{\uselig{antijam}, \uselig{bijection}, \uselig{demijohns}, \emph{and} \uselig{hijack}}.} The \uselig{\emph{ij}} ligature also seems inappropriate for most words that came into English from languages such as French, Japanese, and Spanish, including \emph{bijou} (jewel), \emph{gaijin} (foreigner), \emph{jipijapa} (Panama hat), and \emph{marijuana} (Maryjane). (What? Were you maybe thinking of a different meaning of this word? How come?!) The \uselig{\emph{ij}} ligature is therefore suppressed \emph{globally} by the \pkg{selnolig} package if the options \opt{english} and \opt{hdlig} are set. However, this ligature \emph{does} get used a lot in Dutch. Thus, the \pkg{selnolig} package issues various \cmmd{keeplig} directives so that this ligature isn't suppressed for some names and words of Dutch origin, such as \emph{de~Bruijn} and \emph{rijsttafel}.\footnote{The word \emph{rijsttafel}, incidentally, features three consecutive \enquote{rare} ligatures. Another word that contains three rare ligatures, though not consecutive ones, is \emph{\uselig{is}thmus}. } @@ -608,9 +632,10 @@ However, this ligature \emph{does} get used a lot in Dutch. Thus, the \pkg{selno If a font provides many discretionary ligatures, the likelihood is high that words will occur for which the use of a ligature for the first two characters of a character \emph{triple} might pre-empt the use of a more appropriate ligature for the last two characters of that triple.\footnote{To be sure, the issue of ligature pre-emption is not limited to \enquote{discretionary} ligatures; it can also occur with \enquote{common} f-ligatures. Suppose, for instance, that a certain font provides~ff, fi, and fl ligatures but no ffi and~ffl ligatures, and consider how \TeX\ would typeset words containing \opt{ffi} and \opt{ffl} character triples. Left to its own devices, \TeX\ would let the leading ff-ligature pre-empt the trailing fi- and fl-ligatures, resulting in typographically incorrect outcomes for words such as \uselig{wolffish} (better: wolffish), \uselig{safflower} (safflower), \uselig{auffinden} (auffinden), and \uselig{Schaffleisch} (Schaffleisch). \label{fn:triple}} -In this section, we examine the use of \cmmd{nolig} rules to address this contingency, focusing on cases of~\emph{st}, \emph{sp}, \emph{th}, and~\emph{ta} character pairs being preceded by character pairs (for which the font provides ligatures) that end in~\emph{s} or~\emph{t}, respectively. This focus is dictated largely by the discretionary ligatures provided by the main text font used for this user guide (Garamond Premier Pro). Other ligature-rich fonts may provide further possibilities for one ligature inappropriately pre-empting that for a trailing character pair.\footnote{For the font Garamond Premier Pro, I've discovered the following preculiar exception to the general rule that \TeX\ always gives precedence to a ligature for the first two characters of a character triple: for the character triple \opt{fis} (as in \opt{fist} and \opt{fish}), \TeX\ gives preference to the trailing \emph{is} ligature over the preceding\, \emph{fi} ligature, causing these words to be typeset as \emph{\uselig{fish}} and \emph{\uselig{fist}}, respectively. I can't tell if this outcome is a conscious design feature or a bug. For now, \pkg{selnolig} is set to override this behavior, i.e., to always give preference to the leading\, \emph{fi} ligature over the trailing \emph{is} ligature for words that contain the strings \opt{fist} and \opt{fish}; hence, they'll be rendered as \emph{fist} and \emph{fish}, respectively. +In this section, we examine the use of \cmmd{nolig} rules to address this contingency, focusing on cases of~\emph{st}, \emph{sp}, \emph{th}, and~\emph{ta} character pairs being preceded by character pairs (for which the font provides ligatures) that end in~\emph{s} or~\emph{t}, respectively. This focus is dictated largely by the discretionary ligatures provided by the main text font used for this user guide (Garamond Premier Pro). Other ligature-rich fonts may provide further possibilities for one ligature inappropriately pre-empting that for a trailing character pair.% +\footnote{For the font Garamond Premier Pro, I've discovered the following preculiar exception to the general rule that \TeX\ always gives precedence to a ligature for the first two characters of a character triple: for the character triple \opt{fis} (as in \opt{fist} and \opt{fish}), \TeX\ gives preference to the trailing \emph{is} ligature over the leading\, \emph{fi} ligature, causing these words to be typeset as \emph{\uselig{fish}} and \emph{\uselig{fist}}, respectively. I can't tell if this is a conscious design feature or a bug in this font. The \pkg{selnolig} package overrides this behavior, i.e., it is set to give preference to the leading\, \emph{fi} ligature over the trailing \emph{is} ligature for words that contain the strings \opt{fist} and \opt{fish}; hence, they'll be typeset as \emph{fish} and \emph{fist}, respectively. -Note that if the \opt{broadf} option is set, as is the case for the document you're reading, a side effect of this setting is that words such as \emph{deafish, dwarfish, elfish, oafish, selfish, unselfish, wolfish, draffish, giraffish, gruffish, offish, raffish, sniffish, standoffish, stiffish, \emph{and} toffish}, as well as the associated adverbs ending in \emph{-ly}, will \emph{not} feature an \emph{is} ligature. This loss is, hopefully, not too serious.} +Note that if the \opt{broadf} option is set, as is the case for the document you're currently reading, a side effect of this setting is that words such as \emph{deafish, dwarfish, elfish, oafish, selfish, unselfish, wolfish, draffish, giraffish, gruffish, offish, raffish, sniffish, standoffish, stiffish, \emph{and} toffish}, as well as the associated adverbs ending in \emph{-ly}, will \emph{not} feature an \emph{is} ligature. This loss is, hopefully, not too serious.} @@ -645,25 +670,24 @@ Given the commonness and the distinctive pronuciation of the \opt{th} character Fixing the \emph{at}--\emph{th} ligature pre-emption issue globally\textemdash e.g., via \Verb+\nolig{ath}{a|th}+\textemdash is not completely innocuous, though, because doing so will also suppress the \emph{at} ligature for words such as \opt{boathook}, for which the \emph{th} ligature would span a morpheme boundary and thus shouldn't be employed anyway. For such words, then, there's no need to suppress the \emph{at} ligature. These cases are dealt with by providing specific \cmmd{keeplig} rules to re-enable the use of the \emph{at} ligature. Suppressing an \emph{et} ligature in favor of a subsequent \emph{th} ligature via \Verb+\nolig{eth}{e|th}+ is almost universally correct, either because the \emph{th} ligature \emph{should} take precedence\textemdash as in the words \emph{ethics}, \emph{methane}, and \emph{teeth}\textemdash or because the \emph{et} ligature would cross a morpheme boundary and hence shouldn't be used anyway, as in the words \emph{forethought} and \emph{rethink}. -I say that it's \emph{almost} universally correct to do so; however, there are some words, such as \opt{Beethoven}, \opt{prophethood}, and \opt{sweetheart}, for which the \emph{th} ligature would be inappropriate anyway and for which the use of the \emph{et} ligature would hence be unproblematic. To address this issue, \cmmd{keeplig} rules are provided to override the rule \Verb+\nolig{eth}{e|th}+ for words such as \emph{Beethoven}, \emph{prophethood}, and \emph{sweetheart}.\footnote{Note that this method works if the font being used provides both \emph{et} and \emph{th} ligatures. If the text font you employ provides only the \emph{th} ligature but no \emph{et} ligature, these \cmmd{keeplig} rules should be disabled.} +I say that it's \emph{almost} universally correct to do so; however, there are some words, such as \opt{Beethoven}, \opt{prophethood}, and \opt{sweetheart}, for which the \emph{th} ligature would be inappropriate anyway and for which the use of the \emph{et} ligature would hence be unproblematic. To address this issue, \cmmd{keeplig} rules are provided to override the rule \Verb+\nolig{eth}{e|th}+ for these words, so that they'll get typeset as \emph{Beethoven}, \emph{prophethood}, and \emph{sweetheart}.\footnote{Note that this method works if the font being used provides both \emph{et} and \emph{th} ligatures. If the text font you employ provides only a \emph{th} ligature but no \emph{et} ligature, these \cmmd{keeplig} rules should be disabled.} -%\enlargethispage{1\baselineskip} - \subsubsection*{Ligatures for \emph{at} and \emph{et} that pre-empt a \emph{ta} ligature} There seem to be very few English words for which an \emph{at} ligature might inappropriately pre-empt a \emph{ta} ligature. One such word is \opt{atap}, whose readability is enhanced if it's typeset as~\emph{atap} rather than as~\emph{\uselig{atap}}. -Virtually all words for which an \emph{et} ligature might inappropriately pre-empt the use of a trailing \emph{ta} ligature appear to be words for which the \emph{et} ligature crosses a morpheme boundary and should be suppressed. Examples are \emph{betake, betatter, bristletail, caretaker, detach, dovetail, foretaste, pretax, retable, retack, retard, retarget, timetable, \emph{and} wiretap}. The \emph{et}-related ligature suppression rules already put in place to deal with morpheme boundary crossing cases should therefore suffice to catch these cases as well. There may also be cases of persons' names which include the string |eta| for which the \emph{ta} ligature should not be pre-empted. For instance, the author of this package prefers to see his surname typeset as \emph{Loretan} rather than as \emph{\uselig{Loretan}}\dots +Virtually all words for which an \emph{et} ligature might inappropriately pre-empt the use of a trailing \emph{ta} ligature appear to be words for which the \emph{et} ligature crosses a morpheme boundary and should be suppressed. Examples are \emph{betake, betatter, bristletail, caretaker, detach, dovetail, foretaste, pretax, retable, retack, retard, retarget, timetable, \emph{and} wiretap}. The \emph{et}-related ligature suppression rules already put in place to deal with morpheme boundary crossing cases should therefore suffice to catch these cases as well. +Do be on the lookout for cases of persons' names which include the string |eta| and for which the trailing \emph{ta} ligature should not be pre-empted by the leading \emph{et} ligature. For instance, the author of this package prefers to see his surname typeset as \emph{Loretan} rather than as \emph{\uselig{Loretan}}\dots -\section{Further issues} +\section{Further issues} \label{sec:further} \subsection{Known bugs} -I'm not sure if the following matter constitutes a bug or \enquote{merely} a case of incompatibility between two \LaTeX\ packages. The \pkg{selnolig} package does not appear to interact well with the \LaTeX\ package \pkg{ngerman}. The \pkg{selnolig} package does interact nicely with the \pkg{babel} package if one of the options \opt{ngerman}, \opt{german}, \opt{austrian}, and \opt{naustrian} set. Thus, unless someone can convince me that using the \pkg{ngerman} package is truly preferable to using the \pkg{babel} package, I probably won't bother addressing this incompatibility. +I'm not sure if the following matter constitutes a bug or \enquote{merely} a case of incompatibility between two \LaTeX\ packages. The \pkg{selnolig} package does not appear to interact well with the \LaTeX\ package \pkg{ngerman}. The \pkg{selnolig} package \emph{does} interact nicely with the \pkg{babel} package if one of the options \opt{ngerman}, \opt{german}, \opt{austrian}, \opt{naustrian}, \opt{swissgerman}, or \opt{swiss} is set. Unless someone can convince me that using the \pkg{ngerman} package is truly preferable to using the \pkg{babel} package, I probably won't bother addressing this incompatibility. @@ -671,9 +695,11 @@ I'm not sure if the following matter constitutes a bug or \enquote{merely} a cas \TeX's hyphenation algorithms are widely acknowledged to be very good. However, for the English language case at least, it tends to miss quite a few permissible hyphenation points when dealing with words that end in |-f-ing|, |-f-ier|, |-f-iest|, |-f-less|, |-f-like|, etc. Hyphenation exception lists are provided in the files \pkg{selnolig-english-hyphex.sty} and \pkg{selnolig-german-hyphex.sty}, respectively, for English and German words. -The German-language hyphenation exception list is currently still the shorter of the two; however, this may change in the future. The German word list is shorter in part because it is assumed that writers of German-language documents use the \pkg{babel} package and select the option \opt{ngerman} (or one of the related options); doing so also loads specialized hyphenation patterns suitable for German text.\footnote{As was already noted earlier, the \pkg{selnolig} package is also compatible with the \pkg{hyphsubst} package.} +\enlargethispage{0.5\baselineskip} -It is possible to instruct \pkg{selnolig} \emph{not} to load the package's hyphenation exception lists. You may want to do so, say, if you must use UK-English hyphenation patterns and therefore mustn't make use of the US-English hyphenation patterns provided by the package. (To the best of my knowledge, though, most of the hyphenation patterns indicated in \pkg{selnolig-english-hyphex.sty} are common to UK and US English.) To skip loading the additional hyphenation patterns when invoking the \pkg{selnolig} package, you should specify the option \opt{noadditional\-hyphen\-a\-tion\-patterns}. (I am obviously not trying to make it too easy to invoke this option~\dots) +The German-language hyphenation exception list is currently still the shorter of the two; however, this may change in the future. The German word list is shorter in part because it is assumed that writers of German-language documents use the \pkg{babel} package and select the option \opt{ngerman} (or one of the synonymous language options); doing so also loads specialized hyphenation patterns suitable for German texts.\footnote{As was already noted earlier, the \pkg{selnolig} package is also compatible with the \pkg{hyphsubst} package.} + +It is possible to instruct \pkg{selnolig} \emph{not} to load the package's hyphenation exception lists. You may want to do so, for instance, if you must use UK-English hyphenation patterns and therefore shouln't use the US English-based hyphenation patterns provided by the package. (To the best of my knowledge, most of the hyphenation patterns employed in \pkg{selnolig-english-hyphex.sty} are common to UK and US English.) To skip loading the additional hyphenation patterns when invoking the \pkg{selnolig} package, you should specify the option \opt{noadditional\-hyphen\-a\-tion\-patterns}. (I am obviously not trying to make it too easy to invoke this option~\dots) As was already noted in \cref{sec:anythingelse}, if you use the \pkg{babel} package with, say, the \opt{ngerman} option, be sure to load \pkg{selnolig} package \emph{after} the \pkg{babel} package. That way, the \pkg{selnolig} package's additional hyphenation exception patterns won't be overridden by \pkg{babel}'s settings. @@ -744,33 +770,46 @@ Extensive lists of German and English language words for which one or more ligat The files \pkg{selnolig-german-test.tex} and \pkg{selnolig-english-text.tex} are \enquote{driver programs} that load the \pkg{selnolig} package and then run it on the respective lists of German- and English-language words. To compile the driver programs, be sure to use \LuaLaTeX. + +\section{Making suggestions and reporting bugs} + +Feedback on the \pkg{selnolig} package is always welcome, whether for making general suggestions or for reporting bugs and other problems. \href{mailto:loretan.mico@gmail.com}{Emailing me} about \pkg{selnolig} will definitely get my attention. I'm also a fairly active participant on \url{tex.stackexchange.com}. In case I appear to miss any \pkg{selnolig}-related discussions on that site, don't hesitate to contact me to alert me to them. + +When reporting what you believe to be shortcomings and/or mistakes with the package's ligature suppression rules, please use a structure similar to the template given in \cref{sec:template} of this document. + +If anyone is thinking of creating rules to suppress ligatures selectively for languages other than English and German and would like to make use of the \enquote{machinery} provided by the \pkg{selnolig} package, I'd be delighted to provide reasonable amounts of programming-related assistance. + +The latest versions of all files that comprise the \pkg{selnolig} package may be found at the \href{https://github.com/micoloretan/selnolig}{package's GitHub site}. What's there may be slightly more up to date than what I manage to push to the \href{http://ctan.org/tex-archive/macros/luatex/latex/selnolig}{CTAN page}. + +%\enlargethispage{0.5\baselineskip} + \section{License and acknowledgments} \label{sec:thanks} The entire \pkg{selnolig} package is placed under the terms of the \LaTeX\ Project Public License, version~1.3 or later (\url{http://www.latex-project.org/lppl.txt}). It has the status \enquote{maintained}. -I owe a huge intellectual and programming debt to Patrick Gundlach and Taco Hoekwater, who responded kindly and generously with detailed computer code to various queries I posted to \href{http://tex.stackexchange.com}{\texttt{tex.stackexchange.com}}.\footnote{See especially the questions \href{http://tex.stackexchange.com/q/37443/5001}{Any suggestions/requests for features for a new package that allows disabling ligatures for (pre)selected words?}, \href{http://tex.stackexchange.com/q/48516/5001}{How to suppress the operation of a luatex-defined macro on a string if the string is part of macro or a label}, and \href{http://tex.stackexchange.com/q/63005/5001}{Ligature suppression algorithm fails if the word in question contains an Umlaut (dieresis) before the ligature}.} Without their expertise in programming in Lua and interfacing the lua code with \LaTeX, this package would not exist. They certainly deserve most of the credit for the lua code used by the \pkg{selnolig} package. +I owe a huge intellectual and programming debt to Patrick Gundlach and Taco Hoekwater, who responded kindly and generously with detailed computer code to various queries I posted to \href{http://tex.stackexchange.com}{\texttt{tex.stackexchange.com}}.\footnote{See especially the questions \href{http://tex.stackexchange.com/q/37443/5001}{Any suggestions/requests for features for a new package that allows disabling ligatures for (pre)selected words?}, \href{http://tex.stackexchange.com/q/48516/5001}{How to suppress the operation of a luatex-defined macro on a string if the string is part of macro or a label}, and \href{http://tex.stackexchange.com/q/63005/5001}{Ligature suppression algorithm fails if the word in question contains an Umlaut (dieresis) before the ligature}.} Without their help and support, this package would not exist. They certainly deserve most of the credit for the lua code used by the \pkg{selnolig} package. Felix Lehmann (a linguist and expert in morphology, i.e., the study of morphemes) and Steffen Hildebrandt (computer scientist extraordinaire) served as patient and careful testers of several early beta versions of this package, uncovering and fixing bugs, pointing out unclear passages in the user guide, writing scripts to automate the discovery of redundancies and syntax errors in the package's \cmmd{nolig} and \cmmd{keeplig} rules, and providing many excellent suggestions for improving tha package. Steffen also provided crucial modifications to the package's lua code to make possible the \cmmd{keeplig} and \cmmd{uselig} macros. +\enlargethispage{0.5\baselineskip} + Equally importantly, Felix and Steffen created scripts to test systematically and comprehensively the package's German \cmmd{nolig} and \cmmd{keeplig} rules for linguistic adequacy and (relative) completeness. They began with a corpus of almost 850 million [!!] words, which they marked up with information on the morphological constituents of each word. From this huge word list, they extracted a set of 462,000 unique word forms containing potential f-ligatures. -According to their analysis, an early version (ca.\ late October 2012) of the \pkg{selnolig} package already dealt correctly with 85 percent (394,000) of those word forms, while still generating 21,000 Type~I errors and 48,000 Type~II errors!\footnote{In the context of the \pkg{selnolig} package, a Type~I error is the failure to suppress a typographically inappropriate ligature, and a Type~II error is the improper suppression of a typographically valid ligature.}\textsuperscript{,}\footnote{1,000 words contained more than one potential f-ligature, hence the difference.} +According to their analysis, an early version (late October 2012) of the \pkg{selnolig} package already dealt correctly with 85 percent (394,000) of those word forms, while still generating 21,000 Type~I errors and 48,000 Type~II errors!\footnote{In the context of the \pkg{selnolig} package, a Type~I error is the failure to suppress a typographically inappropriate ligature, and a Type~II error is the improper suppression of a typographically appropriate ligature.}\textsuperscript{,}\footnote{1,000 words contained more than one potential f-ligature, hence the difference.} Fortunately (for me at least), they also discovered that a non-negligible part of the 69,000 errors wasn't real but, rather, the result of typos in the words included in the corpus and/or of incorrect morphological analysis. The detailed Type~I and~II error lists they generated were critical in helping me refine\textemdash and occasionally revise completely\textemdash the package's \cmmd{nolig} and \cmmd{keeplig} rules, rapidly bringing down the number of Type~I and~II errors.\footnote{For instance, after Steffen wrote the lua code that made possible the \cmmd{keeplig} macro, I was able to eliminate, in one fell swoop, more than 10,000~[!!] Type~II errors generated by the package's earlier, incorrect suppression of the fl-ligature in words that contain the morpheme \opt{pflicht}. } All major changes to the German language ligature suppression patterns are still being subjected to their testing algorithms to streamline the tasks of detecting what's left to improve and catching any newly introduced errors. -Felix and Steffen started the automated testing of the package's |\nolig| and |\keeplig| rules as their finals project for the course \emph{Introduction to Computational Linguistics} at the University of Massachusetts at Amherst in the fall of 2012.\footnote{Their \href{https://github.com/SHildebrandt/selnolig-check}{code} and \href{https://github.com/SHildebrandt/selnolig-check/blob/master/selnolig-check-documentation.pdf?raw=true}{finals paper} is available online.} They wish to thank the Institut für Maschinelle Sprachverarbeitung at the Universität Stuttgart for granting them a license for the morphological analysis tool SMOR\footnote{Schmid, H., A. Fitschen, and U. Heid, 2004, \enquote{SMOR: A German Computational Morphology Covering Derivation, Composition, and Inflection}, \emph{Proceedings of the IVth International Conference on Language Resources and Evaluation (LREC)}, pp.~1263--1266, Lisbon, Portugal.} and, in particular, Helmut Schmid for his guidance. They also express their gratitude to the \emph{Web-as-Corpus kool ynitiative} (\emph{WaCky}) for letting them use the SDeWaC corpus,% -\footnote{Baroni, M., S.~Bernardini, A.~Ferraresi, and E.~Zanchetta, 2009, \enquote{The WaCky Wide Web: A Collection of Very Large Linguistically Processed Web-Crawled Corpora}, \emph{Language Resources and Evaluation}, 43~(3), pp. 209--226.} as well as to Rajesh Bhatt (University of Massachusetts at Amherst), Miriam Butt (Universität Konstanz), and Sabine Schulte im~Walde (Universität Stuttgart) for helping them find the right resources for their project. +Felix and Steffen started the automated testing of the package's |\nolig| and |\keeplig| rules as their finals project for the course \emph{Introduction to Computational Linguistics} at the University of Massachusetts at Amherst in the fall of 2012.\footnote{Their \href{https://github.com/SHildebrandt/selnolig-check}{code} and \href{https://github.com/SHildebrandt/selnolig-check/blob/master/selnolig-check-documentation.pdf?raw=true}{finals paper} is available online.} They wish to thank the Institut für Maschinelle Sprachverarbeitung at the Universität Stuttgart for granting them a license for the morphological analysis tool SMOR\footnote{Schmid, H., A. Fitschen, and U. Heid, 2004, \enquote{SMOR: A German Computational Morphology Covering Derivation, Composition, and Inflection}, \emph{Proceedings of the IVth International Conference on Language Resources and Evaluation (LREC)}, pp.~1263--1266, Lisbon, Portugal.} and, in particular, Helmut Schmid for his guidance. They also express their gratitude to the \emph{Web-as-Corpus kool ynitiative} (\emph{WaCky}) for letting them use the SDeWaC corpus,\footnote{Baroni, M., S.~Bernardini, A.~Ferraresi, and E.~Zanchetta, 2009, \enquote{The WaCky Wide Web: A Collection of Very Large Linguistically Processed Web-Crawled Corpora}, \emph{Language Resources and Evaluation}, 43~(3), pp. 209--226.} as well as to Rajesh Bhatt (University of Massachusetts at Amherst), Miriam Butt (Universität Konstanz), and Sabine Schulte im~Walde (Universität Stuttgart) for helping them find the right resources for their project. The \href{http://www.ctan.org/tex-archive/support/rmligs}{\pkg{rmligs}} script lists hundreds of German language words for which various f\nobreak-liga\-tures should be suppressed. I created many of the initial German language ligature suppression rules of the \pkg{selnolig} package to treat the words listed in the \pkg{rmligs} package.\footnote{All versions of the \pkg{rmligs} package are archived at \url{http://www.j3e.de/ispell/igerman98/dict/}.} -Matthias Vogel very kindly shared with me a set of regular-expression based ligature suppressing macros, named \href{http://www.winedt.org/Macros/LaTeX/Ligatures-German.php}{Ligatures-German}, he wrote for the WinEdt programmer's editor. Matthias's macros work by inserting \pkg{babel}-style (\Verb+"|+) ligature suppressing shortcut directives in the appropriate spots in the |.tex| file (which can then be compiled with pdf\LaTeX). These macros, and a file he sent me containing an extensive list of German words for which one or more f-ligatures should be suppressed, led me to thoroughly refine and extend the scope of the \pkg{selnolig} package's German language ligature suppressing rules. +Matthias Vogel very kindly shared with me a set of regular-expression based ligature suppressing macros, named \href{http://www.winedt.org/Macros/LaTeX/Ligatures-German.php}{Ligatures-German}, he wrote for the WinEdt programmer's editor. Matthias's macros work by inserting \pkg{babel}-style~\Verb+"|+ ligature-suppressing directives in the appropriate places in the |.tex| file, which can then be compiled with pdf\LaTeX. These macros, and a file he sent me containing an extensive list of German words for which one or more f-ligatures should be suppressed, led me to thoroughly refine and extend the scope of the \pkg{selnolig} package's German language ligature suppressing rules. -Barbara Beeton provided careful and incisive comments on an early version of the package's user guide and English language ligature suppression rules.\footnote{She also pointed out to me that the readability of my surname might be enhanced if it were typeset as \emph{Loretan} instead of as \emph{\uselig{Loretan}}\dots} A suggestion received from David Bellows led me to extend some of the \cmmd{nolig} rules in Part~2 (activated by setting the option |broadf|) of the file \pkg{selnolig-english-patterns.sty}. Other contributors to \url{tex.stackexchange.com} and \url{comp.text.tex}, too numerous to name individually, also helped guide and influence the genesis of this package. To all of you, I express my sincere thanks. +Barbara Beeton provided detailed and incisive comments on an early version of the package's user guide and its English language ligature suppression rules.\footnote{She also noted that the readability of my surname might be enhanced if it were typeset as \emph{Loretan} instead of as \emph{\uselig{Loretan}}\dots} David Bellows provided a suggestion that led me to extend some of the \cmmd{nolig} rules in Part~2 (activated by setting the option |broadf|) of the file \pkg{selnolig-english-patterns.sty}. Other contributors to \url{tex.stackexchange.com} and \url{comp.text.tex}, too numerous to name individually, also helped guide and influence the genesis of this package. To all of you, I express my sincere thanks. The website \url{http://www.morewords.com} provides very convenient methods for searching English language words that may contain cases of ligature collisions across morpheme boundaries. For German words, the site \url{http://corpora.informatik.uni-leipzig.de/?dict=de} provides a similar resource. - \clearpage \appendix \selnoligoff % turn off selnolig's macros @@ -778,10 +817,10 @@ The website \url{http://www.morewords.com} provides very convenient methods for \clubpenalty100 \widowpenalty100 -\small % reduce font size by 1pt +\small % reduce text font size from 11pt to 10pt -\section[English-language ligature suppression rules: selnolig-english-patterns.sty]{English-language ligature suppression rules: \\ +\section[English-language ligature suppression rules: selnolig-english-patterns.sty]{English-language ligature suppression rules: \pkg{selnolig-english-patterns.sty}} \label{sec:eng-listing} @@ -791,11 +830,10 @@ The website \url{http://www.morewords.com} provides very convenient methods for \clearpage \section[German-language ligature suppression rules: -selnolig-german-patterns.sty]{German-language ligature suppression rules: \\ -\pkg{selnolig-german-patterns.sty}} +selnolig-german-patterns.sty]{German-language ligature suppression rules: \pkg{selnolig-german-patterns.sty}} \label{sec:germ-listing} -Introductory note: To accommodate the practice of Swiss-German writers of not using the \enquote{ß} character and using \enquote{ss} in its place, all search-and-insert strings that contain an \enquote{ß} character are duplicated with equivalent search-and-insert strings containing \enquote{ss}. +Introductory note: To accommodate the practice of Swiss-German writers of not using the \enquote{ß} character and using \enquote{ss} in its place, all search-and-insert strings that contain an \enquote{ß} character are duplicated with equivalent search-and-insert strings containing~\enquote{ss}. \bigskip @@ -806,6 +844,7 @@ Introductory note: To accommodate the practice of Swiss-German writers of not us \clearpage \section[The package's main style file: selnolig.sty] {The package's main style file: \pkg{selnolig.sty}} +\label{sec:sty} \VerbatimInput{selnolig.sty} @@ -815,6 +854,254 @@ Introductory note: To accommodate the practice of Swiss-German writers of not us \VerbatimInput{selnolig.lua} +\clearpage +\selnoligon +\section{A case study: f-ligatures suppressed in Thomas Mann's \emph{Die Buddenbrooks}} \label{sec:budd} + + +As noted in the introduction, in English language documents the suppression of ligatures that cross morpheme boundaries is generally not considered to be an urgent typographical priorities, quite possibly because ligatures that cross morpheme boundaries don't arise frequently. I did a quick check of this claim by compiling Jack London's novels \emph{Call Of The Wild} and \emph{The Sea Wolf}, obtained from Project Gutenberg's site in plain-text format, with \pkg{selnolig}. Sure enough, in \emph{Call Of The Wild} only one f-ligature is suppressed: the \enquote{fl} in \uselig{wolflike}\slash wolflike. In \emph{The Sea Wolf}, again only one f-ligature is suppressed: the \enquote{ft} in \uselig{fifth}\slash fifth. Not exactly a lot of words, right?! + +The situation is quite different for German texts. E.g., in Thomas Mann's novel \emph{Die Buddenbrooks}, more than 440 words are caught by \pkg{selnolig}'s rules; they are listed below. Incidentally, the fi-ligature in the words Kaufinger and Kaufingerstraße is suppressed because \enquote{\uselig{Kaufinger}} (\enquote{chew-finger}) looks unintentionally hilarious. + +\enlargethispage{1\baselineskip} + +{\RaggedRight +\noindent +\begin{tabularx}{\textwidth}{@{}lX@{}} +\midrule[\heavyrulewidth] +f-lig.\ & Words for which the f-lig.\ is suppressed by \pkg{selnolig}'s rules\\ +\midrule +{\ebg \uselig{fb}, \uselig{ffb}} & +Aufbahrung, +aufbegehrt, +aufbegehrte, +Aufbewahrungsort, +Aufbietung, +aufblicken, +aufblitzenden, +aufblitzt, +aufblitzten, +aufblühende, +aufbrach, +aufbrechen, +aufbringen, +aufbringt, +Aufblick, +Aufbrausen~(2), +Aufbruch~(4), +Briefbeschwerer, +Dampfbrot, +daraufbringen, +greifbaren, +Greifbares, +heraufbefördert, +hinaufblickte, +Hofbräu, +Hofbräuhaus~(3), +Hofbräuhause, +Kopfbewegung~(3), +Kopfbewegungen, +Krippenaufbaus, +Laufbahn, +Privatbriefbogen, +Scharfblick, +Schiffbrüchen, +Schlafbedürfnis, +steifbeinigen, +Stiefbruder~(4), +strafbar~(2), +tiefbelustigt, +tiefblauen~(2), +unangreifbar\\ %% +ff & +Auffahren, +Auffahrt, +auffallend~(5), +auffassen, +Auffassung, +auffordern~(2), +aufforderte~(4), +Aufforderung~(2), +Aufforderungen, +Aufführung, +auffällig~(2), +auffällige~(2), +auffälliger~(2), +auffällt, +aufführen, +aufführte, +fünffacher~(2), +herauffuhr, +heraufführte, +Kauffahrteischiffen, +Liebhaberaufführung, +Schlaffrisur, +unauffällig, +unauffällige\\ %% +ffi & Auffinden\\ %% +ffl & +ffl $\to$ f\kern0ptfl: +Aufflackern, +aufflog; +ffl $\to$ ff\kern0ptl: +unübertrefflich~(3), +unübertrefflichen, +vortrefflich~(11), +vor\-treff\-li\-che~(2), +vortrefflichen, +vortrefflicher, +vortreffliches, +vortrefflichsten\\ %% +{\ebg \uselig{fh}, \uselig{ffh}} & +aufheben~(3), +Aufhebens, +aufhebt, +Aufhebung, +aufheitert, +aufhellte, +aufhielt~(3), +Aufhorchend, +aufhorchenden, +aufhält~(2), +aufhören~(14), +aufhörte~(6), +daraufhin~(2), +Fünfhausen~(2), +fünfhundert~(5), +Hundertsiebenundzwanzigtausendfünfhundert~[!!], +Kaufherren~(2), +krampfhaft~(6), +krampfhafte~(2), +krampfhafte, +krampfhaften~(4), +Schlaffheit, +Steifheit~(2), +unaufhaltsam~(5), +unaufhaltsame, +unaufhaltsamen, +unaufhaltsamer, +unaufhörlich~(14), +unaufhörliche, +unaufhörlichen\\ %% +fi & +Kaufinger, +Kaufingerstraße, +tiefinnere\\ %% +{\ebg \uselig{fj}} & +Aufjauchzen, +elfjährig, +fünfjährigen, +zwölfjährig~(2)\\ +{\ebg \uselig{fk}, \uselig{ffk}} & +aufkam, +aufklingen, +aufklärte, +Aufklärung, +aufkommen, +Briefkas\breaklig{}ten, +Haffkrug, +heraufkamen, +heraufkommen~(3), +Heraufkommenden, +Kehlkopfknoten, +Kopfkissen~(2), +Napfkuchens, +Stopfkugel~(2)\\ +fl & +auflehnte, +aufleuchtete~(2), +auflösen, +auflöste, +Auflösung~(11), +begreiflich, +Begreiflicherweise, +be\-hilf\-lich~(6), +beruflichen~(3), +glimpflich~(2), +gräflichen, +Großkaufleuten, +Handgreifliches, +hilflos~(7), +hilfloses, +Hilf\-losigkeit~(2), +Hilflosigkeitsgefühl, +hinaufläuft, +höflich~(7), +höfliche~(2), +höflichen, +Höflichkeit~(6), +Höflichkeitsform, +höflichst, +kampflose, +kampflosen, +Kaufleute~(9), +Kaufleute-Witwenkasse, +Kauf\-leuten~(3), +Knopfloch, +käuflich~(2), +reiflich, +schimpfliche, +schimpflichen, +schlaflos, +schlaflose, +schlaflosen, +Schlaflosigkeit, +steiflehnige, +teuflischem, +teuflischer, +teuflisches, +tiefliegende, +tiefliegenden~(20), +unbegreif\-lich~(3), +unbegreifliche, +unbegreiflichen~(3), +unbegreiflicher, +Unbegreiflicherweise, +unerschöpflich, +unhöflichen, +Verzweiflung~(23), +verzweiflungsvoll~(2), +Zöpflein, +zweifle~(2)\\ +ft & +auftat~(2), +auftauchen, +auftauchte, +auftauen, +auftreten, +Auftreten~(3), +Auftritt~(3), +Auftritte~(2), +Auftritten, +Auftrittes, +auftrittst, +Aufträge, +Briefträger, +elftausend, +Elfter, +Elftes~(3), +fünftausend~(2), +fünften~(3), +fünfter, +Fünfter, +Fünftes~(9), +Hoftheater, +Hoftheaterbesuchen, +Hoftore, +Hoftore, +Hoftür, +schlaftrunkenen, +schlaftrunkener, +Schnupftuch~(3), +Schnupftuche, +Schnupftuches, +Tauftages, +Zwölftes\\ +\bottomrule +\end{tabularx} +} + +\selnoligoff \clearpage \section[Reporting bugs and other issues with the selnolig package: A suggested template]{Reporting bugs and other issues with the \pkg{selnolig} package:\\A suggested template} \label{sec:template} diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-hyphex.sty b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-hyphex.sty index a2bff825fce..589d48e0361 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-hyphex.sty +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-hyphex.sty @@ -2,7 +2,7 @@ % !TEX TS-program = lualatex \ProvidesPackage{selnolig-english-hyphex}% -[2013/06/30] +[2013/08/08] % This entire package is placed under the % terms of the LaTeX Project Public License, @@ -14,9 +14,11 @@ % (loretan dot mico at gmail dot com) -\hyphenation{re-roof re-roof-ing be-dwarf - be-dwarf-ing be-gulf be-gulf-ing feoff en-feoff in-feoff re-staff re-stuff - dam-sel dam-sel-fish dam-sel-fly dam-sel-flies dis-tel-fink but-ter-fin-ger +\hyphenation{re-roof re-roof-ing + be-dwarf be-dwarf-ing be-gulf be-gulf-ing feoff en-feoff in-feoff + re-staff re-stuff + dam-sel dam-sel-fish dam-sel-fly dam-sel-flies + dis-tel-fink but-ter-fin-ger man-tel-shelf man-tel-shelf-ful man-tel-shelf-fuls dwarf-ish elf-ish oaf-ish serf-ish un-self-ish wolf-ish draff-ish gi-raff-ish raff-ish @@ -49,7 +51,8 @@ chaf-finch chaf-finches wolf-fish fif-ties fif-ti-eth fif-ti-eths fif-ty-ish half-tone half-tones roof-top roof-tops - bat-house boat-house cat-house proph-et-hood rat-hole boat-hook meat-hook pot-hook + bat-house boat-house cat-house proph-et-hood rat-hole + boat-hook meat-hook pot-hook foot-hold root-hold ant-hill foot-hill goat-herd neat-herd boat-houses cat-houses rat-holes boat-hooks meat-hooks pot-hooks foot-holds root-holds ant-hills foot-hills goat-herds neat-herds @@ -146,6 +149,7 @@ re-tiled re-tiles re-til-ing ret-ina ret-i-nae ret-i-nas ret-i-nal ret-i-nal ret-ina-cula ret-ina-cu-lum ret-i-form + cats-kills peeks-kill } \ifnum\righthyphenmin=2 @@ -177,7 +181,8 @@ pleth-o-ra meth-od greens-keep-er grounds-keep-er for-tune-tell-er in-tra-tho-rac-ic aro-ma-ther-a-py - ar-che-typ-al free-think-er} + ar-che-typ-al free-think-er + in-fra-spe-cif-ic in-tra-spe-cif-ic} \else \hyphenation{beef-ier comf-ier goof-ier gulf-ier leaf-ier surf-ier turf-ier diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-patterns.sty b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-patterns.sty index 11b29684376..3246ddd182e 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-patterns.sty +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-english-patterns.sty @@ -2,7 +2,7 @@ % !TEX TS-program = lualatex \ProvidesPackage{selnolig-english-patterns}% -[2013/06/30] +[2013/08/08] % This entire package is placed under the % terms of the LaTeX Project Public License, @@ -432,6 +432,11 @@ % aesthetic esthetic unesthetic % prosthetist +\nolig{Charlest}{Charles|t} + % Charleston +\nolig{Reston}{Res|ton} + % Reston (Washington DC suburb) + \nolig{stown}{s|town} % crosstown Williamstown @@ -484,9 +489,10 @@ \nolig{Misp}{Mis|p} % misplace misperception misprint -\nolig{susp}{sus|p} -\nolig{Susp}{Sus|p} - % suspend suspension suspicious +\nolig{suspen}{sus|pen} +\nolig{Suspen}{Sus|pen} + % suspend suspension + \nolig{sph}{s|ph} % 'ph' from Greek 'phi'! % atmosphere biosphere hemisphere % spherical asphodel phosphorous phosphate @@ -518,6 +524,10 @@ % newsprint % Don't suppress sp lig in "newspeak"! +\nolig{Hyannisp}{Hyannis|p} + % Hyannisport +\nolig{Keyespo}{Keyes|po} + % Keyesport \nolig{Williamsp}{Williams|p} % Williamsport @@ -1030,6 +1040,12 @@ \nolig{Ausp}{Au|sp} % auspicious inauspicious +\nolig{Suspect}{Su|spect} +\nolig{suspect}{su|spect} + % suspect suspects +\nolig{uspici}{u|spici} + % suspicion suspicious + % (iii) at and et preceding th % ............................ diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-hyphex.sty b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-hyphex.sty index b6a391b285d..3df9291a1c3 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-hyphex.sty +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-hyphex.sty @@ -3,7 +3,7 @@ \RequirePackage{ifluatex} \ProvidesPackage{selnolig-german-hyphex}% -[2013/06/30] +[2013/08/08] % This entire package is placed under the % terms of the LaTeX Project Public License, diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-patterns.sty b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-patterns.sty index 66bcd985411..f12cd120a8c 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-patterns.sty +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig-german-patterns.sty @@ -2,7 +2,7 @@ % !TEX TS-program = lualatex \ProvidesPackage{selnolig-german-patterns}% -[2013/06/30] +[2013/08/08] % This entire package is placed under the % terms of the LaTeX Project Public License, @@ -1021,9 +1021,9 @@ % Schenkelklopflektüre \nolig{fler}{f|ler} % Freiberufler Löffler Büffler Schnüffler Höfler - \keeplig{Hoefler} % name of a famous font designer + \keeplig{Hoefler} % a famous font designer! \nolig{fleut}{f|leut} - % Hofleute + % Hofleute Kaufleute \nolig{flich}{f|lich} % tariflich reiflich glimpflich ... @@ -1129,8 +1129,7 @@ \keeplig{iopflast} % Biopflaster \keeplig{nopflaster}% Kinopflaster \keeplig{opflair} % Popflair - \keeplig{opflanz} - % Kakaopflanzen Indigopflanzen + \keeplig{opflanz} % Kakaopflanzen \nolig{öpfle}{öpf|le} % köpfle tröpfle Knöpfle \nolig{orflad}{orf|lad} @@ -1889,6 +1888,7 @@ \nolig{fb}{f|b} \nolig{fh}{f|h} \nolig{fk}{f|k} + % However, there are names of *non-German* % origin for which the 'fk' ligature % shouldn't be suppressed: diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig.lua b/Master/texmf-dist/tex/lualatex/selnolig/selnolig.lua index 8a9b34b765c..6b2931190f0 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig.lua +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig.lua @@ -1,10 +1,10 @@ --- Lua code for the selnolig package, to be loaded --- with an instruction such as +-- Lua code for the selnolig package. +-- To be loaded with an instruction such as -- \directlua{ require("selnolig.lua") } -- from a (Lua)LaTeX .sty file. -- -- Author: Mico Loretan (loretan dot mico at gmail dot com) --- (with crucial contributions by Taco Hoekwater, +-- (with crucial contributions from Taco Hoekwater, -- Patrick Gundlach, and Steffen Hildebrandt) -- -- The entire selnolig package is placed under the terms @@ -15,14 +15,16 @@ selnolig = { } selnolig.module = { name = "selnolig", - version = "0.250", - date = "2013/06/30", + version = "0.254", + date = "2013/08/08", description = "Selective suppression of typographic ligatures", author = "Mico Loretan", copyright = "Mico Loretan", license = "LPPL 1.3 or later" } +debug=false -- default: don't output detailed information + -- Define variables corresponding to various text nodes; -- cf. sections 8.1.2 and 8.1.4 of LuaTeX reference guide local rule = node.id('rule') @@ -40,7 +42,6 @@ end local identifier = 123456 -- any unique identifier local noliga={} local keepliga={} -- String -> Boolean -debug=true function debug_info(s) if debug then @@ -183,7 +184,7 @@ end function enable_suppression(val) suppression_on = val if val then - debug_info("Turning ligature suppression on") + debug_info("Turning ligature suppression back on") else debug_info("Turning ligature suppression off") end diff --git a/Master/texmf-dist/tex/lualatex/selnolig/selnolig.sty b/Master/texmf-dist/tex/lualatex/selnolig/selnolig.sty index a2f84a0262e..6ced0b0d924 100644 --- a/Master/texmf-dist/tex/lualatex/selnolig/selnolig.sty +++ b/Master/texmf-dist/tex/lualatex/selnolig/selnolig.sty @@ -13,15 +13,15 @@ % --------------------- \def\selnoligpackagename{selnolig} -\def\selnoligpackageversion{0.250} -\def\selnoligpackagedate{2013/06/30} +\def\selnoligpackageversion{0.254} +\def\selnoligpackagedate{2013/08/08} % Announce who we are. Issue warning message if we're % not running under LuaLaTeX. \typeout{=== Package \selnoligpackagename, Version \selnoligpackageversion, - Date \selnoligpackagedate ===} + Date \selnoligpackagedate\space ===} \ProvidesPackage{selnolig}[\selnoligpackagedate] \RequirePackage{ifluatex} |