Re: [NTG-context] [NTG Context] Storm (Lido) font support seems to be broken in newer versions of MKII

2010-05-04 Thread Jan Pohanka
Minimal example is here and support files are attached. Original support  
can be downloaded here: http://modules.contextgarden.net/stormfontsupport



\mainlanguage[cz]
\enableregime[il2]
\useencoding[st2]
\useencoding[st3]
\usetypescriptfile[t-type-slido]
\usetypescript[Lido][st2]
\setupbodyfont[Lido,12pt]
\starttext

$$ 3 + 3 + 3 =  3^2 $$ % ok
$$ a + b + c = d $$ % incorrect font
$$ 2 \times 2 $$ % error
$$ 1 \neq 2 $$ % error


\formula[boldmath]{a^2+b^2=c^2} % don't work (not bold)

\stoptext


Jan



Dne Mon, 03 May 2010 22:09:35 +0200 Honza Pohanka xhpoha...@gmail.com  
napsal(a):



Hello,
the Storm font support by Vit Zyka is broken in actual version of MKII.  
I spoke with him, but unfortunately he uses old version and does not  
have the time for updates. I discovered that renaming the enco-*.tex  
files to enco-*.mkii solves a part of the problem, but there still  
remains an issue with math typesetting. Context does not know many  
characters (\times, \neq, ...), boldmath etc. Typescripts looks OK and I  
don't know enough to look deeper. Could anyone help?


greetings Jan





--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

___
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] tooltips and glossary

2010-05-04 Thread Marius
On Tue, May 4, 2010 at 4:40 AM, Michael Saunders odrad...@gmail.com wrote:
 Wolfgang Schuster:
 http://pragma-ade.com/general/manuals/cont-enp.pdf - page 159

 That rambling entry is like the webpage but worse.  It still doesn't
 say what arguments 2--4 do, why \infull is necesarry, or anything else
 with any clarity.  It's just another bundle of bad writing concealing
 what may be (but probably isn't) something useful.  I was thinking of
 something like GlossTeX:
 ftp://ftp.dante.de/tex-archive/support/glosstex/glosstex.pdf

Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf
- page 14

 I accept that Context has nothing built-in that's useful for making
 glossaries.  That's okay, I can come up with something on my own.  How
 about tooltips, though?  Does anyone do those with Context?
___
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] problem with package.path

2010-05-04 Thread Peter Münster
Hello,

I need to include lua-modules from different directories, but package.path
does not seem to work:

\startbuffer[test]
bla = nil
\stopbuffer
\savebuffer[test][../mytest.lua]
\starttext
\startluacode
package.path = ../?.lua;;
require(mytest)
\stopluacode
\stoptext 

Error message:
! LuaTeX error main ctx instance:3: module 'mytest' not found:

TIA for any help!
Cheer, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] problem with package.path

2010-05-04 Thread Peter Münster
On Tue, May 04 2010, Peter Münster wrote:

 package.path = ../?.lua;;

Ok, I see, the paths must be separated by colons:

package.path = path1/?.lua:path2/?.lua

But it's not very comfortable, since some of my luafiles are processed by
lua¹ *and* by context².

¹ To generate code.
² To generate documentation.


But ok, shouldn't be a too big problem... ;)

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] tooltips and glossary

2010-05-04 Thread Michael Saunders
Marius:

 Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf
 - page 14

Thanks, but that looks like it's just some extracts from cont-eni
translated from Engijsh into Engrish along with a distracting
background that makes it hard to read.  The stuff about the not very
useful abbreviation command is there again, but I'm drawn to the
section about building a dictionary that says it's not about building
a dictionary.It says:

All you have to do is inserting a \index at whatever the phrase you
want to index is, and placeing a \placeindex where you want the
glossary to be.

and then goes on to describe and index, not a glossary, which seems to
require commands that need a lot of redundant arguments.  It also
contains this gem:

Like many other ConTeXt command, users can define their own series of
indexing, which pluses the default \index series are called register.

That's the most remarkable thing I've read today.  Maybe I need to be
more clear.  A glossary is like a little dictionary in the back of a
book that defines the specialized words and phrases that the book uses
that might not be known to the general reader.  Here is a definition
of glossary:

A collection of glosses; a list with explanations of abstruse,
antiquated, dialectal, or technical terms; a partial dictionary.

(Glosses were little explanatory notes written in the margins of
medieval texts---the kind of thing I would do if Context's marginal
notes weren't incompatible with its columns.)

Ideally, I'd like a system where I could keep the entries in a bib
database or in a special .tex file.  The records would include the
headword and the gloss, and maybe a cross reference to the point in
the text that dealt with the headword definitively---the point where
the term was explained.  (A document that defines and explains the new
words and phrases it coins---imagine such a thing!)  It would be nice
if there were a command that would automatically link this point in
the text with the glossary entry.  LaTeX has several packages
(glosstex, gloss, glossary, glossaries) that do things like this.

To do this in Context, I will probably have to do it all manually,
defining a command to set an entry and then doing all the
alphabetization and cross-referencing by hand.

What I would really, really, like is to add short definitions to each
glossary record that could pop up as tooltips when the reader hovers
over an unfamiliar word.  Since there is no mechanism for glossaries
in Context, there is no mechanism to build this into, but I'm still
interested in doing it.  The idea is, I could write something like:

\gloss{strange word}{short definition}

The text would read strange word.  When you hover over it with the
cursor, a tooltip would appear saying short definition.  It would be
great if this were linked to a glossary mechanism so I wouldn't have
to keep writing the short definition---I could say something like:

\gloss{strange word}

and its short definition would be looked up automatically for the
tooltip.  The automatic reference to the word might look like this, in
the text:

\gref{strange word}

which would cause the page number at that point to be printed at the
end of the glossary entry for strange word.
___
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 gummybears
On Sun, 2 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
(context -make if memory serves me right)?
I will test with current minimals today.

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
___
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] get tex-value in lua

2010-05-04 Thread Peter Münster
Hello,

How can I get the value of a variable or a mode in the lua part?

Example:

context --arguments=MyVar=true test

And in test.tex:

\starttext
\startluacode
local my_var = loadstring(return  .. get_value_of(MyVar))
if my_var then
tex.print(TRUE)
else
tex.print(FALSE)
end
\stopluacode
\stoptext

TIA for any help!
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] get tex-value in lua

2010-05-04 Thread Peter Münster
On Tue, May 04 2010, Peter Münster wrote:

 How can I get the value of a variable or a mode in the lua part?

The solution is so simple... :

\ctxlua{userdata = userdata or {}; userdata.myvar = \env{MyVar}}
\starttext
\startluacode
if userdata.myvar then
tex.print(TRUE)
else
tex.print(FALSE)
end
\stopluacode
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] tooltips and glossary

2010-05-04 Thread Philipp Gesang
(Preliminary remark to M.S.: please, please, configure your MUA to
correctly reply to the current thread!)


Hi Michael,


I'm cc'ing you in case the list eats the attachments.

On 2010-05-04 04:44:21, Michael Saunders wrote:
 Marius:
 
  Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf
  - page 14
 
 Thanks, but that looks like it's just some extracts from cont-eni
 translated from Engijsh into Engrish along with a distracting

No, it's plain English. Unfamiliar phrases are just one consequence of a
language becoming the world standard. Do you want to flame Italians or
French for not adhering to the norms of classical Latin? You don't.
There's no point at all in even mentioning somebody's stylistic
idiosyncrasies on the internets. Just face it: the world won't adopt
English as a global means of communication without interfering with its
norms. If you don't understand something why don't you contact the
author, his email adress is right there on the first page.

 more clear.  A glossary is like a little dictionary in the back of a
 book that defines the specialized words and phrases that the book uses
 that might not be known to the general reader.  Here is a definition
 of glossary:

 Ideally, I'd like a system where I could keep the entries in a bib
 database or in a special .tex file.  The records would include the
 headword and the gloss, and maybe a cross reference to the point in
 the text that dealt with the headword definitively---the point where
 the term was explained.  (A document that defines and explains the new
 words and phrases it coins---imagine such a thing!)  It would be nice
 if there were a command that would automatically link this point in
 the text with the glossary entry.  LaTeX has several packages
 (glosstex, gloss, glossary, glossaries) that do things like this.

I append a snippet that should allow basic glossaries. It doesn't
provide much functionality (capitalization might have to be implemented
…) but you may fit it to your needs. As for the tooltips, unfortunately
I don't know how to create them. The functionality would be nice,
though, as long as no javascript is involved.

(As for the code, it's certainly not context style, I'm aware of that
but don't have the time to care.)

Awaiting your feedback,


Philipp

 To do this in Context, I will probably have to do it all manually,
 defining a command to set an entry and then doing all the
 alphabetization and cross-referencing by hand.
 
 What I would really, really, like is to add short definitions to each
 glossary record that could pop up as tooltips when the reader hovers
 over an unfamiliar word.  Since there is no mechanism for glossaries
 in Context, there is no mechanism to build this into, but I'm still
 interested in doing it.  The idea is, I could write something like:
 
 \gloss{strange word}{short definition}
 
 The text would read strange word.  When you hover over it with the
 cursor, a tooltip would appear saying short definition.  It would be
 great if this were linked to a glossary mechanism so I wouldn't have
 to keep writing the short definition---I could say something like:
 
 \gloss{strange word}
 
 and its short definition would be looked up automatically for the
 tooltip.  The automatic reference to the word might look like this, in
 the text:
 
 \gref{strange word}
 
 which would cause the page number at that point to be printed at the
 end of the glossary entry for strange word.
 ___
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
\setupinteraction[state=start]

\ctxlua{dofile(glossarium.lua)}

% Use \gloss#1#2 somewhere before \starttext, in a secondary file if you like.
% #1: gloss reference key (used as index)
% #2: the entry (explanation)
\def\gloss#1#2{%
  \ctxlua{gloss.newgloss(#1, \luaescapestring{#2})}
}

\def\dousegloss[#1]#2{%
  \ctxlua{gloss.usegloss(#2, #1)}%
}

% Use this in your text to create a reference to the glossary.
% #1: optional, If this is the main passage where you explain the entry in detail, 
% the glossary will link back here. (Just make it non-empty.)
% #2: the gloss key
\def\usegloss{\dosingleempty\dousegloss}


% This is meant to create the glossary after the text:
% The gloss key is typeset in bold face and will reference the point in the
% main text where \usegloss was called with a nonempty first arg.
\def\placeglossary{\ctxlua{gloss.place_glossary()}}

\starttext

\gloss{glossary}{%
  A 

Re: [NTG-context] tooltips and glossary

2010-05-04 Thread Willi Egger
Hi,

Why do you complain about other user's English? - Let us be happy, that people 
of another mother tong including my self do participate on the list and share 
their experience with others!

According to what I tested the basic functionality is already available in 
Context:

\definesynonyms[Gloss][Glosses][\infull][\inshort]

\Gloss{cooltip}{HEI! This is a longer text in a tooltip}

\def\Hint#1{\tooltip[middle]{#1}{\infull{#1}}}

\starttext
This is a text. This sentence contains a \tooltip[middle]{cooltip}{HEI! This is 
a longer text in a tooltip}
\blank
This is a text. This sentence contains a \inshort{cooltip}: say: 
\infull{cooltip}

\blank
This is a text. This sentence contains a \Hint{cooltip}.
\blank[2cm]
\placelistofGlosses
\stoptext


Willi
On 4 May 2010, at 11:44, Michael Saunders wrote:

 Marius:
 
 Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf
 - page 14
 
 Thanks, but that looks like it's just some extracts from cont-eni
 translated from Engijsh into Engrish along with a distracting
 background that makes it hard to read.  The stuff about the not very
 useful abbreviation command is there again, but I'm drawn to the
 section about building a dictionary that says it's not about building
 a dictionary.It says:
 
 All you have to do is inserting a \index at whatever the phrase you
 want to index is, and placeing a \placeindex where you want the
 glossary to be.
 
 and then goes on to describe and index, not a glossary, which seems to
 require commands that need a lot of redundant arguments.  It also
 contains this gem:
 
 Like many other ConTeXt command, users can define their own series of
 indexing, which pluses the default \index series are called register.
 
 That's the most remarkable thing I've read today.  Maybe I need to be
 more clear.  A glossary is like a little dictionary in the back of a
 book that defines the specialized words and phrases that the book uses
 that might not be known to the general reader.  Here is a definition
 of glossary:
 
 A collection of glosses; a list with explanations of abstruse,
 antiquated, dialectal, or technical terms; a partial dictionary.
 
 (Glosses were little explanatory notes written in the margins of
 medieval texts---the kind of thing I would do if Context's marginal
 notes weren't incompatible with its columns.)
 
 Ideally, I'd like a system where I could keep the entries in a bib
 database or in a special .tex file.  The records would include the
 headword and the gloss, and maybe a cross reference to the point in
 the text that dealt with the headword definitively---the point where
 the term was explained.  (A document that defines and explains the new
 words and phrases it coins---imagine such a thing!)  It would be nice
 if there were a command that would automatically link this point in
 the text with the glossary entry.  LaTeX has several packages
 (glosstex, gloss, glossary, glossaries) that do things like this.
 
 To do this in Context, I will probably have to do it all manually,
 defining a command to set an entry and then doing all the
 alphabetization and cross-referencing by hand.
 
 What I would really, really, like is to add short definitions to each
 glossary record that could pop up as tooltips when the reader hovers
 over an unfamiliar word.  Since there is no mechanism for glossaries
 in Context, there is no mechanism to build this into, but I'm still
 interested in doing it.  The idea is, I could write something like:
 
 \gloss{strange word}{short definition}
 
 The text would read strange word.  When you hover over it with the
 cursor, a tooltip would appear saying short definition.  It would be
 great if this were linked to a glossary mechanism so I wouldn't have
 to keep writing the short definition---I could say something like:
 
 \gloss{strange word}
 
 and its short definition would be looked up automatically for the
 tooltip.  The automatic reference to the word might look like this, in
 the text:
 
 \gref{strange word}
 
 which would cause the page number at that point to be printed at the
 end of the glossary entry for strange word.
 ___
 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
 ___

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

Re: [NTG-context] tooltips and glossary

2010-05-04 Thread Michael Saunders
 (Preliminary remark to M.S.: please, please, configure your MUA to
 correctly reply to the current thread!)

(What's wrong with my subject line?  I'm merely hitting reply in gmail.)


 No, it's plain English. Unfamiliar phrases are just one consequence of a
 language becoming the world standard. Do you want to flame Italians or
 French for not adhering to the norms of classical Latin? You don't.
 There's no point at all in even mentioning somebody's stylistic
 idiosyncrasies on the internets. Just face it: the world won't adopt
 English as a global means of communication without interfering with its
 norms. If you don't understand something why don't you contact the
 author, his email adress is right there on the first page.

I don't mind non-native speakers using bad grammar, strange usages, or
odd constructions at all.  Things like that are usually no problem for
native speakers to understand, although the two sentences I quoted
were not plain English at all---one was completely indecipherable.
The biggest problem with the docs is far more basic---it's the most
basic mistake a beginning writer can make.  I'm sure documents like
the ones I was shown on this thread make perfect sense to their
authors---who already know what they mean---but they fail to
communicate their message to anyone who doesn't already know it.  The
reader isn't being given enough information to decode the message and
what he is given is in no particular order:  it's whatever bits and
pieces of the story the author thinks of in the order he happens to
think of them.

You can't tell the author this.  It makes sense to him and he can't
understand the criticism.  He has to put himself in the place of the
reader who doesn't already know the message.  If he can't do that, he
can't communicate.  I'm sure that these documents would be just as bad
in the native languages of the authors as they are in English.  The
fault is far deeper than bad translation.

Increasingly, I'm wondering whether the problem with Context is just
bad docs or bad language design (it's hard to control, it looks bad
most of the time).  I still don't know.  I'm hoping that Idris's book
will shed light on this.



 I append a snippet that should allow basic glossaries. It doesn't
 provide much functionality (capitalization might have to be implemented
 …) but you may fit it to your needs.
...

 (As for the code, it's certainly not context style, I'm aware of that
 but don't have the time to care.)

 Awaiting your feedback,

Thank you.  I'm not quite sure what to do with these files (the .lua
file in particular).  Unfortunately, I won't be able to get to them
until tomorrow.

 As for the tooltips, unfortunately
 I don't know how to create them. The functionality would be nice,
 though, as long as no javascript is involved.

It's not done with javascript.  As I understand it, the usual way is
to place an invisible pdf  forms-style button over the word you want
to gloss and then set its short description feature.   I think
context knows how to make such buttons and to set bounding boxes
around words, so I think it should be possible, no?
___
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] tooltips and glossary

2010-05-04 Thread Marius
On Tue, May 4, 2010 at 12:44 PM, Michael Saunders odrad...@gmail.com wrote:
 What I would really, really, like is to add short definitions to each
 glossary record that could pop up as tooltips when the reader hovers
 over an unfamiliar word.  Since there is no mechanism for glossaries
 in Context, there is no mechanism to build this into, but I'm still
 interested in doing it.  The idea is, I could write something like:

 \gloss{strange word}{short definition}

 The text would read strange word.  When you hover over it with the
 cursor, a tooltip would appear saying short definition.  It would be
 great if this were linked to a glossary mechanism so I wouldn't have
 to keep writing the short definition---I could say something like:

 \gloss{strange word}

 and its short definition would be looked up automatically for the
 tooltip.  The automatic reference to the word might look like this, in
 the text:

 \gref{strange word}

 which would cause the page number at that point to be printed at the
 end of the glossary entry for strange word.

I don't know how to make tooltips, but everything else is in the file attached.


test2.pdf
Description: Adobe PDF document


test2.tex
Description: TeX document
___
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] tooltips and glossary

2010-05-04 Thread Philipp Gesang
On 2010-05-04 08:32:36, Michael Saunders wrote:
  (Preliminary remark to M.S.: please, please, configure your MUA to
  correctly reply to the current thread!)
 
 (What's wrong with my subject line?  I'm merely hitting reply in gmail.)
Strange, judging from my inbox some of your replies are indeed threaded
correctly, but others are not because they are missing the “references”
and “in-reply-to” headers. Some inconsistency in the gmail frontend?

  No, it's plain English. Unfamiliar phrases are just one consequence of a
  language becoming the world standard. Do you want to flame Italians or
  French for not adhering to the norms of classical Latin? You don't.
  There's no point at all in even mentioning somebody's stylistic
  idiosyncrasies on the internets. Just face it: the world won't adopt
  English as a global means of communication without interfering with its
  norms. If you don't understand something why don't you contact the
  author, his email adress is right there on the first page.
 
 I don't mind non-native speakers using bad grammar, strange usages, or
snip: mostly right stuff/
 Increasingly, I'm wondering whether the problem with Context is just
 bad docs or bad language design (it's hard to control, it looks bad
 most of the time).  I still don't know.  I'm hoping that Idris's book
 will shed light on this.
I agree with you in most points and don't want to discuss this here. My
expectations concerning the context book are high, too, I wonder whether
Idris accepts subscriptions … ?

 Thank you.  I'm not quite sure what to do with these files (the .lua
 file in particular).  Unfortunately, I won't be able to get to them
 until tomorrow.
The lua file should be placed in the same directory as your document.
The tex file contains the wrapper macros for the lua functions in the
preamble. Everything between \starttext and \stoptext is demonstration
of the humble functionality. As this is rather an ad-hoc “solution”,
don't expect much of it. To adapt it to a particular layout you'll have
to manipulate the lua source but that won't be hard. Just tell me when
you're in need of something special. (Expect breakage in footnotes! As
usual, \usegloss has to be made unexpanded to get this to work …)
 
  As for the tooltips, unfortunately
  I don't know how to create them. The functionality would be nice,
  though, as long as no javascript is involved.
 
 It's not done with javascript.  As I understand it, the usual way is
 to place an invisible pdf  forms-style button over the word you want
 to gloss and then set its short description feature.   I think
 context knows how to make such buttons and to set bounding boxes
 around words, so I think it should be possible, no?
As pointed out by Willi, context in fact has tooltips functionality but
they _are_ implemented via js. These gimmicks are unsupported by most pdf
readers (or looking funny in okular, which has some basic js support), so
for now I'm personally opposed to using them. Let's hope “lua sponsor”
Adobe replaces js by lua scripting in pdf eventually.

Philipp

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

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp3pu4yCbceZ.pgp
Description: PGP signature
___
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] tooltips and glossary

2010-05-04 Thread Corsair
Hey Michael,

I'm the author of that terrible document.

On Tue, May 04, 2010 at 08:32:36AM -0500, Michael Saunders wrote:
  No, it's plain English. Unfamiliar phrases are just one consequence of a
  language becoming the world standard. Do you want to flame Italians or
  French for not adhering to the norms of classical Latin? You don't.
  There's no point at all in even mentioning somebody's stylistic
  idiosyncrasies on the internets. Just face it: the world won't adopt
  English as a global means of communication without interfering with its
  norms. If you don't understand something why don't you contact the
  author, his email adress is right there on the first page.
 
 I don't mind non-native speakers using bad grammar, strange usages, or
 odd constructions at all. �Things like that are usually no problem for
 native speakers to understand, although the two sentences I quoted
 were not plain English at all---one was completely indecipherable.
 The biggest problem with the docs is far more basic---it's the most
 basic mistake a beginning writer can make. �I'm sure documents like
 the ones I was shown on this thread make perfect sense to their
 authors---who already know what they mean---but they fail to
 communicate their message to anyone who doesn't already know it. �The
 reader isn't being given enough information to decode the message and
 what he is given is in no particular order: �it's whatever bits and
 pieces of the story the author thinks of in the order he happens to
 think of them.

I'm sorry for my writing and the inconvenience it brings.  However
right now I cannot do anything about it.  May be I will rewrite it
in the summer.
 
 You can't tell the author this. �It makes sense to him and he can't
 understand the criticism. �He has to put himself in the place of the
 reader who doesn't already know the message. �If he can't do that, he
 can't communicate. �I'm sure that these documents would be just as bad
 in the native languages of the authors as they are in English. �The
 fault is far deeper than bad translation.

Actually I do understand your feeling.  Like I said, I may rewrite
most part of it in the summer.

And BTW, that document is *supposed* to be an extraction of some
particular pieces of info in the official doc.  Because I find the
official doc too heavy for both my PDF viewer and me.  And about the
background, I just grabbed some random Asymptote file of mine.  Though
I find it pretty much ok, I may change that also in the future.

Let's focus on the tooltip and external database issue you
encountered, instead of discuss that document and my bad writing :-).

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.
___
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] tooltips and glossary

2010-05-04 Thread Michael Saunders
About glossaries:

Thank you, everyone.  I'm not much of a TeXpert and certainly not a
lua expert, but I'm trying to understand your different solutions and
integrate them into a working system.  There seem to be three
approaches:

I. Willi Egger---synonym-based
II. Marius---modified index
III. Philipp Gesang---lua-based

I. So far, Willi's synonym-based solution looks simple and promising.
I imagine something like this:

\definesynonyms[gloss][glosses][\infull][\inshort]%to make short
glosses available for tooltips
\definesynonyms[gentry][gentries][\infull][\inshort]%to connect
headwords to entries
\def\gdef#1#2#3{\gloss{#1}{#2}\gentry{#1}{#3}}
\def\hint#1{\tooltip[middle]{#1}{\infull{#1}}}


%then you have a file of definitions like this one:

\gdef{vibrato}{a periodic fluctuation in pitch}{A periodic fluctuation
of pitch, typically in the range 6--12~Hz.}


%within the text, where you need a tooltip on a word, you can say:

... \hint{vibrato} ...


%at then end of the text, something like:

Glossary:


\placelistofgentries

I see three problems with this:

1.  I don't know how to tell \hint to refer to the vibrato in
glosses and not in gentries.
2.  There is no mechanism to refer to the page with a substantive
discussion of vibrato.
3.  There is no way to handle cases where the string in the text is
some variation of vibrato (e.g., Vibrato, vibrati, vibrato's)

II. Marius's modified index solution is the only one to successfully
link the entry back to a point in the text, but the resulting
glossary  really just looks like an index.

III.  Philipp Gesang's lua-based solution connects headwords to
entries just as \definesynonyms[gentry][gentries][\infull][\inshort]
does, and it produces something that looks like a glossary, but the
entries have no link back to the text.  Also, I don't see the point of
the \usegloss{word} command unless it references the substantive
discussion(s) of the word.  I think that is what his
\usegloss[exp]{word} is for, but then there should be a reference to
it in the entry.  Something like:
{\bd headword}---entry text, p.\at[g:headword]
There probably is some advantage in using the lua script for this, but
I don't know what it is.


About tooltips:


\tooltip surprised me, and I was impressed that it appears to typeset
the tooltip text with Context, but there are some problems with it:

1. It's stretched horizontally.
2. The active area begins at the baseline and stretches about 1 ex
_under_ the word.
3. It appears without a border and under the cursor.

I have seen tooltips in pdf files before, and they looked better than
this.  I suspect the reason is that, as you say, \tooltip uses
Javascript, and the ones I saw use a different mechanism.  I dug
around and found this reference which describes how it's done with
form fields and invisible buttons:
http://gilbertconsulting.com/pdf/Build_tool_tips_in_InDesign.pdf
(Notice how tidy the tooltips in it look.) That document describes
setting them up manually in a point-and-click interface, but surely
Context could automate this by putting an invisible frame around the
word and creating a form field/button over it?
And, correct me if I'm wrong, but that mechanism is not
Javascript-based at all, is it?

(by the way:  I've not broken the thread again, have I?)
___
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
___