summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/chem-str.mkiv72
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4107 -> 4113 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/meta-fnt.lua15
-rw-r--r--tex/context/base/mlib-pdf.lua8
-rw-r--r--tex/context/base/norm-ltx.mkii2
-rw-r--r--tex/context/base/status-files.pdfbin24829 -> 24782 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 72 insertions, 33 deletions
diff --git a/tex/context/base/chem-str.mkiv b/tex/context/base/chem-str.mkiv
index c28ea21d9..9c31a3c14 100644
--- a/tex/context/base/chem-str.mkiv
+++ b/tex/context/base/chem-str.mkiv
@@ -317,33 +317,45 @@
% special macros (probably needs some more work)
+\let\chem_box_visual\ruledhbox
+\let\chem_box_visual\hbox
+\let\chem_box_normal\hbox
+
\def\chem_top_construct#1#2#3#4%
- {\begingroup
- \setbox0\hbox{\setstrut\strut#3}%
- \setbox2\hbox{\setstrut\strut\molecule{#4}}%
- \setbox0\hbox{\raise\dimexpr\dp0+\ht2\relax\hbox to \wd2{#1\box0#2}}%
- % no: \smashbox0
- \hbox{\box0\box2}%
- \endgroup}%
+ {\hbox\bgroup
+ \setstrut
+ \setbox\scratchboxone\chem_box_visual{\strut#3}%
+ \setbox\scratchboxtwo\chem_box_visual{\strut\molecule{#4}}%
+ \setbox\scratchboxone\chem_box_normal{\raise\dimexpr\dp\scratchboxone+\ht\scratchboxtwo\relax\hbox to \wd\scratchboxtwo{#1\box\scratchboxone#2}}%
+ \smashbox\scratchboxone
+ \box\scratchboxone
+ \box\scratchboxtwo
+ \egroup}
\def\chem_bottom_construct#1#2#3#4%
- {\begingroup
- \setbox0\hbox{\setstrut\strut#3}%
- \setbox2\hbox{\setstrut\strut#4}%
- \setbox0\hbox{\lower\dimexpr\dp2+\ht0\relax\hbox to \wd2{#1\box0#2}}%
- % no: \smashbox0
- \hbox{\box0\box2}%
- \endgroup}%
-
-\unexpanded\def\chemicalleft#1#2%
- {\begingroup
- \hbox{\llap{\setstrut\strut#1}\setstrut\strut#2}%
- \endgroup}%
-
-\unexpanded\def\chemicalright#1#2%
- {\begingroup
- \hbox{\setstrut\strut#2\rlap{\setstrut\strut#1}}%
- \endgroup}%
+ {\hbox\bgroup
+ \setstrut
+ \setbox\scratchboxone\chem_box_visual{\strut#3}%
+ \setbox\scratchboxtwo\chem_box_visual{\strut\molecule{#4}}%
+ \setbox\scratchboxone\chem_box_normal{\lower\dimexpr\dp\scratchboxtwo+\ht\scratchboxone\relax\hbox to \wd\scratchboxtwo{#1\box\scratchboxone#2}}%
+ \smashbox\scratchboxone
+ \box\scratchboxone
+ \box\scratchboxtwo
+ \egroup}
+
+\unexpanded\def\chemicalleft#1#2% redundant boxes thanks to visual
+ {\hbox\bgroup
+ \setstrut
+ \llap{\chem_box_visual{\strut#1}}%
+ \chem_box_visual{\strut#2}%
+ \egroup}
+
+\unexpanded\def\chemicalright#1#2% redundant boxes thanks to visual
+ {\hbox\bgroup
+ \setstrut
+ \chem_box_visual{\strut#2}%
+ \rlap{\chem_box_visual{\strut#1}}%
+ \egroup}
\unexpanded\def\chemicaltop {\chem_top_construct \hss \hss }
\unexpanded\def\chemicallefttop {\chem_top_construct \relax \hss }
@@ -372,11 +384,16 @@
\expandafter\chem_aligned_text_text
\fi}
+\let\chemicaltighttext\relax % maybe smaller strut
+
\def\chem_aligned_text_text#1#2#3%
{\dontleavehmode
\begingroup
\usechemicalstyleandcolor\c!style\c!color
- \hbox to \fontcharwd\font`C{\setstrut\strut#1\molecule{#3}#2}%
+ \chem_box_visual to \fontcharwd\font`C\bgroup
+ \setstrut\strut
+ #1\molecule{#3}#2%
+ \egroup
\endgroup}
\def\chem_aligned_text_math#1#2#3%
@@ -384,7 +401,10 @@
\begingroup
\scratchcounter\normalmathstyle
\usechemicalstyleandcolor\c!style\c!color
- \hbox to \fontcharwd\font`C{\setstrut\strut#1\mathematics{\tf\triggermathstyle\scratchcounter\molecule{#3}}#2}%
+ \chem_box_visual to \fontcharwd\font`C\bgroup
+ \setstrut\strut
+ #1\mathematics{\tf\triggermathstyle\scratchcounter\molecule{#3}}#2%
+ \egroup
\endgroup}
\unexpanded\def\chemicalcentered {\chemicalalignedtext\hss \hss }
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 91e6b0a33..233482b35 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.09.30 20:05}
+\newcontextversion{2013.10.01 11:27}
%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 7c4ff8329..002df6dd6 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 3a11a2738..dc16c148b 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.09.30 20:05}
+\edef\contextversion{2013.10.01 11:27}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/meta-fnt.lua b/tex/context/base/meta-fnt.lua
index 3d8263d3a..811690b69 100644
--- a/tex/context/base/meta-fnt.lua
+++ b/tex/context/base/meta-fnt.lua
@@ -30,6 +30,17 @@ local factor, code, slot, width, height, depth, total, variants = 100, { }, 0, 0
-- A next version of mplib will provide the tfm font information which
-- gives better glyph dimensions, plus additional kerning information.
+--
+-- Somehow actualtext is not used for cut and paste ... in spite of what
+-- manuals say ... the usual compatibility mess I guess.
+
+local function topdf(n,code)
+ if n < 0x10000 then
+ return formatters["/Span << /ActualText <feff%04x> >> BDC % t EMC"](n,code)
+ else
+ return formatters["/Span << /ActualText <feff%04x%04x> >> BDC % t EMC"](n/1024+0xD800,n%1024+0xDC00,code)
+ end
+end
local flusher = {
startfigure = function(chrnum,llx,lly,urx,ury)
@@ -59,7 +70,7 @@ local flusher = {
if inline then
characters[slot] = {
commands = {
- { "special", "pdf: " .. concat(code," ") },
+ { "special", "pdf: " .. topdf(slot,code) },
}
}
else
@@ -68,7 +79,7 @@ local flusher = {
{
"image",
{
- stream = concat(code," "),
+ stream = topdf(slot,code),
bbox = { 0, -depth * 65536, width * 65536, height * 65536 }
},
},
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index 6cb094e3e..0115dfabe 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -340,6 +340,14 @@ function metapost.flush(result,flusher,askedfig)
metapost.urx = urx
metapost.ury = ury
metapost.variables = variables
+-- todo (maybe the lib will change to charwd too):
+--
+-- metapost.charcode = figure.charcode
+-- metapost.charwd = figure.width
+-- metapost.charht = figure.height
+-- metapost.chardp = figure.depth
+-- metapost.charic = figure.italic
+--
if urx < llx then
-- invalid
startfigure(fignum,0,0,0,0,"invalid",figure)
diff --git a/tex/context/base/norm-ltx.mkii b/tex/context/base/norm-ltx.mkii
index cd02cffec..9a8f7ba57 100644
--- a/tex/context/base/norm-ltx.mkii
+++ b/tex/context/base/norm-ltx.mkii
@@ -155,7 +155,7 @@
\let \normallatelua = \latelua
\let \normalluaescapestring = \luaescapestring
\let \normalluastartup = \luastartup
-\let \normalluatexdatestamp = \luatexdatestamp
+%let \normalluatexdatestamp = \luatexdatestamp
\let \normalluatexrevision = \luatexrevision
\let \normalluatexversion = \luatexversion
\let \normalnokerns = \nokerns
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 403a513c5..b8041dc9b 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.log b/tex/context/base/status-lua.log
index 521ff54aa..5008311ec 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.09.30 20:05 MKIV beta fmt: 2013.9.30 int: english/english
+ConTeXt ver: 2013.10.01 11:27 MKIV beta fmt: 2013.10.1 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 3e02295b2..71b1a1e72 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 : 09/30/13 20:05:55
+-- merge date : 10/01/13 11:27:38
do -- begin closure to overcome local limits and interference