summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metapost/context/base/mpiv/mp-tool.mpiv1
-rw-r--r--tex/context/base/context-version.pdfbin4260 -> 4265 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-ctx.lua24
-rw-r--r--tex/context/base/mkiv/font-ini.mkvi148
-rw-r--r--tex/context/base/mkiv/font-sel.lua4
-rw-r--r--tex/context/base/mkiv/lang-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9240 -> 9132 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin368590 -> 368689 bytes
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv72
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin774613 -> 774490 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60791 -> 60795 bytes
-rw-r--r--tex/context/modules/mkiv/s-syntax.mkiv3
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
16 files changed, 209 insertions, 57 deletions
diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv
index e57c703eb..4922d5075 100644
--- a/metapost/context/base/mpiv/mp-tool.mpiv
+++ b/metapost/context/base/mpiv/mp-tool.mpiv
@@ -1095,6 +1095,7 @@ primarydef p randomized s = (
elseif picture p :
mfun_randomized_picture(p,s)(randomized)
else :
+ % p - s/2 + uniformdeviate s % would have been better but we want to be positive
p + uniformdeviate s
fi
) enddef ;
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 434cf63e5..56b86067d 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 48df71ccb..eab508e59 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.08.09 21:55}
+\newcontextversion{2016.08.11 13:56}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 44cb967d1..dd2143252 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.08.09 21:55}
+\edef\contextversion{2016.08.11 13:56}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua
index 33945083e..2f51f5129 100644
--- a/tex/context/base/mkiv/font-ctx.lua
+++ b/tex/context/base/mkiv/font-ctx.lua
@@ -978,6 +978,8 @@ local getspecification = definers.getspecification
-- we can make helper macros which saves parsing (but normaly not
-- that many calls, e.g. in mk a couple of 100 and in metafun 3500)
+local specifiers = { }
+
do -- else too many locals
----- ctx_setdefaultfontname = context.fntsetdefname
@@ -992,6 +994,7 @@ do -- else too many locals
local scanners = tokens.scanners
local scanstring = scanners.string
local scaninteger = scanners.integer
+ local scannumber = scanners.number
local scanboolean = scanners.boolean
local setmacro = tokens.setters.macro
@@ -1225,6 +1228,7 @@ do -- else too many locals
end
--
texsetcount("global","lastfontid",lastfontid)
+ specifiers[lastfontid] = { str, size }
if not mathsize then
-- forget about it
elseif mathsize == 0 then
@@ -1236,6 +1240,26 @@ do -- else too many locals
stoptiming(fonts)
end
+ function scanners.specifiedfontspec()
+ local f = specifiers[scaninteger()]
+ if f then
+ context(f[1])
+ end
+ end
+ function scanners.specifiedfontsize()
+ local f = specifiers[scaninteger()]
+ if f then
+ context(f[2])
+ end
+ end
+ function scanners.specifiedfont()
+ local f = specifiers[scaninteger()]
+ local s = scannumber()
+ if f and s then
+ context("%s at %0.2p",f[1],s * f[2]) -- we round to 2 decimals (as at the tex end)
+ end
+ end
+
--
function definers.define(specification)
diff --git a/tex/context/base/mkiv/font-ini.mkvi b/tex/context/base/mkiv/font-ini.mkvi
index ac807c91d..93753f986 100644
--- a/tex/context/base/mkiv/font-ini.mkvi
+++ b/tex/context/base/mkiv/font-ini.mkvi
@@ -2082,32 +2082,24 @@
\font_helpers_set_current_xsize_alternative{#xsize}{#alternative}%
\fi}
-\def\font_helpers_set_current_font_x_alternative#alternative%
- {\font_helpers_set_current_font_xxx_alternative{#alternative}{4}\scriptstyle
- \currentxfontsize\plusone
- \let\tx\txx}
-
-\def\font_helpers_set_current_font_xx_alternative#alternative%
- {\font_helpers_set_current_font_xxx_alternative{#alternative}{5}\scriptscriptstyle
- \currentxfontsize\plustwo
- \let\tx\empty
- \let\txx\empty}
-
\def\font_helpers_reset_x_fontsize
{\ifcase\currentxfontsize\else
\currentxfontsize\zerocount
- \let\tx\normaltx
+ % also \sx and \sxx ?
+ \let\tx \normaltx
\let\txx\normaltxx
\fi}
-\def\font_helpers_check_nested_x_fontsize % option
+% \def\font_helpers_check_nested_x_fontsize % option
% {\ifcase\currentxfontsize\else\ifx\fontsize\empty\else
% \currentxfontsize\zerocount
% \let\fontsize\empty
% \let\tx\normaltx
% \let\txx\normaltxx
% \fi\fi}
- {}
+% {}
+
+\let\font_helpers_check_nested_x_fontsize\relax
\def\font_helpers_set_current_font_x_alternative#alternative%
{\font_helpers_check_nested_x_fontsize
@@ -2154,30 +2146,136 @@
% \unexpanded\def\tx {\font_helpers_set_current_font_x_alternative \fontalternative}
% \unexpanded\def\txx{\font_helpers_set_current_font_xx_alternative\fontalternative}
+% \unexpanded\def\tx
+% {\ifmmode
+% \scriptstyle
+% \else
+% \let\fontface\!!plusfour
+% \let\fontalternative\fontalternative
+% \font_helpers_synchronize_font
+% \fi
+% \currentxfontsize\plusone
+% \let\tx\txx}
+%
+% \unexpanded\def\txx
+% {\ifmmode
+% \scriptscriptstyle
+% \else
+% \let\fontface\!!plusfive
+% \let\fontalternative\fontalternative
+% \font_helpers_synchronize_font
+% \fi
+% \currentxfontsize\plustwo}
+
+\installcorenamespace{fontscalex}
+\installcorenamespace{fontscalexx}
+
+\newconditional\c_font_inherit_scale
+
+\def\font_scale_inherit#1%
+ {\begingroup
+ \scratchcounterone\fontid\font\relax
+ \currentxfontsize\plusone
+ \normalexpanded{\definedfont[\clf_specifiedfont\scratchcounterone\font_currentfontscale\relax]}%
+ \scratchcountertwo\fontid\font\relax
+ \currentxfontsize\plustwo
+ \normalexpanded{\definedfont[\clf_specifiedfont\scratchcounterone\font_currentfontscale\relax]}%
+ \scratchcounterthree\fontid\font\relax
+ % parent -> x -> xx
+ % parent -> xx
+ \global\expandafter\chardef\csname\??fontscalex \number\scratchcounterone\endcsname\scratchcountertwo
+ \global\expandafter\chardef\csname\??fontscalexx\number\scratchcounterone\endcsname\scratchcounterthree
+ \global\expandafter\chardef\csname\??fontscalex \number\scratchcountertwo\endcsname\scratchcounterthree
+ \global\expandafter\chardef\csname\??fontscalexx\number\scratchcountertwo\endcsname\scratchcounterthree
+ \endgroup
+ \setfontid\csname#1\number\fontid\font\endcsname}
+
+\def\font_scale_inherit_x
+ {\ifcsname\??fontscalex\number\fontid\font\endcsname
+ \setfontid\lastnamedcs
+ \else
+ \font_scale_inherit\??fontscalex
+ \fi
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+\def\font_scale_inherit_xx
+ {\ifcsname\??fontscalexx\number\fontid\font\endcsname
+ \setfontid\lastnamedcs
+ \else
+ \font_scale_inherit\??fontscalexx
+ \fi
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+\def\font_scale_defined_x
+ {\let\fontface\!!plusfour
+ \let\fontalternative\fontalternative
+ \font_helpers_synchronize_font}
+
+\def\font_scale_defined_xx
+ {\let\fontface\!!plusfive
+ \let\fontalternative\fontalternative
+ \font_helpers_synchronize_font}
+
\unexpanded\def\tx
- {\ifmmode
+ {\currentxfontsize\plusone
+ \ifmmode
\scriptstyle
+ \else\ifconditional\c_font_inherit_scale
+ \font_scale_inherit_x
\else
- \let\fontface\!!plusfour
- \let\fontalternative\fontalternative
- \font_helpers_synchronize_font
- \fi
- \currentxfontsize\plusone
+ \font_scale_defined_x
+ \fi\fi
\let\tx\txx}
\unexpanded\def\txx
- {\ifmmode
+ {\currentxfontsize\plustwo
+ \ifmmode
+ \scriptscriptstyle
+ \else\ifconditional\c_font_inherit_scale
+ \font_scale_inherit_xx
+ \else
+ \font_scale_defined_xx
+ \fi\fi
+ \let\tx \empty
+ \let\txx\empty}
+
+\unexpanded\def\sx
+ {\currentxfontsize\plusone
+ \ifmmode
+ \scriptstyle
+ \else
+ \font_scale_inherit_x
+ \fi
+ \let\tx\txx
+ \let\sx\sxx}
+
+\unexpanded\def\sxx
+ {\currentxfontsize\plustwo
+ \ifmmode
\scriptscriptstyle
\else
- \let\fontface\!!plusfive
- \let\fontalternative\fontalternative
- \font_helpers_synchronize_font
+ \font_scale_inherit_xx
\fi
- \currentxfontsize\plustwo}
+ \let\tx \empty
+ \let\txx\empty
+ \let\sx \empty
+ \let\sxx\empty}
+
+\unexpanded\def\useinheritxsizes{\settrue \c_font_inherit_scale} % not yet public, playground for WS and me
+\unexpanded\def\usedefinedxsizes{\setfalse\c_font_inherit_scale} % not yet public, playground for WS and me
\let\normaltx \tx
\let\normaltxx\txx
+\let\normalsx \sx
+\let\normalsxx\sxx
+
%D When asking for a complete font switch, for instance from 10
%D to 12~points, the next macro does the job. First we
%D normalize the size, next we define the current range of
diff --git a/tex/context/base/mkiv/font-sel.lua b/tex/context/base/mkiv/font-sel.lua
index 003b708c6..f176fc17f 100644
--- a/tex/context/base/mkiv/font-sel.lua
+++ b/tex/context/base/mkiv/font-sel.lua
@@ -296,7 +296,9 @@ local function m_style_family(family)
end
local function m_style_subfamily(entries,style,family)
- local t = { }
+ local t = { }
+ local style = cleanname(style)
+ local family = cleanname(family)
for index, entry in next, entries do
if entry["familyname"] == family and entry["subfamilyname"] == style then -- familyname + subfamilyname
t[#t+1] = entry
diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv
index 4e6b203ad..3303e46d4 100644
--- a/tex/context/base/mkiv/lang-ini.mkiv
+++ b/tex/context/base/mkiv/lang-ini.mkiv
@@ -170,9 +170,9 @@
\lastnamedcs
\fi\fi\fi}
-\unexpanded\def\setlanguageparameter#1%
- {\edef\currentusedlanguage{\reallanguagetag{#1\c!language}}%
- %\let\setlanguageparameter\gobbleoneargument
+\unexpanded\def\setusedlanguage#1%
+% {\edef\currentusedlanguage{\reallanguagetag{#1\c!language}}%
+ {\edef\currentusedlanguage{\reallanguagetag{#1}}%
\ifx\currentusedlanguage\empty
\let\currentusedlanguage \currentlanguage
\let\usedlanguageparameter\languageparameter
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a83cc821d..3192f32d8 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 72d2dd8b1..4dc611165 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index 825d18636..0878719b5 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -5526,7 +5526,7 @@
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
\c_syst_helpers_pop_count\csname\??globalpushedmacro\m_syst_helpers_push_macro\endcsname
\global\advance\lastnamedcs \minusone
- \expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
+ \global\expandafter\let\expandafter#1\csname\the\c_syst_helpers_pop_count\m_syst_helpers_push_macro\endcsname}
\unexpanded\def\localpopmacro#1%
{\xdef\m_syst_helpers_push_macro{\csstring#1}%
diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index 4c6d374a6..93406bb52 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -272,35 +272,61 @@
% \currentusedlanguage
% \usedlanguageparameter
+%D The optional argument can be a language, a narrower spec, or a outer:inner language
+%D specification.
+%D
+%D \starttabulate
+%D \NC [en] \NC {\tttf en} \quotation[en] {{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \NC [fr] \NC {\tttf en} \quotation[fr] {{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:] \NC {\tttf fr} \quotation[fr:] {{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \NC [:fr] \NC {\tttf en} \quotation[:fr] {{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:fr] \NC {\tttf fr} \quotation[fr:fr]{{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [en:fr] \NC {\tttf en} \quotation[en:fr]{{\tttf <fr=\currentlanguage>} something french} \NC \NR
+%D \NC [fr:en] \NC {\tttf fr} \quotation[fr:en]{{\tttf <en=\currentlanguage>} something french} \NC \NR
+%D \stoptabulate
+
\let\currentdelimitedlanguage\empty
+\def\typo_delimited_set_language_nop
+ {\setusedlanguage{\delimitedtextparameter\c!language}}
+
+\def\typo_delimited_set_language_yes
+ {\doiflanguageelse\m_delimited_argument
+ \typo_delimited_set_language_yes_a
+ {\doifelseinstring:\m_delimited_argument
+ \typo_delimited_set_language_yes_b
+ \typo_delimited_set_language_nop}}
+
+\def\typo_delimited_set_language_yes_b
+ {\splitstring\m_delimited_argument\at:\to\outerdelimitedlanguage\and\innerdelimitedlanguage
+ \ifx\outerdelimitedlanguage\empty
+ \typo_delimited_set_language_nop
+ \else
+ \doiflanguageelse\outerdelimitedlanguage
+ {\setusedlanguage\outerdelimitedlanguage}%
+ \typo_delimited_set_language_nop
+ \fi
+ \ifx\innerdelimitedlanguage\empty
+ \else
+ \doiflanguageelse\innerdelimitedlanguage
+ {\let\currentdelimitedlanguage\innerdelimitedlanguage}%
+ \donothing
+ \fi
+ \let\m_delimited_argument\empty}
+
+\def\typo_delimited_set_language_yes_a
+ {\let\currentdelimitedlanguage\m_delimited_argument
+ \let\m_delimited_argument\empty}
+
\def\typo_delimited_push#1#2%
{\globalpushmacro\currentdelimitedtext % can we combine these two
- \globalpushmacro\currentdelimitedlanguage
+ \globalpushmacro\currentdelimitedlanguage % the language used for hyphenation
\edef\currentdelimitedtext{#1}%
\edef\m_delimited_argument{#2}%
- \expandafter\splitstring\m_delimited_argument\at:\to\outerdelimitedlanguage\and\innerdelimitedlanguage
- \edef\m_delimited_argument_checked{\outerdelimitedlanguage:}%
- \ifx\m_delimited_argument\m_delimited_argument_checked
- \let\currentdelimitedlanguage\empty
- \setlanguageparameter\delimitedtextparameter
+ \ifx\m_delimited_argument\empty
+ \typo_delimited_set_language_nop
\else
- \ifx\innerdelimitedlanguage\empty
- \let\currentdelimitedlanguage\empty
- \else
- \doiflanguageelse\innerdelimitedlanguage
- {\let\currentdelimitedlanguage\innerdelimitedlanguage
- \let\m_delimited_argument\empty}%
- {\let\currentdelimitedlanguage\empty}%
- \fi
- \ifx\outerdelimitedlanguage\empty
- \setlanguageparameter\delimitedtextparameter
- \else
- \doiflanguageelse\outerdelimitedlanguage
- {\let\currentlanguage\outerdelimitedlanguage
- \let\m_delimited_argument\empty}%
- {\setlanguageparameter\delimitedtextparameter}%
- \fi
+ \typo_delimited_set_language_yes
\fi
\let\currentparentdelimitedtext\currentdelimitedtext
\global\advance\c_typo_delimited_nesting\plusone
@@ -340,7 +366,7 @@
\c!right=,
%\c!level=0,
\c!method=,
- %\c!language\v!local,
+ %\c!language=\v!local,
\c!repeat=\v!no]
\def\typo_delimited_repeat_ideed
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 102a41e63..7a04caa92 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index b39f48fde..21a81dd2a 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/s-syntax.mkiv b/tex/context/modules/mkiv/s-syntax.mkiv
index 96312f771..d9492af3e 100644
--- a/tex/context/modules/mkiv/s-syntax.mkiv
+++ b/tex/context/modules/mkiv/s-syntax.mkiv
@@ -31,7 +31,7 @@
\unexpanded\def\module_syntax_Tex #1{\Sugar{\type{#1}}}
\unexpanded\def\module_syntax_Literal #1{\Sugar{\type{#1}}}
\unexpanded\def\module_syntax_Syntax #1{\strut\kern-.25em{#1}\kern-.25em}
-\unexpanded\def\module_syntax_Next {\crlf\hbox to 2em{}\nobreak}
+\unexpanded\def\module_syntax_Next {\par\strut\kern4em} % {\crlf\hbox to 2em{}\nobreak}
\unexpanded\def\module_syntax_Whatever #1{\Sugar{\mathematics{(\hbox{#1})}}}
\unexpanded\def\module_syntax_Quote #1{\Sugar{\quote{#1}}}
\unexpanded\def\module_syntax_Or {\Sugar{\module_syntax_Indent{\mathematics{\vert}}}}
@@ -70,6 +70,7 @@
\let\L \module_syntax_Literal
\let\S \module_syntax_Something
\let\M \module_syntax_Means
+ \let\N \module_syntax_Next
\let\O \module_syntax_Or
\let\Q \module_syntax_Quote
\let\LB \module_syntax_Lbrace
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 1bd1d0a98..6ef9430b3 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 08/09/16 21:55:17
+-- merge date : 08/11/16 13:56:03
do -- begin closure to overcome local limits and interference