From 85b7bc695629926641c7cb752fd478adfdf374f3 Mon Sep 17 00:00:00 2001 From: Marius Date: Sun, 4 Jul 2010 15:32:09 +0300 Subject: stable 2010-05-24 13:10 --- tex/context/base/xtag-hyp.tex | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 tex/context/base/xtag-hyp.tex (limited to 'tex/context/base/xtag-hyp.tex') diff --git a/tex/context/base/xtag-hyp.tex b/tex/context/base/xtag-hyp.tex new file mode 100644 index 000000000..e4e048e2b --- /dev/null +++ b/tex/context/base/xtag-hyp.tex @@ -0,0 +1,69 @@ +%D \module +%D [ file=xtag-hyp, +%D version=2003.11.24, +%D title=\CONTEXT\ XML MAcros, +%D subtitle=Hyphenation, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt XML Macros / Hyphenation} + +%D This filter is kind of obsolete, since \UTF\ is not +%D limited to \XML. So, here we only enable \UTF\ support. + +\ifnum\texengine=\luatexengine + \defineXMLenvironment [hyphenations] [language=\currentlanguage,regime=utf,encoding=\defaultencoding] + {\startnointerference + \defineXMLargument [hyphenation] \hyphenation + \language[\XMLop{language}]} + {\stopnointerference} +\else + \defineXMLenvironment [hyphenations] [language=\currentlanguage,regime=utf,encoding=\defaultencoding] + {\startnointerference + \defineXMLargument [hyphenation] \hyphenation + \language[\XMLop{language}]% + \enableregime[\XMLop{regime}]% + \enableencoding[\XMLop{encoding}]} + {\stopnointerference} +\fi + +\defineXMLsingular [hyphenate] + {\-} + +\defineXMLgrouped [language] [code=\currentlanguage,scope=local] + {\doifelse{\XMLop{scope}}{global}\mainlanguage\language[\XMLop{code}]} + +\defineXMLsingular [language] [code=\currentlanguage] + {\doifelse{\XMLop{scope}}{global}\mainlanguage\language[\XMLop{code}]} + +\defineXMLsingular [compound] [token=-] + {\expanded{\directdiscretionary{\XMLop{token}}}} + +\endinput + +% \mainlanguage[nl] \setupbodyfont[pos] \useXMLfilter[utf,hyp] +% +% \starttext +% +% \hyphenatedword{pati\ediaeresis nten} +% \hyphenatedword{pati\ediaeresis ntenorganisatie} +% \hyphenatedword{pati\ediaeresis ntenplatform} +% +% \startXMLdata +% +% pa-tiën-ten +% pa-tiën-ten-or-ga-ni-sa-tie +% pa-tiën-ten-plat-form +% +% \stopXMLdata +% +% \hyphenatedword{pati\ediaeresis nten} +% \hyphenatedword{pati\ediaeresis ntenorganisatie} +% \hyphenatedword{pati\ediaeresis ntenplatform} +% +% \stoptext -- cgit v1.2.3