summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-10-13 22:46:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-10-13 22:46:00 +0200
commit8104826384ace46d171bb57d2ce5ae72b96d59cf (patch)
treeae01b0075e4ede4a822eba474f1195bc7b6eba04 /tex
parent2c4b105b9cce4df9d56f752d230b3fbb2a0190d5 (diff)
downloadcontext-8104826384ace46d171bb57d2ce5ae72b96d59cf.tar.gz
beta 2013.10.13 22:46
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4112 -> 4110 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-afm.lua2
-rw-r--r--tex/context/base/font-otf.lua2
-rw-r--r--tex/context/base/font-trt.lua12
-rw-r--r--tex/context/base/mlib-pps.lua13
-rw-r--r--tex/context/base/mult-low.lua2
-rw-r--r--tex/context/base/pack-com.mkiv17
-rw-r--r--tex/context/base/status-files.pdfbin24549 -> 24526 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin224875 -> 224833 bytes
-rw-r--r--tex/context/base/syst-aux.mkiv51
-rw-r--r--tex/context/fonts/treatments.lfg5
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua9
-rw-r--r--tex/generic/context/luatex/luatex-fonts-syn.lua4
15 files changed, 104 insertions, 17 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 37bbb725c..979c78db9 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{2013.10.10 17:47}
+\newcontextversion{2013.10.13 22:46}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index bda3633df..97cca3568 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 3bd1b4847..7aa9b1248 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.10.10 17:47}
+\edef\contextversion{2013.10.13 22:46}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index f06b5283d..adb4281b2 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -311,7 +311,7 @@ local addkerns, addligatures, addtexligatures, unify, normalize -- we will imple
function afm.load(filename)
-- hm, for some reasons not resolved yet
filename = resolvers.findfile(filename,'afm') or ""
- if filename ~= "" then
+ if filename ~= "" and not fonts.names.ignoredfile(filename) then
local name = file.removesuffix(file.basename(filename))
local data = containers.read(afm.cache,name)
local attr = lfs.attributes(filename)
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index ca1151527..7598a9c35 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -2274,7 +2274,7 @@ local function check_otf(forced,specification,suffix)
if fullname == "" then
fullname = fonts.names.getfilename(name,suffix) or ""
end
- if fullname ~= "" then
+ if fullname ~= "" and not fonts.names.ignoredfile(fullname) then
specification.filename = fullname
return read_from_otf(specification)
end
diff --git a/tex/context/base/font-trt.lua b/tex/context/base/font-trt.lua
index ebe8007b7..abc92ba52 100644
--- a/tex/context/base/font-trt.lua
+++ b/tex/context/base/font-trt.lua
@@ -10,6 +10,7 @@ local rawget, dofile, next, type = rawget, dofile, next, type
local cleanfilename = fonts.names.cleanfilename
local splitbase = file.splitbase
+local lower = string.lower
--[[ldx--
<p>We provide a simple treatment mechanism (mostly because I want to demonstrate
@@ -102,3 +103,14 @@ function treatments.applyfixes(filename,data)
end
end
+function treatments.ignoredfile(fullname)
+ local treatmentdata = treatments.data or { } -- when used outside context
+ local _, basepart = splitbase(fullname)
+ local treatment = treatmentdata[basepart] or treatmentdata[lower(basepart)]
+ if treatment and treatment.ignored then
+ report_treatment("font file %a resolved as %a is ignored, reason %a",basepart,fullname,treatment.comment or "unknown")
+ return true
+ end
+end
+
+fonts.names.ignoredfile = treatments.ignoredfile
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index c4a417833..9f6cedad1 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -687,15 +687,20 @@ function makempy.processgraphics(graphics)
os.execute(command)
if io.exists(pdffile) then
command = format("pstoedit -ssp -dt -f mpost %s %s", pdffile, mpyfile)
+ logs.newline()
+ report_metapost("running: %s",command)
+ logs.newline()
os.execute(command)
local result, r = { }, 0
if io.exists(mpyfile) then
local data = io.loaddata(mpyfile)
- for figure in gmatch(data,"beginfig(.-)endfig") do
- r = r + 1
- result[r] = formatters["begingraphictextfig%sendgraphictextfig ;\n"](figure)
+ if data and #data > 0 then
+ for figure in gmatch(data,"beginfig(.-)endfig") do
+ r = r + 1
+ result[r] = formatters["begingraphictextfig%sendgraphictextfig ;\n"](figure)
+ end
+ io.savedata(mpyfile,concat(result,""))
end
- io.savedata(mpyfile,concat(result,""))
end
end
stoptiming(makempy)
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index ad6d28bbc..f82be039c 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -354,6 +354,8 @@ return {
--
"carryoverpar",
--
+ "assumelongusagecs",
+ --
"Umathbotaccent",
--
"righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop",
diff --git a/tex/context/base/pack-com.mkiv b/tex/context/base/pack-com.mkiv
index c913b1ca8..bb6e268bc 100644
--- a/tex/context/base/pack-com.mkiv
+++ b/tex/context/base/pack-com.mkiv
@@ -267,10 +267,13 @@
\edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}%
\to \everydefinecombination
-\def\pack_combinations_pickup % we want to add struts but still ignore an empty box
+\def\pack_combinations_pickup
{\dostarttagged\t!combinationpair\empty
\dostarttagged\t!combinationcontent\empty
- \dowithnextboxcs\pack_combinations_pickup_content\hbox}
+ \assumelongusagecs\pack_combinations_pickup_content_indeed}
+
+\def\pack_combinations_pickup_content_indeed
+ {\dowithnextboxcs\pack_combinations_pickup_content\hbox}
\def\pack_combinations_pickup_content % we want to add struts but still ignore an empty box
{\dostoptagged
@@ -279,15 +282,21 @@
\expandnamespacemacro\??combinationalternative\p_pack_combinations_alternative\v!text}
\setvalue{\??combinationalternative\v!text}%
+ {\assumelongusagecs\pack_combinations_alternative_text_indeed}
+
+\setvalue{\??combinationalternative\v!label}%
+ {\assumelongusagecs\pack_combinations_alternative_label_indeed}
+
+\def\pack_combinations_alternative_text_indeed
{\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
\afterassignment\pack_combinations_caption_first
\let\nexttoken=}
-\setvalue{\??combinationalternative\v!label}%
+\def\pack_combinations_alternative_label_indeed
{\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
\hsize\wd\b_pack_combinations_content
\ifx\p_align\empty\else\setupalign[\p_align]\fi
- \usecombinationstyleandcolor\c!style\c!color % but label style wins, so independent configuration
+ \usecombinationstyleandcolor\c!style\c!color
\begstrut
\normalexpanded{\strc_labels_command{\v!combination\ifx\currentcombination\empty\else:\currentcombination\fi}}%
\endstrut
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 1b43e8b05..c6a5399e4 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 1bd8043ee..a8352d589 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 372080949..97f601cc9 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -401,7 +401,52 @@
\expandafter\m_syst_action_nop
\fi}
-%D This macro uses some auxiliary macros. Although we were able to program quite
+%D Here's one for skipping spaces and pars, handy for:
+%D
+%D \starttyping
+%D \hbox
+%D
+%D {a few lines later}
+%D \stoptyping
+
+% \unexpanded\def\assumelongusagecs#1%
+% {\let\m_syst_action#1%
+% \futurelet\nexttoken\syst_helpers_ignore_par_character}
+%
+% \def\syst_helpers_ignore_par_character
+% {\ifx\nexttoken\blankspace
+% \expandafter\syst_helpers_ignore_par_character_blankspace
+% \else
+% \expandafter\syst_helpers_ignore_par_character_followup
+% \fi}
+%
+% \def\syst_helpers_ignore_par_character_followup
+% {\ifx\nexttoken\par
+% \expandafter\syst_helpers_ignore_par_partoken
+% \else
+% \expandafter\m_syst_action
+% \fi}
+%
+% \def\syst_helpers_ignore_par_partoken
+% {\afterassignment\m_syst_action\let\nexttoken}
+
+\unexpanded\def\assumelongusagecs#1% can be relaxed when we have long support in \hbox etc
+ {\let\m_syst_action#1%
+ \futurelet\nexttoken\syst_helpers_ignore_spacing}
+
+\def\syst_helpers_ignore_spacing
+ {\ifx\nexttoken\blankspace
+ \singleexpandafter\syst_helpers_ignore_spacing_blankspace
+ \else\ifx\nexttoken\par
+ \doubleexpandafter\syst_helpers_ignore_spacing_partoken
+ \else
+ \doubleexpandafter\m_syst_action
+ \fi\fi}
+
+\def\syst_helpers_ignore_spacing_partoken\par
+ {\futurelet\nexttoken\syst_helpers_ignore_spacing}
+
+%D These macros use some auxiliary macros. Although we were able to program quite
%D complicated things, I only understood these after rereading the \TEX book. The
%D trick is in using a command with a one character name. Such commands differ from
%D the longer ones in the fact that trailing spaces are {\em not} skipped. This
@@ -429,6 +474,9 @@
\def\:{\syst_helpers_reinspect_next_parenthesis_character}
\expandafter\def\: {\let\if_next_blank_space_token\iftrue\futurelet\nexttoken\syst_helpers_inspect_next_parenthesis_character}
+\def\:{\syst_helpers_ignore_spacing_blankspace}
+\expandafter\def\: {\futurelet\nexttoken\syst_helpers_ignore_spacing}
+
\let\:\next
%D \macros
@@ -4524,7 +4572,6 @@
{\let\dodogotopar#1%
\redogotopar\par}
-
\unexpanded\def\GetPar
{\expanded
{\dowithpar
diff --git a/tex/context/fonts/treatments.lfg b/tex/context/fonts/treatments.lfg
index 18a43525b..b973906c3 100644
--- a/tex/context/fonts/treatments.lfg
+++ b/tex/context/fonts/treatments.lfg
@@ -64,6 +64,11 @@ return {
comment = "a text file with suffix ttf", -- used in test file
ignored = true,
},
+ -- harmless example
+ -- ["copperplatethirtythreebc.ttf"] = {
+ -- comment = "hangs and has no hyphen",
+ -- ignored = true,
+ -- },
-- ["latinmodern-math.otf"] = {
-- comment = "experimental",
-- },
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index d3eee2087..1556b4495 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 10/10/13 17:47:59
+-- merge date : 10/13/13 22:46:23
do -- begin closure to overcome local limits and interference
@@ -5074,6 +5074,9 @@ fonts.names.resolvespec=fonts.names.resolve
function fonts.names.getfilename(askedname,suffix)
return ""
end
+function fonts.names.ignoredfile(filename)
+ return true
+end
end -- closure
@@ -5428,7 +5431,7 @@ end
local addkerns,addligatures,addtexligatures,unify,normalize
function afm.load(filename)
filename=resolvers.findfile(filename,'afm') or ""
- if filename~="" then
+ if filename~="" and not fonts.names.ignoredfile(filename) then
local name=file.removesuffix(file.basename(filename))
local data=containers.read(afm.cache,name)
local attr=lfs.attributes(filename)
@@ -8168,7 +8171,7 @@ local function check_otf(forced,specification,suffix)
if fullname=="" then
fullname=fonts.names.getfilename(name,suffix) or ""
end
- if fullname~="" then
+ if fullname~="" and not fonts.names.ignoredfile(fullname) then
specification.filename=fullname
return read_from_otf(specification)
end
diff --git a/tex/generic/context/luatex/luatex-fonts-syn.lua b/tex/generic/context/luatex/luatex-fonts-syn.lua
index ea6e3cab5..60dd2c063 100644
--- a/tex/generic/context/luatex/luatex-fonts-syn.lua
+++ b/tex/generic/context/luatex/luatex-fonts-syn.lua
@@ -100,3 +100,7 @@ fonts.names.resolvespec = fonts.names.resolve -- only supported in mkiv
function fonts.names.getfilename(askedname,suffix) -- only supported in mkiv
return ""
end
+
+function fonts.names.ignoredfile(filename) -- only supported in mkiv
+ return true -- will be overloaded
+end