[NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Michail Vidiassov
Dear Developers and All,

lpdf.checkedkey routine from lpdf-ini.lua has problems with accessing
false boolean values, it returns them as nil. Is it by design or
neglect?
(I vaguely remember stumbling on this problems before, so  there is a
chance that I have already got the answer, but have forgotten it.)
The minimal demo:
\starttext
\startluacode
local function writebool(bv,text)
 if bv == true then
  io.write(text,  true \n)
 elseif bv == nil then
  io.write(text,  nil  \n)
 else
  io.write(text,  false\n)
 end
end
local a = {}
a[x] = true
a[y] = false
a[z] = nil
writebool(lpdf.checkedkey(a,x,boolean),lpdf.checkedkey(a,\x\,\boolean\))
writebool(lpdf.checkedkey(a,y,boolean),lpdf.checkedkey(a,\y\,\boolean\))
writebool(lpdf.checkedkey(a,z,boolean),lpdf.checkedkey(a,\z\,\boolean\))
writebool(a.x,a.x)
writebool(a.y,a.y)
writebool(a.z,a.z)
\stopluacode
TEST
\stoptext


It results in the following relevant output

lpdf.checkedkey(a,x,boolean) true
lpdf.checkedkey(a,y,boolean) nil
lpdf.checkedkey(a,z,boolean) nil
a.x true
a.y false
a.z nil

Note that false value was read by checkedkey as nil.

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
___


Re: [NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Michail Vidiassov
Dear Peter,

 More a lua design decision. 'nil' is equal to 'false' here

I know no CS theory behind lua design, but try this:
\starttext
\startluacode
if nil == false then
  io.write(nil == false\n)
end
if nil ~= false then
  io.write(nil ~= false\n)
end
\stopluacode
TEST
\stoptext

and get

nil ~= false

As checkedkey is for reading parameter tables, based on user input,
there may be real difference between a property not set (i.e. nil) and
one set to be false. What if the default setting is true, for example?

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
___


Re: [NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Michail Vidiassov
Dear Aditya, Peter and All,

 I think that what Peter meant was:

the real issue is not teaching me lua and improving the style of my example,
but my complaint (correct or not) about inability of lpdf.checkedkey
to correctly fetch false boolean values: they are fetched as nil, just
as if they were absent or of incorrect type.

Please, someone with time and, preferably, authority - take a look at
lpdf.checkedkey code (5 minutes maximum).
Talking in general about lua, not knowing what lpdf.checkedkey is,
does and is supposed to do, does not look like efficient use of time.

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
___


Re: [NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Michail Vidiassov
Dear Hans,

 well, they're just not treated special

IMHO, they have to be treated special.

 you can try this (untested)

I have tested it. It adds nice enhancement, but does not fix the bug
In the following case
local a = {}
a[e] = blabla
a[t] = true
a[f] = false
a[x] = true
a[y] = false
a[z] = nil

your new lpdf.checkedkey correctly fetches t and f, where the old
one failed.
And your new lpdf.checkedkey fails for e - if I attempt to fetch it
as boolean I get false instead of nil.
(That is caused by toboolean returning false for unconvertible data -
unlike tonumber).

But I did not complain about reading strings!

My problem was with y.
Both your new and old lpdf.checkedkey fetch it as nil instead of false.
My (somewhat ugly) idea of the fix is the following

local function lpdf.checkedkey(t,key,variant)
local pn = t and t[key]
if pn then
local tn = type(pn)
if tn == variant then
if variant == string then
return pn ~=  and pn or nil
elseif variant == table then
return next(pn) and pn or nil
else
return pn
end
elseif tn == string then
if variant == number then
return tonumber(pn)
elseif variant == boolean then
 if pn == true then
   return true
elseif pn == false then
   return false
end
  end
end
elseif t and t[key] ~= nil and variant == boolean and
type(t[key]) == boolean then
return t[key]
end
end

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
___


Re: [NTG-context] lpdf.checkedkey has problem with false values

2014-09-15 Thread Michail Vidiassov
Dear Hans,

 more like

 function lpdf.checkedkey(t,key,variant)

thank you. That works. Please, commit.

Michail

PS.
lpdf.checkedkey issue was raised while I reviewed 3D PDF support.
But there are greater problems:

It seems that u3d inclusion stopped to work in the current (2014.09.06
20:59) ConTeXt.
Texlive 2014 works.

As far as I can track, the problem is caused by the change in
function register(askedname,specification) from grph-inc.lua:
if format %a supported by output file format (and u3d falls under
this category)
specification.found is set to false in the current ConTeXt.
If I set it to true in this case (as in TeXLive 2014 version of
ConTeXt) things start to work again.
May be by doing so I am reversing some unfinished change, but it works for me.

The relevant patch:
@@ -725,7 +725,7 @@
 report_inclusion(format %a natively supported by
backend,format)
 end
 else
-specification.found = false
+specification.found = true -- was false
 if trace_figures then
 report_inclusion(format %a supported by output
file format,format)
 end
___
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
___


Re: [NTG-context] Interactive U3D in .pdf via ConTeXt?

2014-05-18 Thread Michail Vidiassov
Dear luigi,

you wrote:
 I've to play a bit with width , height and the 3D controls of the
adobe reader to have a nice view,

You could just use movie15 parameters (from Laurana.tex in the archive
you mention)

 3Daac=60, 3Droll=0, 3Dc2c=0 745.639 0, 3Droo=745.639, 3Dcoo=22.607
-1618.68 -149.864,

and rewrite them as

 aac=60, roll=0, c2c={0, 745.639, 0}, roo=745.639, coo={22.607,
-1618.68, -149.864},

The ConTeXt 3D PDF module interface was influenced by movie15 for
obvious reasons (among them - unwillingness to write docs).

It should also be possible to select the model or its part in Adobe
GUI (in the model tree, for example), select Zoom to part, ask Adobe
viewer for camera properties and use them for view parameters.
But I have to fix and improve my module to enable that functionality.

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
___


[NTG-context] scientific notation in PDF file

2014-05-18 Thread Michail Vidiassov
Dear Developers and All,

when I create a PDF dictionary with a small number

local mydict = lpdf.dictionary { TT = 0.01 }
lpdf.flushobject(mydict)

I get in PDF

 /TT 1e-18 

that confuses the Adobe Reader (if dictionary is used).

As far as I can investigate, lpdf.flushobject(mydict) calls
pdf.immediateobj(tostring(mydict)) and tostring does the actual damage
by introducing scientific notation.

What is the correct way to deal with the problem?
Converting the dictionary to string with my own code looks like a
possible workaround, not a solution.

Michail

PS.
Minimal example (it produces unused dictionary, so viewer does not complain)

\nopdfcompression
\starttext

\startluacode
local mydict = lpdf.dictionary { TT = 0.01 }
lpdf.flushobject(mydict)
-- or, to the same result
-- pdf.immediateobj(tostring(mydict))
logs.reporter(,)(mydict %s,tostring(mydict))
\stopluacode

Test.

\stoptext

Context is
 current version: 2014.05.13 00:04
___
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
___


Re: [NTG-context] 3D annotations problems

2012-09-09 Thread Michail Vidiassov
Dear Hans and All,


On Sat, Aug 18, 2012 at 10:00 PM, Michail Vidiassov mas...@iaas.msu.ru wrote:
 the examples from back-u3d.mkiv fail to work with latest beta
 (rectangled undefined message appears instead of annotation),
 but if \textwidth is replaced by in in the tex file 3D annotations
 appear OK.

in the latest minimals (2012.09.06 23:03) the following  example from
back-u3d.mkiv fails to work

\useexternalfigure  [test]  [test.prc]  [width=0.5\textwidth,
height=0.5\textwidth, display=u3d:myset:display:1,
controls=u3d:myset:controls:1]
\placefigure[here]{3d test}{\externalfigure[test]}

while after getting rid of \texwidth the following does:

\useexternalfigure  [test]  [test.prc]  [width=3in,   height=3in,
display=u3d:myset:display:1, controls=u3d:myset:controls:1]
\placefigure[here]{3d test}{\externalfigure[test]}

Is it a bug of the example got wrong with some changes 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
___


Re: [NTG-context] 3D annotations problems

2012-09-09 Thread Michail Vidiassov
Dear Wolfgang and All,

On Sun, Sep 9, 2012 at 4:52 PM, Wolfgang Schuster
wolfgang.schus...@gmail.com wrote:
 in the latest minimals (2012.09.06 23:03) the following  example from 
 back-u3d.mkiv fails to work

 \useexternalfigure  [test]  [test.prc]  [width=0.5\textwidth, ...

 It should work when you use “width=\the\dimexpr\textwidth/2\relax” or 
 “width=\the\dimexpr0.5\textwidth\relax”.

thank you, that works.

Is it a permanent change of rules or the old shorter way is just
temporary disabled by some ongoing unfinished development of ConTeXt
code?

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
___


Re: [NTG-context] 3D annotations problems

2012-09-09 Thread Michail Vidiassov
Just a follow up -
the old way width=0.5\textwidth still works for png external figures.

Is it considered non-kosher now and is to be changed everywhere to the
new one “width=\the\dimexpr0.5\textwidth\relax” whenever possible to
avoid potential problems?
___
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
___


[NTG-context] 3D annotations problems

2012-08-18 Thread Michail Vidiassov
Dear Hans and All,

the examples from back-u3d.mkiv fail to work with latest beta
(rectangled undefined message appears instead of annotation),
but if \textwidth is replaced by in in the tex file 3D annotations
appear OK.

Is that a bug, a feature or some transitional state of ConTeXt
(case when things are known to be broken something else is under reform).

   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
___


[NTG-context] hidden attachments broken

2012-08-17 Thread Michail Vidiassov
Dear Hans and All,

if I use example from scrn-wid.mkvi
\attachment[file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX
File,method=hidden]

empty file gets embedded and all specs are lost.

If I remove method=hidden all is OK - file is there, I can see
supplied information in Adobe Reader list of attached/embedded files.

I did not trace the cause of file getting empty, but the loss of specs
appears to be by design.
In 2011 you wrote
The hidden method will not place an annotation.
(http://www.ntg.nl/pipermail/ntg-context/2011/057091.html),
 but now the comment hidden = not in menu in scrn-wid.mkv implies
that you also try to hide file information in the list of attached
files,
so menu entry is just a placeholder with file name attachment.txt
and empty description.
The relevant code piece, where specs and filename are dropped, seems
to be in scrn-wid.mkvseems
\setvalue{scrn_attachment_method_\v!hidden}%
  {\ctxcommand{insertattachment{
 tag= \currentattachment,
 registered = \currentattachmentregistered,
 method = \v!hidden
  }}}


While such anonymizing mode may be required for some security-obsessed
people, who do not want filenames leak into shipped out files,
it seems strange not to provide an option to preserve the old behavior
(hidden file appears in attached/embedded files list of Adobe Reader
with filename and description) and break your own example.

Sincerely, Michail

PS.
ConTeXt  ver: 2012.08.16 22:20 MKIV
___
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
___


Re: [NTG-context] attachment attaches twice - the fix was minimal

2011-04-29 Thread Michail Vidiassov

Dear Hans,

when you fixed the bug with attachment being listed twice
in the attachment list, you also enhanced attachment support

On Mon, 28 Feb 2011, Hans Hagen wrote:

as far as i can see there were a couple of issues: 
attachments without associated annotation, and labeling and both are covered, 
but using the same command and extra keys/values ...


as far as I understand, attachments without associated annotation are
called hidden in ConTeXt, as in

\attachment[test][file=att.tex,title=Oeps,author=Hans,subtitle=TeX 
File,method=hidden]

But that does not work and, as far as I can see from the current beta code, 
is not supposed to. For example, in lpdf-wid.lua we have


local function flushembeddedfiles()
if next(filestreams) then
local e = pdfarray()
for tag, reference in next, filestreams do
if not reference then
report_attachment(unreferenced file: tag '%s',tag)
elseif referenced[name] == hidden then
e[#e+1] = pdfstring(tag)
e[#e+1] = reference -- already a reference
else
-- messy spec ... when annot not in named else twice in menu 
list acrobat
end
end

lpdf.addtonames(EmbeddedFiles,pdfreference(pdfflushobject(pdfdictionary{ 
Names = e })))
end
end

Note the referenced[name] part, while there is no name variable.

It seems the working code did not find its way into released version
and some draft got shipped.

  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
___


Re: [NTG-context] attachment attaches twice - the fix was minimal

2011-02-28 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


i'll patch lpdf-wid


on one hand your patch fixes the bug that is in the Subj. of the 
thread, but it does just that and nothing more. It is a pity

to see the opportunity to enhance attachments support wasted.
It'd likely be a long time before you revisit the issue :(

   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
___


Re: [NTG-context] attachment attaches twice - the fix was minimal (?)

2011-02-28 Thread Michail Vidiassov

Dear Hans,

On Mon, 28 Feb 2011, Hans Hagen wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.

i'll patch lpdf-wid

on one hand your patch fixes the bug that is in the Subj. of the thread,


this is a bit of a weird comment given that i haven't uploaded anything that 
you can comment on; as far as i can see there were a couple of issues: 
attachments without associated annotation, and labeling and both are covered, 
but using the same command and extra keys/values ...


sorry for being so dumb,
but on one hand you haven't uploaded anything,
on the other there were a couple of issues that are covered by now,
and on the third one first-setup.sh brought me this morning lpdf-wid.lua
that now has 
---

local ignorereferenced = true -- fuzzy pdf spec .. twice in attachment list, 
can become an option
---
etc. - that change caused my comment.

On the positive side - ConTeXt internals are your internal affairs,
you are more sovereign than some kings and revolution leaders ;)
Just tell us what that user-level extra keys/values are and we'll sing, 
dance and rejoice, being innocent of knowing what only the ConTeXt creator is to know.


  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
___


Re: [NTG-context] attachment attaches twice - more research

2011-02-23 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:

i'll patch lpdf-wid but somehow I get the impression that it's more a viewer 
issue (the list shown seems to be a merge of filename as well as symbolic 
names while a clever list builder should look at the referred objects) ... 
but maybe no one else usesvdifferent symbolic names (we had similar issues 
with fields in the past and even now advanced field support is somewhat 
bugged one or the other way, depending on the viewer version, esp chained 
ones)


to say the truth I do not understand what are you talking about :(
The issues I have in mind - separating global attachments and attachments 
linked to icons on pages, additional descriptions for attached files -

are addressed in the attached patches.
I am not sure about using attachment lebel as T key, that is indended for 
following:
The text label that shall be displayed in the title bar of the annotation’s 
pop-up window when open and active. This entry shall identify the user who 
added the annotation.

and shows as the upper line when mouse pointer is above attachment icon.
Did not try to have file size and time information added to file stream -
but it'd be nice to have.

Sincerely, Michail
PS. Patches show what I want done, not how it is to be done.
Just hope that my lua may be more clear than my English.--- back-ini.lua.org2011-02-16 01:53:17.0 +0300
+++ back-ini.lua2011-02-23 09:17:50.0 +0300
@@ -67,6 +67,7 @@
 registercomment= nothing,
 
 embedfile  = nothing,
+globattachfile = nothing,
 attachfile = nothing,
 attachmentid   = nothing,
 
--- scrn-int.mkiv.org   2011-01-31 13:26:23.0 +0300
+++ scrn-int.mkiv   2011-02-23 12:34:22.0 +0300
@@ -405,6 +405,25 @@
 % % \setupattachments[\c!symbol={symbol-normal,symbol-down}]
 %
 % \starttext \attachment[whatever] \stoptext
+%
+% \globattachment[test.tex]
+% \globattachment[description][test.tex]
+% \globattachment[description][newname.tex][test.tex]
+
+\def\globattachment
+  {\dotripleempty\doglobattachment}
+
+\def\doglobattachment[#1][#2][#3]% description newfilename filename
+  {\ifthirdargument
+ \dodoglobattachment{#1}{#2}{#3}%
+   \else\ifsecondargument
+ \dodoglobattachment{#1}{}{#2}%
+   \else
+ \dodoglobattachment{}{}{#1}%
+   \fi\fi}
+
+\def\dodoglobattachment#1#2#3% description newfilename filename
+  
{\ctxlua{backends.codeinjections.globattachfile{description=#1,newname=#2,filename=#3}}}
 
 \def\useattachment
   {\doquadrupleempty\douseattachment}
--- lpdf-wid.lua.org2011-02-08 22:41:44.0 +0300
+++ lpdf-wid.lua2011-02-23 12:27:53.0 +0300
@@ -160,14 +160,14 @@
 
 --
 
-local nofattachments, attachments, filestreams = 0, { }, { }
+local nofattachments, attachments, filestreams, globfilestreams = 0, { }, { }, 
{ }
 
 -- todo: hash and embed once
 
 local function flushembeddedfiles()
-if next(filestreams) then
+if next(globfilestreams) then
 local e = pdfarray()
-for name, reference in next, filestreams do
+for name, reference in next, globfilestreams do
 if reference then
 e[#e+1] = pdfstring(name)
 e[#e+1] = reference -- already a reference
@@ -181,7 +181,7 @@
 
 lpdf.registerdocumentfinalizer(flushembeddedfiles,embeddedfiles)
 
-function codeinjections.embedfile(filename)
+function codeinjections.embedfile(filename,newname,description)
 local r = filestreams[filename]
 if r == false then
 return nil
@@ -201,12 +201,28 @@
 UF   = pdfstring(newname or basename),
 EF   = pdfdictionary { F = pdfreference(f) },
 }
+if description then
+d[Desc] = pdfstring(description)
+end
 local r = pdfreference(pdfflushobject(d))
 filestreams[filename] = r
 return r
 end
 end
 
+function codeinjections.globattachfile(specification)
+local filename = specification.filename
+if not filename or filename ==  then
+-- todo: message
+return
+end
+local description = specification.description or 
+local newname = specification.newname or 
+if description ==  then description = nil end
+if newname ==  then newname = nil end
+globfilestreams[filename] = 
codeinjections.embedfile(filename,newname,description)
+end
+
 function codeinjections.attachfile(specification)
 local attachment = interactions.attachments.attachment(specification.label)
 if not attachment then
@@ -239,6 +255,7 @@
 AP   = appearance,
 OC   = analyzelayer(specification.layer),
 C= 
pdfcolorspec(specification.colormodel,specification.colorvalue),
+T= pdfstring(label),
 }
 -- as soon as we can ask for the dimensions of an xform we can
 -- use them here
___
If 

Re: [NTG-context] attachment attaches twice - more research

2011-02-23 Thread Michail Vidiassov

Dear Hans,

On Wed, 23 Feb 2011, Hans Hagen wrote:


Attachments have some history in pdf and each version was slightly different.


as far as I understand ConTeXt now can not link file attachment to 
arbitrary picture, just to some predefined icons. Am I right?

Is it going  to change? Soon? There are comments in the code about
lack of measurement support for XForm - is that the issue and what
that issue is?
I have already met that complaints in 3D Annotations support code.
BTW, I am interested in FileAttachment  Annotations as a way to
work with 3D models. With LaTeX the main PDF file may contain a 2D picture,
that can be displayed in any PDF viewer, but if you click on it in Adobe 
viewer attached PDF file opens with 3D model in it. That attached file may 
be produced by some third-party tool, since often such tools output not 
just 3D model fit for including in PDF, but a one-page PDF with the 3D 
model, complex JavaScript to control it (for example to animate it) and 
some intarctive text related to the model.


 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
___


Re: [NTG-context] \useattachment: Embedding files in PDFs - was attachment attaches twice - more research

2011-02-21 Thread Michail Vidiassov

Dear Hans,

I'd like to remind you about an old problem report
--
From: Tobias Burnus
Date: 2008-01-04 16:01 +300

I can use \useattachment to embed/attach files in a PDF file. I can use:

\useattachment[whatever][title][newname][test.tex]
\attachment[whatever]

This creates an attachment with the description title and the name
test.tex. However, how can I set the author/subject? (Shown in tool
tip of the annotation symbol; it is shown above the description;
actually subject is enough for me.)

Additionally, I miss the file size and possibly the modification date
for the attachments; they are often handy to have.

Is is possible to associate an embedded file stream with the document
itself without creating an annotation symbol as with \attachment in
ConTeXt? (The PDF spec allows this; cf. e.g. 3.10.3 in the PDF spec and
http://www.microtype.com/showcase/EmbedFiles.pdf for an example PDF file.)

---

what he names author/subject is the T entry in annotation dictionary 
(the same where /Subtype /FileAttachment goes), that is described as
The text label that shall be displayed in the title bar of the 
annotation’s pop-up window when open and active. This entry shall identify the user who 
added the annotation.
It appears as the upper of the two lines that are shown when the mouse 
pointer is over file attachment annotation icon (the lower one is the 
description mentioned above).


And for file size and modification date to show up file stream has to 
look like

8 0 obj /Params  /ModDate (20050217) /Size 2048 /Length 1218stream
not just
15 0 obj /Length 144stream
as it is now.

   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
___


Re: [NTG-context] attachment attaches twice

2011-02-20 Thread Michail Vidiassov

Dear All,

to be precise, the attachment is attached once
(can be seen if one inspects the sample PDF files in uncompressed form with 
any text or binary editor - if you do not have Adobe Acrobat), but is 
listed twice by Adobe Reader.


  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
___


Re: [NTG-context] attachment attaches twice - more research

2011-02-20 Thread Michail Vidiassov

Dear Developers,

On Sun, 20 Feb 2011, Michail Vidiassov wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


PDF spec states
--
An embedded file stream shall be included in a PDF document in one of the 
following ways:
•	Any file specification dictionary in the document may have an EF 
entry that specifies an embedded file stream. The stream data shall still 
be associated with a location in the file system. In particular, this 
method shall be used for file attachment annotations (see 12.5.6.15, File 
Attachment Annotations), which associate the embedded file with a location 
on a page in the document.
•	Embedded file streams may be associated with the document as a 
whole through the EmbeddedFiles entry (PDF 1.4) in the PDF document’s name 
dictionary (see 7.7.4, Name Dictionary). The associated name tree shall 
map name strings to file specifications that refer to embedded file streams 
through their EF entries.

--

while code in lpdf-wid.lua sends everything to EmbeddedFiles - including 
files associated with a location on a page in the document as in the 
examples in the originator's post.


For example http://www.microtype.com/showcase/EmbedFiles.pdf
has it done correctly, EmbeddedFiles refers only to that embedded files 
that are not linked to particular icons on pages.


 Sincerely, Michail

PS. did not experiment with patching lpdf-wid.lua myself yet...___
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
___


Re: [NTG-context] attachment attaches twice - please, do not fix by trimming

2011-02-20 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:


to be precise, the attachment is attached once
but is listed twice by Adobe Reader.


code in lpdf-wid.lua sends everything to EmbeddedFiles - including
files associated with a location on a page in the document 


i'll patch lpdf-wid


it'd be nice to not only fix icon-linked attachments (current 
functionality), but to also allow to create document-level attachments

not linked to icons - not that I see any particular use for that just now,
but since functionality is already there (but misused) it'd be a pity to 
just drop it.


  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
___


Re: [NTG-context] Context 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

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
___


Re: [NTG-context] Context 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

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


testprc.tgz
Description: Binary data
--- lpdf-u3d.lua.org2010-03-26 18:24:44.0 +0300
+++ lpdf-u3d.lua2010-04-14 14:24:28.0 +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

Re: [NTG-context] Context 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov

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
___


Re: [NTG-context] Context 2010.05.08 - pdfboolean problem

2010-05-12 Thread Michail Vidiassov

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
___


Re: [NTG-context] 3D annotations

2010-05-04 Thread Michail Vidiassov

Dear gummybears,

On Tue, 4 May 2010, gummybears wrote:


  I read your email (17 april 2010) on the mailing list and applied the two
  patches to my Context minimal distro
  (the very latest version). When I run your test.tex through context the
  preview image test.png is not shown.


did you recreate formats after patch

Probably not (my mistake), but now I did make the formats and with the current 
minimals
I got the following error (when running your test.tex file)
bodyfont    : 12pt rm is loaded
language    : language en is active
systems : begin file test.tex at line 3
floatblocks : 1 placed
! LuaTeX error ...text/tex/texmf-context/tex/context/base/lpdf-mis.lua:163: 
attempt to call field 'timestamp' (a nil value)
stack traceback:
    ...text/tex/texmf-context/tex/context/base/lpdf-mis.lua:163: in function 
'setupidentity'
    main ctx instance:1: in main chunk.
\synchronizebackendidentity ...akeyword \!!es , }}

\actualshipout ...lio \or \the \everyfirstshipout
  \global \everyfirstshipout...
\myshipout ...\@@ppmethod }\gobbleoneargument {#1}
  \setnextrealpageno \afters...
\dofinaloutput ...hbox {\vbox {\dopagebody #1#2}}}
  \the \everyaftershipout \a...
\finaloutput ...EAEAEA \dofinaloutput \fi \fi #1#2
  \resetselectiepagina \incr...
\sidefloatoutput ...e \else \finalsidefloatoutput
  \global \sidefloatvsize \n...
...
l.23 \stopTEXpage

Which version of ConText should I use to make it work?


I have just downloaded the latest version (2010.04.29 22:30) to my
Mac OS X 10.6.3, patched, run test.tex and got no problem.

May be you can describe our setup in more detail (context version, OS,
32/64 bit).

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
___


Re: [NTG-context] 3D annotations

2010-04-17 Thread Michail Vidiassov

Dear Hans,

I wrote to you

thank you for your latest effort to put u3d support in a working state, but


more thanks for more effort, but


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.


you have implemented reading the file signature, but it is now 
almost useless, since if a file has extension other but U3D or PRC

3D annotation code will not be called by file inclusion mechanism
and io.readdata routine is called
local subtype, subdata = U3D, io.readdata(foundname) or 
- what's that?

One more point - preview bitmap images in 3D annotations are now disabled
since necessary functionality of measuring XForms is missing -
please, consider the following workaround.

--- lpdf-u3d.lua.org2010-03-26 18:24:44.0 +0300
+++ lpdf-u3d.lua2010-04-14 14:24:28.0 +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),
+  

Re: [NTG-context] The ConTeXt book

2010-04-01 Thread Michail Vidiassov



On Thu, 1 Apr 2010, Martin Schröder wrote:


Good news - if it isn't an April hoax. :-)


and a good one, one you _want_ to believe...___
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
___


Re: [NTG-context] U3D inclusion

2010-03-27 Thread Michail Vidiassov

Dear gummybears (and hopefully Hans),

On Sat, 23 Jan 2010, gummybears wrote:


After a couple of tests here are my findings

*) The preview does not work at this moment. I only see a light blue square 
which can be activated.
After which the 3d viewer shows the embedded 3d image
The developers are waiting for some functions to appear in luatex before 
doing the preview the right way. I have a patch implementing preview somehow.



*) Specifying several views as shown in back-u3d.mkiv shows up in the resulting pdf as 
unknown view

Most likely a typo bug in lpdf-u3d (at the start of make3dview - if you are 
listening, Hans ;)
Have a fix for that too.


*) I also experimented with different values for coo, c2c, roll etc. When not 
specifying any of these settings
the embedded 3d is always shown with the incorrect roll i.e the roll is always 
90 degrees off


Most likely my fault, but there are different points of view on what is 
default camera position (moview15, Asymptote, OpenGL, U3D, Adobe Viewer),

so most likely the default default is not the one Asymtote expects.
Plus Asymptote is micromanaging things - it not only sets camera,
but also moves the model itself, to be better seen, apparently.
We'll have to dig into that someday - see you on Asymptote forum if 
you wanna play and have time for technicalities.


 Sincerely, Michail
PS. Sorry for slow answer - had to fix Asymptote PRC output first.

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


[NTG-context] PDF annotations problems - was: status of node.write

2010-03-25 Thread Michail Vidiassov

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
___


[NTG-context] 3D annotations - was: status of node.write

2010-03-25 Thread Michail Vidiassov

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
___


Re: [NTG-context] 3D annotations

2010-03-25 Thread Michail Vidiassov

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
___


[NTG-context] status of node.write

2010-03-24 Thread Michail Vidiassov

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 b 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())) -- b
--~ if ref then -- wrong ! a direct ref should work
--~ texsprint(ctxcatcodes,format(\\smash{\\pdfrefximage%s\\relax},ref)) -- 
b

--~ 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
___


Re: [NTG-context] status of node.write

2010-03-24 Thread Michail Vidiassov

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
___


Re: [NTG-context] status of node.write

2010-03-24 Thread Michail Vidiassov

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
___


[NTG-context] MAPS - free PDF version

2010-03-24 Thread Michail Vidiassov

Dear All,

what is the current policy of NTG regarding Subj.?
The links to 2008 issues of MAPS (36 and 37) result in
The PDF version of this document will be
available one year after the paper version.
In 2010 that message is somewhat confusing.

   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
___


Re: [NTG-context] status of node.write

2010-03-24 Thread Michail Vidiassov
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
___


[NTG-context] luatex pdf.immediateobj(streamfile error on Mac OS X Intel 64

2010-03-22 Thread Michail Vidiassov

Dear All,

I am running Mac OS X 10.6.2, latest minimals
luatex is beta-0.52.0-2010031913, Mach-O 64-bit executable x86_64

the fillowing file test.tex fails to compile with context test.tex

\nopdfcompression
\startluacode
local attr = lpdf.dictionary {}
pdf.immediateobj(streamfile,test.tex,attr())
-- pdf.immediateobj(stream,test.tex,attr())
\stopluacode
\starttext
\startTEXpage
Test.
\stopTEXpage
\stoptext

complaining

MTXrun | fatal error: no return code, message: luatex: execution interrupted

and producing PDF file test.pdf where, it seems, luatex has problems
with file size. PDF file starts as follows (note empty Length)
%PDF-1.6
some binary data
9 0 obj 

/Length



stream
\nopdfcompression
\startluacode
local attr = lpdf.dictionary {}
pdf.immediateobj(streamfile,test.tex,attr())
-- pdf.immediateobj(stream,test.tex,attr())
\stopluacode
\starttext
\startTEXpage
Test.
\stopTEXpage
\stoptext
binary garbage
binary garbage
...

The latest minimals under Mac OS X 10.5.8 running on PPC
(luatex beta-0.52.0-2010031913, Mach-o executable ppc)
have no such problem.

Please, test it on your system. Does it work for you?
Is something broken in my setup or we are to complain to 
developers/builders/investigate luatex workings ourselves?


Sincerely, Michail

PS. If I uncomment pdf.immediateobj(stream, and comment
pdf.immediateobj(streamfile, things do work.
PPS. The code above is a minimal test case, I am really revisiting
 3D annotations.
___
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
___


Re: [NTG-context] luatex pdf.immediateobj(streamfile error on Mac OS X Intel 64

2010-03-22 Thread Michail Vidiassov



On Mon, 22 Mar 2010, Taco Hoekwater wrote:


Anway, it runs ok here with rev. 3535 on linux 32. Don't have
access to a 64-bit machine right now.


latest minimals 
Debian 5.0.4, Linux debian 2.6.2-2-amd64

luatex beta-0.52.0-2010031622 ELF 64-bit LSB executable, x86-64, dynamically 
linked for GNU/Linux 2.6.4

Runs OK.



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


[NTG-context] including movies broken?

2010-03-18 Thread Michail Vidiassov

Dear All,

it seems including movies does not work:

\starttext
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth, 
height=.7\textwidth, label=demo]}
\stoptext

processed with context test_mov.tex results in

! LuaTeX error 
...text/tex/texmf-context/tex/context/base/grph-inc.lua:810: bad argument #4 to 'format' (string expected, got nil)


under latest Minimals (Mac OS X 10.6).

Did end-user interface change or we are (as so often) are in the middle of 
some integral migration from used to work somehow to it is done the right way finally

via the best way to test is to release?

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
___


Re: [NTG-context] U3D inclusion

2010-01-24 Thread Michail Vidiassov

Dear gummybears,

On Sat, 23 Jan 2010, gummybears wrote:


For anyone interested, the 3d file was produced with Asymptote 1.91 
(http://asymptote.sourceforge.net/)


May you provide asy, png, prc and pdf (both ConTeXt and Asymptote-LaTeX 
versions)?

   Sincerely, Michail
PS. That was me who was to test that u3d/prc incusion code...

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


[NTG-context] first-setup mtxrun error on Intel Mac

2009-10-18 Thread Michail Vidiassov

Dear All,

I run Mac OS X 10.6 (Intel)
running first-setup.sh (in empty dir, if that matters)
results in
/Users/master/context.new/bin/mtxrun:5416: attempt to index global 'tex' (a nil 
value)

Any ideas?


  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
___


Re: [NTG-context] Cambria integral operator

2009-10-15 Thread Michail Vidiassov

Dear Taco,

On Thu, 15 Oct 2009, Taco Hoekwater wrote:


I have been playing around a bit with the new ConTeXt Minimals and
especially Cambria Math. I couldn't figure out, however, why the
integral operator always comes out at about half the size of \sum or
\prod.

No, that is clearly not right. I will investigate and report back.


This looks like another font bug, but it is one that maybe needs
patching in the mkiv core.
Hans, Aditya, WDYT?


While you are at it, may you take a second look at the integral limits 
placement, as it was already reported in


http://www.mail-archive.com/ntg-context@ntg.nl/msg39749.html


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
___


Re: [NTG-context] Multi-line labels in MetaPost

2009-08-22 Thread Michail Vidiassov

Dear All,


I have fixed this by using:

label.rt(textext(\framed[frame=off,align=right]{One\\Two}),origin);



And what about proper tables there?
Replacing One\\Two in the above code with
$ \startmathmatrix \NC 1 \NC 1 \NR \NC 1 \NC  1 \NR \stopmathmatrix $
or
\starttable{|cm|cm|} \NC 1 \NC 1 \NC \NR \NC 1 \NC 1 \NC \NR \stoptable
does not work for me.
It complains about dotripletestemptyx,
but that seems to be some low level utility code and the error messages 
say nothing to me :(


ConTeXt  ver: 2009.08.14 10:48 MKIV

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Integration limits with Cambria Math

2009-08-17 Thread Michail Vidiassov

Dear All,

On Mon, 17 Aug 2009, Taco Hoekwater wrote:

While the space after the inlined subscripts does look excessive, it
faithfully matches the font's MATH table: the integrals in cambria math
have a massive italic correction even though they fit in their bounding
boxes quite nicely.



Maybe Word has a workaround for that, but at first glance it looks to
me like there is nothing we can do except complain to Microsoft.


We as the developers, who do not consider non-general solutions, or
we as end-users, who can use non-kosher tricks and workarounds
(negative kerns and the like) to suit their limited private needs?

BTW, is there an ear in Microsoft open to such complaints?

 Sincerely, Michail

I get too much space between the integral sign and limits of
integration.
Is it a bug? Are there fixes/workarounds?

I think that the space is also excessive with context version 2009.07.17
and luatex -0.42.0-2009071807

I am attaching the output of

\usetypescript[cambria]
\setupbodyfont[cambria]

\starttext

\startTEXpage
$\displaystyle \int_a^b \int\limits_a^b$
\stopTEXpage

\stoptext

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] hdotsfor replacement

2009-08-17 Thread Michail Vidiassov

Dear Aditya and All,

On Sun, 16 Aug 2009, Aditya Mahajan wrote:


is there a replacement of hdotsfor from LaTeX to fill
several cells in a matrix row with one long series of dots?


Not that I know of. Currently, you can manually do this using TeX primitives.

\startformula
 \startmathmatrix
   \NC a \NC b \NC c \NR
   \NC \spanomit\spanomit{\dotfill} \NR
   \NC e \NC d \NC adlsadjsak \NR
 \stopmathmatrix
 \startmathmatrix
   \NC a \NC b \NC c \NR
   \NC 45 \NC \omit\spanomit{\dotfill} \NR
   \NC e \NC d \NC adlsadjsak \NR
 \stopmathmatrix
\stopformula


\multispan{num}{\dotfill} may be an alternative for 
\omit\spanomit\spanomit\..., but half of the white space

separating columns has to be added before dots in any case.
How to do get that amount?
In the above examples dots appear to be shifted to the left
from the desired position.
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Integration limits with Cambria Math

2009-08-16 Thread Michail Vidiassov

Dear Taco,

On Sun, 16 Aug 2009, Taco Hoekwater wrote:

I get too much space between the integral sign and limits of integration.
Is it a bug? Are there fixes/workarounds?


Do you recall whether this was ok earlier?


 I did not use integral with limits before, I am new in ConTeXt land.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] hdotsfor replacement

2009-08-16 Thread Michail Vidiassov

Dear All,

is there a replacement of hdotsfor from LaTeX to fill
several cells in a matrix row with one long series of dots?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] leqslant for Cambria Math

2009-08-12 Thread Michail Vidiassov

Dear All,

using Cambria + Cambria Math (\usetypescript[cambria] \setupbodyfont[cambria])
makes Unicode math input and typesetting instantly possible
(great for a newbie, even if not FSF-kosher) -
but for missing glyphs for leqslant\geqslant.

What is the right way to fix or work around such problems?
(Complaining to MS does not count).

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] leqslant for Cambria Math

2009-08-12 Thread Michail Vidiassov

Dear All,

On Wed, 12 Aug 2009, Aditya Mahajan wrote:


using Cambria + Cambria Math
makes Unicode math input and typesetting instantly possible
but for missing glyphs for leqslant\geqslant.


There is not much that we can do when the glyph is missing from the font. In 
principle, we can create a fallback, but creating fallbacks for each and 
every missing glyph is not really an option.


Not an option - it impplies that there are many Unicode math fonts,
so one can not make workarounds for their individual glitches, but there 
is only one quality Unicode Math font - Cambria Math, one collaborative
playground development version - Asana-Math and, soon to be released (for years), 
STIX Fonts.

Or so I get it form a casual glance. Am I wrong?

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] support for SUBSCRIPT THREE etc. ?

2009-07-21 Thread Michail Vidiassov

Dear Hans and All,

On Tue, 21 Jul 2009, Hans Hagen wrote:


Superscript works well, but not the subscript:

\starttext
x³ x₃
\stoptext

Unicode sub/superscripts aren't real sub/superscripts, and there use is
discouraged. Most fonts will align those subscript glyphs to the base
line not bellow it, and apparently LM fonts don't have them.


In MKIV one could theoretically fix the (virtual) font with subscript
three containing \sub{3} *** or lowered superscript 3 :)


it's also font dependent and we would en dup with fallback mess etc etc

if the font has the glyph, you can use the unicode char, bu tit is 
unlikely that there will be a mapping mechanism


What about an analog of ucs LaTeX package,
when Unicode math subscripts (and other symbols) in TeX file are replaced
by \sub{3} etc., regardless of the font used for typesetting?

It will give WYSIWYG-like appearance of the input file on the screen
in the editor using Unicode font and will not bring the mess deep into 
ConTeXt?


Is such thing doable?
(Not making a set of mappings for presonal use, but proper package
for public consumption?)

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] 3D PDF support (AKA asymptote support)

2009-06-06 Thread Michail Vidiassov

Dear Hans,

On Fri, 5 Jun 2009, Hans Hagen wrote:


a draft for an analog of LaTeX movie15 package for including Adobe Reader
compatible 3d models into PDF files is at


i'll have a look at it next week; the interface needs some more thinking from 
my side; in principle we should not use externalfigure here but the rendering 
mechanism


BTW, the mechanism ConTeXt uses to include movies (it served me as a 
starting point) is described in part 13.4 Movies of PDF 32000-1:2008 
ISO/Adobe spec, but preceded there with the following note:

 The features described in this sub-clause are obsolescent and their use
 is no longer recommended.
 They are superseded by the general multimedia framework described in
 13.2, “Multimedia.”

Thus even more thinking may be desirable...

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] 3D PDF support (AKA asymptote support)

2009-06-05 Thread Michail Vidiassov
Dear Hans, Mojca and All,

a draft for an analog of LaTeX movie15 package for including Adobe Reader
compatible 3d models into PDF files is at

http://www.iaas.msu.ru/tmp/movie15context.tgz .

Almost no docs/comments inside, but questions are of course welcome.

You'd better take a brief look at part 5.2 of movie15 docs

http://www.ctan.org/tex-archive/macros/latex/contrib/movie15/doc/movie15.pdf

and part 13.6 of ISO/Adobe PDF spec

http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf

to understand what are the settings.

Since I lack understanding of ConTeXt/luatex combo and have to pass data
for dictionaries containing other dictionaries to 3D model embedder I had
to abuse two existing parameters, control and display and rely on sane
lua code being put there.
And even the limited parameter correctness checks do not report problems,
they just silently fail to execute.

One more option to deal with 3D models is not to embed them as annotations
in the main PDF file, but to make a PDF with only 3D model in it and
attach it to the main PDF, linking to a clickable 2D image (like
attachfile2 LaTeX package). Donno if that functionality is in working
condition now and how to use it.

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] 3D PDF support (AKA asymptote support)

2009-06-05 Thread Michail Vidiassov

Dear Luigi,

On Fri, 5 Jun 2009, luigi scarso wrote:


  a draft for an analog of LaTeX movie15 package for including Adobe Reader
  compatible 3d models into PDF files is at

hi michael
some time ago Renaud Aubin discover
http://meshlab.sourceforge.net/
2008-11-22 19:132008-11-22 18:13 +100UTC
Re: [NTG-context] embedding 3d pdf


Sorry, I fail to understand your comment.

On one hand, MeshLab can convert from other 3D formats to U3D (older Adobe 
format) and embed U3D into PDF files via LaTeX with movie15 package, thus
it may be useful in 3D PDF workflow in general, on the other hand it does 
not have anything to do with ConTeXt.


As to the module Renaud Aubin wrote to support 3D annotations - it is 
mkii thing, for example it uses definefileinsertion that did not find 
its way into mkiv IMHO.


While MeshLab may be of great use if you have to convert old data or 
process output from some existing tool, in cases when you make your model 
from scratch by hand or create 3D model file in your own program Asymptote 
may be a better choice since it supports newer PRC 3D format, that is much 
richer in features and has better prospects when it comes to support and 
development by Adobe. On the minus side Asymptote is under active 
development and some of its advantages are not there yet - but so is 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] 3D PDF support (AKA asymptote support)

2009-06-05 Thread Michail Vidiassov

Dear Renaud,

On Fri, 5 Jun 2009, Renaud Aubin wrote:

Asymptote may be a better choice since it supports newer PRC 3D 
format, that is much richer in features and has better prospects when 
it comes to support and development by Adobe.
Ouch, another new 3D format! This will never end. I bet no valuable Open 
Source modeler (i.e. blender) support this one. The fact that asy 
supports PRC is good but I have no illusion about the conclusion of the 
3d formats' war (just an endless pain for developpers)...


IMHO the major difference is that Adobe Reader is a 3D viewer with quite a 
userbase and lots of support resources behind. While the failure of 3D 
community to accept U3D as 3D JPEG is deplorable, PRC prospects in Adobe 
seem bright - they have bought the format together with the authors, make 
noises about submitting it to ISO, released documentation...


From my experience of work with U3D, writing an exporter turned out to be 
not that difficult, since for U3D there is VRML-like intermediate text 
format, but figuring out what are the limitations of Adobe viewer takes a 
lot of time.


I do not remember if that applies to Blender, but googling showed me that
in 2006-2007 people asked questions in lists/forums of 3D software 
pieces about 3D PDF output, but neither users were interested, nor 
developers excited.


   Sincrely, 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] 3D PDF support (AKA asymptote support)

2009-06-05 Thread Michail Vidiassov

Dear Luigi,

On Fri, 5 Jun 2009, luigi scarso wrote:


Asymptote may be a better choice since it supports newer PRC 3D 
format



Ouch, another new 3D format! This will never end. I bet no valuable Open Source 
modeler (i.e. blender) support this one. The fact that asy
supports PRC is good but I have no illusion about the conclusion of the 3d 
formats' war (just an endless pain for developpers)...

Asymptote has a prc dir
 asymptote-1.75/prc
maybe can be a lib too..


To say the truth Adobe Acrobat SDK has PRC API in it, but it is 
Windows-only, goes for big-$$$ and for that is Not licensed to run in a 
batch or server mode.


As to the role of Adobe in 3D formats war - it reminds me of a quote 
attributed to a North Vietnamese general: You Americans have fast 
choppers and jeeps, so you can rapidly move troops to the point of 
engagemment. But we are _already_ there!. The installed base of Adobe 
Readers may be a new factor in that endless Tweedle D.* free-for-all ;)


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] asymptote support

2009-06-03 Thread Michail Vidiassov
Dear Hans,
I wrote

I have developed code to create 3D annotations some months ago
(to do what movie15 does in LaTeX), but now (latest beta) it does not work.
Since movie inclusion I have used as a base is also broken
(
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth,
height=.7\textwidth, label=demo]}
fails to work
)
I did not investigate the issue in depth yet.
What is the state of affairs?
Why is movie inclusion broken now?

You replied:

 fixed

In what beta?
Beta in minimals this morning did not produce error reports at contest
movietest.tex stage, as it was before, but produced a small pdf file that
did not include the movie.

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] asymptote support

2009-06-03 Thread Michail Vidiassov

Dear Hans,

On Wed, 3 Jun 2009, Hans Hagen wrote:

Since movie inclusion I have used as a base is also broken
fixed

Beta in minimals this morning ...
did not include the movie.


well, i get the movie here; did you specify the width and height?


Sorry, tested with Apple viewer, Adobe Reader shows movie OK.

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] asymptote support

2009-06-02 Thread Michail Vidiassov

Dear Mojca and All,

the unique feature of Asymptote is 3D PDF.
I have developed code to create 3D annotations some months ago
(to do what movie15 does in LaTeX), but now (latest beta) it does not work.
Since movie inclusion I have used as a base is also broken
(
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth, height=.7\textwidth, label=demo]} 
fails to work

)
i did not investigate the issue in depth yet.
What is the state of affairs?
Why is movie inclusion broken now?

Another option is attaching a 3D PDF file to the main PDF (someting like 
attachfile2 in LaTeX). Is this functionality OK now? How to use it?


  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] asymptote support

2009-06-02 Thread Michail Vidiassov

 Dear Mojca,

 On Tue, 2 Jun 2009, Mojca Miklavec wrote:


It will help a lot if you could post a link to some file to be
included, so that Hans has something to play with in hand.


 http://www.navone.org/Media/Movies/AlienSong_mp4.mov


   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Producing dvi

2009-04-19 Thread Michail Vidiassov

Dear All,

is it possible to produce dvi in mkiv?
What is the command line?
Are there limitations (like no opentype, no unicode math)?

DVI has to be fit for dvips use.

The reason for my question - Asymptote vector drawing tool
sets labels by processing PS output of LaTeX and relies on the PS
being made by dvips.

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Producing dvi

2009-04-19 Thread Michail Vidiassov

Dear Hans,

On Sun, 19 Apr 2009, Hans Hagen wrote:


is it possible to produce dvi in mkiv?
DVI has to be fit for dvips use.

The reason for my question - Asymptote vector drawing tool
sets labels by processing PS output of LaTeX and relies on the PS
being made by dvips.


you can produce dvi when you force the pdfoutput mode but you will probably 
get errors reported


best convert that ps to pdf than and include the pdf


No, no, no!
I have been misunderstood!

The problem is not how to include Asymptote output into ConTeXt.
If it is 2D - then it is just normal PDF, that can be included as usual.
If it is 3D - I have the code, modeled after movie inclusion (thanks Hans,
you fixed it when I have mentioned that it was broken in mkiv).

What I am talking about now is how to typeset labels within Asymptote by 
ConTeXt.
Asymptote takes label text, wraps it into a minimal document and feeds to 
a TeX engine, gets DVI, processes it with dvips, redefines some PS 
commands (here it relies on the dvips specifics) so that the information
on the resulting path is being printed and runs the PS file through 
ghostscript. Thus Asymptote gets the information of the curves the label
consists of. So if it is possible to feed ConTeXt output to dvips, than 
it'll be easy to adopt Asymptote to use ConTeXt.


If mkiv does not produce dvi (now? never will? not intended to?),
what about mkii?

   Sincerely, Michail

PS. The black side of mirgation from another system - you are both a 
novice and need to setup/modify your new tool in unevident ways to

translate your existing work into new terms...
You barely drive but need to fit that trusty Gatling on the car's roof :(
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Producing dvi

2009-04-19 Thread Michail Vidiassov

Dear Hans,

On Sun, 19 Apr 2009, Hans Hagen wrote:


If mkiv does not produce dvi (now? never will? not intended to?),
what about mkii?


sure, mkii can produce dvi for several drivers


And what about the first part of the question?
The (negative?) answer is implied in your other post,
but what is the official position (if any)?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Producing dvi

2009-04-19 Thread Michail Vidiassov

Dear Mojca,

On Sun, 19 Apr 2009, Mojca Miklavec wrote:


If Asymptote is not able to handle PDF files, maybe Asymptote itself
would need extensions. (When I last tried to use Asymptote I gave up
since I was not able to figure out how to install it and started using
other tools.)


This (installation problems) is part of the question why typesetting in 
Asymptote with ConTeXt is desirable - no need to maintain separate LaTeX 
installation, avoiding mixup with older version of ConTeXt that comes with 
it, etc.


And at this moment Asymptote is (almost) the only tool that makes 3D PDF
directly (without  Windows-only converter like Acrobat), is 
Metapost-like and not some CAD monster or VRML fossil.



If you would like asymptote to handle ConTeXt labels you should start
with mkii. But honestly: I don't really see when LaTeX for typesetting
labels would not suffice. ConTeXt is extremely good at page
formatting, but when it comes to typeset $A$ for point labels, I
would not mind using LaTeX (If it's only about OpenType you cannot do
anything unless Asymptote gets extended, but even then you could use
XeTeX.)


Apart from maintenance problems with the zoo of tools, Asymptote aspires
for high quality of labels (and has invested considerable effort to 
preserve it in 3D mode), that implies that labels are to be in the

same font as the main text and/or follow some predetermined style.
That requirement is not easy to follow consistently if different tools are 
used to typeset body of the article and labels on pics.

http://tug.org/pracjourn/2005-1/levine/levine.pdf


But as far as I know, if the only critical step is conversion of font
outlines into curves, gs is able to read PDF files as well. I see no
reason why one would require PS unless one uses very basic techniques
for document manipulation (it's a bit easier to parse and work with PS
than it is to work with PDF, but when it's done inside a bigger
project it probably pays off to support both; I guess that the
overhead should not be that big).


As a side note - PS is a programming language very well suited for just 
this kind of problems. ;)


 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Producing EPDF

2009-04-19 Thread Michail Vidiassov

Dear All,

is it possible to and howdoi produce EPDF (in mkiv if it matters).
By EPDF I mean EPS like PDF, pagesize == bounding box of what is really 
printed with minimal or no white border.


Reason to do that - produce with ConTeXt one-two line short labels for 
another program (Asymptote).


  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Producing dvi

2009-04-19 Thread Michail Vidiassov

Dear Mojca and All,

On Sun, 19 Apr 2009, Mojca Miklavec wrote:


(When I last tried to use Asymptote I gave up
since I was not able to figure out how to install it and started using
other tools.)



It would be really nice if someone would be ready to spend time to
include asymptote in TeX Live. That would make installation thousand
times easier.


There seems to be a feud between grand wizzards of Asymptote and TeXLive

http://groups.google.com/group/comp.text.tex/browse_thread/thread/37143f0885a4d884?hl=en#

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] PDF ExtensionLevel

2009-03-24 Thread Michail Vidiassov
Dear All,

Is there any way in ConTeXt to set PDF ExtensionLevel, as per

http://www.adobe.com/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf

and like

%PDF 1.7
/Type /Catalog
  /Extensions
/ADBE
/BaseVersion /1.7
  /ExtensionLevel 3




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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] font-win.tex

2009-03-10 Thread Michail Vidiassov
Dear Taco and All,

Taco Hoekwater wrote:
 type-mac for Mac OS (are .dfont fonts working in LuaTeX 0.40).

 That would be nice, but I am not sure I will get around to implementing
 it (besides time constraints, it is never easy to develop for a platform
 one doesn't actually have).

BTW, how the multiplatformity is handled now?

Is there a regular multiplatform build farm?

Do developers use remote access to computers with platforms
they do not have at home (if no - due to lack of hardware or interest)?

And what are the platforms blessed to be owned by developers?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] My printer vs. Times New Roman

2009-03-09 Thread Michail Vidiassov

Dear Vyatcheslav,

On Tue, 10 Mar 2009, Vyatcheslav Yatskovsky wrote:

I have Samsung ML-1615 laser printer. When I print an MS Word document 
typesetted in Times New Roman, the printer uses internal (hardware) font 
resource, and hardcopy is very smooth and nice. When I print a pdf generated 
by ConTexT, the same font becomes rasterized and looks a bit ragged on a 
paper.


IMHO Samsung ML-1615 is a GDI printer, that relies on PC CPU to do most of 
the work. Thus the printer is unlikely to have any hardware fonts.


There may be settings in your PDF viewer to enable/disable the use of 
local fonts and something like print text as graphics - you may play 
with them. But in general PDF document/PDF viewer/Windows GDI printer driver 
combo may or may not work depending on the astrological conditions.


/* Offtopic
 Is go and get a PostScript 3 printer or use GhostScript, both are dirt cheap
 an answer backed by the collective wisdom of ConTeXt/LuaTeX/pdfTeX users? 
*/


  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MinionPro problems

2009-02-27 Thread Michail Vidiassov

Dear All,

I have a comment only on a minor issue and just warning, not error:

On Fri, 27 Feb 2009, Vyatcheslav Yatskovsky wrote:


Does somebody know what the following means? (Was working a few monthes ago)
load otf | warning: The glyph named mu is mapped to U+00B5.
But its name indicates it should be mapped to U+03BC.
load otf | warning: The glyph named Delta is mapped to U+2206.
But its name indicates it should be mapped to U+0394.
load otf | warning: The glyph named Omega is mapped to U+2126.
But its name indicates it should be mapped to U+03A9.


the warnings seem to be related to an old semi-fixed Adobe bug of 
incorrect mapping from glyph names to unicode

INCREMENT, OHM SIGN and MICRO SIGN instead of greek characters.
It still lurks in many mapping tables.

The bug also bits ConTeXt directly - already reported here but not 
considered fix-worthy. (May be worth reconsidering, hey authors!).


http://www.ntg.nl/pipermail/ntg-context/2008/031562.html

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Unicode Math - what it is

2009-02-13 Thread Michail Vidiassov

Dear All,

sorry for a stupid question, the unicode math that is about to come
means formula input using Unicode Math instead of tex commands as 
suggested in

Unicode Nearly Plain-Text Encoding of Mathematics

http://www.unicode.org/notes/tn28/UTN28-PlainTextMath-v2.pdf

or use of the Unicode fonts with math ranges in rendering
the result?
BTW, what are the options for getting a unicode math font?
Taking one from MS Office 2007? Waiting for Stix fonts (what happened yo 
them, there seems to be a delay fir yunpublihrt reason.?


 Sincerely, Nichail
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unicode Math - what it is

2009-02-13 Thread Michail Vidiassov
Dear Mojca and All,

 sorry for a stupid question, the unicode math that is about to come
 means formula input using Unicode Math instead of tex commands as
 suggested in Unicode Nearly Plain-Text Encoding of Mathematics

 The answer to your question might as well be a tiny bit of yes because
 I'm not sure what exactly you are asking. The side effect of this
 transition is also that you should be able to use mathematical greek
 italic alpha instead of \alpha or α, or mathematical italic letter a
 instead of just plain $a$, but I doubt that any sane user would want to do
 that by typing those characters directly with a keyboard.

 I have an impression that the document (even thoug the page is not
 accessible) is about the way to input math in Word. Is there any feature in
 TeX (input) that you are missing?

Alternative URL is
http://www.activemath.org/workshops/MathUI/07/proceedings/Sargent-TwoSyntaxes-MathUI07.pdf

And the system described is that tiny bit of yes on steroids -
not only variables, but also operators, like using the unicode N-ARY
SUMMATION instead of \sum

As to the user sanity - inconvenient input may be balanced by easy reading -
if formulae get very long math symbols come convenient.
And no need to give up typing in favour of mousing things out of glyph
tables - replace on input or search-and-replace on command are in almost
any editor nowdays, to say nothing of sed.

 BTW, what are the options for getting a unicode math font?
 Taking one from MS Office 2007? Waiting for Stix fonts

 Stix is not (and probably will not be) supported
Are there any information about their plans to release anything?
They promised to make fonts proper after beta release, but later
turned silent.
 You can already use Cambria Math or Asana Math in mkiv with the
 non-released LuaTeX with ConTeXt beta from Pragma.
How? What are the typescripts?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] embedding 3d pdf

2009-01-01 Thread Michail Vidiassov

Dear All,

I am slowly implementing Subj. for mkiv + luatex combo and it already kinda 
works..
Is there anyone on the list now interested in testing/using it?

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] PDF Attachments

2008-12-25 Thread Michail Vidiassov

Dear All,

I agree, it should be documented better. I figured the usage from the 
source and trial and error.


i wrote it when it was just available bug bugged in the viewer so it never 
made it into some myway since i never used it except from demos


is the functionality supposed to work in MKIV now?

   Sincerely, Michail
PS. I have cut-n-pased from the wiki page, but have got no result.

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Does ConTeXt really support russian language?

2008-12-25 Thread Michail Vidiassov

Dear Andrey and All,

On Thu, 25 Dec 2008, Andrey Riabushenko wrote:


Works on ConTeXt Minimals, but does not work on TeX Live 2008 and teTeX 3.0.

In there a solution that will work on every of three distributions?


teTeX is abandoned by te and is considered obsolete, is not it?
Is really teTeX compatibility desired or required anywhere?

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] calling a function with complex parameters

2008-12-07 Thread Michail Vidiassov
Dear All,

I need to fill a lua table with data, and some values may be tables.
How to supply that data from ConTeXt?
The most straightforward way is to make user fill a string with lua code 
of table initiaiser and then use loadstring.
In this case the syntax is laconic, but resilence in case of errors is zero.
The other way is to have the user to call series of functions, building 
the complex structure from ground up by making basic stuctures and adding 
them to final structure one by one. In this case the passed parameters can 
be scrutinized for correctness, but multiple calls like addsmthtosmth, 
setsmthinsmth will make the result uneasy to read, to say nothing of 
writing.

What is considered kosher in ConTeXt?
Where can I found examples?

Sincerely, Michail
PS. data that has to be passed to function will look like (example is not lua):
--
name = 3D surface;
toolbar = TRUE; // display 3D toolbar
tree = TRUE;// display model tree
views = (
 {
 name = DefaultView;   // first view (default)
 projection = {
 perspective  = TRUE;// Perspective projection
 aac = 2.5;  // View angle
 };
 camera = {  // Camera position, see movie15 manual 
for explaination
 coo = [ 0, 0, 0 ];  // Center of orbit - where the camera 
are pointed to
 c2c = [ 0, 0, 1 ];  // vector from coo directed to camera
 rot = [40, 0,60 ];  // rotatations of vector from coo 
directed to camera around Ox, Oy, Oz
 roo = 50;   // distance from coo to camera
 roll = 0;   // camera rotation angle
 };
 bg = [ 1.0, 1.0, 1.0 ]; // Background color
 lights = CAD; // Lighting scheme
 nodes = ( ( xlabel, 1.0, TRUE ), ( ylabel, 1.0, TRUE ), (Small 
box, 1.0, TRUE) );
 },
 {
 name = CrossView; // view with a crossection
 projection = {
 perspective  = TRUE;// Perspective projection
 aac = 2.5;  // View angle
 };
 camera = {  // Camera position, see movie15 manual 
for explaination
 coo = [ 0, 0, 0 ];  // Center of orbit - where the camera 
are pointed to
 c2c = [-1,-1, 0 ];  // vector from coo directed to camera
 roo = 50;   // distance from coo to camera
 roll = 0;   // camera rotation angle
 crossection = {
 point  = [  0,  0,  0 ];
 normal = [ -1, -1, -1 ];
 intersection = TRUE;
 transparent  = FALSE;
 };
 bg = [ 1.0, 1.0, 1.0 ]; // Background color
 lights = CAD; // Lighting scheme
 nodes = ( ( xlabel, 1.0, TRUE ), ( ylabel, 1.0, TRUE ), (Small 
box, 1.0, TRUE) );
 }
}
--

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] can not include movie AKA embedding 3d pdf

2008-12-06 Thread Michail Vidiassov
Dear Hans,

On Mon, 1 Dec 2008, Hans Hagen wrote:

 i uploaded an alpha zip which has mov inclusion working
 Where to?

 website

Sorry for stupid question :(
That inclusion does really work but for a minor problem -
label parameter is ignored and the label (or name as it is displayed
by the Reader - that is what in the T key of movie annotation dictionary)
is always set to dummy.

To reproduce - context the following

\pdfcompresslevel=0
\pdfminorversion=7
\starttext
\placefigure[here]{none}{\externalfigure[nonexistentfile.mov][label=mylabel,width=0.7\textwidth,
 height=.7\textwidth]}
\stoptext

and look into pdf with text/binary editor or open it in Adobe Reader.

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Optical scaling

2008-12-03 Thread Michail Vidiassov
Dear All,

among advertised advantages of TeX there used to be optical scaling,
when text in the same font but in different sizes has different shapes of
glyphs. That used to be the feature of metafont fonts and derived
PostScript ones (like cm-super).

But it seems now, with TeX Gyre becoming the default free fonts set, it
seems the idea is dropped. Is it really so or one just needs some
commercial OpenType font family to use it (Adobe Opticals)?

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Optical scaling

2008-12-03 Thread Michail Vidiassov
Dear All,

On Wed, 3 Dec 2008, Idris Samawi Hamid wrote:

 That used to be the feature of metafont fonts and derived
 PostScript ones (like cm-super).

 Or Latin Modern, also derived from the meta sources.

 But it seems now, with TeX Gyre becoming the default free fonts set, it
 seems the idea is dropped.

 LM is default, and is fully optically scaled

But lacks cyrillic.
Is there any mkiv-style support for cm-super?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] can not include movie AKA embedding 3d pdf

2008-11-30 Thread Michail Vidiassov
Dear Hans,

On Sun, 30 Nov 2008, Hans Hagen wrote:

 i uploaded an alpha zip which has mov inclusion working
Where to?

 Is there any way in luatex/context to include a pdf file with annotations
 (without losing them). Not necessary embedding it into a page, but also as

 currently not, at some point the img code will give access to the pdf to
 be included and then i can write an annotation merge routine (slightly
 tricky since we don't want clashes)

Is merging annotations necessary when FileAttachment annotations 
and/or Reference XObjects are used
as in attachfile, attachfile2 or embedfile LaTeX packages?

  The PDF format allows the inclusion of les inside the PDF document.
  The included files can be bound to an annotation on a page. Or they can be 
recorded
  in a sorted list of embedded les. The packages attachle or attachle2 follow 
the
  first approach, package embedle uses the latter method.

To see them in action,
for an example, try page 194 (and the following pages) of

http://www.math.ualberta.ca/~bowman/m117/m117.pdf

I seems whole PDF files with 3D in them have been put into streams
unchanged and are opened in a separate window if user clicks so.

Remember, 3D are annotations.

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] embedding 3d pdf

2008-11-28 Thread Michail Vidiassov
Dear Luigi and All,

On Wed, 26 Nov 2008, luigi scarso wrote:

   Renaud Aubin wrote:
See http://www.nibua-r.org/ConTeXt/devel/
 
 while the macros there are a great improvement from
 what was posted on the list and look extandable for my purposes
 the other question remains - does it make sense to try to implement
 3d model embedding in proper way for public use now or the underlying
 luatex/context part has not been developed/updated yet?
 
 BTW, If you are able to make some samples with context mkiv, please do them 
 and then wikifi it.
 Something is better than nothing .

Renaud's u3d inclusion macros seem to be modeled after mov inclusion.
But including movies does not work for me in minimals (see my post on that).

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] can not include movie

2008-11-28 Thread Michail Vidiassov
Dear Hans and All,

you wrote:

 ConTeXt user manual says movies are just like figures,
 but when I process
 works ok in pdftex

 \placefigure
 [here]
 {none}
 {\externalfigure[texwork.mov][width=0.7\textwidth,
 height=.7\textwidth,label=demo,preview=yes]}

 in luatex i simply didn't implement it yet (will do it soon)

Am I correct to assume that the default engine in minimals is luatex?

On the other hand, I do not need movies, I am looking for code that
makes PDF annotation to handle particular file type of externalfigure.
And current movie inclusion code is marked as buggy and using obsolete pdf
features in commets anyway.

But where to look for luatex-related code to use as an example and
starting point for u3d handling?

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] can not include movie AKA embedding 3d pdf

2008-11-28 Thread Michail Vidiassov
Dear Hans and All,

On Fri, 28 Nov 2008, Hans Hagen wrote:

 But where to look for luatex-related code to use as an example and
 starting point for u3d handling?

 not there; maybe next year

And also concerning mov including he wrote

 in luatex i simply didn't implement it yet (will do it soon)

Is the function backends.pdf.insertmovie in core-inc.lua a part of 
unfinished effort or simply broken or dead-end?

On the other hand, if there is no way now to create 3D annotation for
u3d externalfigure in luatex/context combination, then another way is to 
include a pdf file with 3d annotation.

Is there any way in luatex/context to include a pdf file with annotations
(without losing them). Not necessary embedding it into a page, but also as 
a separate page, embedded file stream opening in a separate window, a 
reference to a separate file with a relative path - anything less ugly 
than an URL to some web location.

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] can not include movie

2008-11-27 Thread Michail Vidiassov
Dear All,

ConTeXt user manual says movies are just like figures,
but when I process

\starttext
\placefigure[here]{none}{\externalfigure[demo.mov][width=0.7\textwidth, 
height=.7\textwidth, label=demo, preview=yes]}
\stoptext

with

context filename.tex

using the latest minimals without any custom settings
I do not get movie included.

What can be wrong?
I am a ConTeXt newbie and fail to see any possible place for errors in the 
above test case.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] embedding 3d pdf

2008-11-26 Thread Michail Vidiassov
Dear All,

Renaud Aubin wrote:
 See http://www.nibua-r.org/ConTeXt/devel/

while the macros there are a great improvement from
what was posted on the list and look extandable for my purposes
(thanks, Renaud),
the other question remains - does it make sense to try to implement
3d model embedding in proper way for public use now or the underlying
luatex/context part has not been developed/updated yet?

LuaTeX roadmap promised that
Think of annotations and object management. The first code will show up
later in 2008.
Did it?
Is there a ConTeXt API to it?
Is it planned to come in some future?
Or  spec-pdf dated 1997.09.20 is what we are to live with?

  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] embedding 3d pdf

2008-11-22 Thread Michail Vidiassov
Dear All,

since ConTeXt lacks support for embedding 3D models (U3D or PRC) into PDF
(btw, is pdf annotations support in context/luatex combination fit for end-user 
or is in transition?)
I have tried to embed some 3D PDFs from
http://asymptote.sourceforge.net/gallery/3D%20graphs/
and
http://www.iaas.msu.ru/tmp/u3d/pdf/ 
using
\externalfigure[3dpf.pdf]
\startpagefigure[3dpdf.pdf]\stoppagefigure
\copypages[3dpdf.pdf][n=1]
but only the preview (flat) images show up,
not the 3D model, that must appear after clicking on it in Adobe Reader.
File size shows that the 3D annotation data was not taken from the 3D PDF 
file into ConTeXt output.

Any advice on possible workarounds? Any hope for ConTeXt fixes?

Or making a link to an external PDF file is the only option for now?

   Sincerely, Michail

PS.
I have seen the code from Renaud AUBIN in the U3D (embedded 3D objects) 
thread,
http://www.ntg.nl/pipermail/ntg-context/2006/020220.html
but it is too ugly and old a hack to start any work from.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Has anybody used asymptote without LaTeX?

2008-10-10 Thread Michail Vidiassov
Dear All,

On Fri, 10 Oct 2008, Zhichu Chen wrote:

 If I want to embed the .prc file into a pdf document, all I need to do
 is specify the correct /Subtype and mime type. That's very easy. I
 think creating 3D presentations without any commercial or mouse-
 clicking-GUI interface becomes realistic now.

No, there is more - you have to set appearance (may be empty).
And many nice things can be done via properties of the 3D object embedded 
into PDF. Consult latest PDF reference.
You may look at libharu U3D code (it handles PRC too) and my 
embedder (it needs libconfig from http://www.hyperrealm.com/libconfig/
and libharu from libharu.org) from
http://www.iaas.msu.ru/tmp/u3dembedder.tgz

   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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Has anybody used asymptote without LaTeX?

2008-09-29 Thread Michail Vidiassov
Dear All,

 And how to embed .prc files into the .pdf document?

I have made a standalone embedder some time ago,
reproducing capabilities of movie15 LeTeX package and somewhat extending them.
If anybody is interested it can be put in shipable state.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] incorrect/absent PostScript names for some greek characters

2008-05-11 Thread Michail Vidiassov
Dear Hans and All,

in char-def.lua there are no adobename for
  greekDelta AKA GREEK CAPITAL LETTER DELTA
  greekOmega AKA GREEK CAPITAL LETTER OMEGA
  greekmuAKA GREEK SMALL LETTER MU

because adobenames Delta, Omega and mu are used for
INCREMENT, OHM SIGN, textmu AKA MICRO SIGN.

While the issue is of infinitesimal and only potential significance,
may be it is worth a fix.

The problem likely comes from Adobe Glyph List
http://www.adobe.com/devnet/opentype/archives/glyphlist.txt

The sub-optimal mapping was fixed in the latest version of
Adobe Glyph List For New Fonts
http://www.adobe.com/devnet/opentype/archives/aglfn.txt
but not in the main Adobe Glyph List.
Both lists are referenced from
http://www.adobe.com/devnet/opentype/archives/glyph.html

BTW, the Adobe Glyph List also has
  increment, Ohm and mu1
that look like better candidates for
  INCREMENT, OHM SIGN, textmu AKA MICRO SIGN.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___