From 0746528ff3a98ee6e70c2121526c07507f614df9 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 9 Nov 2005 00:00:00 +0100 Subject: stable 2005.11.09 --- doc/context/general/allkind/context.rme | 70 -- fonts/map/dvips/context/ec-lm.map | 69 ++ fonts/map/dvips/context/el-lm.map | 69 ++ fonts/map/dvips/context/qx-lm.map | 69 ++ fonts/map/dvips/context/t5-lm.map | 69 ++ fonts/map/dvips/context/texnansi-lm.map | 69 ++ fonts/map/dvips/context/ts1-lm.map | 69 ++ fonts/map/pdftex/context/context-base.map | 1077 ----------------------- fonts/map/pdftex/context/ec-public-lm.map | 69 -- fonts/map/pdftex/context/original-public-lm.map | 170 ---- fonts/map/pdftex/context/original-wasy.map | 7 + fonts/map/pdftex/context/qx-public-lm.map | 69 -- fonts/map/pdftex/context/t5-public-lm.map | 69 -- fonts/map/pdftex/context/texnansi-public-lm.map | 69 -- metapost/context/base/mp-spec.mp | 21 +- scripts/context/perl/mptopdf.pl | 10 +- scripts/context/perl/texexec.pl | 2 + scripts/context/ruby/base/ctx.rb | 2 +- scripts/context/ruby/base/tex.rb | 2 +- scripts/context/ruby/base/texutil.rb | 12 +- scripts/context/ruby/texmfstart.rb | 6 +- tex/context/base/context.tex | 6 +- tex/context/base/core-ntb.tex | 97 +- tex/context/base/core-tbl.tex | 3 +- tex/context/base/core-ver.tex | 97 +- tex/context/base/supp-mis.tex | 3 +- tex/context/base/symb-was.tex | 205 +++++ tex/context/base/syst-ext.tex | 13 + tex/context/base/syst-gen.tex | 75 ++ tex/context/base/type-map.tex | 8 +- tex/context/base/verb-ini.tex | 2 +- tex/context/interface/keys-cz.xml | 2 +- tex/context/interface/keys-de.xml | 2 +- tex/context/interface/keys-en.xml | 2 +- tex/context/interface/keys-it.xml | 2 +- tex/context/interface/keys-nl.xml | 2 +- tex/context/interface/keys-ro.xml | 2 +- 37 files changed, 947 insertions(+), 1643 deletions(-) delete mode 100644 doc/context/general/allkind/context.rme create mode 100644 fonts/map/dvips/context/ec-lm.map create mode 100644 fonts/map/dvips/context/el-lm.map create mode 100644 fonts/map/dvips/context/qx-lm.map create mode 100644 fonts/map/dvips/context/t5-lm.map create mode 100644 fonts/map/dvips/context/texnansi-lm.map create mode 100644 fonts/map/dvips/context/ts1-lm.map delete mode 100644 fonts/map/pdftex/context/context-base.map delete mode 100644 fonts/map/pdftex/context/ec-public-lm.map delete mode 100644 fonts/map/pdftex/context/original-public-lm.map create mode 100644 fonts/map/pdftex/context/original-wasy.map delete mode 100644 fonts/map/pdftex/context/qx-public-lm.map delete mode 100644 fonts/map/pdftex/context/t5-public-lm.map delete mode 100644 fonts/map/pdftex/context/texnansi-public-lm.map create mode 100644 tex/context/base/symb-was.tex diff --git a/doc/context/general/allkind/context.rme b/doc/context/general/allkind/context.rme deleted file mode 100644 index 1cb12cc07..000000000 --- a/doc/context/general/allkind/context.rme +++ /dev/null @@ -1,70 +0,0 @@ -Some Basic information ----------------------- - -There are currently three interfaces available: - - cont-en the english version - cont-de the german version - cont-nl the dutch version - cont-cz the czech version - cont-ro the romanian version - cont-it the italian version - -One should compile one of these (or all) into a fmt file. -When one uses the main file, - - context the undefined version - -TeX ask for an interface language as well as a message -language. Here one has to specify the full name (english, -german, dutch, etc.) or use the default (enter). The \ -savest way to update the TeX and MetaPost format files -is to use TeXExec: - -texexec --make --alone en nl metafun - -In the TeXExec manual you can read how to generate a format -with specific fonts and patterns. - -By default only the english hyphenation patterns are loaded, -unless more are enabled in: - - cont-usr the typesetting language specifications - -Furthermore, users can preset commands etc in the file - - cont-sys a system file loaded at runtime - -For questions and remarks on ConTeXt, one can subscribe to -the list: - - ntg-context@ntg.nl - -by sending the message - - subscribe ntg-context - -to the list server: - - majordomo@ntg.nl - -One can find more info at: - - www.pragma-ade.com - -or at the mirror sites mentioned there. - -Don't hesitate to ask questions. ConTeXt can do a lot, and -the manuals are always a bit behind and incomplete. Also take -a look at the files - - mreadme.pdf - minstall.pdf - mtexexec.pdf - mtexutil.pdf - -The teTeX, fpTeX, and 4TeX distributions demonstrate how -ConTeXt can be integrated in a TeX directory structure. - -------------------------- -Hans Hagen, pragma@wxs.nl diff --git a/fonts/map/dvips/context/ec-lm.map b/fonts/map/dvips/context/ec-lm.map new file mode 100644 index 000000000..d4640394f --- /dev/null +++ b/fonts/map/dvips/context/ec-lm.map @@ -0,0 +1,69 @@ +ec-lmb10 LMRoman10-Demi "enclmec ReEncodeFont" 0) or (length _local_specials_ >0) : +% special ("%%MetaPostSpecials: 1.0 " & decimal _special_signal_ ) ; +% fi ; +% enddef ; +% +% After some reported problems at the \CONTEXT\ mailing list, +% Taco's came up with: + +% TH: \quotation {Ok, got it. There is a bug in mp-spec.mp (inside metafun). +% Because of a wrapping number, it fails to recognize the fact that there +% are embedded specials at all.} The corrected definition is: + vardef add_special_signal = % write the version number - if (length _global_specials_>0) or (length _local_specials_ >0) : + if (length _global_specials_ <> 0) or (length _local_specials_ <> 0) : special ("%%MetaPostSpecials: 1.0 " & decimal _special_signal_ ) ; fi ; enddef ; +% \quotation {It now tests for \quote {not equal to zero} instead of +% \quote {larger than zero}: because of all the included files, the +% string \type {_local_specials_} becomes longer than the maximum number +% \quote {length} can return, so it returns -32768 instead, and that is +% of course less than zero.} + vardef add_extra_specials = scantokens _global_specials_ ; scantokens _local_specials_ ; diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl index 7a4ac2f30..2ab90be06 100644 --- a/scripts/context/perl/mptopdf.pl +++ b/scripts/context/perl/mptopdf.pl @@ -99,14 +99,12 @@ foreach my $file (@files) { $_ = $file ; if (s/\.(\d+|mps)$// && -e $file) { if ($miktex) - { $command = "pdfetex -undump=mptopdf" } + { $command = "pdfetex -undump=mptopdf" } else - { $command = "pdfetex -progname=context -fmt=mptopdf" } + { $command = "pdfetex -fmt=mptopdf -progname=context" } if ($dosish) - { $command = "$command \\relax $file" } - else - { $command = "$command \\\\relax $file" } - #~ print $command ; + { $command = "$command \\relax $file" } + else #~ print $command ; system($command) ; rename ("$_.pdf", "$_-$1.pdf") ; if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") } diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl index 2f3b89e04..a020727df 100644 --- a/scripts/context/perl/texexec.pl +++ b/scripts/context/perl/texexec.pl @@ -255,6 +255,7 @@ my $MakeMpy = ''; "once" => \$RunOnce, "output=s" => \$OutputFormat, "pages=s" => \$Pages, + "paper=s" => \$PaperFormat, "paperformat=s" => \$PaperFormat, "passon=s" => \$PassOn, "path=s" => \$InpPath, @@ -275,6 +276,7 @@ my $MakeMpy = ''; "selection=s" => \$Selection, "combination=s" => \$Combination, "noduplex" => \$NoDuplex, + "offset=s" => \$PaperOffset, "paperoffset=s" => \$PaperOffset, "backspace=s" => \$BackSpace, "topspace=s" => \$TopSpace, diff --git a/scripts/context/ruby/base/ctx.rb b/scripts/context/ruby/base/ctx.rb index 852c3f704..b1fda3c3a 100644 --- a/scripts/context/ruby/base/ctx.rb +++ b/scripts/context/ruby/base/ctx.rb @@ -101,7 +101,7 @@ class CtxRunner @modules << justtext(mod) end REXML::XPath.each(@xmldata.root,"/ctx:job/ctx:process/ctx:resources/ctx:filter") do |fil| - @filters << justtext(mod) + @filters << justtext(fil) end REXML::XPath.each(@xmldata.root,"/ctx:job/ctx:preprocess/ctx:files") do |files| REXML::XPath.each(files,"ctx:file") do |pattern| diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index 2cc9d2542..6132e5a26 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -1136,7 +1136,7 @@ class TEX system("dvipdfmx -d 4 #{File.unsuffixed(rawname)}") when 'xetex' then fixbackendvars('xetex') - system("xdv2pdf #{File.suffixed(jrawname,'xdv')}") + system("xdv2pdf #{File.suffixed(rawname,'xdv')}") when 'dvips' then fixbackendvars('dvips') mapfiles = '' diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb index c279bcc97..4c9bf6139 100644 --- a/scripts/context/ruby/base/texutil.rb +++ b/scripts/context/ruby/base/texutil.rb @@ -213,6 +213,7 @@ class TeXUtil def preset(shortcuts=[],expansions=[],reductions=[],divisions=[]) # maybe we should move this to sort-def.tex 'a'.upto('z') do |c| expander(c) ; division(c) end + 'A'.upto('Z') do |c| expander(c) ; division(c) end expander('1','b') ; expander('2','c') ; expander('3','e') ; expander('4','f') expander('5','g') ; expander('6','h') ; expander('7','i') ; expander('8','i') expander('9','j') ; expander('0','a') ; expander('-','-') ; @@ -240,7 +241,7 @@ class TeXUtil # what to do with xml and utf-8 # \"e etc # unknown \cs - s.gsub!(/\\[a-z][a-z]+\s*\{(.*?)\}/o) do $1 end + s.gsub!(/\\[a-zA-Z][a-zA-Z]+\s*\{(.*?)\}/o) do $1 end return s end @@ -384,7 +385,7 @@ class TeXUtil class Synonym @@debug = false - @@debug = true + # @@debug = true def initialize(t, c, k, d) @type, @command, @key, @sortkey, @data = t, c, k, k, d @@ -463,7 +464,7 @@ class TeXUtil class Register @@debug = false - @@debug = true + # @@debug = true @@howto = /^(.*?)\:\:(.*)$/o @@split = ' && ' @@ -505,7 +506,7 @@ class TeXUtil @sortkey, @texthowto.ljust(10,' '), @state, - @realpage.rjust(6,' '), + (@realpage ||'').rjust(6,' '), @pagehowto ].join(@@split) end @@ -555,7 +556,7 @@ class TeXUtil else testalpha = entry.sortkey[0,1].downcase end - if testalpha != alpha.downcase or alphaclass != entry.class then + if testalpha != alpha.downcase || alphaclass != entry.class then alpha = testalpha alphaclass = entry.class if alpha != ' ' then @@ -614,6 +615,7 @@ class TeXUtil Register.flushsavedline(handle) handle << "\\registersee{#{entry.type}}{#{entry.pagehowto},#{entry.texthowto}}{#{entry.seetoo}}{#{entry.page}}\n" ; lastpage, lastrealpage = entry.page, entry.realpage + copied = false # no page ! elsif @@savedhowto != entry.pagehowto and ! entry.pagehowto.empty? then @@savedhowto = entry.pagehowto end diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb index dc166bf92..0dfd14263 100644 --- a/scripts/context/ruby/texmfstart.rb +++ b/scripts/context/ruby/texmfstart.rb @@ -36,7 +36,7 @@ require "rbconfig" $mswindows = Config::CONFIG['host_os'] =~ /mswin/ $separator = File::PATH_SEPARATOR -$version = "1.6.2" +$version = "1.7.0" if $mswindows then @@ -71,6 +71,7 @@ $predefined['pstopdf'] = 'pstopdf.rb' $predefined['examplex'] = 'examplex.rb' $predefined['concheck'] = 'concheck.rb' +$predefined['runtools'] = 'runtools.rb' $predefined['textools'] = 'textools.rb' $predefined['tmftools'] = 'tmftools.rb' $predefined['ctxtools'] = 'ctxtools.rb' @@ -384,6 +385,7 @@ def usage print("switches : --verbose --report --browser --direct --execute --locate --iftouched\n") print(" --program --file --page --arguments --batch --edit --report --clear\n") print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n") + print(" --tree\n") print("\n") print("example : texmfstart pstopdf.rb cow.eps\n") print(" texmfstart --locate examplex.rb\n") @@ -562,7 +564,7 @@ def find(filename,program) fullname = result[0] end rescue - report("locating '#{filename}.#{suffix}' in tree '#{texroot}' aborted") + report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted") end end return shortpathname(fullname) if register(filename,fullname) diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 0d67d6746..941bea809 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -31,7 +31,11 @@ %D 2004.8.30 the low level interface is english. Watch out and adapt %D your styles an modules. -\def\contextversion{2005.10.27} +\def\contextversion{2005.11.09} + +%D For those who want to use this: + +\def\fmtname{context} %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-ntb.tex b/tex/context/base/core-ntb.tex index 080d5c31a..31f641600 100644 --- a/tex/context/base/core-ntb.tex +++ b/tex/context/base/core-ntb.tex @@ -100,10 +100,12 @@ \def\settblwid#1#2{\setxvalue{\@@tblprefix#1:w}{#2}} % global ! \def\settblhei#1#2{\setxvalue{\@@tblprefix#1:h}{#2}} % global ! +\def\settbldis#1#2{\setxvalue{\@@tblprefix#1:d}{#2}} % global ! \def\settblaut#1#2{\setxvalue{\@@tblprefix#1:a}{#2}} % global ! \def\gettblwid#1{\executeifdefined{\@@tblprefix#1:w}\zeropoint} \def\gettblhei#1{\executeifdefined{\@@tblprefix#1:h}\zeropoint} +\def\gettbldis#1{\executeifdefined{\@@tblprefix#1:d}\zeropoint} \def\gettblaut#1{\csname\@@tblprefix#1:a\endcsname} \def\doiftbltag #1#2{\doifdefined {\@@tblprefix#1:#2:s}} @@ -366,6 +368,51 @@ \long\def\parseTN[#1]#2\eTN {\parseTD[#1]\digits#2\relax\eTD} +%D Vit Zyka needed the option to create a distance between columns, so I +%D added support for individual column distances. +%D +%D \startbuffer +%D % \setupTABLE[c][each][distance=2em] +%D \setupTABLE[c][1][distance=2em] +%D \setupTABLE[c][2][distance=3em] +%D +%D \bTABLE +%D \bTR \bTD test \eTD \bTD test \eTD \bTD test \eTD \eTR +%D \bTR \bTD[nx=2] test \eTD \bTD test \eTD \eTR +%D \bTR \bTD test \eTD \bTD[nx=2] test \eTD \eTR +%D \eTABLE +%D +%D \bTABLE[option=stretch] +%D \bTR \bTD test \eTD \bTD test \eTD \bTD test \eTD \eTR +%D \bTR \bTD[nx=2] test \eTD \bTD test \eTD \eTR +%D \bTR \bTD test \eTD \bTD[nx=2] test \eTD \eTR +%D \eTABLE +%D \stopbuffer +%D +%D \typebuffer \startlinecorrection \getbuffer \stoplinecorrection +%D +%D and he provided patches for the global left and right margin distances +%D as well as the columndistance (although i changed the names -). Here +%D is his testcase: +%D +%D \startbuffer +%D \framed[offset=overlay]\bgroup +%D \setupTABLE[column][2][align=left]% +%D \setupTABLE[column][3][align=right]% +%D \bTABLE[margindistance=2cm,leftmargindistance=.3cm,margindistance=.5cm] +%D \bTR \bTH[nc=3] Table head\eTH \eTR +%D \bTR \bTD[nc=2] AB\eTD \bTD C\eTD \eTR +%D \bTR \bTD[nc=2,align=left] AB\eTD \bTD C\eTD \eTR +%D \bTR \bTD[nc=2,align=middle] AB\eTD \bTD C\eTD \eTR +%D \bTR \bTD A\eTD \bTD B\eTD \bTD C\eTD \eTR +%D \bTR \bTD Aa\eTD \bTD Bb\eTD \bTD Cccc\eTD \eTR +%D \bTR \bTD[nc=3,align=middle] ABC\eTD \eTR +%D \eTABLE +%D \egroup +%D \stopbuffer +%D +%D \typebuffer \startlinecorrection \getbuffer \stoplinecorrection + \newtoks\TBLhead \newtoks\TBLnext \newtoks\TBLbody @@ -573,7 +620,9 @@ {\doglobal\increment\colTBL} \def\nexttblcol - {\doglobal\increment\colTBL&} + {\doglobal\increment\colTBL + \kern\tbltblcolumndistance + &} \def\spantblcol {\span} @@ -582,10 +631,14 @@ {\noalign {\doglobal\increment\rowTBL \doglobal\newcounter\colTBL}% - \nexttblcol} + \nexttblcol + \kern\tbltblleftmargindistance + \kern-\tbltblcolumndistance} \def\endtblrow - {\crcr + {\kern-\tbltblcolumndistance + \kern\tbltblrightmargindistance + \crcr \noalign {\nointerlineskip \allowbreak @@ -659,7 +712,8 @@ {\settblwd \recurselevel\xcol\!!zeropoint \settblht \recurselevel\xcol\!!zeropoint}% % till here - \settblwid\recurselevel\!!zeropoint}% + \settblwid\recurselevel\!!zeropoint + \settbldis\recurselevel\!!zeropoint}% \dorecurse\maximumrow {\settblhei\recurselevel\maxdimen}% \chardef\TBLpass\plusone @@ -674,6 +728,7 @@ \settblaut\colTBL\localwidth \fi}}% \setbox0\vbox{\trialtypesettingtrue \the\tbltoks}% +\settbldis\maximumcol{\zeropoint}% \ifautoTBLspread % experimental, stretch non fixed cells to \hsize \checktblwidthsone % trial run @@ -703,7 +758,10 @@ \globalpushmacro\colTBL \dorecurse{\gettblcol{##1}{##2}} {\advance\dimen2 \gettblwid\colTBL + \advance\dimen2 \tbltblcolumndistance +\ifnum\recurselevel<\gettblcol{##1}{##2}\relax \advance\dimen2 \gettbldis\colTBL\fi \increment\colTBL}% + \advance\dimen2 -\tbltblcolumndistance \edef\widthTBL{\the\dimen2}% \globalpopmacro\colTBL \setbox\scratchbox\hbox{\gettbltxt{##1}{##2}}% @@ -739,7 +797,10 @@ \scratchdimen\zeropoint \dorecurse{\gettblcol{##1}{##2}} {\advance\scratchdimen \gettblwid\colTBL + \advance\scratchdimen \tbltblcolumndistance +\ifnum\recurselevel<\gettblcol{##1}{##2}\relax \advance\scratchdimen \gettbldis\colTBL\fi \increment\colTBL}% + \advance\scratchdimen -\tbltblcolumndistance \edef\widthTBL{\the\scratchdimen}% \globalpopmacro\colTBL % cell @@ -765,11 +826,17 @@ \def\stretchtblwidths {\!!dimend\zeropoint + \!!dimene\hsize \dorecurse\maximumcol - {\advance\!!dimend\gettblwid\recurselevel}% + {\advance\!!dimend \gettblwid\recurselevel + \advance\!!dimend \tbltblcolumndistance + \advance\!!dimene-\gettbldis\recurselevel}% + \advance\!!dimend-\tbltblcolumndistance + \advance\!!dimend\tbltblleftmargindistance + \advance\!!dimend\tbltblrightmargindistance % distribute width (stretch) - \ifdim\!!dimend<\hsize - \advance\!!dimend-\hsize + \ifdim\!!dimend<\!!dimene + \advance\!!dimend-\!!dimene \!!dimend-\!!dimend \divide\!!dimend\maximumcol \dorecurse\maximumcol @@ -1060,6 +1127,7 @@ \!!counta\zerocount \dorecurse\maximumcol {\scratchdimen\gettblaut\recurselevel\relax +% test: \advance\!!dimena-\gettbldis\recurselevel\relax \ifdim\scratchdimen>\zeropoint\relax \advance\!!dimena -\scratchdimen \else @@ -1179,6 +1247,10 @@ \long\def\dohandleTBLcellA#1#2[#3]#4% {\setbox\scratchbox\hbox {\setupTBLcell{#1}{#2}% +\scratchdimen\tbltbldistance\relax +\ifdim\scratchdimen>\gettbldis{#2}\relax + \settbldis{#2}{\the\scratchdimen}% +\fi \localframed [\@@tbl\@@tbl] [#3,\c!background=,\c!frame=\v!off]% 25% faster @@ -1282,7 +1354,8 @@ [\@@tbl\@@tbl] [\c!color=,\c!width=\widthTBL,\c!height=\heightTBL] {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% - \fi}} + \fi}% + \hskip\gettbldis{#2}} \setupTABLE [\c!frameoffset=.5\linewidth, @@ -1302,6 +1375,10 @@ \c!textwidth=\hsize, \c!split=\v!no, \c!splitoffset=0pt, + \c!distance=\zeropoint, % individual column + \c!columndistance=\zeropoint, % each column (whole table) + \c!leftmargindistance=\zeropoint, % whole table + \c!rightmargindistance=\zeropoint,% whole table \c!splitmethod=a] %D We have already prepared the previous macros for nesting, @@ -1426,6 +1503,8 @@ \def\TableTB{\doTableinterline{TB}} \appendtoks\let\TB\TableTB \to\everytable -\appendtoks\let\TB\TabulateTB\to\everytabulate +\appendtoks\let\TB\TabulateTB\to\everytabulate % strange place + +\appendtoks \chardef\recodeverbatimmode\plustwo \to \everytable \protect \endinput diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index b33302da4..c3be264bd 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -748,7 +748,8 @@ % An example of its usage: -\appendtoks \optimizeverbatimfalse \to \everytabulate +\appendtoks \optimizeverbatimfalse \to \everytabulate +\appendtoks \chardef\recodeverbatimmode\plustwo \to \everytabulate % A status variable: diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index eb8363cf0..1c152b165 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -286,23 +286,97 @@ \@EAEAEA\dodotypeD \fi\fi} +% Verbatim does not work when passed as an argument, so here is a +% workaround. Beware, spaces are introduced after a \type {\csname}. + +\chardef\recodeverbatimmode\zerocount % 0=nothing 1=rescan 2=autorescan +\chardef\recodeverbatimmode\zerocount % 0=nothing 1=rescan 2=autorescan + +% \appendtoks \chardef\recodeverbatimmode\plustwo \to \everytabulate +% \appendtoks \chardef\recodeverbatimmode\plustwo \to \everytable + +\def\dodotypeA + {\initializetype + \initializetypegrouping + \verbatimcolor + \ifcase\recodeverbatimmode + \@EA\dodotypeAA + \or + \@EA\dodotypeAB + \or + \ifnum\catcode`\{=\@@active + \@EAEAEA\dodotypeAB + \else + \@EAEAEA\dodotypeAA + \fi + \else + \@EA\dodotypeAA + \fi} + +\def\dodotypeAA + {\afterassignment\protectfirsttype\let\next=} + +\def\dodotypeAB + {\bgroup + \catcode`\}=\@@endgroup + \catcode`\{=\@@begingroup + \afterassignment\redotypeAB\global\globalscratchtoks} + +\def\redotypeAB + {\egroup + \expandafter\convertargument\the\globalscratchtoks\to\ascii + \ifx\scantokens\undefined\ascii\else\everyeof{\hskip-\spaceskip}\scantokens\expandafter{\ascii}\fi + \egroup} + +% bugged +% +% \bgroup +% \catcode`\[=\@@begingroup +% \catcode`\]=\@@endgroup +% \catcode`\{=\@@active +% \catcode`\}=\@@active +% \gdef\initializetypegrouping% +% [\catcode`\{=\@@active +% \catcode`\}=\@@endgroup % otherwise things go wrong ... +% \def\activerightargument% +% [\rightargument +% \egroup]% +% \def\activeleftargument% +% [\bgroup +% \leftargument %% this way TeXEdit can check: { +% \catcode`\}=\@@active % ... in alignments (tables) +% \let}=\activerightargument]% +% \let{=\activeleftargument]% %% this way TeXEdit can check: } +% \egroup +% +% ok: + \bgroup \catcode`\[=\@@begingroup \catcode`\]=\@@endgroup \catcode`\{=\@@active \catcode`\}=\@@active \gdef\initializetypegrouping% - [\catcode`\{=\@@active - \catcode`\}=\@@endgroup % otherwise things go wrong ... - \def\activerightargument% - [\rightargument - \egroup]% + [\ifnum\catcode`\{=\@@active + \let\normalactivebgroup{% + \let\normalactiveegroup}% + \else + \catcode`\{=\@@active + \catcode`\}=\@@active + \let\normalactivebgroup\leftargument + \let\normalactiveegroup\rightargument + \fi \def\activeleftargument% [\bgroup - \leftargument %% this way TeXEdit can check: { - \catcode`\}=\@@active % ... in alignments (tables) - \let}=\activerightargument]% - \let{=\activeleftargument]% %% this way TeXEdit can check: } + \let}\activerightargument + \normalactivebgroup + ]% + \def\activerightargument% + [\normalactiveegroup + \egroup]% + \let{=\activeleftargument + \let}=\egroup + ] \egroup \bgroup @@ -463,10 +537,7 @@ {\setupgroupedtype \slantedtypepermittedtrue} -% the next one was \string, but this prevents coloring, one can make -% it \string again if needed - -\let\protectedfirsttype\relax +\let\protectedfirsttype\string % \relax for special cases \bgroup \catcode`\<=\active diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex index ab089a297..7ad444695 100644 --- a/tex/context/base/supp-mis.tex +++ b/tex/context/base/supp-mis.tex @@ -154,8 +154,9 @@ % no time now, will do a better test later (based on dimendef) \def\!!stringa{plain} \ifx\!!stringa\fmtname \donetrue \else +\def\!!stringa{eplain} \ifx\!!stringa\fmtname \donetrue \else \def\!!stringa{babel-plain} \ifx\!!stringa\fmtname \donetrue \else - \donefalse \fi \fi + \donefalse \fi \fi \fi \ifdone % plain defines some 15 dimens, so we need to define a few diff --git a/tex/context/base/symb-was.tex b/tex/context/base/symb-was.tex new file mode 100644 index 000000000..ba2617306 --- /dev/null +++ b/tex/context/base/symb-was.tex @@ -0,0 +1,205 @@ +%D \module +%D [ file=symb-was, +%D version=2005.10.15, +%D title=\CONTEXT\ Symbol Libraries, +%D subtitle=Roland Waldi's Symbols (wasy-2), +%D author=Henning Hraban Ramm, +%D date=\currentdate, +%D copyright={public domain}] +%C +%C This module is in the public domain. + +%D This module implements the Roland Waldi Symbole font +%D (wasy). The names are derived from the \LATEX\ package +%D \type {wasysym} by Axel Kielhorn. The symbols are +%D available as Type~1 font and are included in \TEX\ distributions. +%D +%D This symbol font offers basic sets of astronomical, astrological, +%D geometrical, musical and general symbols, plus those needed +%D for the APL programming language and some more. +%D This module leaves out most of the math stuff, such as operators +%D and integrals. +%D +%D The font was designed by Robert Waldi and is in the public domain. +%D The PS Type 1 fonts are by Taco Hoekwater, \hyphenatedurl +%D {taco.hoekwater@wkap.nl}, and also in the public domain. +%D The wasysym \LATEX\ package is (c) Axel Kielhorn, \hyphenatedurl +%D {A.Kielhorn@web.de}, under the LaTeX Project Public License. +%D This stuff lives in \hyphenatedurl {http://dante.ctan.org/CTAN/fonts/wasy2/}. +%D +%D This \CONTEXT\ module is by Henning Hraban Ramm, \hyphenatedurl +%D {hraban@fiee.net}, given to the public domain as far as allowed +%D (some parts are copied from the \LATEX\ package). + +%D Slightly patched by HH. + +\loadmapfile[original-wasy.map] + +% there are also fonts for 6, 7, 8, 9 pt; how can we access these automatically? +% how about the bold wasy font? + +\definefontsynonym [WaldiSymbol] [wasy10] +\definefontsynonym [WaldiSymbolBold] [wasyb10] + +\def\WaldiSymbol#1{\getglyph{WaldiSymbol}{\char#1}} + +\def\wasy@over#1#2{{\setbox0\hbox{$#2$}\hbox to \wd0{\hss$#1$\hss}\kern-\wd0\box0}} + +% general symbols + +\startsymbolset [wasy general] + \definesymbol [male] [\WaldiSymbol {26}] + \definesymbol [female] [\WaldiSymbol {25}] + \definesymbol [currency] [\WaldiSymbol {27}] + \definesymbol [cent] [\WaldiSymbol{103}] + \definesymbol [lozenge] [\WaldiSymbol {53}] + \definesymbol [kreuz] [\WaldiSymbol {54}] + \definesymbol [smiley] [\WaldiSymbol {44}] + \definesymbol [blacksmiley] [\WaldiSymbol {45}] + \definesymbol [frownie] [\WaldiSymbol {47}] + \definesymbol [sun] [\WaldiSymbol {46}] + \definesymbol [checked] [\WaldiSymbol {8}] + \definesymbol [brokenvert] [\WaldiSymbol{124}] + \definesymbol [diameter] [\WaldiSymbol {31}] + \definesymbol [invdiameter] [\WaldiSymbol {21}] + \definesymbol [phone] [\WaldiSymbol {7}] + \definesymbol [recorder] [\WaldiSymbol {6}] + \definesymbol [clock] [\WaldiSymbol {28}] + \definesymbol [permil] [\WaldiSymbol{104}] + \definesymbol [bell] [\WaldiSymbol {10}] + \definesymbol [ataribox] [\WaldiSymbol{109}] + \definesymbol [pointer] [\WaldiSymbol {9}] + \definesymbol [lightning] [\WaldiSymbol {18}] + \definesymbol [agemO] [\WaldiSymbol {48}] +\stopsymbolset + +\startsymbolset [wasy music] + \definesymbol [eighthnote] [\WaldiSymbol{11}] + \definesymbol [quarternote] [\WaldiSymbol{12}] + \definesymbol [halfnote] [\WaldiSymbol{13}] + \definesymbol [fullnote] [\WaldiSymbol{14}] + \definesymbol [twonotes] [\WaldiSymbol{15}] +\stopsymbolset + +\startsymbolset [wasy astronomy] + \definesymbol [ascnode] [\WaldiSymbol{19}] + \definesymbol [descnode] [\WaldiSymbol{20}] + \definesymbol [astrosun] [\mathematics{\odot}] + \definesymbol [sun] [\WaldiSymbol{46}] % additional + \definesymbol [newmoon] [\WaldiSymbol{32}] + \definesymbol [fullmoon] [\WaldiSymbol{35}] + \definesymbol [rightmoon] [\WaldiSymbol{37}] + \definesymbol [leftmoon] [\WaldiSymbol{36}] + \definesymbol [vernal] [\WaldiSymbol{23}] + \definesymbol [mercury] [\WaldiSymbol{39}] + \definesymbol [mars] [\dontleavehmode\lower.2ex\hbox{\WaldiSymbol{26}}] + \definesymbol [saturn] [\WaldiSymbol{89}] + \definesymbol [neptune] [\WaldiSymbol{91}] + \definesymbol [earth] [\dontleavehmode\lower.3ex\hbox{\WaldiSymbol{38}}] + \definesymbol [venus] [\dontleavehmode\raise.2ex\hbox{\WaldiSymbol{25}}] + \definesymbol [jupiter] [\WaldiSymbol{88}] + \definesymbol [uranus] [\WaldiSymbol{90}] + \definesymbol [pluto] [\WaldiSymbol{92}] +\stopsymbolset + +\startsymbolset [wasy astrology] + \definesymbol [conjunction] [\WaldiSymbol {86}] + \definesymbol [opposition] [\WaldiSymbol {87}] + \definesymbol [aries] [\WaldiSymbol {23}] + \definesymbol [libra] [\WaldiSymbol {97}] + \definesymbol [taurus] [\WaldiSymbol {93}] + \definesymbol [scorpio] [\WaldiSymbol {98}] + \definesymbol [gemini] [\WaldiSymbol {94}] + \definesymbol [sagittarius] [\WaldiSymbol {99}] + \definesymbol [cancer] [\WaldiSymbol {95}] + \definesymbol [capricornus] [\WaldiSymbol{100}] + \definesymbol [leo] [\WaldiSymbol {19}] + \definesymbol [aquarius] [\WaldiSymbol{101}] + \definesymbol [virgo] [\WaldiSymbol {96}] + \definesymbol [pisces] [\WaldiSymbol{102}] +\stopsymbolset + +\startsymbolset [wasy geometry] + \definesymbol [fivestar] [\WaldiSymbol {69}] % HHR additional + \definesymbol [hexstar] [\WaldiSymbol {65}] + \definesymbol [varhexstar] [\WaldiSymbol {66}] + \definesymbol [davidsstar] [\WaldiSymbol {67}] + \definesymbol [Circle] [\WaldiSymbol {35}] + \definesymbol [CIRCLE] [\WaldiSymbol {32}] + \definesymbol [Leftcircle] [\WaldiSymbol {73}] + \definesymbol [LEFTCIRCLE] [\WaldiSymbol {71}] + \definesymbol [Rightcircle] [\WaldiSymbol {74}] + \definesymbol [RIGHTCIRCLE] [\WaldiSymbol {72}] + \definesymbol [LEFTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{71}\hss}\WaldiSymbol{35}] + \definesymbol [RIGHTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{72}\hss}\WaldiSymbol{35}] + \definesymbol [LEFTarrow] [\WaldiSymbol {16}] + \definesymbol [RIGHTarrow] [\WaldiSymbol {17}] + \definesymbol [UParrow] [\WaldiSymbol {75}] + \definesymbol [DOWNarrow] [\WaldiSymbol {76}] + \definesymbol [Box] [\WaldiSymbol {32}] + \definesymbol [APLbox] [\WaldiSymbol{126}] + \definesymbol [XBox] [\WaldiSymbol {52}] + \definesymbol [Bowtie] [\WaldiSymbol {49}] + \definesymbol [Diamond] [\WaldiSymbol {51}] + \definesymbol [octagon] [\WaldiSymbol {56}] + \definesymbol [hexagon] [\WaldiSymbol {55}] + \definesymbol [varhexagon] [\WaldiSymbol {57}] + \definesymbol [pentagon] [\WaldiSymbol {68}] + \definesymbol [pentastar] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{68}\hss}\lower.04em\hbox{\WaldiSymbol{69}}] % HHR additional +\stopsymbolset + +\startsymbolset [wasy physics] + \definesymbol [varangle] [\WaldiSymbol{30}] + \definesymbol [invneg] [\WaldiSymbol{24}] + \definesymbol [leftturn] [\WaldiSymbol{34}] + \definesymbol [rightturn] [\WaldiSymbol{33}] + \definesymbol [diameter] [\WaldiSymbol{31}] + \definesymbol [invdiameter] [\WaldiSymbol{21}] % additional + \definesymbol [therefore] [\WaldiSymbol {5}] + \definesymbol [AC] [\mbox{\kern.05em\WaldiSymbol{58}\kern.05em}] + \definesymbol [HF] [\dontleavehmode + \lower.09em\hbox to \zeropoint{\kern.05em\WaldiSymbol{58}\hss}% + \raise.09em\hbox{\kern.05em\WaldiSymbol{58}\kern.05em}] + \definesymbol [VHF] [\WaldiSymbol{64}] + \definesymbol [photon] [\hbox{\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}}] + \definesymbol [gluon] [\hbox{\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}}] +\stopsymbolset + +\startsymbolset [wasy apl] + \definesymbol [APLup] [\WaldiSymbol{0}] + \definesymbol [APLdown] [\WaldiSymbol{70}] + \definesymbol [APLbox] [\WaldiSymbol{126}] + \definesymbol [APLinv] [\dontleavehmode\hbox to \zeropoint{$\div$\hss}\WaldiSymbol{126}] + \definesymbol [APLleftarrowbox] [\WaldiSymbol{112}] + \definesymbol [APLrightarrowbox][\WaldiSymbol{113}] + \definesymbol [APLuparrowbox] [\WaldiSymbol{110}] + \definesymbol [APLdownarrowbox] [\WaldiSymbol{111}] + \definesymbol [APLinput] [\WaldiSymbol{125}] + \definesymbol [APLminus] [\dontleavehmode\raise.7ex\hbox{$-$}] + \definesymbol [APLlog] [\WaldiSymbol{22}] + \definesymbol [APLstar] [\WaldiSymbol{69}] + \definesymbol [APLcomment] [\WaldiSymbol{127}] + \definesymbol [notslash] [\wasy@over{/}{-}] + \definesymbol [notbackslash] [\wasy@over{\backslash}{-}] + % + %definesymbol [APLvert] [\WaldiSymbol{}] + %definesymbol [APLnot] [\WaldiSymbol{}] + %definesymbol [APLcirc] [\WaldiSymbol{}] + % + % HH: messy, best define all combinations (todo) + % + \def\APLnot #1{\wasy@over{\sim }{#1}} + \def\APLcirc#1{\wasy@over{\circ}{#1}} + \def\APLvert#1{\wasy@over{\vert}{#1}} + % +\stopsymbolset + +%D \showsymbolset[wasy general] +%D \showsymbolset[wasy music] +%D \showsymbolset[wasy astronomy] +%D \showsymbolset[wasy astrology] +%D \showsymbolset[wasy geometry] +%D \showsymbolset[wasy physics] +%D \showsymbolset[wasy apl] + +\endinput diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index 51376ce78..579eb0112 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -2677,6 +2677,19 @@ {\rawdoifinsetelse{#1}#2\resetglobal {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}} +\def\robustdoifinsetelse#1#2% + {\expanded{\convertargument#1}\to\!!stringa + \expanded{\convertargument#2}\to\!!stringb + \rawdoifinsetelse\!!stringa\!!stringb} + +\def\robustaddtocommalist#1#2% {item} \cs + {\robustdoifinsetelse{#1}#2\resetglobal + {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}} + +\def\robustpretocommalist#1#2% {item} \cs + {\robustdoifinsetelse{#1}#2\resetglobal + {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}} + \def\xsplitstring#1#2% \cs {str} {\def\dosplitstring##1,#2,##2,#2,##3\\% {\edef\!!stringa{\bcleanedupcommalist##1\empty\empty\relax}% diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index 25e5390af..c4f42d24e 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -3001,6 +3001,81 @@ \def\doeassign [#1][#2]{\p!doassign\dosetevalue #1\@relax@#2==\empty\@relax@} \def\undoassign[#1][#2]{\p!doassign\doresetvalue#1\@relax@#2==\empty\@relax@} +%D When someone asked on the mailing list if it's possible to +%D use the current value of a parameter, Taco posted a small module +%D which is included here. Instead of redefining \type {\getparameters} +%D as well, we opt for using \type {\expanded}; see examnple below. + +%D This variant redefines the parameter assignment engine in \CONTEXT\ +%D so that the special macro \type {\currentvalue} can be used to get +%D at the current value of the parameter to be assigned to. If the +%D parameter is not set, it's expansion will be empty. +%D +%D Example document: +%D +%D \startbuffer +%D \getparameters[a][b=d] +%D \expanded{\getparameters[a][b=c\currentvalue]} +%D \framed{\ab} +%D \stopbuffer +%D \typebuffer +%D +%D Gives: \getbuffer + +%D \macros{currentvalue} +%D +%D Just in case a \type{\getparameter} argument itself ends up +%D inside a \type{\write} or other expandable location, our +%D new macro needs a default value. + +\let\currentvalue\empty + +%D \macros{p!doassignwithcurrent} +%D +%D The next definition does the work of re-creating +%D the expandable \type{\currentvalue} again and again. +%D The macro is \type{\let} instead of \type{\def}-ed +%D because that is a little easier on resources, and +%D faster as well. + +\beginTEX + +\def\p!doassign#1#2\@relax@#3=#4=#5#6\@relax@ + {\ifx#5\empty + \@EA\xshowassignerror + \else\ifx#5=% + \@EA\ifx\csname#2#3\endcsname\relax + \let\currentvalue\empty + \else + \@EA\let\@EA\currentvalue\csname#2#3\endcsname + \fi + \@EAEAEA#1% + \else + \@EAEAEA\xshowassignerror + \fi\fi + {#2}{#3}{#4}} + +\endTEX + +\beginETEX + +\def\p!doassign#1#2\@relax@#3=#4=#5#6\@relax@ + {\ifx#5\empty + \@EA\xshowassignerror + \else\ifx#5=% + \ifcsname#2#3\endcsname + \@EA\let\@EA\currentvalue\csname#2#3\endcsname + \else + \let\currentvalue\empty + \fi + \@EAEAEA#1% + \else + \@EAEAEA\xshowassignerror + \fi\fi + {#2}{#3}{#4}} + +\endETEX + %D \macros %D {getemptyparameters} %D diff --git a/tex/context/base/type-map.tex b/tex/context/base/type-map.tex index 2c87d8ad2..e69571bc2 100644 --- a/tex/context/base/type-map.tex +++ b/tex/context/base/type-map.tex @@ -63,8 +63,12 @@ % in the name; for the moment we ship copies of the map files. \starttypescript [map] [modern,modern-vari,modern-cond,computer-modern,latin-modern,latin-modern-vari,latin-modern-cond,] [ec,texnansi,qx,t5] -% \loadmapfile[lm-\typescriptthree.map] % maybe some day - \loadmapfile[\typescriptthree-public-lm.map] + % this was what we had at the start and what fits best into our naming scheme + % \loadmapfile[\typescriptthree-public-lm.map] + % this one also fits into the naming scheme but has been dropped by the distributers + \loadmapfile[\typescriptthree-lm.map] + % this is what teh latest distributions provide + % \loadmapfile[lm-\typescriptthree.map] % maybe some day \stoptypescript % \usetypescript [map] [latin-modern-os] [ec] % lm is loaded under ec regime diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index c38c3f6f4..a43bb1e0a 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -348,7 +348,7 @@ %D \type{\goodbreaks}. And this is how it's done: \def\doverbatimnobreak - {\ifoptimizeverbatim\penalty500\fi} + {\ifoptimizeverbatim\penalty500 \fi} \def\doverbatimgoodbreak {\ifoptimizeverbatim\penalty\linepenalty\fi} diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index e0e1423d9..496e8a857 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 831fd37c1..43e27f3bf 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index d913ebe67..d0ddd2b1b 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 63f45e6dc..f7c124736 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index ee84ea394..be58640d4 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index 5e86b26db..6df62d311 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ - + -- cgit v1.2.3