summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/selnolig/selnolig-english-test.tex
blob: a057a0e6fe38a567d45f7f88d01793d9c4fc56d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% !TEX TS-program = lualatex
\documentclass{article}

% Test program: Apply the 'selnolig' package, with
% 'english' language option set, to a list of English
% words which contain various character pairs that
% should not be ligated. The list of English words is 
% in the companion file 'selnolig-english-wordlist.tex'.
%
% Author: Mico Loretan (loretan dot mico at gmail dot com)
% Date: 2013/05/25

% Check first that we're running Lua(La)TeX.
\usepackage{ifluatex}
\ifluatex\else
  \typeout{===============================================}
  \typeout{The file selnolig-english-test.tex must be     }
  \typeout{compile using lualatex. Exiting immediately.   }
  \typeout{===============================================}
  \endinput
\fi

\usepackage[margin=1in]{geometry}

\righthyphenmin=2 % set this to either 3 (normal) or 2

\usepackage{fancyvrb}

\usepackage{fontspec}

\defaultfontfeatures{%
     Ligatures={TeX,Common,Rare},
     Numbers  = OldStyle}

\setmainfont[ FeatureFile= gpp-ft.fea,
              ItalicFont = {Garamond Premier Pro Italic},
              BoldFont   = {Garamond Premier Pro}]
    {Garamond Premier Pro}

\setmonofont[Scale=MatchLowercase,
             Ligatures=NoCommon]
            {Consolas}

\newfontfamily\ebg[ 
    Ligatures = {TeX,Common,Rare,Historic},
    ItalicFont = {EB Garamond 12 Italic}]
    {EB Garamond 12 Regular}

\usepackage[document]{ragged2e}
\usepackage[english,hdlig,broadf]{selnolig}

\usepackage{showhyphens}

\setlength\parindent{0pt}
\parskip=0.3\baselineskip
\usepackage{multicol}
  \setlength\columnseprule{.4pt}
\title{selnolig-english-test}
\author{\null}
\date{}

\begin{document}
\maketitle

\begin{tabular}{@{}*{10}{l}}
Appearance of f-ligatures 
   &ff &fi &fl &ffi &ffl &ft & \mbox{fj} & {\ebg\mbox{fk}} 
   & \emph{fr}\\
Sample words with these ligatures
   &off &fit &fly &office &baffle &often & fjord 
   &{\ebg Kafka} &\emph{from}\\
\end{tabular}

\bigskip

\begin{tabular}{@{}*{13}{l}}
Appearance of other ligatures 
 & st & ct & sp  
 & \emph{as} & \emph{is, th, us}
 & \emph{at} & \emph{et} & {\ebg\emph{sk}}& \emph{ll}\\
Sample words with these ligatures
 & stay & act & spy 
 & \emph{was} & \emph{\mbox{is}thmus} & \emph{cat} & \emph{net} 
 & {\ebg\emph{ask}} & \emph{ill}\\
\end{tabular}


\bigskip

\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 \\

\end{tabular}
\makeatother

\bigskip

\begin{multicols}{2}
\input selnolig-english-wordlist
\end{multicols}
\end{document}