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/blob-ini.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/blob-ini.mkxl')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl new file mode 100644 index 00000000000..1dcd5597254 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkxl/blob-ini.mkxl @@ -0,0 +1,56 @@ +%D \module +%D [ file=blob-ini, +%D version=2010.04.06, +%D title=\CONTEXT\ \LUA\ Typesetting, +%D subtitle=Initialization, +%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 Lua Typesetting / Initialization} + +%D This is a prelude to typesetting at the \LUA\ end. The code +%D is already quite old but will only get nice when we are further +%D down the road (close to version 1.00 of \LUATEX). Typesetting in +%D pure \LUA\ sometimes makes sense. + +\registerctxluafile{node-typ}{} % experimental +\registerctxluafile{blob-ini}{autosuffix} + +\unprotect + +% \widthofstring % defined in lua +% \heightofstring % defined in lua +% \depthofstring % defined in lua +% \heightanddepthofstring % defined in lua + +\permanent\def\wdofstring#1{\dimexpr\widthofstring {#1}\relax} % assured an dimen +\permanent\def\htofstring#1{\dimexpr\heightofstring{#1}\relax} % assured an dimen +\permanent\def\dpofstring#1{\dimexpr\depthofstring {#1}\relax} % assured an dimen +\permanent\def\hdofstring#1{\dimexpr\totalofstring {#1}\relax} % assured an dimen + +\aliased\let\heightanddepthofstring\totalofstring +\aliased\let\htdpofstring \hdofstring + +% \let\hd\htdp % if yes then move this + +% This one takes anything that can be typeset + +\permanent\protected\def\setwidthof#1\to#2{\edef#2{\widthofstring{#1}}} + +\protect \endinput + +% \starttext +% +% \startluacode +% local b = blobs.new() +% blobs.append(b,"Hello world.\n Here we are.\n\n And Again!") +% blobs.pack(b) +% blobs.write(b) +% \stopluacode +% +% \stoptext |