summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-fil.tex3
-rw-r--r--tex/context/base/cont-new.tex56
-rw-r--r--tex/context/base/core-job.tex3
-rw-r--r--tex/context/base/core-not.tex22
-rw-r--r--tex/context/base/core-ver.tex12
-rw-r--r--tex/context/base/font-ini.tex24
-rw-r--r--tex/context/base/page-lyr.tex3
-rw-r--r--tex/context/base/setupb.tex4
-rw-r--r--tex/context/base/spec-tpd.tex15
-rw-r--r--tex/context/base/symb-glm.tex10
-rw-r--r--tex/context/base/type-ini.tex2
11 files changed, 104 insertions, 50 deletions
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 680e21a22..0dab749fe 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -32,6 +32,9 @@
\definefilesynonym [xml-pretty] [xml-02]
\definefilesynonym [xml-analyze] [xml-11]
+\definefilesynonym [int-load] [set-01]
+\definefilesynonym [int-make] [set-02]
+
\definefilesynonym [fig-base] [fig-00]
\definefilesynonym [fig-make] [fig-01]
\definefilesynonym [fig-fake] [fig-02]
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 23327aa10..7e8b87e61 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -31,6 +31,11 @@
\unexpanded\def\xmlrent#1{\doXMLentity#1;}
+\def\dosetupitemgroupconstant[#1][#2]%
+ {\def\dodosetupitemgroupconstant##1% catches empty in [a,b,] handy for xml
+ {\doifsomething{##1}{\dododosetupitemgroupconstant[#1][##1*]}}%
+ \processcommacommand[#2]\dodosetupitemgroupconstant} % expansion of #2 is handy for xml
+
% \page[left]
% \definecolumntextarea[intro][left][x=1,y=1,nx=4,ny=20,state=start,background=introlayer]
% \setupcolumntextareatext[intro][left][\setups{intro}]
@@ -469,7 +474,7 @@
\def\definemarkedpage[#1]%
{\definetwopasslist{\v!page:#1}}
-\def\markpage[#1]% looks very much like domarginreference and doparagraphreference
+\def\markpage[#1]% looks very much like domarginreference
{\iftrialtypesetting\else
\doglobal\increment\nofmarkedpages\relax
\edef\writeparref%
@@ -1938,28 +1943,29 @@
\let\figuredescription\empty
-% wrong names
-
-\newif\ifpagechanged \let\lastchangedpage\empty
-
-\def\checkpagechange#1%
- {\gettwopassdata\s!paragraph
- \pagechangedfalse
- \iftwopassdatafound
- \ifnum\twopassdata>0\getvalue{\s!paragraph:p:#1}\relax
- \pagechangedtrue
- \fi
- \fi
- \ifpagechanged
- \letgvalue{\s!paragraph:p:#1}\twopassdata
- \globallet\lastchangedpage\twopassdata
- \else
- \globallet\lastchangedpage\realfolio
- \fi
- \doparagraphreference}
-
-\def\changedpage#1%
- {\getvalue{\s!paragraph:p:#1}}
+%% where does this come from, old code probably
+%%
+%%
+%% \newif\ifpagechanged \let\lastchangedpage\empty
+%%
+%% \def\checkpagechange#1%
+%% {\gettwopassdata\s!paragraph
+%% \pagechangedfalse
+%% \iftwopassdatafound
+%% \ifnum\twopassdata>0\getvalue{\s!paragraph:p:#1}\relax
+%% \pagechangedtrue
+%% \fi
+%% \fi
+%% \ifpagechanged
+%% \letgvalue{\s!paragraph:p:#1}\twopassdata
+%% \globallet\lastchangedpage\twopassdata
+%% \else
+%% \globallet\lastchangedpage\realfolio
+%% \fi
+%% \doparagraphreference}
+%%
+%% \def\changedpage#1%
+%% {\getvalue{\s!paragraph:p:#1}}
% incomplete, will be a special case of float placement
@@ -2197,7 +2203,7 @@
%D live on on my machine and are not distributed, but they may end
%D up in the distributed files.
-\readfile {cont-loc} {} {} % local improvements, patches, new features
-\readfile {cont-exp} {} {} % experimental features (e.g. local speed-ups)
+\readsysfile {cont-loc} {} {} % local improvements, patches, new features
+\readsysfile {cont-exp} {} {} % experimental features (e.g. local speed-ups)
\endinput
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index 9942f2430..a743a8350 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -338,8 +338,7 @@
{\letvalue{\e!stop\v!localenvironment}\relax}
{\grabuntil{\e!stop\v!localenvironment}\relax}}
-\setvalue{\v!localenvironment} #1 %
- {\doexecutefileonce{#1}}
+\setvalue{\v!localenvironment}#1 {\doexecutefileonce{#1}}
% Het <pagina>-karakter (FormFeed), wordt omgezet in \par
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 6f8bfdcc8..a697b708e 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -151,6 +151,8 @@
\def\definenote
{\dodoubleempty\dodefinenote}
+% maybe we should inherit
+
\def\dodefinenote[#1][#2]%
{\def\currentnote{#1}%
\ifundefined{\??vn:\currentnote}%
@@ -202,6 +204,7 @@
\c!textstyle=\tx,
\c!textcolor=,
\c!interaction=\v!yes,
+ \c!factor=,
\c!n=1]%
\definenumber
[\currentnote]
@@ -233,7 +236,7 @@
\s!unknown=>\setvalue{\??vn\c!rule:\currentnote}{\noteparameter\c!rule}]%
\processaction % todo
[\noteparameter\c!split]
- [ \v!tolerant=>\notepenalty\zeropoint,
+ [ \v!tolerant=>\notepenalty\zeropoint,
\v!strict=>\notepenalty9999,
\v!verystrict=>\notepenalty\maxdimen,
\s!default=>\notepenalty\zeropoint,
@@ -271,9 +274,9 @@
\scratchcounter\noteparameter\c!n\relax
\divide\count\currentnoteins \scratchcounter
\fi
- \ExpandBothAfter\doifinsetelse\v!page{\footnoteparameter\c!location} % **
+ \ExpandBothAfter\doifinsetelse\v!page{\footnoteparameter\c!location}% **
{\global\endnotesfalse
- \ExpandBothAfter\doifinsetelse\v!high{\footnoteparameter\c!location} % **
+ \ExpandBothAfter\doifinsetelse\v!high{\footnoteparameter\c!location}% **
{\global\bottomnotesfalse}
{\global\bottomnotestrue}}
{\global\endnotestrue
@@ -290,6 +293,10 @@
\global\bottomnotestrue
\setclevernotes
\fi
+ \doifsomething{\noteparameter\c!factor}
+ {\ifnum\noteparameter\c!factor<\zerocount\else
+ \count\currentnoteins\noteparameter\c!factor
+ \fi}%
\ifnotelimit
\dimen\currentnoteins\noteparameter\c!height
\multiply\dimen\currentnoteins \scratchcounter
@@ -298,6 +305,15 @@
\def\checknotes
{\processnotes\dochecknote}
+% Example of using factor:
+%
+% \definenote[mynote][way=bypage,location=text,width=\marginwidth,rule=,before=,factor=0]
+% \setuplayout[backspace=5cm,margin=3cm,margindistance=.5cm,width=middle]
+% \setuptexttexts[margin][\vbox to \textheight{\placenotes[mynote]\vfill}][]
+% \starttext
+% \dorecurse{10}{test \mynote{one one one one one one} \input zapf \mynote{one one one one one one} }
+% \stoptext
+
%D The noterule can be a graphic and therefore calling this
%D setup macro at every skipswitch is tricky (many many MP
%D runs). Let's just reserve a few points, that probably match
diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex
index f61697605..dcd26e718 100644
--- a/tex/context/base/core-ver.tex
+++ b/tex/context/base/core-ver.tex
@@ -140,11 +140,11 @@
\def\prettyvariablefont {\getvalue{#1\c!vcommand}}%
\def\prettynaturalfont {\getvalue{#1\c!ccommand}}%
%
- \doifvalue{#1\c!space}\v!on{\def\obeyspaces{\setcontrolspaces}}%
- %doifvalue{#1\c!tab} \v!on{\def\obeytabs {\settabskips}}%
- \doifnotvalue{#1\c!tab}\v!off{\def\obeytabs {\settabskips}}%
- \doifvalue{#1\c!tab} \s!ascii{\chardef\tabskipmode\plustwo}% quit on >127
- \doifvalue{#1\c!page}\v!no{\def\obeypages {\ignorepages}}%
+ \doifvalue{#1\c!space }\v!on {\def\obeyspaces{\setcontrolspaces}}%
+ %doifvalue{#1\c!tab }\v!on {\def\obeytabs {\settabskips}}%
+ \doifnotvalue{#1\c!tab}\v!off {\def\obeytabs {\settabskips}}%
+ \doifvalue{#1\c!tab }\s!ascii{\chardef\tabskipmode\plustwo}% quit on >127
+ \doifvalue{#1\c!page }\v!no {\def\obeypages {\ignorepages}}%
%
\ignorehyphens % default
\ExpandFirstAfter\processaction
@@ -1173,7 +1173,7 @@
{\getvalue{\??tp#1\c!stop }}}}%
\stopverbatimcolor
\stoppacked} % includes \egroup
- {\bgroup
+ {\ifmmode\hbox\fi\bgroup
\expanded{\convertargument#3}\to\ascii
\tttf[\makemessage\m!verbatims1\ascii]%
\showmessage\m!verbatims1\ascii
diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex
index adf08b12f..293c10443 100644
--- a/tex/context/base/font-ini.tex
+++ b/tex/context/base/font-ini.tex
@@ -998,9 +998,7 @@
\appendtoks
\dosetmathfamily\mrfam\textface\scriptface\scriptscriptface\c!mr\mrfallback
\dosetmathfamily\mifam\textface\scriptface\scriptscriptface\c!mi\empty
- \dosetskewchar\defaultskewcharmi % implemented later on
\dosetmathfamily\syfam\textface\scriptface\scriptscriptface\c!sy\empty
- \dosetskewchar\defaultskewcharsy % implemented later on
\dosetmathfamily\exfam\textface\textface \textface \c!ex\empty
\dosetmathfamily\mafam\textface\scriptface\scriptscriptface\c!ma\empty
\dosetmathfamily\mbfam\textface\scriptface\scriptscriptface\c!mb\empty
@@ -1009,6 +1007,11 @@
\dosetmathfamily\nnfam\textface\scriptface\scriptscriptface\c!nn\empty
\to \mathstrategies
+\appendtoks
+ \dosetskewchar\mifam\defaultskewcharmi % implemented later on
+ \dosetskewchar\syfam\defaultskewcharsy % implemented later on
+\to \mathstrategies
+
\def\dosetmathfamily#1#2#3#4#5#6%
{\let\savedfontbody\fontbody % op hoger plan
\let\fontfamily#5%
@@ -3106,10 +3109,19 @@
\chardef\defaultskewcharmi='177
\chardef\defaultskewcharsy='60
-\def\dosetskewchar#1%
- %{\skewchar\font\ifundefined{\purefontname\font\s!skewchar}%
- % #1\else\csname\purefontname\font\s!skewchar\endcsname\fi}
- {\skewchar\font\ifx\@@fontskewchar\empty#1\else\@@fontskewchar\fi}
+% \def\dosetskewchar#1%
+% {\skewchar\font\ifx\@@fontskewchar\empty#1\else\@@fontskewchar\fi}
+
+\def\dosetskewchar#1#2%
+ {\ifx\@@fontskewchar\empty
+ \skewchar\textfont #1#2%
+ \skewchar\scriptfont #1#2%
+ \skewchar\scriptscriptfont#1#2%
+ \else
+ \skewchar\textfont #1\@@fontskewchar
+ \skewchar\scriptfont #1\@@fontskewchar
+ \skewchar\scriptscriptfont#1\@@fontskewchar
+ \fi}
%D The previous macros show that it's is not always
%D neccessary to define the whole bunch of fonts, take for
diff --git a/tex/context/base/page-lyr.tex b/tex/context/base/page-lyr.tex
index 0e23d0554..38b535d23 100644
--- a/tex/context/base/page-lyr.tex
+++ b/tex/context/base/page-lyr.tex
@@ -13,6 +13,9 @@
\writestatus{loading}{Context Page Macros / Layers}
+% todo : first / last / next / +... => page key
+% test on left/right box when no doublesided option given
+
\unprotect
% When being backgrounds layers get the background offset
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index fe937ad31..1959f5d8e 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -834,6 +834,10 @@
[\c!interaction]
[\v!yes,\v!no]
[\v!yes]
+ \variable
+ [\c!factor]
+ [\c!number!]
+ [] % or -1
\inheritvariables
[\y!framed]
[]
diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex
index 3238ddc80..d9fdfb2d8 100644
--- a/tex/context/base/spec-tpd.tex
+++ b/tex/context/base/spec-tpd.tex
@@ -206,8 +206,19 @@
\ifx\pdfmapline\undefined \let\pdfmapline\gobbletwoarguments \fi
\definespecial\doresetmapfilelist{\pdfmapfile{original-empty.map}}
-\definespecial\doloadmapfile #1#2{\pdfmapfile{#1#2}}
-\definespecial\doloadmapline #1#2{\pdfmapline{#1#2}}
+
+\ifnum\pdftexversion<120
+
+ \definespecial\doloadmapfile #1#2{\pdfmapfile{+#2}}
+ \definespecial\doloadmapline #1#2{}
+
+\else
+
+ \definespecial\doloadmapfile #1#2{\pdfmapfile{#1#2}}
+ \definespecial\doloadmapline #1#2{\pdfmapline{#1#2}}
+
+\fi
+
%D nasty but needed
diff --git a/tex/context/base/symb-glm.tex b/tex/context/base/symb-glm.tex
index 1a961e900..a212bf4d9 100644
--- a/tex/context/base/symb-glm.tex
+++ b/tex/context/base/symb-glm.tex
@@ -42,15 +42,15 @@
\definesymbol [xguilsingleleft] [\getglyph{Guil}{\char14}]
\definesymbol [xguilsingleright] [\getglyph{Guil}{\char15}]
-%D A strange place, but okay:
+%D A strange place, but okay (the \type {\relax} prevents space gobbling)
\startencoding [default]
- \definecharacter leftguillemot {\symbol[xleftguillemot]}
- \definecharacter rightguillemot {\symbol[xrightguillemot]}
+ \definecharacter leftguillemot {\symbol[xleftguillemot]\relax}
+ \definecharacter rightguillemot {\symbol[xrightguillemot]\relax}
- \definecharacter guilsingleleft {\symbol[xguilsingleleft]}
- \definecharacter guilsingleright {\symbol[xguilsingleright]}
+ \definecharacter guilsingleleft {\symbol[xguilsingleleft]\relax}
+ \definecharacter guilsingleright {\symbol[xguilsingleright]\relax}
\stopencoding
diff --git a/tex/context/base/type-ini.tex b/tex/context/base/type-ini.tex
index 342fe59b9..b4fc331d3 100644
--- a/tex/context/base/type-ini.tex
+++ b/tex/context/base/type-ini.tex
@@ -272,7 +272,7 @@
\def\doloadfontmapfile#1%
{\ifundefined{#1 \c!state}%
\writestatus\m!fonts{using map file: #1}%
- \doloadmapfile{+}{#1}%
+ \doloadmapfile{=}{#1}% +/add =/replace -/remove
\setxvalue{#1 \c!state}{1}%
\fi}