ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* status of node.write
@ 2010-03-24  9:23 Michail Vidiassov
  2010-03-24  9:52 ` luigi scarso
  2010-03-24 10:17 ` status of node.write Hans Hagen
  0 siblings, 2 replies; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-24  9:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear All,

I notice that broken code for inserting movies uses
node.write in codeinjections.insertmovie (in back-pdf.lua),
while figures.checkers.mov (in grph-inc.lua) expects text return
from codeinjections.insertmovie to feed to "texsprint(ctxcatcodes".

The 3D annotation code (it also seems not to work) has
node.write variant commented out and replaced with
"texsprint(ctxcatcodes" with "brrrr" comment!

    local annot, preview, ref = backends.pdf.helpers.insert3d {
       ......
     }
  -- node.write(pdfannotation(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")

And the question is: does it make sense to try to make the current 3D 
annotation handling code work by complaining to the maintainers and/or
fixing it myself or nothing is supposed to work till migration to 
from "texsprint(ctxcatcodes" API to "node.write" API is complete?

              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] 16+ messages in thread

* Re: status of node.write
  2010-03-24  9:23 status of node.write Michail Vidiassov
@ 2010-03-24  9:52 ` luigi scarso
  2010-03-24 10:53   ` Michail Vidiassov
  2010-03-24 13:26   ` Hans Hagen
  2010-03-24 10:17 ` status of node.write Hans Hagen
  1 sibling, 2 replies; 16+ messages in thread
From: luigi scarso @ 2010-03-24  9:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Mar 24, 2010 at 10:23 AM, Michail Vidiassov <master@iaas.msu.ru> wrote:
> Dear All,
>
> I notice that broken code for inserting movies uses
> node.write in codeinjections.insertmovie (in back-pdf.lua),
> while figures.checkers.mov (in grph-inc.lua) expects text return
> from codeinjections.insertmovie to feed to "texsprint(ctxcatcodes".
>
> The 3D annotation code (it also seems not to work) has
> node.write variant commented out and replaced with
> "texsprint(ctxcatcodes" with "brrrr" comment!
>
>   local annot, preview, ref = backends.pdf.helpers.insert3d {
>      ......
>    }
>  -- node.write(pdfannotation(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")
>
> And the question is: does it make sense to try to make the current 3D
> annotation handling code work by complaining to the maintainers and/or
> fixing it myself or nothing is supposed to work till migration to from
> "texsprint(ctxcatcodes" API to "node.write" API is complete?
I'm pretty sure that I still don't understand much , but
I have written an article for including swf in mkiv , cfr
http://wiki.pctex.com/index.php/PracTeXJournal

PracTeXJournal should be on-line next month,
and I have planned  2nd part x next issue.

I'm watching at your u3d files to maintains same style.
-- 
luigi
___________________________________________________________________________________
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] 16+ messages in thread

* Re: status of node.write
  2010-03-24  9:23 status of node.write Michail Vidiassov
  2010-03-24  9:52 ` luigi scarso
@ 2010-03-24 10:17 ` Hans Hagen
  1 sibling, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2010-03-24 10:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 24-3-2010 10:23, Michail Vidiassov wrote:
> Dear All,
>
> I notice that broken code for inserting movies uses
> node.write in codeinjections.insertmovie (in back-pdf.lua),
> while figures.checkers.mov (in grph-inc.lua) expects text return
> from codeinjections.insertmovie to feed to "texsprint(ctxcatcodes".

i need a test


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

* Re: status of node.write
  2010-03-24  9:52 ` luigi scarso
@ 2010-03-24 10:53   ` Michail Vidiassov
  2010-03-24 11:10     ` luigi scarso
  2010-03-24 13:26   ` Hans Hagen
  1 sibling, 1 reply; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-24 10:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Luigi and All,

On Wed, 24 Mar 2010, luigi scarso wrote:

> I'm pretty sure that I still don't understand much , but
> I have written an article for including swf in mkiv , cfr

am I correct to assume that swf inclusion works ok and is done in a 
current kosher way in latest minimals
and so can be used as a reference for inclusion of other types?

          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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 10:53   ` Michail Vidiassov
@ 2010-03-24 11:10     ` luigi scarso
  2010-03-24 13:02       ` Michail Vidiassov
  0 siblings, 1 reply; 16+ messages in thread
From: luigi scarso @ 2010-03-24 11:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Mar 24, 2010 at 11:53 AM, Michail Vidiassov <master@iaas.msu.ru> wrote:
> Dear Luigi and All,
>
> On Wed, 24 Mar 2010, luigi scarso wrote:
>
>> I'm pretty sure that I still don't understand much , but
>> I have written an article for including swf in mkiv , cfr
>
> am I correct to assume that swf inclusion works ok and is done in a current
> kosher way in latest minimals
> and so can be used as a reference for inclusion of other types?
>
>         Sincerely, Michail
No no no, and I'm sorry for misunderstanding.
In practex I have written a really dirty way to include a swf in mkiv
based on flashmovie.sty .
Hans provided me the skeleton -- like yours u3d files --- and I must
rewrite a 2nd article to implement the mkiv way.
So in no way files in minimals are ready for swf embedding:
it's  still a test, because flash player embedded  AdobeRead is
absolutely  new for me .

Anyway it's my next project --- after I've finished some articles abut
FellType, ~next week.



-- 
luigi
___________________________________________________________________________________
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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 11:10     ` luigi scarso
@ 2010-03-24 13:02       ` Michail Vidiassov
  2010-03-24 14:20         ` luigi scarso
  0 siblings, 1 reply; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-24 13:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Luigi and All,

On Wed, 24 Mar 2010, luigi scarso wrote:

> Hans provided me the skeleton -- like yours u3d files --- and I must
> rewrite a 2nd article to implement the mkiv way.

And where the mkiv way is to be studued?
What kinds of inclusion not only work, but are implemented
in the modern way and so are fit to be emulated?
Is node.write mkiv way or not yet?

                       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] 16+ messages in thread

* Re: status of node.write
  2010-03-24  9:52 ` luigi scarso
  2010-03-24 10:53   ` Michail Vidiassov
@ 2010-03-24 13:26   ` Hans Hagen
  2010-03-25 19:12     ` 3D annotations - was: " Michail Vidiassov
  1 sibling, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2010-03-24 13:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 24-3-2010 10:52, luigi scarso wrote:

> I'm watching at your u3d files to maintains same style.

there is u3d support presen tbut nobody tested it

also, we can only improve it if we have a proper test set (also true for 
swf) that we can add to the samples section, simple public tests

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 13:02       ` Michail Vidiassov
@ 2010-03-24 14:20         ` luigi scarso
  2010-03-24 14:29           ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: luigi scarso @ 2010-03-24 14:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Mar 24, 2010 at 2:02 PM, Michail Vidiassov <master@iaas.msu.ru> wrote:
> Dear Luigi and All,
>
> On Wed, 24 Mar 2010, luigi scarso wrote:
>
>> Hans provided me the skeleton -- like yours u3d files --- and I must
>> rewrite a 2nd article to implement the mkiv way.
>
> And where the mkiv way is to be studued?
> What kinds of inclusion not only work, but are implemented
> in the modern way and so are fit to be emulated?
> Is node.write mkiv way or not yet?
>
>                      Sincerely, Michail
As I wrote, I quite don't understand well this area.
For now I can say that the mkiv way is a mix of lua and tex, while
the latex/mkii/pdftex tex way is described in flashmovie.sty
Also Adobe Supplement to the ISO 32000 base version 1.7 extensione
level 3 is the guideline.

I much prefear to code by myself without ask for Hans now,
it's a way to understand this aspect that I don't manage well.


-- 
luigi
___________________________________________________________________________________
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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 14:20         ` luigi scarso
@ 2010-03-24 14:29           ` Hans Hagen
  2010-03-24 16:46             ` Michail Vidiassov
  2010-03-25 14:18             ` PDF annotations problems - was: " Michail Vidiassov
  0 siblings, 2 replies; 16+ messages in thread
From: Hans Hagen @ 2010-03-24 14:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 24-3-2010 15:20, luigi scarso wrote:
> On Wed, Mar 24, 2010 at 2:02 PM, Michail Vidiassov<master@iaas.msu.ru>  wrote:
>> Dear Luigi and All,
>>
>> On Wed, 24 Mar 2010, luigi scarso wrote:
>>
>>> Hans provided me the skeleton -- like yours u3d files --- and I must
>>> rewrite a 2nd article to implement the mkiv way.
>>
>> And where the mkiv way is to be studued?
>> What kinds of inclusion not only work, but are implemented
>> in the modern way and so are fit to be emulated?
>> Is node.write mkiv way or not yet?
>>
>>                       Sincerely, Michail
> As I wrote, I quite don't understand well this area.
> For now I can say that the mkiv way is a mix of lua and tex, while
> the latex/mkii/pdftex tex way is described in flashmovie.sty
> Also Adobe Supplement to the ISO 32000 base version 1.7 extensione
> level 3 is the guideline.
>
> I much prefear to code by myself without ask for Hans now,
> it's a way to understand this aspect that I don't manage well.

it is already coded .. see back-u3d.mkiv for the interface

when given examples of something that does not work i can repair it

mkii/sty files are of no use here as things need to fit into the context 
user interface

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 14:29           ` Hans Hagen
@ 2010-03-24 16:46             ` Michail Vidiassov
  2010-03-25 15:37               ` Hans Hagen
  2010-03-25 14:18             ` PDF annotations problems - was: " Michail Vidiassov
  1 sibling, 1 reply; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-24 16:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

> when given examples of something that does not work i can repair it

take a look at http://www.ntg.nl/pipermail/ntg-context/2010/047898.html
- it is about problem with movies, but movies and u3d are both done via
annotations, thus there are similarities.

> it is already coded .. see back-u3d.mkiv for the interface

the interface seems to be disfunctional now, I'll supply examples
once I get to a computer with working luatex
(my personal one is still disfunctional since the fix for luatex problem
I reported at http://www.ntg.nl/pipermail/ntg-context/2010/048022.html did
not find its way to precompiled binaries yet).

               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] 16+ messages in thread

* PDF annotations problems - was: status of node.write
  2010-03-24 14:29           ` Hans Hagen
  2010-03-24 16:46             ` Michail Vidiassov
@ 2010-03-25 14:18             ` Michail Vidiassov
  1 sibling, 0 replies; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-25 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

On Wed, 24 Mar 2010, Hans Hagen wrote:

> when given examples of something that does not work i can repair it

in lpdf-ini.lua one can find the following utility function for setting a 
boolean config parameter:

local function pdfboolean(b,default)
     if ((type(b) == "boolean") and b) or default then
         return p_true
     else
         return p_false
     end
end

How is it supposed to work if the config parameter has value "false" and 
default value is "true"? It seems in this case the value of "b" is ignored.

    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] 16+ messages in thread

* Re: status of node.write
  2010-03-24 16:46             ` Michail Vidiassov
@ 2010-03-25 15:37               ` Hans Hagen
  0 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2010-03-25 15:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 24-3-2010 17:46, Michail Vidiassov wrote:
> Dear Hans,
>
>> when given examples of something that does not work i can repair it
>
> take a look at http://www.ntg.nl/pipermail/ntg-context/2010/047898.html
> - it is about problem with movies, but movies and u3d are both done via
> annotations, thus there are similarities.

i uploaded a new version, movies seem to work, u3d not tested

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

* 3D annotations - was: status of node.write
  2010-03-24 13:26   ` Hans Hagen
@ 2010-03-25 19:12     ` Michail Vidiassov
  2010-03-25 22:24       ` Hans Hagen
  2010-03-26  5:53       ` 3D annotations Michail Vidiassov
  0 siblings, 2 replies; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-25 19:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

On Wed, 24 Mar 2010, Hans Hagen wrote:

> there is u3d support presen tbut nobody tested it

thank you for your latest effort to put u3d support in a working state,
but as of now even the most basic test from back-u3d.mkiv does not work 
and is not supposed to:

grph-u3d.lua needs adding to the preamble

local pdfannotation   = nodes.pdfannotation
local todimen         = string.todimen

and replacing

node.write(annotation... with node.write(pdfannotation(annotation...

to at least make code run without throwing error messages.

lpdf-u3d.lua has more severe problem:

         --  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 } }

shows that option to include a bitmap preview image into 3d 
annotation is just commented out.

On the other hand, an approach like in LaTeX package attachfile2 may be 
convenient - a PDF with just 3D annotation and minimal support elements 
(with or without preview) is attached to the main document, that has a 
clickable image that activates that attached PDF document in a separate 
window.
In this case the preparation of the attaced PDF can be 
completely delegated to external utility.
Does attachfile2 analog work in ConTeXt now?
Where to look for usage examples?

         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] 16+ messages in thread

* Re: 3D annotations - was: status of node.write
  2010-03-25 19:12     ` 3D annotations - was: " Michail Vidiassov
@ 2010-03-25 22:24       ` Hans Hagen
  2010-03-26  5:53       ` 3D annotations Michail Vidiassov
  1 sibling, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2010-03-25 22:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 25-3-2010 20:12, Michail Vidiassov wrote:

> to at least make code run without throwing error messages.

new beta

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

* Re: 3D annotations
  2010-03-25 19:12     ` 3D annotations - was: " Michail Vidiassov
  2010-03-25 22:24       ` Hans Hagen
@ 2010-03-26  5:53       ` Michail Vidiassov
  2010-03-26 15:32         ` Hans Hagen
  1 sibling, 1 reply; 16+ messages in thread
From: Michail Vidiassov @ 2010-03-26  5:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

On Thu, 25 Mar 2010, Michail Vidiassov wrote:

> On Wed, 24 Mar 2010, Hans Hagen wrote:
>
>> there is u3d support presen tbut nobody tested it
>
> thank you for your latest effort to put u3d support in a working state, but

now that Adobe has fallen in love with a new 3D format, PRC, the following 
is to be changed:

lpdf-u3d.lua

      if not stream then
          local attr = pdfdictionary {
              Type    = pdfconstant("3D"),
-            Subtype = pdfconstant("U3D"),
          }
+        if string.upper(string.sub(foundname,-4))==".PRC" then
+            attr.Subtype = pdfconstant("PRC")
+        else
+            attr.Subtype = pdfconstant("U3D")
+        end
          local streamviews = checkedkey(streamparam, "views", "table")
          if streamviews then
              local list = pdfarray()

May be a more robust way is to read first 3 bytes of the model file, since
"U3D" or "PRC" signature is always there - that can be done instead of 
relying on file name extension or only in case it it not "u3d" or "prc".

Also PRC annotations have to trigger setting PDF version to 1.7.3
(developer extensions dictionary mechanism).
It can be done per your advice directly

\doPDFaddtocatalog {
   /Extensions
     <</ADBE
         <</BaseVersion /1.7
           /ExtensionLevel 3
         >>
     >>
}

But what about an interface like \pdfmicroversion and
automatic pushing up of PDF version once PRC annontation happens?

Also I try to remind you about pdfboolean problem in lpdf-ini.lua
(old code is not OK if b is "false" and default is "true")

  local function pdfboolean(b,default)
-    if ((type(b) == "boolean") and b) or default then
-        return p_true
+    if type(b) ~= "boolean" then
+        if default then
+            return p_true
+        else
+            return p_false
+        end
      else
-        return p_false
+        if b then
+            return p_true
+        else
+            return p_false
+        end
      end
  end

        Sincerely, Michail

PS. And a great palliative way to deal with 3D annotations is via
attaching a 3D PDF file made with LaTeX (by Asymptote, for example).

But while your method of answering my messages in lua works OK for
new code (updating minimals and making a diff with old code is not
harder than checking e-mail inbox - "Your morning patch, sir!" ;),
I can not deduce from existing sea of ConTeXt code the status of file attachments support.
___________________________________________________________________________________
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] 16+ messages in thread

* Re: 3D annotations
  2010-03-26  5:53       ` 3D annotations Michail Vidiassov
@ 2010-03-26 15:32         ` Hans Hagen
  0 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2010-03-26 15:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 26-3-2010 6:53, Michail Vidiassov wrote:

> lpdf-u3d.lua
>
> if not stream then
> local attr = pdfdictionary {
> Type = pdfconstant("3D"),
> - Subtype = pdfconstant("U3D"),
> }
> + if string.upper(string.sub(foundname,-4))==".PRC" then
> + attr.Subtype = pdfconstant("PRC")
> + else
> + attr.Subtype = pdfconstant("U3D")
> + end
> local streamviews = checkedkey(streamparam, "views", "table")
> if streamviews then
> local list = pdfarray()
>
> May be a more robust way is to read first 3 bytes of the model file, since
> "U3D" or "PRC" signature is always there - that can be done instead of
> relying on file name extension or only in case it it not "u3d" or "prc".

more like:

         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

> Also PRC annotations have to trigger setting PDF version to 1.7.3
> (developer extensions dictionary mechanism).
> It can be done per your advice directly
>
> \doPDFaddtocatalog {
> /Extensions
> <</ADBE
> <</BaseVersion /1.7
> /ExtensionLevel 3
>  >>
>  >>
> }
>
> But what about an interface like \pdfmicroversion and
> automatic pushing up of PDF version once PRC annontation happens?

i don't know that command and anyway want to get rid of all commands 
that start with \pdf

concerning versions ... peter rolf and i are working on detailed support 
for standards (also related to preflighting) and before i even want to 
look in some automated version handling we first need to get that bit 
done well

> Also I try to remind you about pdfboolean problem in lpdf-ini.lua
> (old code is not OK if b is "false" and default is "true")
>
> local function pdfboolean(b,default)
> - if ((type(b) == "boolean") and b) or default then
> - return p_true
> + if type(b) ~= "boolean" then
> + if default then
> + return p_true
> + else
> + return p_false
> + end
> else
> - return p_false
> + if b then
> + return p_true
> + else
> + return p_false
> + end
> end
> end

i need to check it ... later (also for interferences)


> PS. And a great palliative way to deal with 3D annotations is via
> attaching a 3D PDF file made with LaTeX (by Asymptote, for example).

well, one can attach files as-is already (unless it's broken)

> I can not deduce from existing sea of ConTeXt code the status of file
> attachments support.

\attachment has been there for ages

actually, all kind of annotations hav ebeen supported as soon as they 
showed up in acrobat (mediademo is an exmaple of flash) but i gave up on 
implementing these things too early as in acrobat/pdf such new tricks 
normally needs a few versions to reach stability

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 16+ messages in thread

end of thread, other threads:[~2010-03-26 15:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24  9:23 status of node.write Michail Vidiassov
2010-03-24  9:52 ` luigi scarso
2010-03-24 10:53   ` Michail Vidiassov
2010-03-24 11:10     ` luigi scarso
2010-03-24 13:02       ` Michail Vidiassov
2010-03-24 14:20         ` luigi scarso
2010-03-24 14:29           ` Hans Hagen
2010-03-24 16:46             ` Michail Vidiassov
2010-03-25 15:37               ` Hans Hagen
2010-03-25 14:18             ` PDF annotations problems - was: " Michail Vidiassov
2010-03-24 13:26   ` Hans Hagen
2010-03-25 19:12     ` 3D annotations - was: " Michail Vidiassov
2010-03-25 22:24       ` Hans Hagen
2010-03-26  5:53       ` 3D annotations Michail Vidiassov
2010-03-26 15:32         ` Hans Hagen
2010-03-24 10:17 ` status of node.write Hans Hagen

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).