summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/languages
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-18 17:05:11 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-18 17:05:11 +0200
commit50928735daee408de73737b055b2535d96424824 (patch)
treea16ca5d16734b5bc146f053fe0368e61f4c72400 /doc/context/sources/general/manuals/languages
parent3eb2d078f0023266585aec42d98326d72567b9d6 (diff)
downloadcontext-50928735daee408de73737b055b2535d96424824.tar.gz
2016-07-18 16:51:00
Diffstat (limited to 'doc/context/sources/general/manuals/languages')
-rw-r--r--doc/context/sources/general/manuals/languages/languages-back.tex14
-rw-r--r--doc/context/sources/general/manuals/languages/languages-basics.tex20
-rw-r--r--doc/context/sources/general/manuals/languages/languages-contents.tex13
-rw-r--r--doc/context/sources/general/manuals/languages/languages-cover.tex133
-rw-r--r--doc/context/sources/general/manuals/languages/languages-environment.tex350
-rw-r--r--doc/context/sources/general/manuals/languages/languages-goodies.tex4
-rw-r--r--doc/context/sources/general/manuals/languages/languages-hyphenation.tex96
-rw-r--r--doc/context/sources/general/manuals/languages/languages-labels.tex4
-rw-r--r--doc/context/sources/general/manuals/languages/languages-mkiv.tex72
-rw-r--r--doc/context/sources/general/manuals/languages/languages-numbering.tex34
-rw-r--r--doc/context/sources/general/manuals/languages/languages-sorting.tex4
11 files changed, 163 insertions, 581 deletions
diff --git a/doc/context/sources/general/manuals/languages/languages-back.tex b/doc/context/sources/general/manuals/languages/languages-back.tex
deleted file mode 100644
index aadcc3aa4..000000000
--- a/doc/context/sources/general/manuals/languages/languages-back.tex
+++ /dev/null
@@ -1,14 +0,0 @@
-% \doifmodeelse {simple} {
-%
-% \page
-% \page[empty,left]
-%
-% \startMPpage
-% DrawCoverPage("back") ;
-% \stopMPpage
-%
-% } {
-%
-% % not needed as it's part of the cover page
-%
-% }
diff --git a/doc/context/sources/general/manuals/languages/languages-basics.tex b/doc/context/sources/general/manuals/languages/languages-basics.tex
index 39ce840f3..840897096 100644
--- a/doc/context/sources/general/manuals/languages/languages-basics.tex
+++ b/doc/context/sources/general/manuals/languages/languages-basics.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-basics
+\environment languages-environment
+
\startchapter[title=Some basics][color=darkyellow]
\startsection[title={Introduction}]
@@ -35,11 +35,11 @@ up to users to provide the information.}
\getbuffer
-\noindentation You can call up such a table with the following commands:
+You can call up such a table with the following commands:
\typebuffer
-\noindentation Instead you can run \type {context --global languages-system.mkiv}.
+Instead you can run \type {context --global languages-system.mkiv}.
As you can see, many languages have hyphenation patterns but for Japanese,
Korean, Chinese as well as Arabic languages they make no sense. The patterns are
@@ -107,7 +107,7 @@ In the line 4 we have a \type {\-} between the two words, and in the last
line just a \type {-}. If you look closely you will notice that the snippets
can be quite small. If we typeset a word with a 1mm text width we get this:
-\blank \noindentation \start \en \hsize 1mm incredibly \par \stop \blank
+\blank \start \en \hsize 1mm incredibly \par \stop \blank
If you are familiar with the details of hyphenation, you know that the number of
characters at the end and beginning of a word is controlled by the two variables
@@ -122,7 +122,7 @@ a language. It is insensitive for capitalization as the following text shows:
\blank
-\startnarrower \noindentation
+\startnarrower
\hyphenatedword {This time the musical distraction while developing code came
from watching youtube performances of Cory Henry (also known from Snarky Puppy,
a conglomerate of excellent players). Just search the web for his name with \quote
@@ -139,7 +139,7 @@ are of course many more fantastic musicians.}
\blank
-\noindentation Of course, names are often short and don't need to be hyphenated
+Of course, names are often short and don't need to be hyphenated
(or the left and right settings prohibit it). Another complication with names is
that they can come from another language so we either need to switch language
temporarily or we need to add an exception (more about that later).
@@ -315,9 +315,9 @@ are several ways to do this:
\typebuffer
-\noindentation This typesets:
+This typesets:
-\blank \start \setupindenting[no] \getbuffer \stop \blank
+\blank \startpacked \setupindenting[no] \getbuffer \stoppacked \blank
When you use setups you can use the following trick:
@@ -337,7 +337,7 @@ When you use setups you can use the following trick:
\typebuffer
-\noindentation As expected we get:
+As expected we get:
\blank \start \setupindenting[no] \getbuffer \stop \blank
diff --git a/doc/context/sources/general/manuals/languages/languages-contents.tex b/doc/context/sources/general/manuals/languages/languages-contents.tex
deleted file mode 100644
index 10fadb56b..000000000
--- a/doc/context/sources/general/manuals/languages/languages-contents.tex
+++ /dev/null
@@ -1,13 +0,0 @@
-% language=uk
-
-\startcomponent languages-contents
-
-\environment languages-environment
-
-\starttitle[title=Contents][color=darkgray]
-
-\placelist[chapter][criterium=text]
-
-\stoptitle
-
-\stopcomponent
diff --git a/doc/context/sources/general/manuals/languages/languages-cover.tex b/doc/context/sources/general/manuals/languages/languages-cover.tex
deleted file mode 100644
index 75a033b5f..000000000
--- a/doc/context/sources/general/manuals/languages/languages-cover.tex
+++ /dev/null
@@ -1,133 +0,0 @@
-% language=uk
-
-\startcomponent languages-cover
-
-\environment languages-environment
-
-\startbuffer[abstract]
-
-This book explains how we support languages (and
-scripts) in \CONTEXT\ \MKIV\ and \LUATEX. Some of
-the mechanisms discussed are generic and not
-\CONTEXT\ specific. We discuss the way languages are
-dealt with in the engine, hyphenation, standard
-features and additional goodies. Tracing and the
-extensibility of code are also discussed.
-
-\stopbuffer
-
-\startsetups document:abstract
- \framed [
- foregroundstyle=bold,
- foregroundcolor=white,
- width=7.5cm,
- align={normal,tolerant},
- frame=off,
- strut=no,
- ] {
- \getbuffer[abstract]
- }
-\stopsetups
-
-\startMPextensions
-
- def DrawCoverPage (expr what) =
-
- begingroup ;
-
- save SpineWidth ; numeric SpineWidth ; SpineWidth := 8mm ;
- save PaperBleed ; numeric PaperBleed ; PaperBleed := 2mm ; % todo
-
- StartCover ;
-
- save width, size, anchor ;
-
- numeric width, size ; pair anchor, offset ;
-
- color ColorVariant[] ;
-
- % ColorVariant[1] := \MPcolor{darkred} ;
- % ColorVariant[2] := \MPcolor{darkgreen} ;
- % ColorVariant[3] := \MPcolor{darkblue} ;
- % ColorVariant[4] := \MPcolor{darkyellow} ;
-
- ColorVariant[1] := \MPcolor{darkmagenta} ;
- ColorVariant[2] := \MPcolor{darkorange} ;
- ColorVariant[3] := \MPcolor{darkyellow} ;
- ColorVariant[4] := \MPcolor{darkcyan} ;
-
- fill CoverPage enlarged PaperBleed withcolor \MPcolor{darkgray} ;
-
- fill Spine bottomenlarged -.5CoverHeight withcolor ColorVariant[3] ;
- fill Spine topenlarged -.5CoverHeight withcolor ColorVariant[2] ;
-
- width := FrontPageWidth ;
- height := FrontPageHeight ;
- size := 4 * width / 3 ;
- offset := (-1cm,1cm) ;
- anchor := .5[lrcorner CoverPage,urcorner CoverPage] ;
-
- fill anchored.llft(lltriangle scaled size, urcorner FrontPage) withcolor ColorVariant[1] ;
- fill anchored.urt (urtriangle scaled size, llcorner FrontPage) withcolor ColorVariant[2] ;
- fill anchored.lrt (lrtriangle scaled size, ulcorner FrontPage) withcolor ColorVariant[3] ;
- fill anchored.ulft(ultriangle scaled size, lrcorner FrontPage) withcolor ColorVariant[4] ;
-
- fill anchored.lrt (lrtriangle scaled size, ulcorner BackPage) withcolor ColorVariant[1] ;
- fill anchored.llft(lltriangle scaled size, urcorner BackPage) withcolor ColorVariant[3] ;
- fill anchored.ulft(ultriangle scaled size, lrcorner BackPage) withcolor ColorVariant[2] ;
- fill anchored.urt (urtriangle scaled size, llcorner BackPage) withcolor ColorVariant[4] ;
-
- draw thetextext.llft(textext("\bf Languages in \ConTeXt\hskip-.1em") rotated 45 ysized .350height, anchor shifted (6*offset+offset)) withcolor white ;
- draw thetextext.llft(textext("\bf explaining luatex and mkiv") rotated 45 ysized .275height, anchor shifted (5*offset+offset)) withcolor white ;
- draw thetextext.llft(textext("\bf Hans Hagen") rotated 45 ysized .200height, anchor shifted (2*offset+offset)) withcolor white ;
- draw thetextext.llft(textext("\bf PRAGMA ADE") rotated 45 ysized .200height, anchor shifted (1*offset+offset)) withcolor white ;
-
- % for the moment
-
- draw thetextext.top(textext("\bf work in progress") xsized 4cm, lrcorner Page shifted (-3cm,1cm)) withcolor white ;
-
- % till here
-
- width := BackPageWidth ;
-
- draw thetextext(textext("\bf\setups[document:abstract]") xsized .65width rotated 45 , center BackPage) withcolor white ;
-
- anchor := .5[ulcorner Spine,urcorner Spine] shifted (0,-1cm);
-
- draw thetextext.bot(textext("\bf Languages in \ConTeXt\hskip-.1em") rotated 90 xsized .8SpineWidth, anchor) withcolor white ;
-
- anchor := .5[llcorner Spine,lrcorner Spine] shifted (0,1cm);
-
- draw thetextext.top(textext("\bf Hans Hagen") rotated 90 xsized .8SpineWidth, anchor) withcolor white ;
-
- StopCover ;
-
- if what = "front" :
- clip currentpicture to FrontPage ;
- elseif what = "back" :
- clip currentpicture to BackPage ;
- else :
- drawboundary CoverPage ;
- fi ;
-
- endgroup ;
-
- enddef ;
-
-\stopMPextensions
-
-\doifmodeelse {simple} {
-
- \startMPpage
- DrawCoverPage("front") ;
- \stopMPpage
-
-} {
-
- \startMPpage
- DrawCoverPage("cover") ;
- \stopMPpage
-
-}
-
-\stopcomponent
diff --git a/doc/context/sources/general/manuals/languages/languages-environment.tex b/doc/context/sources/general/manuals/languages/languages-environment.tex
index ff529a8d1..2669fe0c5 100644
--- a/doc/context/sources/general/manuals/languages/languages-environment.tex
+++ b/doc/context/sources/general/manuals/languages/languages-environment.tex
@@ -1,347 +1,15 @@
\startenvironment languages-environment
-\usemodule[visual]
-\usemodule[simulate]
+ \environment manuals-explaining-environment
+ \environment manuals-explaining-cover
-\dontcomplain
+ \usemodule [s] [languages-hyphenation]
+ \usemodule [s] [languages-frequencies]
+ \usemodule [s] [languages-sorting]
+ \usemodule [s] [languages-counters]
+ \usemodule [s] [languages-system]
-\definepapersize
- [book]
- [width=18cm,
- height=24cm]
-
-\setuppapersize
- [book]
-
-\startmode[oversized]
-
- \setuppapersize
- [book]
- [oversized]
-
- \setuplayout
- [marking=on]
-
-\stopmode
-
-\setuplayout
- [location=middle,
- topspace=1.5cm,
- bottomspace=2cm,
- backspace=2cm,
- cutspace=2cm,
- header=0cm,
- footer=0cm,
- margindistance=.25cm,
- margin=1.25cm,
- width=middle,
- height=middle]
-
-\setuplayout
- [style=\ss]
-
-\usetypescript
- [dejavu-condensed]
-
-\setupbodyfont
- [ipaex,9pt]
-
-\setupbodyfont
- [dejavu,9pt]
-
-\definetyping
- [narrowtyping]
- [typing]
- [bodyfont=dejavu-condensed]
-
-% This is way too ugly for a manual:
-%
-% \setuptyping
-% [indentnext=no]
-%
-% \setupindenting
-% [medium,yes]
-
-\setupwhitespace
- [big]
-
-\defineoverlay
- [page]
- [\useMPgraphic{page}]
-
-\setupbackgrounds
- [page]
- [background=page]
-
-\setuphead
- [chapter,section,subsection]
- [color=\namedstructureuservariable{chapter}{color}]
-
-\setuphead
- [chapter]
- [style=\bfc]
-
-\setuphead
- [section]
- [style=\bfb]
-
-\setuphead
- [subsection]
- [style=\bf,
- before=\blank,
- after=\blank]
-
-\startsetups document:chapter:inside
- \definecolor[maincolor][1.0(\namedheadparameter{chapter}{color})] % this expands the color
- \definecolor[halfcolor][0.5(maincolor,white)]
-\stopsetups
-
-\setuphead
- [chapter]
- [insidesection=\setup{document:chapter:inside}]
-
-\setuppagenumbering
- [alternative=doublesided,
- location=]
-
-\setuplist
- [aligntitle=yes]
-
-\setuplist
- [chapter]
- [pagenumber=no,
- style=bold,
- before={\blank\startcolor[\structurelistuservariable{color}]},
- after={\placelist[section]\stopcolor}]
-
-\setuplist
- [chapter,section]
- [width=3em]
-
-\startuseMPgraphic{page}
-
- StartPage ;
-
- linecap := butt ;
-
- if OnRightPage :
-
- path p ; p := (
- urcorner Page shifted (-2cm,0) --
- urcorner Page --
- urcorner Page shifted (0,-2cm) -- cycle
- ) shifted (-2.5mm,-2.5mm) ;
-
- else :
-
- path p ; p := (
- ulcorner Page shifted (2cm,0) --
- ulcorner Page --
- ulcorner Page shifted (0,-2cm) -- cycle
- ) shifted (2.5mm,-2.5mm) ;
-
- fi ;
-
- fill p
- withpen pencircle scaled 1mm
- % withcolor \MPcolor{\namedstructureuservariable{chapter}{color}} ;
- withcolor \MPcolor{maincolor} ;
-
- draw thetextext("\bf\userpagenumber",
- if OnRightPage : urcorner p shifted (-5mm,-5mm) else : ulcorner p shifted (5mm,-5mm) fi)
- withcolor white ;
-
- if OnRightPage :
-
- path p ; p := (
- lrcorner Page shifted (-5cm,0) --
- lrcorner Page
- ) shifted (-5mm,10mm)
-
- else :
-
- path p ; p := (
- llcorner Page shifted (5cm,0) --
- llcorner Page
- ) shifted (5mm,10mm) ;
-
- fi ;
-
- draw p
- withpen pencircle scaled 1mm
- % withcolor \MPcolor{\namedstructureuservariable{chapter}{color}} ;
- withcolor \MPcolor{maincolor} ;
-
- draw if OnRightPage :
- thetextext.lft("\bf\getspecificstructuretitle{chapter}",lrcorner Page shifted (-5mm,5mm))
- else :
- thetextext.rt ("\bf\getspecificstructuretitle{chapter}",llcorner Page shifted ( 5mm,5mm))
- fi withcolor \MPcolor{\namedstructureuservariable{chapter}{color}} ;
- % fi withcolor \MPcolor{maincolor} ;
-
- StopPage ;
-\stopuseMPgraphic
-
-\definecolor[orange] [r=1,g=.6,b=.1]
-
-\definecolor[middlegray] [s=.75]
-\definecolor[darkgray] [s=.25]
-\definecolor[darkred] [r=.5]
-\definecolor[darkgreen] [g=.5]
-\definecolor[darkblue] [b=.5]
-
-\definecolor[darkyellow] [.5(red,green)]
-\definecolor[darkmagenta][.5(red,blue)]
-\definecolor[darkcyan] [.5(green,blue)]
-
-\definecolor[darkorange] [.5(orange)]
-
-\definecolor [mix-1] [r=1,g=.75,b=.25] \definecolor [darkmix-1][.5(mix-1)]
-\definecolor [mix-2] [r=1,g=.25,b=.75] \definecolor [darkmix-2][.5(mix-2)]
-\definecolor [mix-3] [r=.75,g=1,b=.25] \definecolor [darkmix-3][.5(mix-3)]
-\definecolor [mix-4] [r=.75,g=.25,b=1] \definecolor [darkmix-4][.5(mix-4)]
-\definecolor [mix-5] [r=.25,g=1,b=.75] \definecolor [darkmix-5][.5(mix-5)]
-\definecolor [mix-6] [r=.25,g=.75,b=1] \definecolor [darkmix-6][.5(mix-6)]
-
-% \blackrule[height=1cm,width=10cm,color=mix-1] \blackrule[height=1cm,width=10cm,color=darkmix-1]
-% \blackrule[height=1cm,width=10cm,color=mix-2] \blackrule[height=1cm,width=10cm,color=darkmix-2]
-% \blackrule[height=1cm,width=10cm,color=mix-3] \blackrule[height=1cm,width=10cm,color=darkmix-3]
-% \blackrule[height=1cm,width=10cm,color=mix-4] \blackrule[height=1cm,width=10cm,color=darkmix-4]
-% \blackrule[height=1cm,width=10cm,color=mix-5] \blackrule[height=1cm,width=10cm,color=darkmix-5]
-% \blackrule[height=1cm,width=10cm,color=mix-6] \blackrule[height=1cm,width=10cm,color=darkmix-6]
-
-\definecolor[maincolor] [darkgray]
-
-% modules
-
-\usemodule
- [abr-01]
-
-\setupsorting
- [logo]
- [style=]
-
-\usemodule [chart]
-\usemodule [nodechart]
-
-% \usemodule [s] [fonts-tables]
-% \usemodule [s] [fonts-missing]
-% \usemodule [s] [fonts-vectors]
-% \usemodule [s] [fonts-features]
-
-\usemodule [s] [languages-words]
-\usemodule [s] [languages-hyphenation]
-\usemodule [s] [languages-frequencies]
-\usemodule [s] [languages-sorting]
-\usemodule [s] [languages-counters]
-\usemodule [s] [languages-system]
-
-\usemodule [s] [math-extensibles]
-
-\setupFLOWchart
- [width=6em,
- height=3em,
- offset=-2em, % maybe default : todo: hoffset and voffset
- dx=2em,
- dy=2em]
-
-\setupFLOWlines
- [color=maincolor]
-
-\setupFLOWshapes
- [rulecolor=maincolor]
-
-% tables
-
-\setuptabulate
- [rulethickness=.5mm,
- rulecolor=maincolor]
-
-% special commands
-
-\startuniqueMPgraphic{reference}{color}
- fill
- .5[llcorner OverlayBox,ulcorner OverlayBox] --
- .5[ulcorner OverlayBox,urcorner OverlayBox] --
- .5[urcorner OverlayBox,lrcorner OverlayBox] --
- .5[lrcorner OverlayBox,llcorner OverlayBox] -- cycle
- withcolor \MPvar{color} ;
-\stopuniqueMPgraphic
-
-\startuniqueMPgraphic{reference}{color}
- path p ; p := OverlayBox enlarged -1mm ;
- filldraw
- ulcorner p --
- urcorner p --
- lrcorner p --
- .5[lrcorner p,llcorner p] shifted (0,-1ExHeight) --
- llcorner p -- cycle
- withpen pencircle scaled 1mm
- withcolor \MPvar{color} ;
- setbounds currentpicture to OverlayBox enlarged 1ExHeight ;
-\stopuniqueMPgraphic
-
-\defineoverlay[reference][\uniqueMPgraphic{reference}{color=maincolor,}]
-
-\definecolor[maincolor][red]
-
-\definemargindata
- [appendixdata]
-% [inner]
- [outer]
- [stack=yes]
-
-\definemarginframed
- [appendixdata]
- [width=3.5em,
- height=\lineheight, % we know what goes in there
- align=middle,
- offset=overlay,
- foregroundcolor=white,
- background=reference]
-
-% todo:
-%
-% \appendixdata[reference=bla]{}
-%
-% whole data
-
-% interaction
-
-\setupinteraction
- [state=start,
- click=no,
- color=,
- contrastcolor=,
- style=]
-
-% extra fonts (shared among chapters)
-
-\definefontfeature[demo-onum][kern=yes,onum=yes]
-%definefontfeature[demo-lnum][kern=yes,lnum=yes]
-\definefontfeature[demo-tnum][kern=yes,tnum=yes]
-\definefontfeature[demo-pnum][kern=yes,pnum=yes]
-\definefontfeature[demo-zero][zero=yes]
-\definefontfeature[demo-none][]
-
-\definefont[DemoOnumLM][file:lmroman10-regular*demo-onum at 42pt]
-%definefont[DemoLnumLM][file:lmroman10-regular*demo-lnum at 42pt]
-\definefont[DemoTnumLM][file:lmroman10-regular*demo-tnum at 42pt]
-\definefont[DemoPnumLM][file:lmroman10-regular*demo-pnum at 42pt]
-
-\definefont[DemoZeroLM][file:lmroman10-regular*demo-zero at 42pt]
-\definefont[DemoNoneLM][file:lmroman10-regular*demo-none at 42pt]
-
-\definefont[DemoZeroLT][file:lmtypewriter10-regular*demo-zero at 42pt]
-\definefont[DemoNoneLT][file:lmtypewriter10-regular*demo-none at 42pt]
-
-\definestartstop
- [notabene]
- [before=\blank,
- after=\blank,
- style=\em]
-
-\setuphyphenation
- [method=default]
+ \usemodule [s] [math-extensibles]
\stopenvironment
+
diff --git a/doc/context/sources/general/manuals/languages/languages-goodies.tex b/doc/context/sources/general/manuals/languages/languages-goodies.tex
index fbbfafc34..32de54db3 100644
--- a/doc/context/sources/general/manuals/languages/languages-goodies.tex
+++ b/doc/context/sources/general/manuals/languages/languages-goodies.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-goodies
+\environment languages-environment
+
\startchapter[title=Goodies][color=darkorange]
\startsection[title=Introduction]
diff --git a/doc/context/sources/general/manuals/languages/languages-hyphenation.tex b/doc/context/sources/general/manuals/languages/languages-hyphenation.tex
index 48e6eb385..6698717be 100644
--- a/doc/context/sources/general/manuals/languages/languages-hyphenation.tex
+++ b/doc/context/sources/general/manuals/languages/languages-hyphenation.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-hyphenation
+\environment languages-environment
+
\startchapter[title=Hyphenation][color=darkmagenta]
\startsection[title=How it works]
@@ -339,7 +339,7 @@ aaaaabbbbb \par
\typebuffer
-\noindentation This code is self explaining and results in:
+This code is self explaining and results in:
\blank
@@ -347,8 +347,7 @@ aaaaabbbbb \par
\setupindenting[no]\hsize 1mm \lefthyphenmin 1 \righthyphenmin 1 \getbuffer
\stophyphenation
-\noindentation There can be multiple hyphens and even multiple words in such a
-specification:
+There can be multiple hyphens and even multiple words in such a specification:
\startbuffer
\registerhyphenationexception[aaaaa-bbbbb cc-ccc-ddd-dd]
@@ -358,7 +357,7 @@ cccccddddd \par
\typebuffer
-\noindentation We get:
+We get:
\blank
@@ -520,7 +519,7 @@ When applied to one the tufte example we get:
\starthyphenation[traditional]
\setuptolerance[tolerant]
\sethyphenationfeatures[demo]
- \noindentation % \dontleavehmode
+ \dontleavehmode
\input tufte\relax
\stophyphenation
\stopbuffer
@@ -626,7 +625,7 @@ So, we only break a line after symbols.
\stophyphenation
\stoplinecorrection
-\noindentation A quick test can look as follows:
+A quick test can look as follows:
\startbuffer
\starthyphenation[traditional]
@@ -663,7 +662,7 @@ superef\zwnj fective
\typebuffer[sample]
-\noindentation and define two featuresets:
+and define two featuresets:
\startbuffer
\definehyphenationfeatures
@@ -678,7 +677,7 @@ superef\zwnj fective
\typebuffer \getbuffer
-\noindentation We limit the width to 1mm and get:
+We limit the width to 1mm and get:
\startlinecorrection[blank]
\bTABLE[option=stretch,offset=.5ex]
@@ -748,7 +747,7 @@ same as the breakpoints mechanism (compounds).
\starthyphenation[traditional]
\sethyphenationfeatures[demo-3]
\dontcomplain
- \hsize 1mm \noindentation
+ \hsize 1mm
we use (super)special(ized) patterns
\stophyphenation
\stopbuffer
@@ -764,11 +763,11 @@ We can make this more clever by adding patterns:
\typebuffer \blank \getbuffer \blank
-\noindentation This gives:
+This gives:
\blank \getbuffer[demo] \blank
-\noindentation A detailed trace shows that these patterns get applied:
+A detailed trace shows that these patterns get applied:
\starthyphenation[traditional]
\ttx
@@ -778,8 +777,75 @@ We can make this more clever by adding patterns:
\unregisterhyphenationpattern[en][)9]
\unregisterhyphenationpattern[en][9(]
-\noindentation The somewhat weird hyphens at the edges will in practice not show
-up because there is always one regular character there.
+The somewhat weird hyphens at the edges will in practice not show up because
+there is always one regular character there.
+
+\stopsection
+
+\startsection[title=Counting]
+
+There is not much you can do about patterns. It's a craft to make them and so
+they are shipped with the distribution. In order to hyphenate well, \TEX\ looks
+at some character properties. In \CONTEXT\ only the characters used in the
+patterns of a language get tagged as valid in a word.
+
+The following example illustrates that there can be corner cases. In fact, this
+example might render differently depending on the patterns available. First we
+define an extra language, based on French.
+
+\startbuffer
+\installlanguage[frf][default=fr,patterns=fr,factor=yes]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Here we set the \type {factor} parameter which tells the loader that it should
+look at the characters used in a special way: some count for none, and some count
+for more than one when determining the min values used to determine if and where
+hyphenation is to be applied.
+
+\startbuffer
+\startmixedcolumns[n=3,balance=yes]
+ \hsize 1mm \dontcomplain
+ \language[fr] aesop oedipus æsop œdipus \column
+ \hsize 1mm \dontcomplain
+ \language[frf] aesop oedipus æsop œdipus \column
+ \startexceptions æ-sop \stopexceptions
+ \hsize 1mm \dontcomplain
+ \language[frf] aesop oedipus æsop œdipus
+\stopmixedcolumns
+\stopbuffer
+
+\typebuffer
+
+We get three (when writing this manual) different columns:
+
+\getbuffer
+
+The trick is in the \type {factor}: when set to \type {yes} an \type {æ} is
+counted as two characters. Combining marks count as zero but you will not
+find them being used as we already resolve them in an earlier stage.
+
+\startluacode
+context.startcolumns { n = 2 }
+context.starttabulate { "|Tc|c|c|l|" }
+for u, data in table.sortedhash(languages.hjcounts) do
+ if data.category ~= "combining" then
+ context.NC() context("%05U",u)
+ context.NC() context("%c",u)
+ context.NC() context(data.count)
+ context.NC() context(data.category)
+ context.NC() context.NR()
+ end
+end
+context.stoptabulate()
+context.stopcolumns()
+\stopluacode
+
+It is very unlikely to find an \type {ffi} in the input and even an \type {ij} is
+rare. The \type {æ} is marked as character and the \type {œ} a ligatyure in
+\UNICODE. Maybe all the characters here are dubious but al least we provide a
+way to experiment with them.
\stopsection
diff --git a/doc/context/sources/general/manuals/languages/languages-labels.tex b/doc/context/sources/general/manuals/languages/languages-labels.tex
index 3d1c00c04..6c806ab1c 100644
--- a/doc/context/sources/general/manuals/languages/languages-labels.tex
+++ b/doc/context/sources/general/manuals/languages/languages-labels.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-labels
+\environment languages-environment
+
\startchapter[title=Labels][color=darkcyan]
\startsection[title=Introduction]
diff --git a/doc/context/sources/general/manuals/languages/languages-mkiv.tex b/doc/context/sources/general/manuals/languages/languages-mkiv.tex
index e054cd8de..98ca84814 100644
--- a/doc/context/sources/general/manuals/languages/languages-mkiv.tex
+++ b/doc/context/sources/general/manuals/languages/languages-mkiv.tex
@@ -15,39 +15,47 @@
\enablemode[simple] % ,oversized
-\startproduct languages-mkiv
+\startbuffer[abstract]
-\environment languages-environment
-
-\setupbackgrounds[page][background=]
-
-\component languages-cover
-
-% \startcovermatter
-
-\page[dummy] \setupbackgrounds[page][background=page] \resetuserpagenumber
+ This book explains how we support languages (and scripts) in \CONTEXT\ \MKIV\
+ and \LUATEX. Some of the mechanisms discussed are generic and not \CONTEXT\
+ specific. We discuss the way languages are dealt with in the engine,
+ hyphenation, standard features and additional goodies. Tracing and the
+ extensibility of code are also discussed.
-% \stopcovermatter
+\stopbuffer
-\startfrontmatter
- \component languages-contents
- \component languages-introduction
-\stopfrontmatter
-
-\startbodymatter
- \component languages-basics
- \component languages-hyphenation
- \component languages-labels
- \component languages-numbering
- \component languages-typesetting
- \component languages-goodies
- \component languages-sorting
-\stopbodymatter
-
-\startappendices
- \component languages-appendix
-\stopappendices
-
-\component languages-back
+\environment languages-environment
-\stopproduct
+\startdocument
+ [author=Hans Hagen,
+ title=Languages in \ConTeXt,
+ subtitle=explaining luatex and mkiv,
+ affiliation=PRAGMA ADE,
+ comment=work in progress,
+ cover:color:1=darkmagenta,
+ cover:color:2=darkorange,
+ cover:color:3=darkyellow,
+ cover:color:4=darkcyan,
+ cover:color:5=darkgray]
+
+ \startfrontmatter
+ \component manuals-explaining-contents
+ \component languages-introduction
+ \stopfrontmatter
+
+ \startbodymatter
+ \component languages-basics
+ \component languages-hyphenation
+ \component languages-labels
+ \component languages-numbering
+ \component languages-typesetting
+ \component languages-goodies
+ \component languages-sorting
+ \stopbodymatter
+
+ \startappendices
+ \component languages-appendix
+ \stopappendices
+
+\stopdocument
diff --git a/doc/context/sources/general/manuals/languages/languages-numbering.tex b/doc/context/sources/general/manuals/languages/languages-numbering.tex
index 90deab417..3464826df 100644
--- a/doc/context/sources/general/manuals/languages/languages-numbering.tex
+++ b/doc/context/sources/general/manuals/languages/languages-numbering.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-numbering
+\environment languages-environment
+
\startchapter[title=Numbering][color=darkgreen]
\startsection[title=Introduction]
@@ -19,13 +19,13 @@ how English, Spanish and Slovenian numbers:
\blank
\startpacked
\startcolor[maincolor]
-\noindentation\dontleavehmode
+\dontleavehmode
{\ttbf\mainlanguage[en]\dorecurse{28}
{\hbox to 1.5em{\convertnumber{alphabetic}{#1}\hss}}}\par
-\noindentation\dontleavehmode
+\dontleavehmode
{\ttbf\mainlanguage[es]\dorecurse{28}
{\hbox to 1.5em{\convertnumber{alphabetic}{#1}\hss}}}\par
-\noindentation\dontleavehmode
+\dontleavehmode
{\ttbf\mainlanguage[sl]\dorecurse{28}
{\hbox to 1.5em{\convertnumber{alphabetic}{#1}\hss}}}\par
\stopcolor
@@ -153,7 +153,7 @@ application:
\typebuffer
-\noindentation What renders as:
+What renders as:
\startlines[color=maincolor]
\getbuffer
@@ -170,7 +170,7 @@ a label text depending on the valu ebeing non|-|zero.
\typebuffer
-\noindentation This gives:
+This gives:
\startlines[color=maincolor]
\getbuffer
@@ -190,7 +190,7 @@ So,
\typebuffer
-\noindentation Gives:
+Gives:
\startlines[color=maincolor]
\getbuffer
@@ -200,17 +200,17 @@ There are also some non language related converters that we mention here for
completeness:
\blank
-\noindentation\type {set 0}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 0}{#1} }\stopcolor\par
-\noindentation\type {set 1}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 1}{#1} }\stopcolor\par
-\noindentation\type {set 2}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 2}{#1} }\stopcolor\par
-\noindentation\type {set 3}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 3}{#1} }\stopcolor\par
+\type {set 0}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 0}{#1} }\stopcolor\par
+\type {set 1}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 1}{#1} }\stopcolor\par
+\type {set 2}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 2}{#1} }\stopcolor\par
+\type {set 3}: \startcolor[maincolor]\dorecurse{20}{\convertnumber{set 3}{#1} }\stopcolor\par
\blank
When a set overruns we start again at the first element.
-\noindentation The ordinal converter produces output like \color [maincolor]
-{\convertnumber {ordinal}{123}} and \color [maincolor] {\convertnumber
-{ordinal}{654}}. The corresponding string renderer is \type {\highordinalstr}.
+The ordinal converter produces output like \color [maincolor] {\convertnumber
+{ordinal}{123}} and \color [maincolor] {\convertnumber {ordinal}{654}}. The
+corresponding string renderer is \type {\highordinalstr}.
% quite limited currently op not documented here:
%
@@ -250,7 +250,7 @@ specific date with \type {\date}, for instance:
\getbuffer
\stoplines
-\noindentation Possible elements of the specification are:
+Possible elements of the specification are:
\starttabulate
\FL
@@ -294,7 +294,7 @@ can also as a specific one, so {\em jalali} \date [y=1395, m=4, d=18]
[jalali:from, month, day, {, }, year].
\stopbuffer
-\typebuffer \startnarrower \getbuffer stopnarrower
+\typebuffer \startnarrower \getbuffer \stopnarrower
\stopsection
diff --git a/doc/context/sources/general/manuals/languages/languages-sorting.tex b/doc/context/sources/general/manuals/languages/languages-sorting.tex
index abf7b292c..ce24f385c 100644
--- a/doc/context/sources/general/manuals/languages/languages-sorting.tex
+++ b/doc/context/sources/general/manuals/languages/languages-sorting.tex
@@ -1,9 +1,9 @@
% language=uk
-\environment languages-environment
-
\startcomponent languages-sorting
+\environment languages-environment
+
\startchapter[title=Sorting][color=darkblue]
\startsection[title=Introduction]