summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2004-06-26 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2004-06-26 00:00:00 +0200
commitcb44a2aa0526c4b6ffb1b01110fac78222c315ca (patch)
tree65d4fa9b3e4523c0fce60c7f4ed611b90488a3e8
parent6b30d8eb0ad7be8b7581f54e5cbcfc3ea413a804 (diff)
downloadcontext-cb44a2aa0526c4b6ffb1b01110fac78222c315ca.tar.gz
stable 2004.06.26
-rw-r--r--context/data/cont-cz.tws2
-rw-r--r--context/data/cont-de.tws2
-rw-r--r--context/data/cont-en.tws2
-rw-r--r--context/data/cont-it.tws2
-rw-r--r--context/data/cont-nl.tws2
-rw-r--r--context/data/cont-ro.tws2
-rw-r--r--context/data/type-fsf.dat18
-rw-r--r--scripts/context/perl/texexec.pl11
-rw-r--r--scripts/context/perl/texutil.pl2
-rw-r--r--scripts/context/ruby/xmltools.rb80
-rw-r--r--scripts/context/ruby/xmpl/switch.rb43
-rw-r--r--tex/context/base/colo-hex.tex75
-rw-r--r--tex/context/base/colo-ini.tex6
-rw-r--r--tex/context/base/cont-new.tex21
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-int.tex4
-rw-r--r--tex/context/base/core-job.tex2
-rw-r--r--tex/context/base/core-not.tex161
-rw-r--r--tex/context/base/core-ntb.tex167
-rw-r--r--tex/context/base/core-reg.tex7
-rw-r--r--tex/context/base/core-uti.tex4
-rw-r--r--tex/context/base/mult-con.tex6
-rw-r--r--tex/context/base/page-lay.tex4
-rw-r--r--tex/context/base/page-mul.tex181
-rw-r--r--tex/context/base/page-not.tex16
-rw-r--r--tex/context/base/ppchtex.tex28
-rw-r--r--tex/context/base/prop-mis.tex2
-rw-r--r--tex/context/base/setupb.tex2
-rw-r--r--tex/context/base/supp-fil.tex1
29 files changed, 496 insertions, 359 deletions
diff --git a/context/data/cont-cz.tws b/context/data/cont-cz.tws
index fd9c65834..dcf3cbbf4 100644
--- a/context/data/cont-cz.tws
+++ b/context/data/cont-cz.tws
@@ -344,7 +344,7 @@ com:nastavpoznamkypodcarou:
typ:vars/:
var:konverze:cisla,pismena,Pismena,rimskecislice,Rimskecislice::
var:zpusob:skrztext,skrz*sekce::
-var:misto:stranka,text,sloupce,vysoko,zadny::
+var:misto:stranka,text,sloupce,firstcolumn,lastcolumn,vysoko,zadny::
var:linka:zap,vyp::
var:pred:*prikaz::
var:po:*prikaz::
diff --git a/context/data/cont-de.tws b/context/data/cont-de.tws
index 648020363..6e251c662 100644
--- a/context/data/cont-de.tws
+++ b/context/data/cont-de.tws
@@ -344,7 +344,7 @@ com:stellefussnotenein:
typ:vars/:
var:konversion:ziffern,buchstaben,Buchstaben,roemischezahlen,Roemischezahlen::
var:art:protext,pro*Abschnitt::
-var:platz:seite,text,spalten,hoch,kein::
+var:platz:seite,text,spalten,firstcolumn,lastcolumn,hoch,kein::
var:linie:an,aus::
var:vor:*Befehl::
var:nach:*Befehl::
diff --git a/context/data/cont-en.tws b/context/data/cont-en.tws
index d1cfad9b1..d6ebe90b3 100644
--- a/context/data/cont-en.tws
+++ b/context/data/cont-en.tws
@@ -344,7 +344,7 @@ com:setupfootnotes:
typ:vars/:
var:conversion:numbers,characters,Characters,romannumerals,Romannumerals::
var:way:bytext,by*section::
-var:location:page,text,columns,high,none::
+var:location:page,text,columns,firstcolumn,lastcolumn,high,none::
var:rule:on,off::
var:before:*command::
var:after:*command::
diff --git a/context/data/cont-it.tws b/context/data/cont-it.tws
index 47d2cdcd1..e1355b559 100644
--- a/context/data/cont-it.tws
+++ b/context/data/cont-it.tws
@@ -344,7 +344,7 @@ com:impostanotepdp:
typ:vars/:
var:conversione:numeri,lettere,Lettere,numeriromani,Numeriromani::
var:modo:datesto,da*sezione::
-var:luogo:pagina,testo,colonne,alto,nessuno::
+var:luogo:pagina,testo,colonne,firstcolumn,lastcolumn,alto,nessuno::
var:linea:attivo,disattivo::
var:prima:*comando::
var:dopo:*comando::
diff --git a/context/data/cont-nl.tws b/context/data/cont-nl.tws
index 5ced4faa0..65a282aa1 100644
--- a/context/data/cont-nl.tws
+++ b/context/data/cont-nl.tws
@@ -344,7 +344,7 @@ com:stelvoetnotenin:
typ:vars/:
var:conversie:cijfers,letters,Letters,romeins,Romeins::
var:wijze:pertekst,per*sectie::
-var:plaats:pagina,tekst,kolommen,hoog,geen::
+var:plaats:pagina,tekst,kolommen,eerstekolom,laatstekolom,hoog,geen::
var:lijn:aan,uit::
var:voor:*commando::
var:na:*commando::
diff --git a/context/data/cont-ro.tws b/context/data/cont-ro.tws
index 31a9c36ef..ae806b0b4 100644
--- a/context/data/cont-ro.tws
+++ b/context/data/cont-ro.tws
@@ -344,7 +344,7 @@ com:seteazanotasubsol:
typ:vars/:
var:conversie:numere,caractere,Caractere,numereromane,Numereromane::
var:mod:detext,de*sectiune::
-var:locatie:pagina,text,coloane,inalt,niciunul::
+var:locatie:pagina,text,coloane,firstcolumn,lastcolumn,inalt,niciunul::
var:rigla:on,dezactivat::
var:inainte:*comanda::
var:dupa:*comanda::
diff --git a/context/data/type-fsf.dat b/context/data/type-fsf.dat
index 7ccec15a4..1bb6fcbbb 100644
--- a/context/data/type-fsf.dat
+++ b/context/data/type-fsf.dat
@@ -1,23 +1,23 @@
# fontsite opus
--en=? --ve=fontsite --co=opus --re
---en=? --ve=fontsite --co=opus --so=fontsite/500 --ma --in opus*
+--en=? --ve=fontsite --co=opus --so=fsf/all --ma --in opus*
---en=? --ve=fontsite --co=opus --so=fontsite/500 --sl=* opusrg_*
---en=? --ve=fontsite --co=opus --so=fontsite/500 --sl=* opusb_*
+--en=? --ve=fontsite --co=opus --so=fsf/all --sl=* opusrg_*
+--en=? --ve=fontsite --co=opus --so=fsf/all --sl=* opusb_*
# fontsite typewriter
--en=? --ve=fontsite --co=typewriter --re
---en=? --ve=fontsite --co=typewriter --so=fontsite/500 --ma --in type*
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --ma --in type*
---en=? --ve=fontsite --co=typewriter --so=fontsite/500 --sl=* typerg_*
---en=? --ve=fontsite --co=typewriter --so=fontsite/500 --sl=* typeb_*
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --sl=* typerg_*
+--en=? --ve=fontsite --co=typewriter --so=fsf/all --sl=* typeb_*
# fontsite garamond
--en=? --ve=fontsite --co=garamond --re
---en=? --ve=fontsite --co=garamond --so=fontsite/500 --ma --in gara*
+--en=? --ve=fontsite --co=garamond --so=fsf/all --ma --in gara*
---en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garamond*
---en=? --ve=fontsite --co=garamond --so=fontsite/500 --sl=* garab_* \ No newline at end of file
+--en=? --ve=fontsite --co=garamond --so=fsf/all --sl=* garamond*
+--en=? --ve=fontsite --co=garamond --so=fsf/all --sl=* garab_* \ No newline at end of file
diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl
index 0e1d4c0ab..a68135ded 100644
--- a/scripts/context/perl/texexec.pl
+++ b/scripts/context/perl/texexec.pl
@@ -987,7 +987,10 @@ sub RunPerlScript {
} else {
$cmd = "$ScriptName $Options";
}
- unless ( $cmd eq "" ) { system($cmd) }
+ unless ( $cmd eq "" ) {
+ print $cmd if ($Verbose) ;
+ system($cmd) ;
+ }
}
my $FullFormat = '';
@@ -1524,7 +1527,7 @@ my $DummyFile = 0;
sub isXMLfile {
my $Name = shift;
- if ( ($ForceXML) || ( $Name =~ /\.xml$/io ) ) { return 1 }
+ if ( ($ForceXML) || ( $Name =~ /\.(xml|fo)$/io ) ) { return 1 }
else {
open( XML, $Name );
my $str = <XML>;
@@ -1546,7 +1549,7 @@ sub RunConTeXtFile {
system("pdfclose --all") unless $ok ;
}
if ( -e "$JobName.$JobSuffix" ) {
- $DummyFile = ( ($ForceXML) || ( $JobSuffix =~ /xml/io ) );
+ $DummyFile = ( ($ForceXML) || ( $JobSuffix =~ /(xml|fo)/io ) );
}
# to be considered :
# { $DummyFile = isXMLfile("$JobName.$JobSuffix") }
@@ -1558,7 +1561,7 @@ sub RunConTeXtFile {
}
if ($DummyFile) {
open( TMP, ">$JobName.run" );
- if ( ( $JobSuffix =~ /xml/io ) || $ForceXML ) {
+ if ( ( $JobSuffix =~ /(xml|fo)/io ) || $ForceXML ) {
if ( $Filters ne "" ) {
print " using xml filters : $Filters\n";
}
diff --git a/scripts/context/perl/texutil.pl b/scripts/context/perl/texutil.pl
index 0886f0e9c..06bccb82f 100644
--- a/scripts/context/perl/texutil.pl
+++ b/scripts/context/perl/texutil.pl
@@ -2023,7 +2023,7 @@ sub SaveFigurePresets
{ ++$NOfFigures ;
$Figures[$NOfFigures] = "\\presetfigure[$FNam][e=$FTyp" ;
if ($FUni)
- { $Figures[$NOfFigures] .= (sprintf ",w=%5.3fcm,h=%5.3fcm\n", $FWid, $FHei) }
+ { $Figures[$NOfFigures] .= (sprintf ",w=%5.3fcm,h=%5.3fcm", $FWid, $FHei) }
else
{ $Figures[$NOfFigures] .= ",w=${FWid}bp,h=${FHei}bp" }
if (($FXof!=0)||($FYof!=0))
diff --git a/scripts/context/ruby/xmltools.rb b/scripts/context/ruby/xmltools.rb
index 0c2367068..b4a983c9c 100644
--- a/scripts/context/ruby/xmltools.rb
+++ b/scripts/context/ruby/xmltools.rb
@@ -118,6 +118,7 @@ class Commands
file = @commandline.argument('first')
eps = @commandline.option('eps')
+ jpg = @commandline.option('jpg')
png = @commandline.option('png')
style = @commandline.option('style')
modes = @commandline.option('modes')
@@ -128,51 +129,57 @@ class Commands
style = "--arg=\"style=#{style}\"" unless style.empty?
modes = "--mode=#{modes}" unless modes.empty?
if system("texmfstart texexec.pl --batch --pdf --once --result=#{long} --use=mmlpag #{style} #{modes} #{file}.xml") then
- if f = open("#{file}-mmlpages.txt") then
- while line = f.gets do
- data = Hash.new
- if fields = line.split then
- fields.each do |fld|
- key, value = fld.split('=')
- data[key] = value if key && value
- end
- if data.key?('p') then
- page = data['p']
- name = "#{long}-#{page}"
- if eps then
- report("generating eps file #{name}")
- if system("pdftops -eps -f #{page} -l #{page} #{long}.pdf #{name}.eps") then
- if data.key?('d') then
- if epsfile = IO.read("#{name}.eps") then
- epsfile.sub!(/^(\%\%BoundingBox:.*?$)/i) do
- newline = $1 + "\n%%Baseline: #{data['d']}\n"
- if data.key?('w') && data.key?('h') then
- newline += "%%PositionWidth: #{data['w']}\n"
- newline += "%%PositionHeight: #{data['h']}\n"
- newline += "%%PositionDepth: #{data['d']}"
+ if eps then
+ if f = open("#{file}-mmlpages.txt") then
+ while line = f.gets do
+ data = Hash.new
+ if fields = line.split then
+ fields.each do |fld|
+ key, value = fld.split('=')
+ data[key] = value if key && value
+ end
+ if data.key?('p') then
+ page = data['p']
+ name = "#{long}-#{page.to_i-1}"
+ if eps then
+ report("generating eps file #{name}")
+ if system("pdftops -eps -f #{page} -l #{page} #{long}.pdf #{name}.eps") then
+ if data.key?('d') then
+ if epsfile = IO.read("#{name}.eps") then
+ epsfile.sub!(/^(\%\%BoundingBox:.*?$)/i) do
+ newline = $1 + "\n%%Baseline: #{data['d']}\n"
+ if data.key?('w') && data.key?('h') then
+ newline += "%%PositionWidth: #{data['w']}\n"
+ newline += "%%PositionHeight: #{data['h']}\n"
+ newline += "%%PositionDepth: #{data['d']}"
+ end
+ newline
+ end
+ if g = File.open("#{name}.eps",'wb') then
+ g.write(epsfile)
+ g.close
end
- newline
- end
- if g = File.open("#{name}.eps",'wb') then
- g.write(epsfile)
- g.close
end
end
+ else
+ report("error in generating eps from #{name}")
end
- else
- report("error in generating eps from #{name}")
end
end
- if png then
- report("generating png file #{name}")
- system("imagemagick #{name}.eps #{name}.png")
- end
end
end
+ f.close
+ else
+ report("missing data log file #{filename}")
end
- f.close
- else
- report("missing data log file #{filename}")
+ end
+ if png then
+ report("generating png file for #{long}")
+ system("imagemagick #{long}.pdf #{long}-%d.png")
+ end
+ if jpg then
+ report("generating jpg files for #{long}")
+ system("imagemagick #{long}.pdf #{long}-%d.jpg")
end
else
report("error in processing file #{filename}")
@@ -207,6 +214,7 @@ commandline.registervalue('root')
commandline.registerflag('eps')
commandline.registerflag('png')
+commandline.registerflag('jpg')
commandline.registervalue('style')
commandline.registervalue('modes')
diff --git a/scripts/context/ruby/xmpl/switch.rb b/scripts/context/ruby/xmpl/switch.rb
index 69d2a8644..9c38cdbdd 100644
--- a/scripts/context/ruby/xmpl/switch.rb
+++ b/scripts/context/ruby/xmpl/switch.rb
@@ -32,27 +32,46 @@ module CommandBase
def initialize(commandline,logger,banner)
@commandline, @logger, @banner = commandline, logger, banner
+ @forcenewline, @versiondone = false, false
version if @commandline.option('version')
end
- def report(*str)
- @logger.report(str)
- end
-
def reportlines(*str)
@logger.reportlines(str)
end
- def version # just a bit of playing with defs
- report(@banner.join(' - '))
- def report(*str)
+ # only works in 1.8
+ #
+ # def report(*str)
+ # @logger.report(str)
+ # end
+ #
+ # def version # just a bit of playing with defs
+ # report(@banner.join(' - '))
+ # def report(*str)
+ # @logger.report
+ # @logger.report(str)
+ # def report(*str)
+ # @logger.report(str)
+ # end
+ # end
+ # def version
+ # end
+ # end
+
+ def report(*str)
+ if @forcenewline then
@logger.report
- @logger.report(str)
- def report(*str)
- @logger.report(str)
- end
+ @forcenewline = false
end
- def version
+ @logger.report(str)
+ end
+
+ def version # just a bit of playing with defs
+ unless @versiondone then
+ report(@banner.join(' - '))
+ @forcenewline = true
+ @versiondone = true
end
end
diff --git a/tex/context/base/colo-hex.tex b/tex/context/base/colo-hex.tex
new file mode 100644
index 000000000..0c75d37e0
--- /dev/null
+++ b/tex/context/base/colo-hex.tex
@@ -0,0 +1,75 @@
+%D \module
+%D [ file=colo-hex,
+%D version=2004.06.23,
+%D title=\CONTEXT\ Color Macros,
+%D subtitle=Hex Colors,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%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 Color Macros / hexadecimal}
+
+% \edef\testcolor{\string#FFC0C0}
+%
+% \setupcolors[state=start]
+%
+% \expanded{\definecolor[thehexcolor][\hexcolorspec\testcolor]}
+%
+% \checkhexcolor[\testcolor]
+%
+% \definecolor[thehexcolor][\testcolor]
+%
+% \starttext
+%
+% test \color[thehexcolor]{rood}
+% test \color[red]{rood}
+% test \color[\testcolor]{rood}
+%
+% \stoptext
+
+\unprotect
+
+\newdimen\hexcolorfraction \hexcolorfraction=\dimexpr(1pt/256)
+
+\chardef\hexcolorprefix=`#
+
+\def\hexcolorspec #1{\expandafter\dohexcolorspec #1}
+\def\hexcolorpattern#1{\expandafter\dohexcolorpattern#1}
+
+\def\hexcolorcomponent#1%
+ {\ifnum"#1=\zerocount0\else\ifnum"#1=\plusone1\else
+ \expandafter\withoutpt\the\dimexpr("#1\hexcolorfraction)%
+ \fi\fi}
+
+\def\dohexcolorspec#1#2#3#4#5#6#7%
+ {r=\hexcolorcomponent{#2#3},g=\hexcolorcomponent{#4#5},b=\hexcolorcomponent{#6#7}}
+
+\def\dohexcolorpattern#1#2#3#4#5#6#7%
+ {0R:\hexcolorcomponent{#2#3}:\hexcolorcomponent{#4#5}:\hexcolorcomponent{#6#7}:0:0}
+
+\def\doifhexcolorelse#1%
+ {\expandafter\dodoifhexcolorelse#10\od} % 0 is a dirty trick to catch an empty #1
+
+\def\dodoifhexcolorelse#1#2\od
+ {\ifnum`#1=\hexcolorprefix
+ \expandafter\firstoftwoarguments
+ \else
+ \expandafter\secondoftwoarguments
+ \fi}
+
+\def\checkhexcolor[#1]%
+ {\doifhexcolorelse{#1}{\doifundefined{#1}%
+ {\expanded{\setxvalue{\??cr#1}{\hexcolorpattern#1}}}}\donothing}
+
+\let\dodododefinecolor\dododefinecolor % we will overload this one
+
+\def\dododefinecolor#1#2#3#4[#5][#6]%
+ {\doifhexcolorelse{#6}
+ {\setxvalue{\??cr#5}{\hexcolorpattern#6}}
+ {\dodododefinecolor#1#2#3#4[#5][#6]}}
+
+\protect \endinput \ No newline at end of file
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex
index b3b62018f..e4b63d21c 100644
--- a/tex/context/base/colo-ini.tex
+++ b/tex/context/base/colo-ini.tex
@@ -247,9 +247,9 @@
%D does not work, but \type {\romannumeral} does. Actually,
%D \type{\romannumeral0} returns nothing, so it's a perfect
%D candidate for this kind of hackery. This reminds me that I
-%D have to look into David Karstrup's (check spelling)
-%D Euro\TeX\ 2002 article because he is using \type
-%D {\romannumeral} for loops (repetitive \quote {m} stuff).
+%D have to look into David Kastrup's Euro\TeX\ 2002 article
+%D because he is using \type {\romannumeral} for loops
+%D (repetitive \quote {m} stuff).
% \def\x{\y}\def\y{\z}\def\z{0:1:1:1}
%
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 594d8eb0e..40ae9efab 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -23,6 +23,27 @@
\tracefonthandlingtrue
+\def\complexdozieregister[#1]#2#3%
+ {\begingroup
+ \thisisnextinternal\s!ind
+ \ifduplicate\getlastregisterentry{#2}\fi
+ \convertexpanded{\??id\currentregister}{#2}\asciiregisterentryA
+ \convertexpanded{\??id\currentregister}{#3}\asciiregisterentryB
+ \makesectionformat
+ \edef\schrijfwegnaarregister%
+ {\writeutility%
+ {r s %
+ {\currentregister} %
+ {\nextinternalreference} %
+ {#1} %
+ {\asciiregisterentryA} %
+ {\asciiregisterentryB} %
+ {\sectionformat}}}%
+ \schrijfwegnaarregister
+ \endgroup
+ \registerinfo{> zie}{#2}%
+ \GotoPar}
+
\def\dodododoinatreference#1#2#3[#4]% \removeunwantedspaces added june 2004
{\ifx\next\bgroup
\dododododoinatreference
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index ccd439213..e05411b69 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -15,7 +15,7 @@
\catcode`\{=1 \catcode`\}=2
-\def\contextversion{2004.6.21}
+\def\contextversion{2004.6.26}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type{tex -i} or \type{whatevertex} using
diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex
index 01a273693..9f7252588 100644
--- a/tex/context/base/core-int.tex
+++ b/tex/context/base/core-int.tex
@@ -458,7 +458,7 @@
{\ifx\flushpostponedbookmark\relax \else
\bgroup
\convertargument#1\to\ascii
- \writestatus{system}{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN
+ \writestatus\m!systems{clashing bookmarks: \ascii}% ECHTE MESSAGE MAKEN
\egroup
\fi
\doglobal\prependtoks
@@ -510,7 +510,7 @@
\setxvalue{\@@bookcount0}{1}%
\global\chardef\currentbookmarklevel\zerocount
\global\chardef\previousbookmarklevel\zerocount
- \doutilities{#1,\@@bookmark}\jobname{#1}\relax\relax}
+ \doutilities{listentries,#1,\@@bookmark}\jobname{#1}\relax\relax}
\def\dodogetbookmarkelement#1#2#3#4#5#6%
{\doifelsenothing{#1}
diff --git a/tex/context/base/core-job.tex b/tex/context/base/core-job.tex
index 13573f50d..d39baff7c 100644
--- a/tex/context/base/core-job.tex
+++ b/tex/context/base/core-job.tex
@@ -261,6 +261,8 @@
\expandafter\normalend
\fi}
+\def\currentfile{\inputfilename}
+
\def\doexecutefileonce#1%
{\beforesplitstring#1\at.\to\currentfile
\fullexpandtwoargsafter\doifnotinset\currentfile\loadedfiles
diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex
index 6e25a89a6..b2b381d0d 100644
--- a/tex/context/base/core-not.tex
+++ b/tex/context/base/core-not.tex
@@ -66,7 +66,8 @@
\newif\ifendnotes \endnotesfalse
\newif\ifbottomnotes \bottomnotestrue
-\newif\ifclevernotes \clevernotesfalse % being [plaats=kolommen]
+
+\chardef\clevernotes=\zerocount % 0=page 1=firstcolumn 2=lastcolumn
%D The next definitions indicate that we can frame the footnote
%D area. The footnotes themselves are treated as definitions.
@@ -250,22 +251,18 @@
{\edef\noteinsertions{#1}}%
\fi\fi}
-\def\dochecknote % for the moment no mixed text/endnotes modes
- {\setnotedistance
- \count\currentnoteins1000
- %ExpandBothAfter\doifinsetelse\v!kolommen{\noteparameter\c!plaats}
- \ExpandBothAfter\doifinsetelse\v!kolommen{\footnoteparameter\c!plaats}
- {\clevernotestrue % global ?
- \ifnum\@@kln=\zerocount
- \scratchcounter\plusone
- \else
- %scratchcounter\noteparameter\c!n\relax
- \scratchcounter\footnoteparameter\c!n\relax
- \fi
- \global\endnotesfalse
- \global\bottomnotestrue
- \setclevernotes}
- {\clevernotesfalse
+\def\dochecknote
+ {% for the moment no mixed text/endnotes modes, so we use
+ % \footnoteparameter and not \noteparameter (**)
+ \setnotedistance
+ \count\currentnoteins\plusthousand
+ \ExpandBothAfter\doifcommonelse{\v!kolommen,\v!laatstekolom}{\footnoteparameter\c!plaats} % **
+ {\chardef\clevernotes\plustwo}
+ {\ExpandBothAfter\doifinsetelse{\v!eerstekolom}{\footnoteparameter\c!plaats} % **
+ {\chardef\clevernotes\plusone}
+ {\chardef\clevernotes\zerocount}}%
+ \ifcase\clevernotes\relax
+ % notes not in column areas
\ifnum\noteparameter\c!n=\zerocount
\settextnotes
\scratchcounter\plusone
@@ -274,16 +271,25 @@
\scratchcounter\noteparameter\c!n\relax
\divide\count\currentnoteins \scratchcounter
\fi
- %ExpandBothAfter\doifinsetelse\v!pagina{\noteparameter\c!plaats}
- \ExpandBothAfter\doifinsetelse\v!pagina{\footnoteparameter\c!plaats}
+ \ExpandBothAfter\doifinsetelse\v!pagina{\footnoteparameter\c!plaats} % **
{\global\endnotesfalse
- %ExpandBothAfter\doifinsetelse\v!hoog{\noteparameter\c!plaats}
- \ExpandBothAfter\doifinsetelse\v!hoog{\footnoteparameter\c!plaats}
+ \ExpandBothAfter\doifinsetelse\v!hoog{\footnoteparameter\c!plaats} % **
{\global\bottomnotesfalse}
{\global\bottomnotestrue}}
{\global\endnotestrue
\global\bottomnotestrue
- \postponenotes}}%
+ \postponenotes}%
+ \else
+ % notes in column areas
+ \ifnum\@@kln=\zerocount % brrr dependency on \??kl
+ \scratchcounter\plusone
+ \else
+ \scratchcounter\footnoteparameter\c!n\relax % **
+ \fi
+ \global\endnotesfalse
+ \global\bottomnotestrue
+ \setclevernotes
+ \fi
\ifnotelimit
\dimen\currentnoteins\noteparameter\c!hoogte
\multiply\dimen\currentnoteins \scratchcounter
@@ -708,8 +714,11 @@
\let\stoppopnotes = \relax
\def\placenoteinserts
+ {\processnotes\doplacenoteinserts}
+
+\def\doplacenoteinserts
{%\ifvoid\currentnoteins \else % unsafe, strange
- \ifdim\ht\currentnoteins>\zeropoint\relax
+ \relax\ifdim\ht\currentnoteins>\zeropoint\relax
\ifendnotes \else
\noteparameter\c!voor
\placenoterule % alleen in ..mode
@@ -727,17 +736,21 @@
% \fi
% this is too ugly actually
\stoppopnotes}%
- \localframed
- [\??vn\currentnote]
- [\c!breedte=\v!passend,
- \c!hoogte=\v!passend,
- \c!strut=\v!nee,
- \c!offset=\v!overlay]
- {\ifdim\dp0=\zeropoint % this hack is needed because \vadjust
- \hbox{\lower\strutdp\box0}% % in margin number placement
- \else % hides the (always) present depth
- \box0
- \fi}%
+ \setbox2\hbox
+ {\localframed
+ [\??vn\currentnote]
+ [\c!breedte=\v!passend,
+ \c!hoogte=\v!passend,
+ \c!strut=\v!nee,
+ \c!offset=\v!overlay]
+ {\ifdim\dp0=\zeropoint % this hack is needed because \vadjust
+ \hbox{\lower\strutdp\box0}% % in margin number placement
+ \else % hides the (always) present depth
+ \box0
+ \fi}}%
+ \setbox2\hbox{\lower\strutdepth\box2}%
+ \dp2=\strutdepth % so we know that it has the note bodyfont depth
+ \box2
\egroup
\noteparameter\c!na
\fi
@@ -1028,7 +1041,7 @@
\endgraf
\fi
\ifvmode
- \calculatetotalnoteheight
+ \calculatetotalclevernoteheight
\ifdim\totalnoteheight>\zeropoint \kern\totalnoteheight \fi
\fi}
@@ -1036,12 +1049,16 @@
\def\docalculatetotalnoteheight
{\ifdim\ht\currentnoteins>\zeropoint
- \ifclevernotes % tricky here ! ! ! to be sorted out ! ! !
- \advance\totalnoteheight\ht \currentbackupnoteins
- \advance\totalnoteheight\skip\currentbackupnoteins
+ \ifcase\clevernotes % tricky here ! ! ! to be sorted out ! ! !
+ \ifdim\ht\currentnoteins>\zeropoint
+ \advance\totalnoteheight\ht \currentnoteins
+ \advance\totalnoteheight\skip\currentnoteins
+ \fi
\else
- \advance\totalnoteheight\ht \currentnoteins
- \advance\totalnoteheight\skip\currentnoteins
+ \ifdim\ht\currentbackupnoteins>\zeropoint
+ \advance\totalnoteheight\ht \currentbackupnoteins
+ \advance\totalnoteheight\skip\currentbackupnoteins
+ \fi
\fi
\fi}
@@ -1049,6 +1066,20 @@
{\totalnoteheight\zeropoint
\processnotes\docalculatetotalnoteheight}
+\def\docalculatetotalclevernoteheight
+ {\ifdim\ht\currentnoteins>\zeropoint
+ \ifcase\clevernotes\else % tricky here ! ! ! to be sorted out ! ! !
+ \ifdim\ht\currentnoteins>\zeropoint
+ \advance\totalnoteheight\ht \currentnoteins
+ \advance\totalnoteheight\skip\currentnoteins
+ \fi
+ \fi
+ \fi}
+
+\def\calculatetotalclevernoteheight
+ {\totalnoteheight\zeropoint
+ \processnotes\docalculatetotalclevernoteheight}
+
\newif\ifnotespresent
\def\dochecknotepresence
@@ -1125,4 +1156,52 @@
\def\postponefootnotes {\postponenotes}
\def\autopostponefootnotes{\autopostponenotes}
-\protect \endinput \ No newline at end of file
+\protect \endinput
+
+% \def\myfootnote[#1]#2% let's guess that #2 is without catcode problems
+% {\setgvalue{note:t:#1}%
+% {\setxvalue{note:l:#1}{\getvalue{note:n:#1}}%
+% \footnote[note:a:#1:\getvalue{note:l:#1}]{#2}}%
+% \setgvalue{note:n:#1}%
+% {1}%
+% \getvalue{note:t:#1}}%
+
+% \def\mynote[#1]%
+% {\removeunwantedspaces
+% \scratchcounter\getvalue{note:n:#1}\relax
+% \edef\NoteNumber{\the\scratchcounter}%
+% \doglobal\incrementvalue{note:n:#1}\relax
+% \doifreferencefoundelse{note:a:#1:1}
+% {\edef\NotePageA{\number\currentrealreference}%
+% \doifreferencefoundelse{note:a:#1:\getvalue{note:n:#1}}
+% {\edef\NotePageB{\number\currentrealreference}%
+% \doifreferencefoundelse{note:a:#1:\NoteNumber}
+% {\ifnum\currentrealreference=\NotePageB\relax
+% \pagereference[note:a:#1:\getvalue{note:n:#1}]%
+% \note[note:a:#1:\getvalue{note:l:#1}]%
+% \else\ifnum\NotePageA=\NotePageB\relax
+% \pagereference[note:a:#1:\getvalue{note:n:#1}]%
+% \note[note:a:#1:\getvalue{note:l:#1}]%
+% \else
+% \getvalue{note:t:#1}%
+% \fi\fi}
+% {\ifnum\NotePageA=\NotePageB\relax
+% \pagereference[note:a:#1:\getvalue{note:n:#1}]%
+% \note[note:a:#1:\getvalue{note:l:#1}]%
+% \else
+% \getvalue{note:t:#1}%
+% \fi}}
+% {\pagereference[note:a:#1:\getvalue{note:n:#1}]%
+% \note[note:a:#1:\getvalue{note:l:#1}]}}
+% {\pagereference[note:a:#1:\getvalue{note:n:#1}]%
+% \note[note:a:#1:\getvalue{note:l:#1}]}}
+
+% \starttext
+
+% funny \myfootnote[funny]{funny} funny \mynote[funny] \page
+
+% funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page
+% funny \mynote[funny] funny \mynote[funny] \page
+% funny \mynote[funny] funny \mynote[funny] funny \mynote[funny] \page
+
+% \stoptext \ No newline at end of file
diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex
index 6f59d2035..de988a306 100644
--- a/tex/context/base/core-ntb.tex
+++ b/tex/context/base/core-ntb.tex
@@ -277,6 +277,7 @@
\long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces
{\def\currentcol{0}\increment\maximumrow
+ \let\currentcolpos\currentcol
\setupTABLE[\v!rij][\maximumrow][#1]#3}
\long\def\parseTD[#1][#2]#3\eTD % [#2] is dummy that kills spaces
@@ -675,133 +676,6 @@
\begintbl
\to\tbltoks}
-% \def\endTBL
-% {\appendtoks
-% \endtbl
-% \to\tbltoks
-% \setbox\scratchbox\hbox
-% {\localframed
-% [\@@tbl\@@tbl]
-% [\c!kader=\v!uit,\c!achtergrond=,\c!uitlijnen=\v!nee]
-% {\strut}}%
-% \edef\minimalcellheight{\the\ht\scratchbox}%
-% \dorecurse\maximumcol
-% {\settblaut\recurselevel\!!zeropoint % \zeropoint etc
-% % new
-% \let\xcol\recurselevel
-% \dorecurse\maximumrow
-% {\settblwd \recurselevel\xcol\!!zeropoint
-% \settblht \recurselevel\xcol\!!zeropoint}%
-% % till here
-% \settblwid\recurselevel\!!zeropoint}%
-% \dorecurse\maximumrow
-% {\settblhei\recurselevel\maxdimen}%
-% \chardef\TBLpass\plusone
-% \let\handleTBLcell\dohandleTBLcellA
-% \def\makeTBL##1##2%
-% {\gettbltxt{##1}{##2}}%
-% \def\inTBLcell##1##2%
-% {\ExpandBothAfter\doifinsetelse\localwidth{\v!passend,\v!ruim} % user set
-% {}
-% {\scratchdimen\gettblaut\colTBL\relax
-% \ifdim\localwidth>\scratchdimen
-% \settblaut\colTBL\localwidth
-% \fi}}%
-% \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}%
-% \ifautoTBLspread
-% % experimental, stretch non fixed cells to \hsize
-% \checktblwidthsone % trial run
-% \checktblwidthstwo % real run
-% \stretchtblwidths
-% \let\handleTBLcell\dohandleTBLcellB
-% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
-% \else\ifdim\wd0>\hsize
-% \ifautoTBLhsize
-% \checktblwidthsone % trial run
-% \checktblwidthstwo % real run
-% \let\handleTBLcell\dohandleTBLcellB
-% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
-% \fi
-% \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ?
-% % added jan 2002 because nx=* did no longer work
-% \checktblwidthsone % trial run
-% \checktblwidthstwo % real run
-% %
-% \let\handleTBLcell\dohandleTBLcellC
-% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
-% \fi\fi\fi\fi
-% \let\handleTBLcell\dohandleTBLcellD
-% \chardef\TBLpass2
-% \def\makeTBL##1##2% meer in cellD
-% {\dimen2\zeropoint
-% \pushmacro\colTBL
-% \dorecurse{\gettblcol{##1}{##2}}
-% {\advance\dimen2 \gettblwid\colTBL
-% \increment\colTBL}%
-% \edef\widthTBL{\the\dimen2}%
-% \popmacro\colTBL
-% \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}%
-% \settblht{##1}{##2}{\the\ht\scratchbox}%
-% \settblwd{##1}{##2}{\the\wd\scratchbox}%
-% \ifdim\ht\scratchbox>\gettblhei{##1}\relax
-% \settblhei{##1}{\the\ht\scratchbox}%
-% \fi}%
-% \setbox\scratchbox\vbox{\trialtypesettingtrue \the\tbltoks}%
-% \checktblheightsone
-% \checktblheightstwo
-% \let\handleTBLcell\dohandleTBLcellE
-% \chardef\TBLpass3
-% \def\makeTBL##1##2%
-% {% height
-% \pushmacro\rowTBL
-% \scratchdimen\zeropoint
-% \def\rowTBL{##1}%
-% \ifnum\gettblcol{##1}{##2}=\maximumcol\relax
-% % case: nc=maxcolumns
-% \else
-% \dorecurse{\gettblrow{##1}{##2}}
-% {\advance\scratchdimen \gettblhei\rowTBL
-% \increment\rowTBL}%
-% \ifdim\scratchdimen<\gettblht{##1}{##2}\relax
-% \scratchdimen\gettblht{##1}{##2}\relax
-% \fi
-% \fi
-% \edef\heightTBL{\the\scratchdimen}%
-% \popmacro\rowTBL
-% % width
-% \pushmacro\colTBL
-% \scratchdimen\zeropoint
-% \dorecurse{\gettblcol{##1}{##2}}
-% {\advance\scratchdimen \gettblwid\colTBL
-% \increment\colTBL}%
-% \edef\widthTBL{\the\scratchdimen}%
-% \popmacro\colTBL
-% % cell
-% \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}%
-% \ifnum\gettblcol{##1}{##2}=\maximumcol\relax
-% % case: nc=maxcolumns
-% \else
-% \scratchdimen\gettblhei{##1}%
-% \setbox\scratchbox\hbox
-% {\lower\ht\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}}%
-% \ht\scratchbox\scratchdimen
-% \fi
-% \dp\scratchbox\zeropoint
-% \box\scratchbox}%
-% \iftraceTABLE\showtbltoks\fi
-% \ifnum\TBLlevel>\plusone
-% \vbox{\the\tbltoks}%
-% \else\ifenableTBLbreak
-% \ifmultipleTBLheads
-% \setbox\scratchbox\vbox{\the\tbltoks}%
-% \splittblbox\scratchbox
-% \else
-% \the\tbltoks
-% \fi
-% \else
-% \vbox{\the\tbltoks}%
-% \fi\fi}
-
\def\endTBL
{\appendtoks
\endtbl
@@ -1457,45 +1331,6 @@
\setsecondpasscharacteralign \checkalignment{#2}% {\strut#2\unskip}%
\ignorespaces}
-% \long\def\dohandleTBLcellA#1#2[#3]#4%
-% {\setbox\scratchbox\hbox
-% {\setupTBLcell{#1}{#2}%
-% \localframed
-% [\@@tbl\@@tbl]
-% [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster
-% {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{#1}{#2}}}%
-% \scratchdimen\gettblwid\colTBL\relax
-% \ifdim\wd\scratchbox>\scratchdimen
-% \settblwid\colTBL{\the\wd\scratchbox}% auto set
-% \fi
-% \let\rowTBLx\rowTBL\increment\rowTBLx
-% \scratchdimen\gettblhei\rowTBLx\relax
-% \ifdim\ht\scratchbox<\scratchdimen
-% \settblhei\rowTBLx{\the\ht\scratchbox}% auto set
-% \fi
-% \settblht{#1}{#2}{\the\ht\scratchbox}%
-% \settblwd{#1}{#2}{\the\wd\scratchbox}%
-% \ifautoTBLcheckwidth
-% \ifdim\wd\scratchbox<.75\hsize
-% \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a
-% \scratchdimen\gettblaut\colTBL\relax % figure or so
-% \ifdim\scratchdimen=\zeropoint
-% % side effect: when width is set to 0pt,
-% % we can force a span that fits the sum of spans widths
-% \settblaut\colTBL{\the\scratchdimen}%
-% \else\ifdim\wd\scratchbox>\scratchdimen
-% % unless span
-% \settblaut\colTBL{\the\wd\scratchbox}%
-% % to be translated
-% \writestatus\m!TABLE{no auto width in (\number#1,\number#2)\space\the\wd\scratchbox/\the\hsize}%
-% \fi\fi
-% \fi
-% \fi
-% \fi
-% \setbox2\null
-% \wd2\wd\scratchbox \ht2\ht\scratchbox \dp2\dp\scratchbox
-% \box2}
-
% new, needed for icare first col of 'doeltabel', experimental
\long\def\dohandleTBLcellA#1#2[#3]#4%
diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex
index 9b105df70..fd046af52 100644
--- a/tex/context/base/core-reg.tex
+++ b/tex/context/base/core-reg.tex
@@ -154,7 +154,8 @@
{\begingroup
\thisisnextinternal\s!ind
\ifduplicate\getlastregisterentry{#2}\fi
- \convertexpanded{\??id\currentregister}{#2}\asciiregisterentry
+ \convertexpanded{\??id\currentregister}{#2}\asciiregisterentryA
+ \convertexpanded{\??id\currentregister}{#3}\asciiregisterentryB
\makesectionformat
\edef\schrijfwegnaarregister%
{\writeutility%
@@ -162,8 +163,8 @@
{\currentregister} %
{\nextinternalreference} %
{#1} %
- {\asciiregisterentry} %
- {#3} %
+ {\asciiregisterentryA} %
+ {\asciiregisterentryB} %
{\sectionformat}}}%
\schrijfwegnaarregister
\endgroup
diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex
index 3d20a74df..6f593a70c 100644
--- a/tex/context/base/core-uti.tex
+++ b/tex/context/base/core-uti.tex
@@ -260,8 +260,8 @@
\resetutilities
% more than one utility thing can be handled in one pass,
% for instance lists, so we process ##1 as list
- \def\docommando##1{\csname\s!set##1\endcsname}%
- \processcommacommand[#1]\docommando
+ \def\douticommand##1{\csname\s!set##1\endcsname}%
+ \processcommacommand[#1]\douticommand
\begingroup
\def\currentutilityfilename{#2}%
\notesenabledfalse
diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex
index 6c3a1248e..66e8f7692 100644
--- a/tex/context/base/mult-con.tex
+++ b/tex/context/base/mult-con.tex
@@ -2093,6 +2093,9 @@ proces: proces process
eerstepagina: eerstepagina firstpage
ersteseite prvnistranka
primapagina primapagina
+ eerstekolom: eerstekolom firstcolumn
+ firstcolumn firstcolumn
+ firstcolumn firstcolumn
vorigepagina: vorigepagina previouspage
vorigeseite predchozistranka
paginaprecedente paginaanterioara
@@ -2102,6 +2105,9 @@ proces: proces process
laatstepagina: laatstepagina lastpage
letzteseite poslednistrana
ultimapagina ultimapagina
+ laatstekolom: laatstekolom lastcolumn
+ lastcolumn lastcolumn
+ lastcolumn lastcolumn
lastpagenumber: laatstepaginanummer lastpagenumber
lastpagenumber lastpagenumber
lastpagenumber lastpagenumber
diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex
index 4b0baf02b..2f5954b62 100644
--- a/tex/context/base/page-lay.tex
+++ b/tex/context/base/page-lay.tex
@@ -548,8 +548,8 @@
% inconsistent specification
\fi}}%
\else
- % beware, when the bodyfont changes (switched) this wil lchange as well; implementing
- % a global lineheight is tricky: should we take the bodyfont ils or the one set
+ % beware, when the bodyfont changes (switched) this will change as well; implementing
+ % a global lineheight is tricky: should we take the bodyfont interlinespace or the one set
% independent of the bodyfont (before or after a layout spec); way too fuzzy, so we
% stick to the current method (after a night of experimenting ...2003/10/13)
\global\zethoogte\layoutparameter\c!regels\lineheight
diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex
index 0a4fa03ca..2c3e5c131 100644
--- a/tex/context/base/page-mul.tex
+++ b/tex/context/base/page-mul.tex
@@ -352,24 +352,46 @@
%D dimensions are influenced by bodyfont switches inside
%D multi||column mode.
-\def\setcolumnvsize
- {%\global\vsize\columntextheight
- \global\vsize-\columntextoffset
- \global\multiply\vsize 2
- \global\advance\vsize \columntextheight
+% \def\setcolumnvsize
+% {%\global\vsize\columntextheight
+% \global\vsize-\columntextoffset
+% \global\multiply\vsize \plustwo
+% \global\advance\vsize \columntextheight
+% \ifdim\precolumnboxheight>\zeropoint
+% \global\advance\vsize -\precolumnboxheight
+% \fi
+% %\getinsertionheights\to\dimen0\\%
+% %\global\advance\vsize -\dimen0
+% \settotalinsertionheight
+% \global\advance\vsize -\totalinsertionheight
+% %%%\ifgridsnapping % evt altijd, nog testen, testing now, see columned tocs
+% \getnoflines\vsize
+% \vsize\noflines\openlineheight
+% \advance\vsize .5\openlineheight % collect enough data
+% %%%\fi
+% \global\vsize\nofcolumns\vsize
+% \global\pagegoal\vsize} % let's do it only here
+
+\newdimen\mcscratchdimen
+\newcount\nofcolumnlines
+
+\def\getmulticolumnlines
+ {\mcscratchdimen-\columntextoffset
+ \multiply\mcscratchdimen \plustwo
+ \advance\mcscratchdimen \columntextheight
\ifdim\precolumnboxheight>\zeropoint
- \global\advance\vsize -\precolumnboxheight
+ \advance\mcscratchdimen -\precolumnboxheight
\fi
- %\getinsertionheights\to\dimen0\\%
- %\global\advance\vsize -\dimen0
\settotalinsertionheight
- \global\advance\vsize -\totalinsertionheight
-%%%\ifgridsnapping % evt altijd, nog testen, testing now, see columned tocs
- \getnoflines\vsize
- \vsize\noflines\openlineheight
- \advance\vsize .5\openlineheight % collect enough data
-%%%\fi
- \global\vsize\nofcolumns\vsize
+ \advance\mcscratchdimen -\totalinsertionheight
+ \getnoflines\mcscratchdimen
+ \nofcolumnlines\noflines}
+
+\def\setcolumnvsize
+ {\getmulticolumnlines
+ \mcscratchdimen\nofcolumnlines\openlineheight
+ \advance\mcscratchdimen .5\openlineheight % collect enough data
+ \global\vsize\nofcolumns\mcscratchdimen
\global\pagegoal\vsize} % let's do it only here
%D It really starts here. After some checks and initializations
@@ -756,16 +778,16 @@
\fuzzysnappedbox\unvbox0
\fakecolumnfootnotes{#1}}%
\else
- \ifclevernotes
+ \ifcase\clevernotes
+ \global\setbox#1\vsplit#2 to \dimen#3%
+ \global\setbox#1\vbox
+ {\fuzzysnappedbox\unvbox{#1}}% % or \box ?
+ \else
\columnfootnotecorrection{#1}{\dimen#3}%
\setbox0\vsplit#2 to \dimen#3%
\global\setbox#1\vbox to \dimen#3%
{\fuzzysnappedbox\unvbox0
\fakecolumnfootnotes{#1}}%
- \else
- \global\setbox#1\vsplit#2 to \dimen#3%
- \global\setbox#1\vbox
- {\fuzzysnappedbox\unvbox{#1}}% % or \box ?
\fi
\fi
\egroup}
@@ -786,7 +808,7 @@
\def\fakecolumnfootnotes#1%
{\relax
- \ifclevernotes
+ \ifcase\clevernotes\else
\ifnum#1=\lastcolumnbox
\fakenotes
\fi
@@ -794,34 +816,91 @@
\def\columnfootnotecorrection#1#2%
{\relax
- \ifclevernotes
+ \ifcase\clevernotes
+ % page notes
+ \or
+ \ifnum#1=\firstcolumnbox\relax
+ \calculatetotalclevernoteheight
+ \advance#2 -\totalnoteheight
+ \fi
+ \else
\ifnum#1=\lastcolumnbox\relax
- \calculatetotalnoteheight
+ \calculatetotalclevernoteheight
\advance#2 -\totalnoteheight
\fi
\fi}
-\def\overlaycolumnfootnotes % VERVANGEN !!!
+% \def\overlaycolumnfootnotes % VERVANGEN !!!
+% {\relax
+% \ifcase\clevernotes\else
+% \checknotepresence
+% \ifnotespresent
+% % the note box has the depth of the notefont
+% % because a column (i.e. first column has no depth,
+% % we need to anchor top down)
+% \bgroup
+% \scratchdimen\ht\firstcolumnbox
+% \advance\scratchdimen -\openstrutdepth % \strutdp
+% \getnoflines\scratchdimen
+% \advance\noflines -2
+% \scratchdimen\noflines\lineheight
+% \advance\scratchdimen \topskip
+% \setbox0\hbox
+% {\lower\scratchdimen\vbox{\placenoteinserts}}%
+% \ht0=\openstrutheight % \strutht
+% \dp0=\openstrutdepth % \strutdp
+% \scratchdimen\ht\lastcolumnbox
+% \global\setbox\lastcolumnbox\vbox to \scratchdimen
+% {\box\lastcolumnbox
+% \vskip-\scratchdimen
+% \restoretextcolor{\box0}}%
+% \egroup
+% \fi
+% \fi}
+
+\def\overlaycolumnfootnotes
{\relax
- \ifclevernotes
+ \ifcase\clevernotes
+ % page notes
+ \else
\checknotepresence
\ifnotespresent
+ % the note box has the depth of the notefont
+ % because a column (i.e. first column has no depth,
+ % we need to anchor top down)
\bgroup
- \scratchdimen\ht\firstcolumnbox
- \advance\scratchdimen -\openstrutdepth % \strutdp
- \getnoflines\scratchdimen
- \advance\noflines -2
- \scratchdimen\noflines\lineheight
- \advance\scratchdimen \topskip
- \setbox0\hbox
- {\lower\scratchdimen\vbox{\placenoteinserts}}%
- \ht0=\openstrutheight % \strutht
- \dp0=\openstrutdepth % \strutdp
- \scratchdimen\ht\lastcolumnbox
- \global\setbox\lastcolumnbox\vbox to \scratchdimen
- {\box\lastcolumnbox
- \vskip-\scratchdimen
- \restoretextcolor{\box0}}%
+ \ifcase\clevernotes\or
+ \getmulticolumnlines
+ \advance\nofcolumnlines -2 % ?
+ \scratchdimen\nofcolumnlines\lineheight
+ \advance\scratchdimen \topskip
+ \setbox0\hbox
+ {\lower\scratchdimen\vbox{\placenoteinserts}}%
+ \ht0=\openstrutheight % \strutht
+ \dp0=\openstrutdepth % \strutdp
+ \scratchdimen\ht\firstcolumnbox
+ \global\setbox\firstcolumnbox\vbox to \scratchdimen
+ {\box\firstcolumnbox
+ \vskip-\scratchdimen
+ \restoretextcolor{\box0}}%
+ \else
+ % maybe here also \getmulticolumnlines
+ \scratchdimen\ht\firstcolumnbox
+ \advance\scratchdimen -\openstrutdepth % \strutdp
+ \getnoflines\scratchdimen
+ \advance\noflines -2
+ \scratchdimen\noflines\lineheight
+ \advance\scratchdimen \topskip
+ \setbox0\hbox
+ {\lower\scratchdimen\vbox{\placenoteinserts}}%
+ \ht0=\openstrutheight % \strutht
+ \dp0=\openstrutdepth % \strutdp
+ \scratchdimen\ht\lastcolumnbox
+ \global\setbox\lastcolumnbox\vbox to \scratchdimen
+ {\box\lastcolumnbox
+ \vskip-\scratchdimen
+ \restoretextcolor{\box0}}%
+ \fi
\egroup
\fi
\fi}
@@ -837,14 +916,16 @@
\forgetall
\setmulticolumnsout
\dontshowcomposition
- \dimen0=\columntextheight
- \advance\dimen0 -\precolumnboxheight
- \settotalinsertionheight
- \advance\dimen0 -\totalinsertionheight
- \ifgridsnapping % evt altijd, nog testen
- \getnoflines{\dimen0}
- \dimen0=\noflines\openlineheight
- \fi
+% \dimen0=\columntextheight
+% \advance\dimen0 -\precolumnboxheight
+% \settotalinsertionheight
+% \advance\dimen0 -\totalinsertionheight
+% \ifgridsnapping % evt altijd, nog testen
+% \getnoflines{\dimen0}
+% \dimen0=\noflines\openlineheight
+% \fi
+ \getmulticolumnlines
+ \dimen0=\nofcolumnlines\openlineheight
\dohandleallcolumns
{\splitcurrentcolumn from \box\normalpagebox to \dimen0}
\setbox\restofpage\vbox{\unvbox\normalpagebox}%
@@ -1154,7 +1235,7 @@
#2=\dimen4
#3=\dimen6 }
-\def\getinsertionheight%
+\def\getinsertionheight
{\ifdim\pagegoal<\maxdimen
\bgroup
\dimen0=\columntextheight
@@ -1162,7 +1243,7 @@
\xdef\insertionheight{\the\dimen0}%
\egroup
\else
- \global\let\insertionheight=\zeropoint
+ \global\let\insertionheight\zeropoint
\fi}
\def\docolumnroomfloat
diff --git a/tex/context/base/page-not.tex b/tex/context/base/page-not.tex
index 23217781b..2dd5d09ff 100644
--- a/tex/context/base/page-not.tex
+++ b/tex/context/base/page-not.tex
@@ -23,18 +23,18 @@
\unprotect
\def\checkbegincolumnfootnotes % should happen inside otr
- {\ifclevernotes
+ {\ifcase\clevernotes
+ \erasenotebackup
+ \else
\doflushnotes
\savenotecontent
- \else
- \erasenotebackup
\fi
\savenotedata
\checknotes}
\def\checkendcolumnfootnotes
{\restorenotedata % maybe better just \checknotes
- \ifclevernotes
+ \ifcase\clevernotes\else
\restorenotecontent
\fi}
@@ -52,18 +52,18 @@
% hm
\def\checkbegincolumnfootnotes % should happen inside otr
- {\ifclevernotes
+ {\ifcase\clevernotes
+ \erasenotebackup
+ \else
\doflushnotes
\savenotecontent
- \else
- \erasenotebackup
\fi
\savenotedata
\checknotes}
\def\checkendcolumnfootnotes
{\restorenotedata
- \ifclevernotes
+ \ifcase\clevernotes\else
\restorenotecontent
\fi}
diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex
index 3a8a556f7..badc2212d 100644
--- a/tex/context/base/ppchtex.tex
+++ b/tex/context/base/ppchtex.tex
@@ -489,9 +489,10 @@
\endpspicture
\or
\resetchemicalcoordinates
- \setbox2=\hbox
- {\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
- \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
+ \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
+ \wd2=\!!zeropoint
+ \ht2=\!!zeropoint
+ \dp2=\!!zeropoint
\put {\box2} at 0 0
\endpicture
\popMPdrawing
@@ -529,9 +530,10 @@
\put {\box\chemicalsymbols} at 0 0 % elders
\ifMPdrawingdone
\resetchemicalcoordinates
- \setbox2=\hbox
- {\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
- \wd2=\!!zeropoint\ht2=\!!zeropoint\dp2=\!!zeropoint
+ \setbox2\hbox{\MPshiftdrawingtrue\MPstaticgraphictrue\getMPdrawing}%
+ \wd2=\!!zeropoint
+ \ht2=\!!zeropoint
+ \dp2=\!!zeropoint
\put {\box2} at 0 0 %
\fi
\endpicture
@@ -3381,11 +3383,15 @@ RT##3##4##5=>\processchemicaltextelement{RN}{##3##4##5}{#1}{0}{},
\c!kleur=]
\def\cpos#1#2%
- {\bgroup
- \pushmacro\dowithchemical
- \gdef\dowithchemical##1{\hpos{#1}{##1}\popmacro\dowithchemical}%
- #2%
- \egroup}
+ {\iftrialtypesetting
+ #2%
+ \else
+ \bgroup
+ \globalpushmacro\dowithchemical
+ \gdef\dowithchemical##1{\hpos{#1}{##1}\globalpopmacro\dowithchemical}%
+ #2%
+ \egroup
+ \fi}
\fi
diff --git a/tex/context/base/prop-mis.tex b/tex/context/base/prop-mis.tex
index 45513f880..822b48cd9 100644
--- a/tex/context/base/prop-mis.tex
+++ b/tex/context/base/prop-mis.tex
@@ -108,7 +108,7 @@
{\doifsomething{\rawgetbotmark\overprintmark}%
{\propertyhandler{\rawgetbotmark\negativemark}}}
-\def\popsplitoverprintproperty
+\def\popsplitnegativeproperty
{\getsplitmarks\negativemark % hier wel
\doifsomething{\rawgetsplitbotmark\negativemark}%
{\propertyhandler{\rawgetsplitbotmark\negativemark}}}
diff --git a/tex/context/base/setupb.tex b/tex/context/base/setupb.tex
index 934a347cb..9d934fdd9 100644
--- a/tex/context/base/setupb.tex
+++ b/tex/context/base/setupb.tex
@@ -763,7 +763,7 @@
[\v!per\v!tekst]
\variable
[\c!plaats]
- [\v!pagina,\v!tekst,\v!kolommen,\v!hoog,\v!geen]
+ [\v!pagina,\v!tekst,\v!kolommen,\v!eerstekolom,\v!laatstekolom,\v!hoog,\v!geen]
[\v!pagina]
\variable
[\c!lijn]
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex
index 0865d5762..b5df1e20c 100644
--- a/tex/context/base/supp-fil.tex
+++ b/tex/context/base/supp-fil.tex
@@ -191,6 +191,7 @@
\edef~{\string~}%
\expanded{\xdef\noexpand\sanitizedfilename{#1}}%
\egroup
+ % maybe \convertcommand\sanitizedfilename\to#2%
\let#2\sanitizedfilename}
\egroup