diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
commit | 974640d66e61e81cb197ad96fdff7b08343e4c5a (patch) | |
tree | 2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl new file mode 100644 index 00000000000..9d137f5a561 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkxl/typo-lan.mkxl @@ -0,0 +1,64 @@ +%D \module +%D [ file=typo-lan, +%D version=2013.03.22, +%D title=\CONTEXT\ Typesetting Macros, +%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. + +\writestatus{loading}{ConTeXt Typography Macros / Languages} + +\unprotect + +\registerctxluafile{typo-lan}{} + +%D \macros +%D {averagecharwidth, charwidthlanguage} +%D +%D This is a more \MKIV-ish variant of lang-frq.mkiv. The methods are gone as one +%D doesn't need the tables for them. The main macro is \type {\averagecharwidth} +%D which behaves like a dimension register. +%D +%D I finally decided to reimplement this as I needed it for a manual (which is often +%D a reason for such a rewrite). With some inspiring Porcupine Tree in the +%D background it's not the worst thing to do. + +\mutable\def\charwidthlanguage{\currentmainlanguage} + +\permanent\def\averagecharwidth {\dimexpr\clf_averagecharwidth{\charwidthlanguage}\scaledpoint\relax} +\permanent\def\languagecharwidth#1{\dimexpr\clf_averagecharwidth{#1}\scaledpoint\relax} + +\protect + +\continueifinputfile{typo-lan.mkiv} + +\setuplayout[backspace=4cm] + +\showframe + +\starttext + +\startbuffer + +\mainlanguage[en] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par +\mainlanguage[de] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par +\mainlanguage[nl] \hsize65\averagecharwidth \normalexpanded{\inleft{\the\hsize}} \input ward \par + +\stopbuffer + +\getbuffer \blank + +\switchtobodyfont[pagella] + +\getbuffer \blank + +\switchtobodyfont[tt,8pt] + +\getbuffer + +\stoptext |