diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2009-08-23 11:11:32 +0000 |
commit | 8fc3039c82d48605b5ca8b2eda3f4fdd755681e1 (patch) | |
tree | 3cd9bbdd599bc4d1ac0409e167fee2136e4c0ec9 /Master/texmf-dist/tex/context/base/grph-u3d.lua | |
parent | 850fc99b7cd3ae7a20065531fe866ff7bae642ec (diff) |
this is context 2009.08.19 17:10
git-svn-id: svn://tug.org/texlive/trunk@14827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/grph-u3d.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/grph-u3d.lua | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/grph-u3d.lua b/Master/texmf-dist/tex/context/base/grph-u3d.lua new file mode 100644 index 00000000000..e5944691c00 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/grph-u3d.lua @@ -0,0 +1,45 @@ +if not modules then modules = { } end modules ['grph-u3d'] = { + version = 1.001, + comment = "companion to grph-inc.tex", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- see lpdf-u3d.lua for comment + +local format = string.format + +local texsprint = tex.sprint +local ctxcatcodes = tex.ctxcatcodes + +function figures.checkers.u3d(data) + local dr, du, ds = data.request, data.used, data.status + local width = (dr.width or figures.defaultwidth):todimen() + local height = (dr.height or figures.defaultheight):todimen() + local foundname = du.fullname + dr.width, dr.height = width, height + du.width, du.height, du.foundname = width, height, foundname + texsprint(ctxcatcodes,format("\\startfoundexternalfigure{%ssp}{%ssp}",width,height)) + local annot, preview, ref = backends.pdf.helpers.insert3d { + foundname = foundname, + width = width, + height = height, + factor = number.dimenfactors.bp, + display = dr.display, + controls = dr.controls, + label = dr.label, + } + -- node.write(nodes.pdfannot(width,-height,0,annot())) + texsprint(ctxcatcodes,format("\\pdfannot width %ssp height %ssp {%s}",width,height,annot())) -- brrrr +--~ if ref then -- wrong ! a direct ref should work +--~ texsprint(ctxcatcodes,format("\\smash{\\pdfrefximage%s\\relax}",ref)) -- brrrr +--~ end + texsprint(ctxcatcodes,"\\stopfoundexternalfigure") + return data +end + +figures.includers.u3d = figures.includers.nongeneric + +figures.registersuffix("u3d","u3d") +figures.registersuffix("prc","u3d") |