1%D \module 2%D [ file=s-languages-goodies, 3%D version=2021.25.03, 4%D title=\CONTEXT\ Style File, 5%D subtitle=Language Goodies, 6%D author=Hans Hagen, 7%D date=\currentdate, 8%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] 9%C 10%C This module is part of the \CONTEXT\ macro||package and is 11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12%C details. 13 14\startmodule[languages-goodies] 15 16\registerctxluafile{s-languages-goodies}{autosuffix} 17 18\installmodulecommandluasingle \showlanguagegoodies {moduledata.languages.goodies.show} 19\installmodulecommandluasingle \showlanguageligatures {moduledata.languages.goodies.ligatures} 20 21\stopmodule 22 23\continueifinputfile{s-languages-goodies.mkxl} 24 25% Beware, for now this file is a playground so what gets rendered 26% can differ per upload. 27 28\usemodule[art-01] 29 30% \setupbodyfont[libertine] 31 32\setuplanguage[de][goodies={lang-de.llg}] 33\setuplanguage[en][goodies={lang-en.llg}] 34 35\mainlanguage[de] 36 37% \setupalign[stretch,verytolerant,flushleft] \dontcomplain 38 39% \startlanguageoptions[de] 40% Zapf|innovation 41% \stoplanguageoptions 42 43% \tracinghyphenation3 \tracingonline2 44 45\starttext 46 47 \start 48% \setupalign[stretch,verytolerant,flushleft,nothyphenated] \dontcomplain 49 50% \showlanguageligatures[language=de,list=ff fi fl fk ft fb ffi ffl fff ffk fft ffb ffh ffj] 51% \showlanguageligatures[language=en,list=ff fi fl fk ft fb ffi ffl fff ffk fft ffb ffh ffj] 52 53% \starttitle[title={DE}] 54% \start \de \showlanguagegoodies [file={lang-de.llg}] \stop 55% \stoptitle 56 57% \starttitle[title={EN}] 58% \start \en \showlanguagegoodies[file={lang-en.llg}] \stop 59% \stoptitle 60 61 \page 62 63 \stop 64 65 % oeps effe 66 % nonexistentffitestcase 67 % nonexistentffltestcase 68 69 \enabletrackers[languages.goodies,languages.applied] 70 71 \start \de \dontcomplain 72 73% general 74 75% 0 : ignore 76% 1 : invisible % {}{}{} 77% 2 : no break % {}{}{}[9] 78% 3 : pre % {-}{}{} 79% 4 : pre replace % {-}{}{-} 80% 5 : post % {}{-}{} 81% 6 : post replace % {}{-}{-} 82% 7 : pre post % {-}{-}{} 83% 8 : pre post replace % {-}{-}{-} 84 85% \codedef\hccode 86% \codedef\hycode 87 88% \hccode"002D = "2010 \hycode"002D = "0 % hyphen minus 89% \hccode"00AD = "0000 \hycode"00AD = "1 % soft hyphen 90% \hccode"2010 = "2010 \hycode"2010 = "0 % hyphen 91% \hccode"2011 = "2010 \hycode"2011 = "2 % non breaking hyphen 92% \hccode"2012 = "2012 \hycode"2012 = "0 % figure dash 93% \hccode"2013 = "2013 \hycode"2013 = "0 % en dash 94% \hccode"2014 = "2014 \hycode"2014 = "0 % em dash 95 96 97% \permanent\protected\def\cwm{\discretionary preword postword{-}{}{-}} 98% \tracingonline2 \tracinghyphenation2 99 100% One can map to exhyphenchar and use a pre/post for that one but if 101% really needed \hbcode (before=pre) and \hacode (after=post) can be 102% introduced. Maybe only settable runtime via lua. 103 104\hccode"002D = "002D 105\hccode"2010 = "2010 106\hccode"2013 = "2013 107\hccode"2014 = "2014 108 109% Offline\cwm Anwendungen\par 110% {\hsize 1mm Offline\cwm Anwendungen\par} 111% Offline-Anwendungen\par 112% Offline{\char"2010}Anwendungen\par 113% {\hsize 1mm Offline-Anwendungen\par} 114% {\hsize 1mm Offline{\char"2010}Anwendungen\par} 115% {\hsize 1mm Offline{\endash}Anwendungen\par} 116% {\hsize 1mm Offline{\emdash}Anwendungen\par} 117 {\hsize 3mm \emdash Offline-Anwendungen\emdash\par} 118 {\hsize 3mm \emdash\wordboundary Offline-Anwendungen\wordboundary\emdash\par} 119 {\hsize 3mm \quotation{Offline-Anwendungen}\par} 120 {\hsize 3mm „Offline-Anwendungen“\par} 121 {\hsize 3mm -Offline-Anwendungen-\par} 122 123% OfflineAnwendungen\par 124% {\hsize 1mm OfflineAnwendungen\par} 125% Offline\par 126% {\hsize 1mm Offline\par} 127 128 129% \hyphenationmode\bitwiseflip\hyphenationmode-\forcehandlerhyphenationmodecode 130 131% \de \dontcomplain 132 133% \startexceptions[de] 134% multi-cul-ti{-}{}{-}word{-}{}{-}boun-daries 135% \stopexceptions 136 137% {multiculti-word-boundaries\par} 138% {multicultiwordboundaries\par} 139% {\hsize 1mm multicultiwordboundaries\par} 140% {\hsize 1mm multiculti-word-boundaries\par} 141% {\hsize 1mm multiwordboundaries\par} 142 143 \stop 144\stoptext 145 |