summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/cont-new.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/cont-new.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkiv80
1 files changed, 9 insertions, 71 deletions
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv
index 3bda269efef..772d5780a70 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv
@@ -5,13 +5,13 @@
%D subtitle=New Macros,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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.
-\newcontextversion{2011.05.18 18:04}
+\newcontextversion{2012.05.14 16:00}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -21,43 +21,6 @@
\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
-
-\def\fastscale#1%
- {\begingroup
- \ifnum#1=1000\relax
- \setfalse\scaleboxdone
- \else
- \settrue\scaleboxdone
- \edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1pt/1000\relax}%
- \let\finalscaleboxyscale\finalscaleboxxscale
- \fi
- \dowithnextbox{\doscaleboxindeed\flushnextbox\endgroup}\hbox}
-
-% \setupcaption [figure] [align=flushleft]
-% \setupcaption [figure-1] [align=flushleft,leftmargin=10mm]
-% \setupcaption [figure-2] [align=flushleft,leftmargin=10mm,rightmargin=-10mm,width=\textwidth]
-%
-% \startsetups somefigure
-% \ifdim\floatsetupwidth>\textwidth
-% \placesetupfloat[figure-2]
-% \else
-% \placesetupfloat[figure-1]
-% \fi
-% \stopsetups
-%
-% \placefloatwithsetups[somefigure]{}{\externalfigure[dummy][width=5cm,height=2cm]}
-
-\def\placefloatwithsetups
- {\dotripleempty\doplacefloatwithsetups}
-
-\long\def\doplacefloatwithsetups[#1][#2][#3]#4%
- {\def\floatsetupcaption {#4}%
- \def\floatsetupcontent {\copy\nextbox}%
- \def\floatsetupwidth {\wd\nextbox}%
- \def\floatsetupheight {\ht\nextbox}%
- \def\placesetupfloat[##1]{\placefloat[##1][#2][#3]{#4}{\floatsetupcontent}}% #4 and not \floatsetupcaption (unexpanded)
- \dowithnextbox{\setups[#1]}\vbox}
-
\def\dividedsize#1#2#3% size gap n
{\dimexpr
\ifnum\dimexpr#1\relax>\plusone
@@ -70,6 +33,8 @@
\definecomplexorsimple\widened
+\let\active\activecatcode % for a while (tikz)
+
% todo
%
% \def\definelocation{\dodoubleargument\dodefinelocation}
@@ -230,10 +195,12 @@
\setuplabeltext
[placeholder={, moved}]
+% move to support module, and then use context(...)
+
\startluacode
function commands.percentageof(str,dim)
local n = str:match("^(.*)%%$")
- tex.sprint(tex.ctxcatcodes,(n and (tonumber(n)/100)*dim .. "sp") or str)
+ context.sprint(tex.ctxcatcodes,(n and (tonumber(n)/100)*dim .. "sp") or str)
end
\stopluacode
@@ -361,8 +328,6 @@
% \the\dimexpr(\dimchoice{11pt}{{<10pt}{8pt}{<12pt}{9pt}{<15pt}{10pt}{=11pt}{12pt}})
% \the\dimexpr(\dimchoice{14pt}{{<10pt}{8pt}{<12pt}{9pt}{<15pt}{10pt}{=11pt}{12pt}})
-\def\showsetupsdefinition[#1]{\showvalue{\??su:#1}} % temp hack for debugging
-
\def\tabulaterule % to be redone, not correct
{\dotabulaterule
{\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
@@ -428,8 +393,7 @@
\def\dostartgridcorrection[#1]%
{\ifgridsnapping
- \iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi
- \snaptogrid\vbox\bgroup
+ \snaptogrid[#1]\vbox\bgroup
\else
\startbaselinecorrection
\fi}
@@ -463,32 +427,6 @@
% \startplaatsen[links] bla \stopplaatsen
-% we don't register the paragraph characteristics, only the
-% width
-
-\appendtoks
- \setinnerparpositions % see "techniek" for application
-\to \everytabulate
-
-\def\fontclassname#1#2%
- {\ifcsname\??ff#1#2\endcsname
- \fontclassname{#1}{\csname\??ff#1#2\endcsname}%
- \else\ifcsname\??ff#2\endcsname
- \fontclassname{#1}{\csname\??ff#2\endcsname}%
- \else
- #2%
- \fi\fi}
-
-\def\defineclassfontsynonym
- {\dotripleargument\dodefineclassfontsynonym}
-
-\def\dodefineclassfontsynonym[#1][#2][#3]%
- {\definefontsynonym[#1][\fontclassname{#2}{#3}]}
-
-%\definefontsynonym [KopFont] [\fontclassname{officina}{SerifBold}]
-%
-%\defineclassfontsynonym [KopFont] [officina] [SerifBold]
-
\def\startcolumnmakeup % don't change
{\bgroup
\getrawnoflines\textheight % teksthoogte kan topskip hebben, dus raw
@@ -505,7 +443,7 @@
\wd\scratchbox\textwidth
\box\scratchbox
\egroup
- \synchronizehsize}
+ \page_otr_command_synchronize_hsize}
\long\def\startexternalfigure
{\dotripleempty\dostartexternalfigure}