summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/back-pdf.lua22
-rw-r--r--tex/context/base/back-pdf.mkiv139
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4101 -> 4114 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/l-os.lua24
-rw-r--r--tex/context/base/mlib-pps.mkiv20
-rw-r--r--tex/context/base/s-inf-03.pdfbin1978 -> 1974 bytes
-rw-r--r--tex/context/base/status-files.pdfbin24695 -> 24703 bytes
-rw-r--r--tex/context/base/status-lua.log9
-rw-r--r--tex/context/base/trac-log.lua20
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
12 files changed, 132 insertions, 108 deletions
diff --git a/tex/context/base/back-pdf.lua b/tex/context/base/back-pdf.lua
index dc6f6b06f..f8a5dab6f 100644
--- a/tex/context/base/back-pdf.lua
+++ b/tex/context/base/back-pdf.lua
@@ -19,13 +19,25 @@ end
backends.install("pdf")
--- experimental code (somewhat weird here) .. todo: nodeinjections
-
local context = context
local sind, cosd = math.sind, math.cosd
local insert, remove = table.insert, table.remove
+local f_matrix = string.formatters["%0.8f %0.8f %0.8f %0.8f"]
+
+function commands.pdfrotation(a)
+ -- todo: check for 1 and 0 and flush sparse
+ local s, c = sind(a), cosd(a)
+ context(f_matrix(c,s,-s,c))
+end
+
+-- experimental code (somewhat weird here) .. todo: nodeinjections .. this will only work
+-- out well if we also calculate the accumulated cm and wrap inclusions / annotations in
+-- the accumulated ... it's a mess
+--
+-- we could also do the save restore wrapping here + colorhack
+
local pdfsetmatrix = nodes.pool.pdfsetmatrix
local stack = { }
@@ -65,12 +77,12 @@ function commands.pdfstartmirroring()
context(pdfsetmatrix(-1,0,0,1))
end
-function commands.pdfstartmatrix(sx,rx,ry,sy)
+function commands.pdfstartmatrix(sx,rx,ry,sy) -- tx, ty
if sx == 1 and rx == 0 and ry == 0 and sy == 1 then
insert(stack,false)
else
- context(pdfsetmatrix(rx,sx,sy,ry))
- insert(stack,{ -rx, -sx, -sy, -ry })
+ context(pdfsetmatrix(sx,rx,ry,sy))
+ insert(stack,{ -sx, -rx, -ry, -sy })
end
end
diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv
index 39d9e114a..597899af1 100644
--- a/tex/context/base/back-pdf.mkiv
+++ b/tex/context/base/back-pdf.mkiv
@@ -123,118 +123,107 @@
\to \everylastbackendshipout
%D Transformations. Some day we will use primitives (once they're fixed).
-
-% \def\dostartscaling#1#2% the test is needed because acrobat is bugged!
-% {\forcecolorhack % maybe use signal instead
-% \pdfliteral{q \ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0
-% \ifdim#2\points=\zeropoint.0001\else#2\fi\space 0 0 cm}}
-%
-% \def\dostopscaling
-% {\pdfliteral{Q}}
-%
-% \def\dostartrotation#1% grouped
-% {\forcecolorhack % maybe use signal instead
-% \pdfliteral{q \cldcontext{lpdf.rotationcm(#1)}}}
-%
-% \def\dostoprotation
-% {\pdfliteral{Q}}
-%
-% function lpdf.rotationcm(a)
-% local s, c = sind(a), cosd(a)
-% return format("%f %f %f %f 0 0 cm",c,s,-s,c)
-% end
-%
-% \def\dostartmirroring{\pdfliteral{-1 0 0 1 0 0 cm}}
-% \def\dostopmirroring {\pdfliteral{-1 0 0 1 0 0 cm}}
-
% todo: inject at the lua end cq. deal with #5 and #6 too
-% \unexpanded\def\dostartrotation#1% grouped
-% {\forcecolorhack % maybe use signal instead
-% \advance\backendtransformlevel\plusone
-% \pdfsave
-% \pdfsetmatrix{\ctxcommand{pdfrotation(#1)}}}
-%
-% \unexpanded\def\dostoprotation
-% {\pdfrestore
-% \advance\backendtransformlevel\minusone}
+% % % rotation % % %
\unexpanded\def\dostartrotation#1% grouped
- {\forcecolorhack % maybe use signal instead
- \advance\backendtransformlevel\plusone
- \ctxcommand{pdfstartrotation(#1)}}
+ {\advance\backendtransformlevel\plusone
+ \forcecolorhack
+ \pdfsave
+ \pdfsetmatrix{\ctxcommand{pdfrotation(#1)}}}
\unexpanded\def\dostoprotation
- {\ctxcommand{pdfstoprotation()}%
+ {\pdfrestore
+ \forcecolorhack
\advance\backendtransformlevel\minusone}
-% \unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged!
-% {\forcecolorhack % maybe use signal instead
+% \unexpanded\def\dostartrotation#1% grouped
+% {\forcecolorhack
% \advance\backendtransformlevel\plusone
-% \pdfsave
-% \pdfsetmatrix
-% {\ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0
-% \ifdim#2\points=\zeropoint.0001\else#2\fi\space}}% 0 0
-%
-% \unexpanded\def\dostopscaling
-% {\pdfrestore
+% \ctxcommand{pdfstartrotation(#1)}}
+
+% \unexpanded\def\dostoprotation
+% {\ctxcommand{pdfstoprotation()}%
% \advance\backendtransformlevel\minusone}
+% % % scaling % % %
+
\unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged!
- {\forcecolorhack % maybe use signal instead
- \advance\backendtransformlevel\plusone
- \ctxcommand{pdfstartscaling(#1,#2)}}
+ {\advance\backendtransformlevel\plusone
+ \forcecolorhack % maybe use signal instead
+ \pdfsave
+ \pdfsetmatrix
+ {\ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0
+ \ifdim#2\points=\zeropoint.0001\else#2\fi\space}}% 0 0
\unexpanded\def\dostopscaling
- {\ctxcommand{pdfstopscaling()}%
+ {\pdfrestore
+ \forcecolorhack
\advance\backendtransformlevel\minusone}
-% \unexpanded\def\dostartmirroring
-% {\advance\backendtransformlevel\plusone
-% \pdfsave
-% \pdfsetmatrix{-1 0 0 1}} % 0 0
+% \unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged!
+% {\forcecolorhack
+% \advance\backendtransformlevel\plusone
+% \ctxcommand{pdfstartscaling(#1,#2)}}
-% \unexpanded\def\dostopmirroring
-% {\pdfrestore
+% \unexpanded\def\dostopscaling
+% {\ctxcommand{pdfstopscaling()}%
% \advance\backendtransformlevel\minusone}
+% % % mirroring % % %
+
\unexpanded\def\dostartmirroring
{\advance\backendtransformlevel\plusone
- \ctxcommand{pdfstartmirroring()}}
+ \pdfsave
+ \pdfsetmatrix{-1 0 0 1}} % 0 0
\unexpanded\def\dostopmirroring
- {\ctxcommand{pdfstopmirroring()}%
+ {\pdfrestore
\advance\backendtransformlevel\minusone}
-% \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
+% \unexpanded\def\dostartmirroring
% {\advance\backendtransformlevel\plusone
-% % fixing ht/dp/wd should happen elsewhere
-% \dowithnextbox{\dodotransformnextbox{#5}{#6}{#1 #2 #3 #4}}}
-%
-% \unexpanded\def\dodotransformnextbox#1#2#3%
-% {\hbox
-% {\kern#1\onebasepoint
-% \raise#2\onebasepoint\hbox
-% {\pdfsave
-% \pdfsetmatrix{#3}% 0 0 (no #5 #6 yet)
-% \box\nextbox
-% \pdfrestore
-% \advance\backendtransformlevel\minusone}}}
+% \ctxcommand{pdfstartmirroring()}}
+
+% \unexpanded\def\dostopmirroring
+% {\ctxcommand{pdfstopmirroring()}%
+% \advance\backendtransformlevel\minusone}
+
+% % % transform % % %
\unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
{\advance\backendtransformlevel\plusone
% fixing ht/dp/wd should happen elsewhere
- \dowithnextbox{\dodotransformnextbox{#5}{#6}{#1}{#2}{#3}{#4}}}
+ \dowithnextbox{\dodotransformnextbox{#5}{#6}{#1 #2 #3 #4}}}
-\unexpanded\def\dodotransformnextbox#1#2#3#4#5#6%
+\unexpanded\def\dodotransformnextbox#1#2#3%
{\hbox
{\kern#1\onebasepoint
\raise#2\onebasepoint\hbox
- {\ctxcommand{pdfstartmatrix(#3,#4,#5,#6)}
+ {\pdfsave
+ \pdfsetmatrix{#3}% 0 0 (no #5 #6 yet)
\box\nextbox
- \ctxcommand{pdfstopmatrix()}
+ \pdfrestore
\advance\backendtransformlevel\minusone}}}
+% \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints !
+% {\advance\backendtransformlevel\plusone
+% % fixing ht/dp/wd should happen elsewhere
+% \dowithnextbox{\dodotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+% \unexpanded\def\dodotransformnextbox#1#2#3#4#5#6%
+% {\hbox
+% {\kern #5\onebasepoint
+% \raise#6\onebasepoint
+% \hbox
+% {\ctxcommand{pdfstartmatrix(#1,#2,#3,#4)}%
+% \box\nextbox
+% \ctxcommand{pdfstopmatrix()}%
+% \advance\backendtransformlevel\minusone}}}
+
+% % % clipping % % %
+
\unexpanded\def\dostartclipping#1#2#3% we can move this to lua and only set a box here
{\PointsToBigPoints{#2}\width
\PointsToBigPoints{#3}\height
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 1f94beac3..1af85a7cd 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.08.06 15:50}
+\newcontextversion{2013.08.07 10:55}
%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 dc67d2670..ef25efc14 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 11ce57e03..4b2e0bdd7 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.08.06 15:50}
+\edef\contextversion{2013.08.07 10:55}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua
index a4c0ac820..3838b5524 100644
--- a/tex/context/base/l-os.lua
+++ b/tex/context/base/l-os.lua
@@ -382,31 +382,43 @@ end
local timeformat = format("%%s%s",os.timezone(true))
local dateformat = "!%Y-%m-%d %H:%M:%S"
+local lasttime = nil
+local lastdate = nil
function os.fulltime(t,default)
- t = tonumber(t) or 0
+ t = t and tonumber(t) or 0
if t > 0 then
-- valid time
elseif default then
return default
else
- t = nil
+ t = time()
end
- return format(timeformat,date(dateformat,t))
+ if t ~= lasttime then
+ lasttime = t
+ lastdate = format(timeformat,date(dateformat))
+ end
+ return lastdate
end
local dateformat = "%Y-%m-%d %H:%M:%S"
+local lasttime = nil
+local lastdate = nil
function os.localtime(t,default)
- t = tonumber(t) or 0
+ t = t and tonumber(t) or 0
if t > 0 then
-- valid time
elseif default then
return default
else
- t = nil
+ t = time()
+ end
+ if t ~= lasttime then
+ lasttime = t
+ lastdate = date(dateformat,t)
end
- return date(dateformat,t)
+ return lastdate
end
function os.converttime(t,default)
diff --git a/tex/context/base/mlib-pps.mkiv b/tex/context/base/mlib-pps.mkiv
index f21d84e0d..fe9f460f9 100644
--- a/tex/context/base/mlib-pps.mkiv
+++ b/tex/context/base/mlib-pps.mkiv
@@ -55,7 +55,7 @@
\ctxlua{metapost.edefsxsy(\number\wd\scratchbox,\number\ht\scratchbox,0)}%
\vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}}
-% horrible:
+% horrible (we could inline scale and matrix code):
\def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty
{\ctxlua{metapost.gettext(\number\MPtextbox,#1)}%
@@ -64,16 +64,16 @@
\vbox to \zeropoint\bgroup
\vss
\hbox to \zeropoint \bgroup
-% \scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}%
-% \scale[\c!sx=#8,\c!sy=#9,\c!depth=\v!no]{\box\MPtextbox}%
+ % \scale[\c!sx=#8,\c!sy=#9]{\raise\dp\MPtextbox\box\MPtextbox}%
+ % \scale[\c!sx=#8,\c!sy=#9,\c!depth=\v!no]{\box\MPtextbox}%
\fastsxsy{#8}{#9}{\raise\dp\MPtextbox\box\MPtextbox}%
- % This gives: LuaTeX warning: Misplaced \pdfrestore .. don't ask me why.
- % but I'll retry it some day soon.
- % \dostartscaling{#8}{#9}%
- % \raise\dp\MPtextbox\box\MPtextbox
- % \dostopscaling
- \forcecolorhack % needed ? already in the scale macro
- \hss
+ % This gives: LuaTeX warning: Misplaced \pdfrestore .. don't ask me why.
+ % but I'll retry it some day soon.
+ % \dostartscaling{#8}{#9}%
+ % \raise\dp\MPtextbox\box\MPtextbox
+ % \dostopscaling
+ \forcecolorhack % can go away ... already in the scale macro
+ \hss
\egroup
\egroup
\egroup
diff --git a/tex/context/base/s-inf-03.pdf b/tex/context/base/s-inf-03.pdf
index 5a4ec2f39..74b183f3f 100644
--- a/tex/context/base/s-inf-03.pdf
+++ b/tex/context/base/s-inf-03.pdf
Binary files differ
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c2beda085..0ec5a6755 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 60c0b46f6..370c5ea16 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,11 +1,13 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.08.06 15:50 MKIV beta fmt: 2013.8.6 int: english/english
+ConTeXt ver: 2013.08.07 10:55 MKIV beta fmt: 2013.8.7 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
system > 'cont-loc.mkiv' loaded
-(c:/data/develop/context/sources/cont-loc.mkiv)
+(c:/data/develop/context/sources/cont-loc.mkiv
+!!!! > testing rotation and scaling
+)
system > 'cont-exp.mkiv' loaded
interface > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0
interface > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0
@@ -74,5 +76,4 @@ references > unknown reference '[][math]'
references > unknown reference '[][mathematics]'
references > unknown reference '[][mbox]'
references > unknown reference '[][md5]'
-references > unknown reference '[][metapost]'
-references > unknown reference '[][mime]'
+references > unknown reference '[][metapost]' \ No newline at end of file
diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua
index 0ae5d87e3..4ef50f5f4 100644
--- a/tex/context/base/trac-log.lua
+++ b/tex/context/base/trac-log.lua
@@ -271,7 +271,8 @@ if tex and (tex.jobname or tex.formatname) then
translations = t
end
- setlogfile = ignore
+ setlogfile = ignore
+ settimedlog = ignore
else
@@ -339,8 +340,6 @@ else
setformats = ignore
settranslations = ignore
- local f_timed = formatters["[%S] "]
-
setlogfile = function(name,keepopen)
if name and name ~= "" then
local localtime = os.localtime
@@ -349,17 +348,27 @@ else
local f = io.open(name,"ab")
write_nl = function(s)
writeline(s)
- f:write(f_timed(localtime()),s,"\n")
+ f:write(localtime()," | ",s,"\n")
end
else
write_nl = function(s)
writeline(s)
local f = io.open(name,"ab")
- f:write(f_timed(localtime()),s,"\n")
+ f:write(localtime()," | ",s,"\n")
f:close()
end
end
end
+ setlogfile = ignore
+ end
+
+ settimedlog = function()
+ local localtime = os.localtime
+ local writeline = write_nl
+ write_nl = function(s)
+ writeline(localtime() .. " | " .. s)
+ end
+ settimedlog = ignore
end
end
@@ -374,6 +383,7 @@ logs.setformats = setformats
logs.settranslations = settranslations
logs.setlogfile = setlogfile
+logs.settimedlog = settimedlog
logs.direct = direct
logs.subdirect = subdirect
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6c5476801..f7b952af9 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 : 08/06/13 15:50:04
+-- merge date : 08/07/13 10:55:57
do -- begin closure to overcome local limits and interference