summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkxl/s-languages-goodies.mkxl
blob: fd5e66bdaf2af1a2547befe1008dc5a5755305b1 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%D \module
%D   [      file=s-languages-goodies,
%D        version=2021.25.03,
%D          title=\CONTEXT\ Style File,
%D       subtitle=Language Goodies,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\startmodule[languages-goodies]

\registerctxluafile{s-languages-goodies}{autosuffix}

\installmodulecommandluasingle \showlanguagegoodies   {moduledata.languages.goodies.show}
\installmodulecommandluasingle \showlanguageligatures {moduledata.languages.goodies.ligatures}

\stopmodule

\continueifinputfile{s-languages-goodies.mkxl}

% Beware, for now this file is a playground so what gets rendered
% can differ per upload.

\usemodule[art-01]

% \setupbodyfont[libertine]

\setuplanguage[de][goodies={lang-de.llg}]
\setuplanguage[en][goodies={lang-en.llg}]

\mainlanguage[de]

% \setupalign[stretch,verytolerant,flushleft] \dontcomplain

% \startlanguageoptions[de]
%     Zapf|innovation
% \stoplanguageoptions

% \tracinghyphenation3 \tracingonline2

\starttext

    \start
%     \setupalign[stretch,verytolerant,flushleft,nothyphenated] \dontcomplain

%     \showlanguageligatures[language=de,list=ff fi fl fk ft fb ffi ffl fff ffk fft ffb ffh ffj]
%     \showlanguageligatures[language=en,list=ff fi fl fk ft fb ffi ffl fff ffk fft ffb ffh ffj]

%     \starttitle[title={DE}]
%         \start \de \showlanguagegoodies [file={lang-de.llg}] \stop
%     \stoptitle

%     \starttitle[title={EN}]
%         \start \en \showlanguagegoodies[file={lang-en.llg}] \stop
%     \stoptitle

    \page

    \stop

    %     oeps effe
    %     nonexistentffitestcase
    %     nonexistentffltestcase

    \enabletrackers[languages.goodies,languages.applied]

    \start \de \dontcomplain

% general

% 0 : ignore
% 1 : invisible           % {}{}{}
% 2 : no break            % {}{}{}[9]
% 3 : pre                 % {-}{}{}
% 4 : pre replace         % {-}{}{-}
% 5 : post                % {}{-}{}
% 6 : post replace        % {}{-}{-}
% 7 : pre post            % {-}{-}{}
% 8 : pre post replace    % {-}{-}{-}

% \codedef\hccode
% \codedef\hycode

% \hccode"002D = "2010 \hycode"002D = "0 % hyphen minus
% \hccode"00AD = "0000 \hycode"00AD = "1 % soft hyphen
% \hccode"2010 = "2010 \hycode"2010 = "0 % hyphen
% \hccode"2011 = "2010 \hycode"2011 = "2 % non breaking hyphen
% \hccode"2012 = "2012 \hycode"2012 = "0 % figure dash
% \hccode"2013 = "2013 \hycode"2013 = "0 % en dash
% \hccode"2014 = "2014 \hycode"2014 = "0 % em dash


% \permanent\protected\def\cwm{\discretionary preword postword{-}{}{-}}
% \tracingonline2 \tracinghyphenation2

% One can map to exhyphenchar and use a pre/post for that one but if
% really needed \hbcode (before=pre) and \hacode (after=post) can be
% introduced. Maybe only settable runtime via lua.

\hccode"002D = "002D
\hccode"2010 = "2010
\hccode"2013 = "2013
\hccode"2014 = "2014

%     Offline\cwm Anwendungen\par
%     {\hsize 1mm Offline\cwm Anwendungen\par}
%                 Offline-Anwendungen\par
%                 Offline{\char"2010}Anwendungen\par
%     {\hsize 1mm Offline-Anwendungen\par}
%     {\hsize 1mm Offline{\char"2010}Anwendungen\par}
%     {\hsize 1mm Offline{\endash}Anwendungen\par}
%     {\hsize 1mm Offline{\emdash}Anwendungen\par}
    {\hsize 3mm \emdash Offline-Anwendungen\emdash\par}
    {\hsize 3mm \emdash\wordboundary Offline-Anwendungen\wordboundary\emdash\par}
    {\hsize 3mm \quotation{Offline-Anwendungen}\par}
    {\hsize 3mm „Offline-Anwendungen“\par}
    {\hsize 3mm -Offline-Anwendungen-\par}

%                 OfflineAnwendungen\par
%     {\hsize 1mm OfflineAnwendungen\par}
%                 Offline\par
%     {\hsize 1mm Offline\par}


%     \hyphenationmode\bitwiseflip\hyphenationmode-\forcehandlerhyphenationcode

%     \de \dontcomplain

%     \startexceptions[de]
%         multi-cul-ti{-}{}{-}word{-}{}{-}boun-daries
%     \stopexceptions

%     {multiculti-word-boundaries\par}
%     {multicultiwordboundaries\par}
%     {\hsize 1mm multicultiwordboundaries\par}
%     {\hsize 1mm multiculti-word-boundaries\par}
%     {\hsize 1mm multiwordboundaries\par}

    \stop
\stoptext