diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-02-11 15:41:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-02-11 15:41:00 +0100 |
commit | 44d8cfd7f075e99c4adf6785920bcb39e9d88e75 (patch) | |
tree | 3b9b229acbb578318b944a1e4ac3e6d4a2391832 /tex/context | |
parent | b39044522da766a9e97ad0f41246fcc2011dee52 (diff) | |
download | context-44d8cfd7f075e99c4adf6785920bcb39e9d88e75.tar.gz |
beta 2010.02.11 15:41
Diffstat (limited to 'tex/context')
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/lang-ita.tex | 10 | ||||
-rw-r--r-- | tex/context/base/math-run.mkii | 54 | ||||
-rw-r--r-- | tex/context/base/page-mul.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/strc-not.lua | 29 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkiv | 23 | ||||
-rw-r--r-- | tex/context/base/strc-reg.lua | 8 | ||||
-rw-r--r-- | tex/context/base/strc-reg.mkiv | 6 |
9 files changed, 90 insertions, 48 deletions
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} |