blob: edcfcd0c55f6e130e8ef34d76fa6a79d431e997c (
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
|
% Copyright (c) 2022-2023 Thomas Kelkel kelkel@emaileon.de
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
% LaTeX version 2009/09/24 or later.
% The ligtype package makes use of the German language
% ligature suppression rules of the selnolig package by
% Mico Loretan. The selnolig package can be downloaded at
% https://www.ctan.org/pkg/selnolig
% and may be distributed and/or modified under the
% conditions of the LaTeX Project Public License.
\ProvidesPackage{ligtype}[2023/07/08 v0.3 Comprehensive ligature suppression functionalities]
\RequirePackage{ifluatex,luatexbase}
\ifluatex
\directlua{require ( "ligtype.lua" )}
\DeclareOption{noshortf}{\directlua{ligtype_no_short_f()}}
\DeclareOption{allshortf}{\directlua{ligtype_all_short_f()}}
\DeclareOption{makemarks}{\directlua{ligtype_make_marks()}}
\DeclareOption{kerntest}{\AtEndDocument{\directlua{ligtype_write_ligs()}}}
\DeclareOption{nodefault}{\directlua{ligtype_no_default()}}
\DeclareOption{liglist}{\directlua{ligtype_lig_list()}}
\DeclareOption{connotes}{\directlua{ligtype_con_notes()}}
\ProcessOptions
\def\ligtypeon{\directlua{ligtype_on()}}
\def\ligtypeoff{\directlua{ligtype_off()}}
\def\noligs{\directlua{ligtype_no_ligs()}}
\def\ligs{\directlua{ligtype_ligs()}}
\ligtypeon
\newcommand\nolig[2]{%
\directlua{%
ligtype_parse_macro ( "\luatexluaescapestring{#1}", "\luatexluaescapestring{#2}", true )%
}%
}
\newcommand\keeplig[2]{%
\directlua{%
ligtype_parse_macro ( "\luatexluaescapestring{#1}", "\luatexluaescapestring{#2}", false )%
}%
}
\else
\errhelp{Compile with LuaLaTeX to be able to use the "ligtype" package.}
\errmessage{Package "ligtype" error: This package requires LuaLaTeX!}
\fi
|