ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Context 2010.05.08
@ 2010-05-10 11:58 Taco Hoekwater
  2010-05-12 21:18 ` Context 2010.05.08 - pdfboolean problem Michail Vidiassov
  2010-05-13 10:16 ` Context 2010.05.08 - 3D annotations Michail Vidiassov
  0 siblings, 2 replies; 10+ messages in thread
From: Taco Hoekwater @ 2010-05-10 11:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


As Hans wrote already, there is a new context current.

The short news summary:

* Many of the stubs for the ruby tools have gone away. If you want one
   of the old command names back, just create a link from mtxrun to the
   required name, e.g. copy mtxrun.exe to mptopdf.exe on windows.
   Eventually all perl and ruby scripts will be gone. Most functionality
   is already provided by lua variants.
* The hyphenation patterns for German, German (old), Hungarian and
   Spanish have been updated from the tex-hyphen project.
* New versions of the ancientgreek, letter, and simplefont modules are
   included.
* New modules (mkiv only): barcodes and punk
* Support for shockwave flash has been updated (mkiv only). The backend
   code has been rewritten and currently only pdf is supported.
* The split between mkii and mkiv is getting more complete. Only a few
   mkii bug fixes have taken place.
* Typescripts are now split completely and no definitions are shared;
   loading of a mkio/mkiv file takes precedence over a tex file.

As always, there is a detailed changes file on the wiki:

   http://wiki.contextgarden.net/Context_2010.05.08

This current context is meant for texlive 2010, but there is a little
time before the final freeze of the texlive repository, so there will
be a bugfix update in a week or so.

If you have pending urgent bugs (especially in mkii) this would be an
excellent time to report them.

You could try the mailing list, but a better approach to bug reporting
is to simultaneously create a tracker item at this url:

   http://tracker.luatex.org/search.php?project_id=2

Best wishes,
Taco




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - pdfboolean problem
  2010-05-10 11:58 Context 2010.05.08 Taco Hoekwater
@ 2010-05-12 21:18 ` Michail Vidiassov
  2010-05-13 10:16 ` Context 2010.05.08 - 3D annotations Michail Vidiassov
  1 sibling, 0 replies; 10+ messages in thread
From: Michail Vidiassov @ 2010-05-12 21:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear All,

> You could try the mailing list, but a better approach to bug reporting
> is to simultaneously create a tracker item at this url:
>
>  http://tracker.luatex.org/search.php?project_id=2

done that http://tracker.luatex.org/view.php?id=393
it seems pdfboolean function akways returns true if default argumennt is 
true.
Sincerely, Michail

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-10 11:58 Context 2010.05.08 Taco Hoekwater
  2010-05-12 21:18 ` Context 2010.05.08 - pdfboolean problem Michail Vidiassov
@ 2010-05-13 10:16 ` Michail Vidiassov
  2010-05-13 11:43   ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2010-05-13 10:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear All,

> This current context is meant for texlive 2010, but there is a little
> time before the final freeze of the texlive repository, so there will
> be a bugfix update in a week or so.
>
> If you have pending urgent bugs (especially in mkii) this would be an
> excellent time to report them.

is it worth trying to fix 3D annotations now?
I have a patch I have posted here (3D annotations thread),
but it is both a fix for errors (like == used instead of = )
and a work-around for missing base features (bitmap preview done
"by hand" while, it seems, the authors dalayed the question till 
something is implemented in luatex/ConTeXt the right way)
  - so it may not classify exactly as just a bugfix.

       Sincerely, Michail
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-13 10:16 ` Context 2010.05.08 - 3D annotations Michail Vidiassov
@ 2010-05-13 11:43   ` Hans Hagen
  2010-05-13 11:57     ` Michail Vidiassov
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-05-13 11:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 13-5-2010 12:16, Michail Vidiassov wrote:
> Dear All,
>
>> This current context is meant for texlive 2010, but there is a little
>> time before the final freeze of the texlive repository, so there will
>> be a bugfix update in a week or so.
>>
>> If you have pending urgent bugs (especially in mkii) this would be an
>> excellent time to report them.
>
> is it worth trying to fix 3D annotations now?
> I have a patch I have posted here (3D annotations thread),
> but it is both a fix for errors (like == used instead of = )
> and a work-around for missing base features (bitmap preview done
> "by hand" while, it seems, the authors dalayed the question till
> something is implemented in luatex/ConTeXt the right way)
> - so it may not classify exactly as just a bugfix.

some things were fixed, so best first check against the latest beta and 
then summarize the problems

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-13 11:43   ` Hans Hagen
@ 2010-05-13 11:57     ` Michail Vidiassov
  2010-05-13 15:00       ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2010-05-13 11:57 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1429 bytes --]

Dear Hans,

On Thu, 13 May 2010, Hans Hagen wrote:

> On 13-5-2010 12:16, Michail Vidiassov wrote:

>> is it worth trying to fix 3D annotations now?
>> I have a patch I have posted here (3D annotations thread),
>> but it is both a fix for errors (like == used instead of = )
>> and a work-around for missing base features (bitmap preview done
>> "by hand" while, it seems, the authors dalayed the question till
>> something is implemented in luatex/ConTeXt the right way)
>> - so it may not classify exactly as just a bugfix.
>
> some things were fixed, so best first check against the latest beta and then 
> summarize the problems

first  - it does not work due to typos like

     local name = viewname
     local name = pdfunicode((view.name ~= "" and name) or "unknown view")

- likely someone started to write code, but dropped the idea and never tested

Or

         local subtype, subdata = "U3D", io.readdata(foundname) or ""
         if find(subdata,"^PRC") then
             subtype == "PRC"
         elseif find(subdata,"^U3D") then
             subtype == "U3D"
         elseif file.extname(foundname) == "prc" then
             subtype == "PRC"
         end

it seems == is used instead of =, io.readdata instead of file.readdata - 
again, some one wrote the code but had no time to read the result

Second, more important - no preview image is created.


patch and test case attached


         Sincerely, Michail

[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 29627 bytes --]

[-- Attachment #3: Type: TEXT/PLAIN, Size: 4822 bytes --]

--- lpdf-u3d.lua.org	2010-03-26 18:24:44.000000000 +0300
+++ lpdf-u3d.lua	2010-04-14 14:24:28.000000000 +0400
@@ -17,6 +17,7 @@
 local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs
 
 local pdfconstant   = lpdf.constant
+local pdfnumber     = lpdf.number
 local pdfboolean    = lpdf.boolean
 local pdfunicode    = lpdf.unicode
 local pdfdictionary = lpdf.dictionary
@@ -62,8 +63,7 @@
 
 local function make3dview(view)
 
-    local name = viewname
-    local name = pdfunicode((view.name ~= "" and name) or "unknown view")
+    local name = pdfunicode((view.name ~= "" and view.name) or "unknown view")
 
     local viewdict = pdfdictionary {
        Type = pdfconstant("3DView"),
@@ -311,9 +311,6 @@
         for i=1,#nodes do
             local node = checkedkey(nodes,i,"table")
             if node then
-                local position = checkedkey(node,"position","table")
-                position = position and #position == 12 and pdfarray(position)
-                if position then
                     nodelist[#nodelist+1] = pdfdictionary {
                         Type = pdfconstant("3DNode"),
                         N    = node.name or ("node_" .. i), -- pdfunicode ?
@@ -325,13 +322,18 @@
                         },
                         M    = position,
                     }
+                local position = checkedkey(node,"position","table")
+                position = position and #position == 12 and pdfarray(position)
+                if position then
+                    nodelist[#nodelist].M = position
                 end
             end
       end
-      viewdict.NR = true
       viewdict.NA = nodelist
    end
 
+    viewdict.NR = true
+
    return viewdict
 
 end
@@ -349,19 +351,19 @@
 
     local activationdict = pdfdictionary {
        TB = pdfboolean(param.toolbar,true),
-       NP = pdfboolean(param.tree,true),
+       NP = pdfboolean(param.tree,false),
     }
 
     local stream = streams[label]
     if not stream then
 
-        local subtype, subdata = "U3D", io.readdata(foundname) or ""
+        local subtype, subdata = "U3D", file.readdata(foundname) or ""
         if find(subdata,"^PRC") then
-            subtype == "PRC"
+            subtype = "PRC"
         elseif find(subdata,"^U3D") then
-            subtype == "U3D"
+            subtype = "U3D"
         elseif file.extname(foundname) == "prc" then
-            subtype == "PRC"
+            subtype = "PRC"
         end
 
         local attr = pdfdictionary {
@@ -423,12 +425,35 @@
         local ref = stored_pr[tag]
         if not ref then
         --  weird, has to be a /Form and not an /Image so we need a wrap = true key
-        --  local figure = img.immediatewrite { filename = preview, width = width, height = height }
-            local figure = img.immediatewrite { stream = ".5 .75 .75 rg 0 0 20 10 re f", bbox = {0,0,20,10 } }
+            local figure = img.immediatewrite { filename = preview, width = width, height = height }
+        --  local figure = img.immediatewrite { stream = ".5 .75 .75 rg 0 0 20 10 re f", bbox = {0,0,20,10 } }
             ref = figure.objnum
             stored_pr[tag] = ref
         end
-        annot.AP = ref and pdfdictionary { N = pdfreference(ref) }
+        if ref then
+            local pw   = pdfdictionary {
+                Type      = pdfconstant("XObject"),
+                Subtype   = pdfconstant("Form"),
+                FormType  = pdfnumber(1),
+                BBox      = pdfarray { pdfnumber(0), pdfnumber(0), pdfnumber(factor*width), pdfnumber(factor*height) },
+                Matrix    = pdfarray { pdfnumber(1), pdfnumber(0), pdfnumber(0), pdfnumber(1), pdfnumber(0), pdfnumber(0) },
+                Resources = pdfdictionary {
+                                XObject = pdfdictionary {
+                                    IM = pdfreference(ref)
+                                }
+                            },
+                ExtGState = pdfdictionary {
+                                GS = pdfdictionary {
+                                    Type = pdfconstant("ExtGState"),
+                                    CA   = pdfnumber(1),
+                                    ca   = pdfnumber(1)
+                                }
+                            },
+                ProcSet    = pdfarray { pdfconstant("PDF"), pdfconstant("ImageC") },
+            }
+            local pwd = pdf.immediateobj("stream",format("q /GS gs %s 0 0 %s 0 0 cm /IM Do Q",factor*width,factor*height),pw())
+            annot.AP = pdfdictionary { N = pdfreference(pwd) }
+        end
         return annot, figure, ref
     else
         activationdict.A = pdfconstant("PV")

[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-13 11:57     ` Michail Vidiassov
@ 2010-05-13 15:00       ` Hans Hagen
  2010-05-14  4:37         ` Michail Vidiassov
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-05-13 15:00 UTC (permalink / raw)
  To: Michail Vidiassov; +Cc: mailing list for ConTeXt users

On 13-5-2010 1:57, Michail Vidiassov wrote:
> Dear Hans,

> - likely someone started to write code, but dropped the idea and never
> tested

well, i'm that someone but indeed i didn't test it (as i have no test 
files on my system anyway) .. are those tests you sent free? i.e. can i 
add them to the testbed?

> patch and test case attached

patched roughly that way ... new beta on the website

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-13 15:00       ` Hans Hagen
@ 2010-05-14  4:37         ` Michail Vidiassov
  2010-05-14 15:03           ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2010-05-14  4:37 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Dear Hans,

On Thu, 13 May 2010, Hans Hagen wrote:

> well, i'm that someone but indeed i didn't test it (as i have no test files 
> on my system anyway) .. are those tests you sent free? i.e. can i add them to 
> the testbed?
>
>> patch and test case attached
>
> patched roughly that way ... new beta on the website

Already?
MTXrun | current version: 2010.05.13 12:15
has old version of lpdf-u3d.lua

Tests are free (made by me in free Asymptote tool).
BTW, there were u3d test files sent to you some time ago
(their names can be seen in back-u3d.mkiv).
I'll try to put them together with back-u3d.mkiv into a usable test case.

One more 3D related questoin - support for attaching files to PDF.
It seems that instead of embedding 3D annotation into main PDF file
sometimes it is better to attach to it a separate file with just
an annotation in it and have a picture that will launch that file when 
clicked on. It is done in LaTeX via attachfile2 package, like
as in http://www.iaas.msu.ru/tmp/u3d/m117_old.pdf at page 194
Is it posiible to have something like it in ConTeXt?

            Sincerely, Michail

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-14  4:37         ` Michail Vidiassov
@ 2010-05-14 15:03           ` Hans Hagen
       [not found]             ` <96547d6cc6eaa6ffd0f8318c39220df4.squirrel@squirrelmail.iaas.msu.ru>
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-05-14 15:03 UTC (permalink / raw)
  To: Michail Vidiassov; +Cc: mailing list for ConTeXt users

On 14-5-2010 6:37, Michail Vidiassov wrote:

> One more 3D related questoin - support for attaching files to PDF.
> It seems that instead of embedding 3D annotation into main PDF file
> sometimes it is better to attach to it a separate file with just
> an annotation in it and have a picture that will launch that file when
> clicked on. It is done in LaTeX via attachfile2 package, like
> as in http://www.iaas.msu.ru/tmp/u3d/m117_old.pdf at page 194
> Is it posiible to have something like it in ConTeXt?

i think that it's still embedded but the annot is defined as a pop one 
(open in other window is a generic property)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
       [not found]               ` <4BED7795.50402@wxs.nl>
@ 2010-05-15  2:40                 ` Michail Vidiassov
  2010-05-15  2:59                   ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Michail Vidiassov @ 2010-05-15  2:40 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Dear Hans,

On Fri, 14 May 2010, Hans Hagen wrote:

> On 14-5-2010 5:25, Michail Vidiassov wrote:
>>>> One more 3D related questoin - support for attaching files to PDF.
>>>> It seems that instead of embedding 3D annotation into main PDF file
>>>> sometimes it is better to attach to it a separate file with just
>>>> an annotation in it and have a picture that will launch that file when
>>>> clicked on. It is done in LaTeX via attachfile2 package, like
>>>> as in http://www.iaas.msu.ru/tmp/u3d/m117_old.pdf at page 194
>>>> Is it posiible to have something like it in ConTeXt?
>>> 
> it's all a matter of taste; you can get the old variant by just making small 
> one page documents and using the \attachment mechanism with the preview as 
> symbol

O! That's the answer I sought.
The mechanism is called \attachment and it is in a working state - fine!
Any pointers to usage examples?

BTW it is not just matter of taste.
Many tools produce not just models for 3D PDF (U3D or PRC),
but complete PDF documents with additional JavaScript-programmed actions
linked to proprietary toolbars etc.
If this extended surrounding of the model is to bee preserved attachfile 
instead of embedfile approach is a must.

           Sincerely, Michail
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Context 2010.05.08 - 3D annotations
  2010-05-15  2:40                 ` Michail Vidiassov
@ 2010-05-15  2:59                   ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2010-05-15  2:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 15 May 2010, Michail Vidiassov wrote:

> On Fri, 14 May 2010, Hans Hagen wrote:
>
>>  On 14-5-2010 5:25, Michail Vidiassov wrote:
>>  it's all a matter of taste; you can get the old variant by just making
>>  small one page documents and using the \attachment mechanism with the
>>  preview as symbol
>
> O! That's the answer I sought.
> The mechanism is called \attachment and it is in a working state - fine!
> Any pointers to usage examples?

I used \attachment sometime ago in a MyWay (for attaching text not pdf)

http://dl.contextgarden.net/myway/context-latex-math.pdf

The source is at

http://dl.contextgarden.net/myway/context-latex-math.tar.gz

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-05-15  2:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 11:58 Context 2010.05.08 Taco Hoekwater
2010-05-12 21:18 ` Context 2010.05.08 - pdfboolean problem Michail Vidiassov
2010-05-13 10:16 ` Context 2010.05.08 - 3D annotations Michail Vidiassov
2010-05-13 11:43   ` Hans Hagen
2010-05-13 11:57     ` Michail Vidiassov
2010-05-13 15:00       ` Hans Hagen
2010-05-14  4:37         ` Michail Vidiassov
2010-05-14 15:03           ` Hans Hagen
     [not found]             ` <96547d6cc6eaa6ffd0f8318c39220df4.squirrel@squirrelmail.iaas.msu.ru>
     [not found]               ` <4BED7795.50402@wxs.nl>
2010-05-15  2:40                 ` Michail Vidiassov
2010-05-15  2:59                   ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).