From 0b7402fd3fcb61b7359f4eb80e1d72bcbdf2d412 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 28 Jun 2011 12:19:00 +0200 Subject: beta 2011.06.28 12:19 --- scripts/context/lua/mtx-update.lua | 67 +++++++++--- scripts/context/lua/mtxrun.lua | 2 +- scripts/context/stubs/mswin/mtxrun.lua | 2 +- scripts/context/stubs/unix/mtxrun | 2 +- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/font-ini.mkiv | 45 ++++++--- tex/context/base/s-fnt-10.mkiv | 2 +- tex/context/base/s-map-10.mkiv | 112 ++++++--------------- tex/context/base/status-files.pdf | Bin 23690 -> 23582 bytes tex/context/base/status-lua.pdf | Bin 157640 -> 156576 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 14 files changed, 127 insertions(+), 115 deletions(-) diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua index 42ef9d246..74baed938 100644 --- a/scripts/context/lua/mtx-update.lua +++ b/scripts/context/lua/mtx-update.lua @@ -20,7 +20,8 @@ local helpinfo = [[ --rsync=string rsync binary (rsync) --texroot=string installation directory (not guessed for the moment) --engine=string tex engine (luatex, pdftex, xetex) ---extras=string extra modules (can be list or 'all') +--modules=string extra modules (can be list or 'all') +--fonts=string additional fonts (can be list or 'all') --goodies=string extra binaries (like scite and texworks) --force instead of a dryrun, do the real thing --update update minimal tree @@ -31,13 +32,13 @@ local helpinfo = [[ local application = logs.application { name = "mtx-update", - banner = "ConTeXt Minimals Updater 0.22", + banner = "ConTeXt Minimals Updater 0.30", helpinfo = helpinfo, } local report = application.report -local format, concat, gmatch, gsub = string.format, table.concat, string.gmatch, string.gsub +local format, concat, gmatch, gsub, find = string.format, table.concat, string.gmatch, string.gsub, string.find scripts = scripts or { } scripts.update = scripts.update or { } @@ -180,6 +181,9 @@ scripts.update.selfscripts = { scripts.update.modules = { } +scripts.update.fonts = { +} + function scripts.update.run(str) -- important, otherwise formats fly to a weird place -- (texlua sets luatex as the engine, we need to reset that or to fix texexec :) @@ -211,7 +215,8 @@ function scripts.update.synchronize() local bin = states.get("rsync.program") -- rsync local url = states.get("rsync.server") -- contextgarden.net local version = states.get("context.version") -- current (or beta) - local extras = states.get("extras") -- extras (like modules) + local modules = states.get("modules") -- modules (third party) + local fonts = states.get("fonts") -- fonts (experimental or special) local goodies = states.get("goodies") -- goodies (like editors) local force = environment.argument("force") @@ -292,20 +297,41 @@ function scripts.update.synchronize() -- rsync://contextgarden.net/minimals/current/modules/ - if extras and type(extras) == "table" then + if modules and type(modules) == "table" then -- fetch the list of available modules from rsync server local available_modules = get_list_of_files_from_rsync({"modules/"}) -- hash of requested modules - -- local h = table.tohash(extras:split(",")) + -- local h = table.tohash(modules:split(",")) + local asked = table.copy(modules) + asked.all = nil for i=1,#available_modules do local s = available_modules[i] - -- if extras == "all" or h[s] then - if extras.all or extras[s] then - scripts.update.modules[#scripts.update.modules+1] = { format("modules/%s/",s), "texmf-context" } + if modules.all or modules[s] then + scripts.update.modules[#scripts.update.modules+1] = { format("modules/%s/",s), "texmf-modules" } end + asked[s] = nil + end + if next(asked) then + report("skipping unknown modules: %s",table.concat(table.sortedkeys(asked),", ")) + end + end + + -- rsync://contextgarden.net/minimals/current/fonts/extra/ + + if fonts and type(fonts) == "table" then + local available_fonts = get_list_of_files_from_rsync({"fonts/extra/"}) + local asked = table.copy(fonts) + asked.all = nil + for i=1,#available_fonts do + local s = available_fonts[i] + if fonts.all or fonts[s] then + scripts.update.fonts[#scripts.update.fonts+1] = { format("fonts/extra/%s/",s), "texmf" } + end + asked[s] = nil + end + if next(asked) then + report("skipping unknown fonts: %s",table.concat(table.sortedkeys(asked),", ")) end - -- TODO: check if every module from the list has been added and issue warning otherwise - -- one idea to do it: remove every value from h once added and then check if anything is left in h end local function add_collection(collection,platform) @@ -333,6 +359,9 @@ function scripts.update.synchronize() for platform, _ in next, platforms do add_collection(scripts.update.modules,platform) end + for platform, _ in next, platforms do + add_collection(scripts.update.fonts,platform) + end for engine, _ in next, engines do for platform, _ in next, platforms do add_collection(scripts.update.engines[engine],platform) @@ -544,8 +573,20 @@ if scripts.savestate then states.set("formats.cont-nl", true) states.set("formats.metafun", true) - for r in gmatch(environment.argument("extras") or "","([^, ]+)") do - states.set("extras." .. r, true) + for r in gmatch(environment.argument("extras") or "","([^, ]+)") do -- for old times sake + if not find(r,"^[a-z]%-") then + r= "t-" .. r + end + states.set("modules." .. r, true) + end + for r in gmatch(environment.argument("modules") or "","([^, ]+)") do + if not find(r,"^[a-z]%-") then + r= "t-" .. r + end + states.set("modules." .. r, true) + end + for r in gmatch(environment.argument("fonts") or "","([^, ]+)") do + states.set("fonts." .. r, true) end for r in gmatch(environment.argument("goodies") or "","([^, ]+)") do states.set("goodies." .. r, true) diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index bc6711e93..6b0e18ff0 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -14871,7 +14871,7 @@ local helpinfo = [[ local application = logs.application { name = "mtxrun", - banner = "ConTeXt TDS Runner Tool 1.30", + banner = "ConTeXt TDS Runner Tool 1.31", helpinfo = helpinfo, } diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index bc6711e93..6b0e18ff0 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -14871,7 +14871,7 @@ local helpinfo = [[ local application = logs.application { name = "mtxrun", - banner = "ConTeXt TDS Runner Tool 1.30", + banner = "ConTeXt TDS Runner Tool 1.31", helpinfo = helpinfo, } diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index bc6711e93..6b0e18ff0 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -14871,7 +14871,7 @@ local helpinfo = [[ local application = logs.application { name = "mtxrun", - banner = "ConTeXt TDS Runner Tool 1.30", + banner = "ConTeXt TDS Runner Tool 1.31", helpinfo = helpinfo, } diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 69da6a74f..4f33fc517 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.06.27 23:49} +\newcontextversion{2011.06.28 12:19} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index d1390ed87..afc30085c 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.06.27 23:49} +\newcontextversion{2011.06.28 12:19} %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.mkii b/tex/context/base/context.mkii index 775310ff3..a4bd64e4b 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.06.27 23:49} +\edef\contextversion{2011.06.28 12:19} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 611652011..1211c8120 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.06.27 23:49} +\edef\contextversion{2011.06.28 12:19} %D For those who want to use this: diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv index 3b05eea90..87c75defc 100644 --- a/tex/context/base/font-ini.mkiv +++ b/tex/context/base/font-ini.mkiv @@ -574,15 +574,18 @@ \let\currentmathsize\!!plusthree\let\fontbody\scriptscriptface\dodosetmathfamily\scriptscriptfont#1% \let\currentmathsize\!!plustwo \let\fontbody\scriptface \dodosetmathfamily\scriptfont #1% \let\currentmathsize\!!plusone \let\fontbody\textface \dodosetmathfamily\textfont #1% - \expandafter\xdef\csname\??ff:\fontclass:\textface:\c!mm:#2:\fontsize\endcsname{% - \scriptscriptfont#1\csname*\fontclass\scriptscriptface\c!mm#23\fontsize3*\endcsname - \scriptfont #1\csname*\fontclass\scriptface \c!mm#22\fontsize2*\endcsname - \textfont #1\csname*\fontclass\textface \c!mm#21\fontsize1*\endcsname - }% + \dosavefontclassmathfamily#1#2% \let\currentmathsize\empty \let\fontbody\savedfontbody \autofontsizefalse} +\def\dosavefontclassmathfamily#1#2% + {\expandafter\xdef\csname\??ff:\fontclass:\textface:\c!mm:#2:\fontsize\endcsname{% + \scriptscriptfont#1\csname*\fontclass\scriptscriptface\c!mm#23\fontsize3*\endcsname + \scriptfont #1\csname*\fontclass\scriptface \c!mm#22\fontsize2*\endcsname + \textfont #1\csname*\fontclass\textface \c!mm#21\fontsize1*\endcsname + }} + % It would be nice if characters could be defined in a neutral way (say fam 255) and % be mapped to a real family during noad list construction. However, this changes % tex in critical places so for the moment we simulate this using manipulation. @@ -711,15 +714,29 @@ % we need \fontid (or could store this for a fontclass) -\appendtoks - \edef\currentmathfontmr{\fontname\textfont\zerocount}% - \edef\currentmathfontmb{\fontname\textfont\plusthree}% - \ifx\currentmathfontmr\currentmathfontmb - \letvalue{\??ff:ms:\fontclass}\dosetmathpartialboldstrategy % enables partial bold math - \else - \letvalue{\??ff:ms:\fontclass}\dosetmathfullboldstrategy % enables full bold math - \fi -\to \mathstrategies +\ifdefined\fontid + + \appendtoks + \ifnum\fontid\textfont\zerocount=\fontid\textfont\plusthree + \letvalue{\??ff:ms:\fontclass}\dosetmathpartialboldstrategy % enables partial bold math + \else + \letvalue{\??ff:ms:\fontclass}\dosetmathfullboldstrategy % enables full bold math + \fi + \to \mathstrategies + +\else + + \appendtoks + \edef\currentmathfontmr{\fontname\textfont\zerocount}% + \edef\currentmathfontmb{\fontname\textfont\plusthree}% + \ifx\currentmathfontmr\currentmathfontmb + \letvalue{\??ff:ms:\fontclass}\dosetmathpartialboldstrategy % enables partial bold math + \else + \letvalue{\??ff:ms:\fontclass}\dosetmathfullboldstrategy % enables full bold math + \fi + \to \mathstrategies + +\fi \def\synchronizemathboldstrategy {\csname\??ff:ms:\fontclass\endcsname} diff --git a/tex/context/base/s-fnt-10.mkiv b/tex/context/base/s-fnt-10.mkiv index e3c13b621..ce97f4593 100644 --- a/tex/context/base/s-fnt-10.mkiv +++ b/tex/context/base/s-fnt-10.mkiv @@ -135,7 +135,7 @@ end \page \egroup} -% \doifnotmode{demo} {\endinput} +\doifnotmode{demo} {\endinput} \starttext diff --git a/tex/context/base/s-map-10.mkiv b/tex/context/base/s-map-10.mkiv index 22ceeb161..56a8075d7 100644 --- a/tex/context/base/s-map-10.mkiv +++ b/tex/context/base/s-map-10.mkiv @@ -1,6 +1,6 @@ %\module [ % file=s-map-se, -% version=2005.02.03, +% version=2011.06.28, % title=\CONTEXT\ Style File, % subtitle=\MAPS\ basis stijl, % author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg}, @@ -20,24 +20,22 @@ % 3. one column, with wide left margin (option asym) % - font sizes deviate from TeX's usual geometric progression % - use of sans-serif for headers and various details -% - option realfonts uses Bitstream Charter, Euler Math and Latin Modern. +% - option realfonts uses Linux Libertine, Euler Math and Inconsolata. % This is used for final typesetting. % The default font setup, intended for authors, uses Computer -% Modern. +% Modern Math instead of Euler Math (which is still in beta), +% and LM Mono instead of Inconsolata. % A mode nosubsub defines only two levels of sectioning. If you % don't need more and use the two-column layout, then this option % will probably improve the looks of your paper. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% pdftex support \newif\ifMapsInColumns \doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn \doifnotmode{onecolumn}{\MapsInColumnstrue} -\enablemode[realfonts] - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% fonts @@ -107,25 +105,20 @@ \usetypescriptfile[type-inconsolata] -\startmode[mkii] -\starttypescript [maps] [ec] -\definetypeface [maps] [mm] [math] [euler] [default] [encoding=default,rscale=0.9] -\usemathcollection[euler] -\definetypeface [maps] [tt] [mono] [inconsolata] [default] [encoding=ec,rscale=0.92] -\definetypeface [maps] [ss] [sans] [default] [default] [encoding=ec,rscale=0.95] -\definetypeface [maps] [rm] [serif] [libertine] [default] [encoding=ec] +\starttypescript [maps] +\definetypeface [maps] [rm] [serif] [modern] [default] [rscale=0.95] +\definetypeface [maps] [mm] [math] [modern] [computer-modern] +\definetypeface [maps] [tt] [mono] [modern] [default] [rscale=0.90] +\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] \stoptypescript -\usetypescript[maps] [ec] -\stopmode -\startmode[mkiv] +\startmode[realfonts] \starttypescript [maps] +\definetypeface [maps] [rm] [serif] [libertine] [default] \definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9] \definetypeface [maps] [tt] [mono] [inconsolata] [default] [rscale=0.92] \definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] -\definetypeface [maps] [rm] [serif] [libertine] [default] \stoptypescript -\usetypescript[maps] \stopmode \setupbodyfont[maps,10pt,rm] @@ -137,10 +130,6 @@ \setupalign[hanging] -% \usetypescript[map][texnansi] - -% \setupbodyfont [map,10pt] - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% additional general typographic details @@ -269,36 +258,14 @@ %%% floats \setupfloats [location=center, before={\ss}] -\setupcaptions [headstyle={\ss},style={\ssx}, - stopper=.,distance=6pt, +\setupcaptions [headstyle={\ssbf},style={\ssx}, + suffix=.,distance=6pt, inbetween={\blank[halfline]}] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% various document elements -%\startnotmode[realfonts] -\def\ChkBox{% - \hbox {\boxrulewidth=.4pt \raise.2ex\ruledvbox - {\phantom{\vrule width .85ex height .85ex% -}}}} - -\startmode[mkii] -\pdfmapline{stmary10 stmary10