summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-02-11 15:41:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-02-11 15:41:00 +0100
commit44d8cfd7f075e99c4adf6785920bcb39e9d88e75 (patch)
tree3b9b229acbb578318b944a1e4ac3e6d4a2391832
parentb39044522da766a9e97ad0f41246fcc2011dee52 (diff)
downloadcontext-44d8cfd7f075e99c4adf6785920bcb39e9d88e75.tar.gz
beta 2010.02.11 15:41
-rw-r--r--scripts/context/lua/mtx-fonts.lua2
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lang-ita.tex10
-rw-r--r--tex/context/base/math-run.mkii54
-rw-r--r--tex/context/base/page-mul.mkiv4
-rw-r--r--tex/context/base/strc-not.lua29
-rw-r--r--tex/context/base/strc-not.mkiv23
-rw-r--r--tex/context/base/strc-reg.lua8
-rw-r--r--tex/context/base/strc-reg.mkiv6
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
11 files changed, 92 insertions, 50 deletions
diff --git a/scripts/context/lua/mtx-fonts.lua b/scripts/context/lua/mtx-fonts.lua
index 7c4b36711..30ee177f2 100644
--- a/scripts/context/lua/mtx-fonts.lua
+++ b/scripts/context/lua/mtx-fonts.lua
@@ -221,7 +221,7 @@ function scripts.fonts.list()
end
elseif pattern then
--~ mtxrun --script font --list --pattern=*somename*
- list_matches(fonts.names.list(string.topattern(pattern,true),reload,all),info)
+ list_matches(fonts.names.list(string.topattern(pattern,true),reload,all),info)
elseif given then
--~ mtxrun --script font --list somename
list_matches(fonts.names.list(given,reload,all),info)
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index ed04f9a5c..c96730065 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.02.10 10:38}
+\newcontextversion{2010.02.11 15:41}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 1d92fb702..21218fb96 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.02.10 10:38}
+\edef\contextversion{2010.02.11 15:41}
%D For those who want to use this:
diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex
index d6695cf9e..03efb0614 100644
--- a/tex/context/base/lang-ita.tex
+++ b/tex/context/base/lang-ita.tex
@@ -186,8 +186,8 @@
\setupheadtext [\s!ro] [\v!graphics=Grafice]
\setupheadtext [\s!fr] [\v!intermezzi=Interm\`edes]
-\setupheadtext [\s!es] [\v!intermezzi=intermedios]
-\setupheadtext [\s!ca] [\v!intermezzi=intermedis]
+\setupheadtext [\s!es] [\v!intermezzi=Intermedios]
+\setupheadtext [\s!ca] [\v!intermezzi=Intermedis]
\setupheadtext [\s!it] [\v!intermezzi=Intermezzi]
\setupheadtext [\s!la] [\v!intermezzi=Intermissa]
\setupheadtext [\s!pt] [\v!intermezzi=Interm\'edios]
@@ -202,7 +202,7 @@
\setupheadtext [\s!ro] [\v!index=Index]
\setupheadtext [\s!fr] [\v!abbreviations=Abr\'eviations]
-\setupheadtext [\s!es] [\v!abbreviations=Abreviaciones]
+\setupheadtext [\s!es] [\v!abbreviations=Abreviaturas]
\setupheadtext [\s!ca] [\v!abbreviations=Abreviacions]
\setupheadtext [\s!it] [\v!abbreviations=Abbreviazioni]
\setupheadtext [\s!la] [\v!abbreviations=Notae]
@@ -226,7 +226,7 @@
\setupheadtext [\s!ro] [\v!units=Unit\u{a}\c{t}i]
\setupheadtext [\s!fr] [pubs=Bibliographie]
-%setupheadtext [\s!es] [pubs=?]
+\setupheadtext [\s!es] [pubs=Bibliograf\'\ia]
\setupheadtext [\s!ca] [pubs=Referències]
\setupheadtext [\s!it] [pubs=Bibliografia]
%setupheadtext [\s!la] [pubs=?]
@@ -250,7 +250,7 @@
\setuplabeltext [\s!ro] [\v!figure=Figura ]
\setuplabeltext [\s!fr] [\v!intermezzo=Interm\`ede ]
-\setuplabeltext [\s!es] [\v!intermezzo=intermedio ]
+\setuplabeltext [\s!es] [\v!intermezzo=Intermedio ]
\setuplabeltext [\s!ca] [\v!intermezzo=Intermedi ]
\setuplabeltext [\s!it] [\v!intermezzo=Intermezzo ]
\setuplabeltext [\s!la] [\v!intermezzo=Intermissum ]
diff --git a/tex/context/base/math-run.mkii b/tex/context/base/math-run.mkii
index afe5b18b4..6bc4bf4d5 100644
--- a/tex/context/base/math-run.mkii
+++ b/tex/context/base/math-run.mkii
@@ -44,29 +44,37 @@
\ifdim\wd2>\dimen2 \dimen2=\wd2 \fi}
\def\dodefinemathcharacter[##1][##2][##3][##4][##5][##6]{}
\def\dodefinemathcommand [##1][##2][##3]##4{}
- \readsysfile{\f!mathprefix tex}\donothing\donothing
- \readsysfile{\f!mathprefix ams}\donothing\donothing
- \edef\encwidth{\the\dimen0}
- \dimen0=\hsize
- \advance\dimen0 2em
- \advance\dimen2 2em
- \ifcase\showmathmodern\or\advance\dimen2 4em\fi
- \divide \dimen0 by \dimen2 \advance\dimen0 1sp
- \edef\enccols{\number\dimen0}
- \startcolumns[\c!n=\enccols,\c!distance=2em]
- \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
- {%\localcolortrue
- %\color
- % [math \purefamilyhex{##3}]
- {\hbox
- {\ifcase\showmathmodern\or
- \hbox to \encwidth{\modern\let\mathcollection\nomathcollection\mathematics{\getvalue{##1}{}{}{}}\hss}%
- \fi
- \hbox to \encwidth{\mathematics{\getvalue{##1}{}{}{}}\hss}%
- \hbox to 1em{\tttf\purefamilyhex{##3}\hss}##1}\par}}
- \readsysfile{\f!mathprefix tex}\donothing\donothing
- \readsysfile{\f!mathprefix ams}\donothing\donothing
- \stopcolumns
+ \readsysfile{\f!mathprefix tex.mkii}\!!doneatrue\!!doneafalse
+ \readsysfile{\f!mathprefix ams.mkii}\!!donebtrue\!!donebfalse
+ \if!!donea
+ \if!!doneb
+ \edef\encwidth{\the\dimen0}
+ \dimen0=\hsize
+ \advance\dimen0 2em
+ \advance\dimen2 2em
+ \ifcase\showmathmodern\or\advance\dimen2 4em\fi
+ \divide \dimen0 by \dimen2 \advance\dimen0 1sp
+ \edef\enccols{\number\dimen0}
+ \startcolumns[\c!n=\enccols,\c!distance=2em]
+ \def\dodefinemathsymbol[##1][##2][##3][##4][##5][##6]%
+ {%\localcolortrue
+ %\color
+ % [math \purefamilyhex{##3}]
+ {\hbox
+ {\ifcase\showmathmodern\or
+ \hbox to \encwidth{\modern\let\mathcollection\nomathcollection\mathematics{\getvalue{##1}{}{}{}}\hss}%
+ \fi
+ \hbox to \encwidth{\mathematics{\getvalue{##1}{}{}{}}\hss}%
+ \hbox to 1em{\tttf\purefamilyhex{##3}\hss}##1}\par}}
+ \readsysfile{\f!mathprefix tex.mkii}\donothing\donothing
+ \readsysfile{\f!mathprefix ams.mkii}\donothing\donothing
+ \stopcolumns
+ \else
+ \par \tttf no chars in \f!mathprefix ams\par
+ \fi
+ \else
+ \par \tttf no chars in \f!mathprefix tex\par
+ \fi
\stoptextrule
\egroup}
diff --git a/tex/context/base/page-mul.mkiv b/tex/context/base/page-mul.mkiv
index 3ec0537a7..4ede65a11 100644
--- a/tex/context/base/page-mul.mkiv
+++ b/tex/context/base/page-mul.mkiv
@@ -602,7 +602,7 @@
\setfalse\someprecolumncontent % will be set elsewhere
\else
\settrue\someprecolumncontent
-\mkprocessboxcontents\precolumnbox
+ \mkprocessboxcontents\precolumnbox
\fi
\forgetall
\setmulticolumnsout
@@ -920,6 +920,7 @@
{\lower\scratchdimen\vbox{\placenoteinserts}}%
\ht0=\openstrutheight % \strutht
\dp0=\openstrutdepth % \strutdp
+ \wd0=\zeropoint
\scratchdimen\ht\firstcolumnbox
\global\setbox\firstcolumnbox\vbox to \scratchdimen
{\box\firstcolumnbox
@@ -937,6 +938,7 @@
{\lower\scratchdimen\vbox{\placenoteinserts}}%
\ht0=\openstrutheight % \strutht
\dp0=\openstrutdepth % \strutdp
+ \wd0=\zeropoint
\scratchdimen\ht\lastcolumnbox
\global\setbox\lastcolumnbox\vbox to \scratchdimen
{\box\lastcolumnbox
diff --git a/tex/context/base/strc-not.lua b/tex/context/base/strc-not.lua
index 97e1ffe72..be883af57 100644
--- a/tex/context/base/strc-not.lua
+++ b/tex/context/base/strc-not.lua
@@ -91,6 +91,9 @@ end
function notes.save(tag,newkind)
local state = notestates[tag]
if state and not state.saved then
+ if trace_notes then
+ logs.report("notes","saving state of %s: %s -> %s",tag,state.kind,newkind or state.kind)
+ end
state.saved = notedata[tag]
state.savedkind = state.kind
state.kind = newkind or state.kind
@@ -98,11 +101,14 @@ function notes.save(tag,newkind)
end
end
-function notes.restore(tag)
+function notes.restore(tag,forcedstate)
local state = notestates[tag]
if state and state.saved then
+ if trace_notes then
+ logs.report("notes","restoring state of %s: %s -> %s",tag,state.kind,state.savedkind)
+ end
state.saved = nil
- state.kind = state.savedkind
+ state.kind = forcedstate or state.savedkind
notedata[tag] = state.saved
end
end
@@ -264,9 +270,9 @@ function notes.flush(tag,whatkind) -- store and postpone
local state = notestates[tag]
local kind = state.kind
if kind == whatkind then
+ local nd = notedata[tag]
+ local ns = state.start -- first index
if kind == "postpone" then
- local nd = notedata[tag]
- local ns = state.start -- first index
if nd and ns then
if trace_notes then
logs.report("notes","flushing state %s of %s from %s to %s",whatkind,tag,ns,#nd)
@@ -278,17 +284,22 @@ function notes.flush(tag,whatkind) -- store and postpone
state.start = nil
state.kind = "insert"
elseif kind == "store" then
- local nd = notedata[tag]
- local ns = state.start -- first index
- if trace_notes then
- logs.report("notes","flushing state %s of %s from %s to %s",whatkind,tag,ns,#nd)
- end
if nd and ns then
+ if trace_notes then
+ logs.report("notes","flushing state %s of %s from %s to %s",whatkind,tag,ns,#nd)
+ end
for i=ns,#nd do
texsprint(ctxcatcodes,format("\\handlenoteitself{%s}{%s}",tag,i))
end
end
state.start = nil
+ elseif kind == "reset" then
+ if nd and ns then
+ if trace_notes then
+ logs.report("notes","flushing state %s of %s from %s to %s",whatkind,tag,ns,#nd)
+ end
+ end
+ state.start = nil
elseif trace_notes then
logs.report("notes","not flushing state %s of %s",whatkind,tag)
end
diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv
index 19cc1d030..0eb93a5e2 100644
--- a/tex/context/base/strc-not.mkiv
+++ b/tex/context/base/strc-not.mkiv
@@ -194,6 +194,7 @@
\c!prefixconnector=.,
%\c!next=\autoinsertnextspace
\c!prefix=\v!no,
+ %\c!continue=\v!no,
\c!n=1]
\setupnotes
@@ -571,11 +572,13 @@
\globallet\lastnotesymbol\dolastnotesymbol
\fi
\fi
- \ifconditional\postponingnotes
+ \ifconditional\postponingnotes % todo: per note class
+ \global\settrue\postponednote
+ \else\ifconditional\inlocalnotes % todo: per note class
\global\settrue\postponednote
\else
\handlenoteinsert\currentnote\currentnotenumber
- \fi
+ \fi\fi
\endgroup
\fi
\fi
@@ -736,7 +739,7 @@
\fi
\to \everyinsidenoteinsert
-\appendtoks \setnotehsize \to \everyinsidenoteinsert % we will sort out columns etc later
+% not: \appendtoks \setnotehsize \to \everyinsidenoteinsert (spoils columns)
\let\lastnotesymbol\relax
@@ -903,23 +906,29 @@
\def\defaultnotewidth{\makeupwidth} % {\ifdim\hsize<\makeupwidth\hsize\else\makeupwidth\fi}
+\newconditional\inlocalnotes
+
\def\startlocalnotes
{\dosingleempty\dostartlocalnotes}
\def\dostartlocalnotes[#1]%
{\def\localnoteslist{#1}%
+ \settrue\inlocalnotes
\processcommacommand[\localnoteslist]\dodostartlocalnotes}
\def\stoplocalnotes
- {\processcommacommand[\localnoteslist]\dodostoplocalnotes}
+ {\processcommacommand[\localnoteslist]\dodostoplocalnotes
+ \setfalse\inlocalnotes}
\def\dodostartlocalnotes#1%
- {\savestructurecounter[#1]%
- \resetstructurecounter[#1]%
+ {\doifnot{\noteparameter\c!continue}\v!yes
+ {\savestructurecounter[#1]%
+ \resetstructurecounter[#1]}%
\ctxlua{structure.notes.save("#1","store")}}
\def\dodostoplocalnotes#1%
- {\restorestructurecounter[#1]%
+ {\doifnot{\noteparameter\c!continue}\v!yes
+ {\restorestructurecounter[#1]}%
\ctxlua{structure.notes.restore("#1")}}
\def\placelocalnotes
diff --git a/tex/context/base/strc-reg.lua b/tex/context/base/strc-reg.lua
index bce3b17ba..34c63caaf 100644
--- a/tex/context/base/strc-reg.lua
+++ b/tex/context/base/strc-reg.lua
@@ -416,6 +416,14 @@ end
-- todo take conversion from index
+function jobregisters.userdata(index,name)
+ local data = jobreferences.internals[tonumber(index)]
+ data = data and data.userdata and data.userdata[name]
+ if data then
+ texsprint(ctxcatcodes,data)
+ end
+end
+
function jobregisters.flush(data,options,prefixspec,pagespec)
local equal = table.are_equal
texsprint(ctxcatcodes,"\\startregisteroutput")
diff --git a/tex/context/base/strc-reg.mkiv b/tex/context/base/strc-reg.mkiv
index fe3803753..2b73c4ae5 100644
--- a/tex/context/base/strc-reg.mkiv
+++ b/tex/context/base/strc-reg.mkiv
@@ -361,7 +361,7 @@
\def\setregisterentry {\dotripleempty\dosetregisterentry}
\def\finishregisterentry{\dotripleempty\dofinishregisterentry}
-% not yet document, not sure if thsi will stay:
+% not yet document, not sure if this will stay:
\def\dosetregisterentry [#1][#2][#3]{\doflushatpar{\doregisterstructurepageregister{#1}{#2}{#3}}}
\def\dofinishregisterentry[#1][#2][#3]{\dofinishregisterstructurepageregister{#1}{#2}{#3}}
@@ -732,6 +732,10 @@
% todo: \installregisterpagehandler
+\def\registerpageuserdata#1#2{\ctxlua{jobregisters.userdata(#1,"#2")}}
+
+% not yet ok : new internal handler names
+
\def\registerpagebuttonsymbol{\vrule\!!width1em\!!height1ex\!!depth\zeropoint\relax}
\setvalue{\??id:\c!symbol :\c!n}{\def\registerpageseparatorsymbol{, }\let\registerpagenumberhandler\firstofoneargument}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index f6683650a..bb3ad1aed 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua
--- merge date : 02/09/10 18:25:39
+-- merge date : 02/11/10 15:54:42
do -- begin closure to overcome local limits and interference