Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
Am 2017-09-10 um 11:09 schrieb Herbert Voss <herbert.v...@fu-berlin.de>:

> Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm:
>> My current code actually looks like
>> % split in #1 page size parts
>> \def\clipfigure{\dodoubleempty\doClipFigure}
>> \def\doClipFigure[#1][#2]{
>> \ifsecondargument
>>   \dorecurse{#1}{%
>>   \tooltip{\clip[
>> height=\textheight,
>> voffset=\dimexpr((\recurselevel - 1)\textheight),]{%
> 
> voffset=\numexpr(\recurselevel -1)\textheight]{%

Aha, numexpr. Danke!

Am 2017-09-10 um 10:09 schrieb Herbert Voss <herbert.v...@fu-berlin.de>:

> Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm:
> 
>> \def\ausschnitt{\dodoubleempty\doAusschnitt}
>> \def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par}
>> This also doesn’t work; there I’m trying to set the y coordinate for the 
>> start like
>> \ausschnitt[15cm][verylongimage]
> 
> 
>> BTW example picture:
>> http://www.balderdashcomic.com/comic/ibonus
>> i.e. http://www.balderdashcomic.com/comics/1416175460-bonus1.png
> 
> \def\ausschnitt{\dodoubleempty\doAusschnitt}
> \def\doAusschnitt[#1][#2]{%
>   \clip[height=\textheight,
> voffset=#1]{\externalfigure[#2][height=\textheight]}\par}

So I just forgot the brackets. Me stupid. Thanks!
It still doesn’t do what I want, must try further.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Herbert Voss

Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm:

My current code actually looks like

% split in #1 page size parts
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\ifsecondargument
   \dorecurse{#1}{%
   \tooltip{\clip[
 height=\textheight,
 voffset=\dimexpr((\recurselevel - 1)\textheight),]{%


voffset=\numexpr(\recurselevel -1)\textheight]{%

Herbert



 \externalfigure[#2]}}{#2 (\recurselevel/#1)}\par}
\else
   \normalfigure[#1]
\fi
}

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
Am 2017-09-09 um 22:06 schrieb Aditya Mahajan <adit...@umich.edu>:

> On Sat, 9 Sep 2017, Henning Hraban Ramm wrote:
> 
>> Ahoi,
>> I got some long images that I’d like to split over several pages.
>> 
>> \def\clipfigure{\dodoubleempty\doClipFigure}
>> \def\doClipFigure[#1][#2]{
>> \dorecurse{#1}{%
>>  \clip[
>>height=\textheight,
>>voffset=\dimexpr((\recurselevel -1) * \textheight)
>>   ]{\externalfigure[#2][width=\textwidth]}\par
>> }
>> }
>> 
>> \clipfigure[3][verylongimage]
>> 
>> But "\dimexpr((\recurselevel -1) * \textheight)" for the vertical offset is 
>> wrong.
>> How can I do this calculation?
> 
> You are missing a comma at the end of the voffset line

Thank you, but that’s not the core problem.
I get "Illegal unit of measure (pt inserted)".


My current code actually looks like

% split in #1 page size parts
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\ifsecondargument
  \dorecurse{#1}{%
  \tooltip{\clip[
height=\textheight,
voffset=\dimexpr((\recurselevel - 1)\textheight),]{%
\externalfigure[#2]}}{#2 (\recurselevel/#1)}\par}
\else
  \normalfigure[#1]
\fi
}


Another approach:

\def\ausschnitt{\dodoubleempty\doAusschnitt}
\def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par}

This also doesn’t work; there I’m trying to set the y coordinate for the start 
like
\ausschnitt[15cm][verylongimage]

Here I get "Missing number, treated as zero".


I guess I need to employ the right combination of \the, expansion etc., but I 
don’t know how. This stuff is still over my head.


> but why not use
> \clip[nx= .., ny=.., x=, y=...] instead.
> http://wiki.contextgarden.net/Using_Graphics#Image_Clipping

Because I don’t want to split the picture in even slices, but cut in places 
where it makes sense. The page height is a simplification, until I get the 
calculations working.


BTW example picture:
http://www.balderdashcomic.com/comic/ibonus
i.e. http://www.balderdashcomic.com/comics/1416175460-bonus1.png


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Accessibility and Tagged PDF/A, Footnotes showing

2016-01-19 Thread Ursula Hermann
Hello Alan!

Yes, i know, it is because I am working with Word until now, but would like to 
change to ConTeXt.  If I set there a footnote, then there comes an pop-up 
window with the text. 

A Discussion would be very interesting. 

Thanks a lot. 

Ursula Hermann 

-Ursprüngliche Nachricht-
Von: ntg-context [mailto:ntg-context-boun...@ntg.nl] Im Auftrag von Alan BRASLAU
Gesendet: Montag, 18. Januar 2016 23:08
Cc: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Accessibility and Tagged PDF/A, Footnotes showing

On Mon, 18 Jan 2016 22:38:56 +0100
Hans Hagen <pra...@wxs.nl> wrote:

> On 1/18/2016 8:26 PM, Ursula Hermann wrote:
> > Hello Hans and Dr. Dominik Klein!
> >
> > Today I found a Thread about Accessibility from last Juli!
> >
> >
> > I work at the University in Vienna,  and I work with students, who 
> > are blind or have a see handicap. So I read this Thread today.
> >
> > Last year in Summer I began to read the manual of Context.
> >
> > I have a question to this discussion, it is nessesary to know: How 
> > can footnotes be shown in the PDF/A tagged PDF, in a text?
> >
> > What I mean something, that shows in the Text the text from the 
> > footnote, when I click on the number from the footnote.
> >
> >
> > Maybe with a tooltip? Or what is the right way? Which command?  
> 
> tooltips are widgets and not part of the document text stream .. so i 
> think they don't count as accessibility feature (but i might be wrong)
> 
> maybe someone else on the list knows
> 
> i wonder, as you use tex you can consider generating an additional 
> document (larger fontsize, better readable fonts, inline notes, maybe 
> other enhancements), pop ups etc
> 
> it'a anyway interesting to discuss how to make documents accessible 
> (tagged pdf is one options but not beforehand the nicest approach)

Hello,

It is an interesting comment going beyond the simple (yet important) question 
of accessibility: how in general should items such as footnotes be handled in 
alternative, non-printed formats, where the notion of a "page" becomes fuzzy?

With ConTeXt, it is easy to have such "footnotes" placed at the bottom of the 
formatted page, at the end of a section, chapter or book. It is also easy for 
them to have hyperlinks to jump to their location and then back to the 
reference text.

Tooltips and other widgets, as Hans says, depend on the display client and not 
on the document - there are many things that might work with one reader (i.e. 
Adobe) and not on others. Addressing the questions of accessibility, in 
particular for blind or otherwise vision-impaired readers, one can design an 
appropriate action or model for the document. Footnotes and endnotes are useful 
tools for a writer. Like indexes, bibliographic references, or floating figures 
or tables, these are concepts that might require some thought as to how they 
might be employed in an ebook or by an audio reader. This would make an 
interesting topic of discussion for our next ConTeXt users' meeting.

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

[NTG-context] Accessibility and Tagged PDF/A, Footnotes showing

2016-01-18 Thread Ursula Hermann
Hello Hans and Dr. Dominik Klein!

Today I found a Thread about Accessibility from last Juli!


I work at the University in Vienna,  and I work with students, who are
blind or have a see handicap. So I read this Thread today.

Last year in Summer I began to read the manual of Context.

I have a question to this discussion, it is nessesary to know: How can
footnotes be shown in the PDF/A tagged PDF, in a text?

What I mean something, that shows in the Text the text from the footnote,
when I click on the number from the footnote.


Maybe with a tooltip? Or what is the right way? Which command?

Ursula Hermann




___
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] Accessibility and Tagged PDF/A, Footnotes showing

2016-01-18 Thread Hans Hagen

On 1/18/2016 8:26 PM, Ursula Hermann wrote:

Hello Hans and Dr. Dominik Klein!

Today I found a Thread about Accessibility from last Juli!


I work at the University in Vienna,  and I work with students, who are
blind or have a see handicap. So I read this Thread today.

Last year in Summer I began to read the manual of Context.

I have a question to this discussion, it is nessesary to know: How can
footnotes be shown in the PDF/A tagged PDF, in a text?

What I mean something, that shows in the Text the text from the footnote,
when I click on the number from the footnote.


Maybe with a tooltip? Or what is the right way? Which command?


tooltips are widgets and not part of the document text stream .. so i 
think they don't count as accessibility feature (but i might be wrong)


maybe someone else on the list knows

i wonder, as you use tex you can consider generating an additional 
document (larger fontsize, better readable fonts, inline notes, maybe 
other enhancements), pop ups etc


it'a anyway interesting to discuss how to make documents accessible 
(tagged pdf is one options but not beforehand the nicest approach)


Hans




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

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

Re: [NTG-context] Accessibility and Tagged PDF/A, Footnotes showing

2016-01-18 Thread Alan BRASLAU
On Mon, 18 Jan 2016 22:38:56 +0100
Hans Hagen <pra...@wxs.nl> wrote:

> On 1/18/2016 8:26 PM, Ursula Hermann wrote:
> > Hello Hans and Dr. Dominik Klein!
> >
> > Today I found a Thread about Accessibility from last Juli!
> >
> >
> > I work at the University in Vienna,  and I work with students, who
> > are blind or have a see handicap. So I read this Thread today.
> >
> > Last year in Summer I began to read the manual of Context.
> >
> > I have a question to this discussion, it is nessesary to know: How
> > can footnotes be shown in the PDF/A tagged PDF, in a text?
> >
> > What I mean something, that shows in the Text the text from the
> > footnote, when I click on the number from the footnote.
> >
> >
> > Maybe with a tooltip? Or what is the right way? Which command?  
> 
> tooltips are widgets and not part of the document text stream .. so i 
> think they don't count as accessibility feature (but i might be wrong)
> 
> maybe someone else on the list knows
> 
> i wonder, as you use tex you can consider generating an additional 
> document (larger fontsize, better readable fonts, inline notes, maybe 
> other enhancements), pop ups etc
> 
> it'a anyway interesting to discuss how to make documents accessible 
> (tagged pdf is one options but not beforehand the nicest approach)

Hello,

It is an interesting comment going beyond the simple (yet important)
question of accessibility: how in general should items such as
footnotes be handled in alternative, non-printed formats, where the
notion of a "page" becomes fuzzy?

With ConTeXt, it is easy to have such "footnotes" placed at the bottom
of the formatted page, at the end of a section, chapter or book. It is
also easy for them to have hyperlinks to jump to their location and
then back to the reference text.

Tooltips and other widgets, as Hans says, depend on the display client
and not on the document - there are many things that might work with
one reader (i.e. Adobe) and not on others. Addressing the questions of
accessibility, in particular for blind or otherwise vision-impaired
readers, one can design an appropriate action or model for the
document. Footnotes and endnotes are useful tools for a writer. Like
indexes, bibliographic references, or floating figures or tables, these
are concepts that might require some thought as to how they might be
employed in an ebook or by an audio reader. This would make an
interesting topic of discussion for our next ConTeXt users' meeting.

Alan
___
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] tooltip and buttom for footnotes?

2016-01-14 Thread Ursula Hermann
Hello Wolfgang or Hans?

 

Can one of you help me please. Iwant something like this: 

 

\setuppapersize[S6][S6]

\setupinteraction[state=start]

\setupcolors[state=start]

 

\starttext

Here is an example: by saying

\type{\tooltip[left]{Example}{Is it nice}}, we get

\blank

\midaligned{\tooltip[bottom]{Example}{Isn't it nice?}}

\blank

 

This file when opened in Adobe Acrobat will show the tooltip "Isn't it
nice?" when one hovers over the word "Example".

 

\blank

\midaligned{\tooltip[bottom]{an example}{Isn't it nice?}  of tooltip on the
bottom}

\blank

\midaligned{an example of tooltip on the \tooltip[right]{right}{Isn't it
nice?}}

\blank

\midaligned{\tooltip[left]{an}{Isn't it nice?}  example of tooltip on the
left}

 

\stoptext

 

But i would need it for footnotes in pdf. Is this possible, or do I have to
define somehting?

 

Thanks 

 

Uschi 

___
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] Break links into items in the itemize list

2012-04-13 Thread Jaroslav Hajtmar

Hello all
Once again I return to this issue. Lukas confirmed  me that really links 
do not work. Where is error when links into items in the itemize list 
are not working. Links are active but not working...
It is interesting that the chapter on the links when hovering tooltip 
will appear with the page number where the link leads, not the case for 
the line item.


Here is Lukas example (my example is bottom )


\setupinteraction[state=start]

\starttext
  Go to \in[sec:1] -- \about[sec:1] or \in[it:a] -- \about[it:a].

  \page
  \section[sec:1]{Sec}
\startitemize[n]
  \item[it:a] Item A
\stopitemize
\stoptext



Thanx for advices
Jaroslav Hajtmar



Here is my old example:


\setupinteraction[state=start]

\starttext

\in{First link}[bibl:7] and \in{second link}[bibl:1]

\page

\startitemize[n]
\item [bibl:7] Item 7
\item [bibl:4] Item 4
\item [bibl:8] Item 8
\item [bibl:10] Item 10
\item [bibl:1] Item 1
\item [bibl:20] Item 20
\stopitemize

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


Re: [NTG-context] Break links into items in the itemize list

2012-04-13 Thread Hans Hagen

On 13-4-2012 09:50, Jaroslav Hajtmar wrote:

Hello all
Once again I return to this issue. Lukas confirmed me that really links
do not work. Where is error when links into items in the itemize list
are not working. Links are active but not working...
It is interesting that the chapter on the links when hovering tooltip
will appear with the page number where the link leads, not the case for
the line item.

Here is Lukas example (my example is bottom )


\setupinteraction[state=start]

\starttext
Go to \in[sec:1] -- \about[sec:1] or \in[it:a] -- \about[it:a].

\page
\section[sec:1]{Sec}
\startitemize[n]
\item[it:a] Item A
\stopitemize
\stoptext



I'll look into it, but keep in mind that \about makes no sense for items

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

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


Re: [NTG-context] Break links into items in the itemize list

2012-04-13 Thread Jaroslav Hajtmar

Thanks Hans for your feedback.
Can be solved in such a case some alternative? I use this method for a 
simple bibliography. Now everything is working OK, I only mentioned the 
problem with break links.


Thanx Jaroslav


On 13-4-2012 09:50, Jaroslav Hajtmar wrote:

Hello all
Once again I return to this issue. Lukas confirmed me that really links
do not work. Where is error when links into items in the itemize list
are not working. Links are active but not working...
It is interesting that the chapter on the links when hovering tooltip
will appear with the page number where the link leads, not the case for
the line item.

Here is Lukas example (my example is bottom )


\setupinteraction[state=start]

\starttext
Go to \in[sec:1] -- \about[sec:1] or \in[it:a] -- \about[it:a].

\page
\section[sec:1]{Sec}
\startitemize[n]
\item[it:a] Item A
\stopitemize
\stoptext



I'll look into it, but keep in mind that \about makes no sense for items

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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

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


[NTG-context] Translate tooltip on button in pdf

2012-03-18 Thread Jan Heinen

Hello

how to change the tooltipps from english First page to  
german Erste Seite?


\setupinteraction[state=start]
\starttext
\button {\scale[height=2em] {\symbol[navigation 
1][nextpage]}}  [NextPage]

\page
\button {\scale[height=2em] {\symbol[navigation 
1][previouspage]}}  [PreviousPage]

\page
\stoptext


Regards
Jannis

--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt   
All information arround ConTeXt


http://wiki.contextgarden.net/Category:Commands  
Commands


!!! new: One-Click from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist


___
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] Translate tooltip on button in pdf

2012-03-18 Thread Wolfgang Schuster

Am 18.03.2012 um 19:08 schrieb Jan Heinen:

 Hello
 
 how to change the tooltipps from english First page to  german Erste 
 Seite?
 
 \setupinteraction[state=start]
 \starttext
 \button {\scale[height=2em] {\symbol[navigation 1][nextpage]}}  [NextPage]
 \page
 \button {\scale[height=2em] {\symbol[navigation 1][previouspage]}}  
 [PreviousPage]
 \page
 \stoptext

I think the texts are generated from your PDF viewer because Reader.app on the 
Mac
shows for me “Zur nächsten Seite” on the first page and “Zur vorherigen Seite” 
on
the second page but with Adobe Reader I don’t get any tooltips.

Wolfgang
___
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] \setupfields needs linefeed

2011-08-25 Thread Hans Hagen

On 24-8-2011 16:39, Peter Rolf wrote:

Hi,

I use '\setupfields[reset]%' in a tooltip macro and this single line
breaks compilation.

[..]
Runaway argument?
]\stoptext
! File ended while scanning use of \scrn_field_setup_fields.
inserted text
 \par
*  ./tooltip
   \stoptext
?
! Emergency stop.
inserted text
 \par
*  ./tooltip
   \stoptext
!  ==  Fatal error occurred, no output PDF file produced!



Complete example code, tested with the latest beta:
%
\nopdfcompression
\setupinteraction[state=start]
\setuppagenumber[state=stop]

\starttext
\setupfields[reset]%
\stoptext
%


in scrn-fld.mkiv:

\def\scrn_field_setup_fields[#variant][#totalsettings][#labelsettings][#fieldsettings]%

add a % there.

Hans

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

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


[NTG-context] \setupfields needs linefeed

2011-08-24 Thread Peter Rolf
Hi,

I use '\setupfields[reset]%' in a tooltip macro and this single line
breaks compilation.

[..]
Runaway argument?
]\stoptext
! File ended while scanning use of \scrn_field_setup_fields.
inserted text
\par
* ./tooltip
  \stoptext
?
! Emergency stop.
inserted text
\par
* ./tooltip
  \stoptext
!  == Fatal error occurred, no output PDF file produced!



Complete example code, tested with the latest beta:
%
\nopdfcompression
\setupinteraction[state=start]
\setuppagenumber[state=stop]

\starttext
\setupfields[reset]%
\stoptext
%

Peter
___
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] HTML-like title attribute

2011-02-16 Thread Khaled Hosny
I'm playing with some lua markdown parser[1], already added ConTeXt
output support except for two minor features.

HTML links and images can have a title attribute that shows like a
tooltip, but I don't seem to find a way to do similar trick in ConTeXt,
any ideas? \tooltip seems to be the closest but it requires JS which
means AR only, also seems one have to click for the tooltip ti show
which is not exactly the same behaviour.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
___
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] HTML-like title attribute

2011-02-16 Thread Khaled Hosny
The link https://github.com/jgm/lunamark :)

On Thu, Feb 17, 2011 at 02:03:04AM +0200, Khaled Hosny wrote:
 I'm playing with some lua markdown parser[1], already added ConTeXt
 output support except for two minor features.
 
 HTML links and images can have a title attribute that shows like a
 tooltip, but I don't seem to find a way to do similar trick in ConTeXt,
 any ideas? \tooltip seems to be the closest but it requires JS which
 means AR only, also seems one have to click for the tooltip ti show
 which is not exactly the same behaviour.
 
 Regards,
  Khaled
 
 -- 
  Khaled Hosny
  Egyptian

-- 
 Khaled Hosny
 Egyptian
___
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] tooltip in a buffer (beta)

2011-01-28 Thread Peter Rolf
Hi Hans,

I have overseen an unwanted horizontal skip in my menu test graphic. Mh,
donno what this is... it's no skip nor a simple spurious space (as I use
\removeunwantedspaces in front of that macro).
A minimal example is attached. No urgent case...

Best wishes,  Peter
\setupinteraction[state=start]

\definelayer[foo][width=300pt,height=300pt]
\setlayerframed[foo][width=300pt,height=300pt]{foo}


\starttext

\startbuffer[test]
\framed[offset=overlay]{\tooltip{\CONTEXT}{a \TEX\ macropackage}}
\stopbuffer

\setlayerframed[foo][x=0pt,y=0pt][offset=overlay]{\getbuffer[test]} % big skip 
in front of text
\flushlayer[foo]

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


Re: [NTG-context] tooltip in a buffer (beta)

2011-01-28 Thread Hans Hagen

On 28-1-2011 4:20, Peter Rolf wrote:

Hi Hans,

I have overseen an unwanted horizontal skip in my menu test graphic. Mh,
donno what this is... it's no skip nor a simple spurious space (as I use
\removeunwantedspaces in front of that macro).
A minimal example is attached. No urgent case...


if you're bored and have enough time you can run with \tracinglal and 
see where a blank space is inserted



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

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


Re: [NTG-context] tooltip in a buffer (beta)

2011-01-28 Thread Wolfgang Schuster

Am 28.01.2011 um 18:58 schrieb Hans Hagen:

 On 28-1-2011 4:20, Peter Rolf wrote:
 Hi Hans,
 
 I have overseen an unwanted horizontal skip in my menu test graphic. Mh,
 donno what this is... it's no skip nor a simple spurious space (as I use
 \removeunwantedspaces in front of that macro).
 A minimal example is attached. No urgent case...
 
 if you're bored and have enough time you can run with \tracinglal and see 
 where a blank space is inserted

The spaces come from java-imp-fld.mkiv, you can get rid of them by modifying
the “javascripts.usescripts” function in java-ini.lua (end of the file):

function javascripts.usescripts(name)
if name ~= variables.reset then
commands.uselibrary(name,patterns,function(name,foundname)
context.startnointerference()
context.startreadingfile()
context.input(foundname)
context.showcolormessage(javascript,1,name)
context.stopreadingfile()
context.stopnointerference()
end)
end
end

Wolfgang

___
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] tooltip in a buffer (beta)

2011-01-28 Thread Peter Rolf
Am 28.01.2011 20:02, schrieb Wolfgang Schuster:
 
 Am 28.01.2011 um 18:58 schrieb Hans Hagen:
 
 On 28-1-2011 4:20, Peter Rolf wrote:
 Hi Hans,

 I have overseen an unwanted horizontal skip in my menu test graphic. Mh,
 donno what this is... it's no skip nor a simple spurious space (as I use
 \removeunwantedspaces in front of that macro).
 A minimal example is attached. No urgent case...

 if you're bored and have enough time you can run with \tracinglal and see 
 where a blank space is inserted

\tracingall is information overkill for me :-D


 The spaces come from java-imp-fld.mkiv, you can get rid of them by modifying
 the “javascripts.usescripts” function in java-ini.lua (end of the file):
 
 function javascripts.usescripts(name)
 if name ~= variables.reset then
 commands.uselibrary(name,patterns,function(name,foundname)
 context.startnointerference()
 context.startreadingfile()
 context.input(foundname)
 context.showcolormessage(javascript,1,name)
 context.stopreadingfile()
 context.stopnointerference()
 end)
 end
 end


Many thanks Wolfgang!


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


Re: [NTG-context] tooltip in a buffer (beta)

2011-01-28 Thread Hans Hagen

On 28-1-2011 8:02, Wolfgang Schuster wrote:


 context.startnointerference()


ok, patched


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

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


[NTG-context] tooltips broken (beta)

2011-01-27 Thread Peter Rolf
Hi Hans,

with the beta 2011.01.26 11:02 and the attached example (tooltip.tex)
compilation break with

[..]
javascript  : loading script set fld
! LuaTeX error r:/tex/texmf-context/tex/context/base/supp-fil.lua:322:
attempt to call local 'failure' (a nil value)
stack traceback:
r:/tex/texmf-context/tex/context/base/supp-fil.lua:322: in function
'uselibrary'
r:/tex/texmf-context/tex/context/base/java-ini.lua:151: in function
'usescripts'
main ctx instance:1: in main chunk.
\douseJSscripts ...pts.usescripts(\!!bs #1\!!es )}
  \douseJSpreamblenow {#2}
to be read again
   \globallet
\loadfieldscripts -\useJSscripts [fld]\globallet
  \loadfieldscripts \relax
\doprocessfield ... \begingroup \loadfieldscripts
  \edef
\currentfieldname {#...
to be read again
   }
\dotooltip ...fitfield [\currentsystemfield :txt]}
  }\dimen 0=\ifdim \wd
0=\ze...
l.5 \tooltip{\CONTEXT}{a \TEX\ macropackage}

?


mkii works, but I get black text on black background for the tooltip.


Best wishes,  Peter
\setupinteraction[state=start]

\starttext

\tooltip{\CONTEXT}{a \TEX\ macropackage}

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


Re: [NTG-context] ntg-context Digest, Vol 72, Issue 9

2010-06-04 Thread Michael Saunders
 more acrobat and initialization and so ... some of these things change
 per version; which version of acrobat? test file?

I have Adobe Reader 9.3.2, which I think is the latest.  The following test:

\starttext
\dorecurse{1000}{\tooltip[middle]{test}{test}}
\stoptext

produces a pdf which opens up with the purple band at the top.  There
is a button (which doesn't look much like a button) on the left of
this band that will hide it when pressed.  Still I'd like to control
it.

I have a closely-related question.  I'm preparing a document for
screen reading, and I always have to push the Adobe Read button click
to show one page at a time to make it behave nicely.   I'm guessing
that the command to keep the purple band from my screen is similar to
the one that would push this button automatically and begin the
document in the one-page-at-a-time mode.  I'm using:

\setupinteraction[state=start,color=,contrastcolor=,focus=???]

and I've tried every value I can think of for ???, but maybe that's
not the solution.
___
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] Please fill out the following form

2010-06-04 Thread Michael Saunders
 more acrobat and initialization and so ... some of these things change
 per version; which version of acrobat? test file?

I have Adobe Reader 9.3.2, which I think is the latest.  The following test:

\starttext
\dorecurse{1000}{\tooltip[middle]{test}{test}}
\stoptext

produces a pdf which opens up with the purple band at the top.  There
is a button (which doesn't look much like a button) on the left of
this band that will hide it when pressed.  Still I'd like to control
it.

I have a closely-related question.  I'm preparing a document for
screen reading, and I always have to push the Adobe Read button click
to show one page at a time to make it behave nicely.   I'm guessing
that the command to keep the purple band from my screen is similar to
the one that would push this button automatically and begin the
document in the one-page-at-a-time mode.  I'm using:

\setupinteraction[state=start,color=,contrastcolor=,focus=???]

and I've tried every value I can think of for ???, but maybe that's
not the solution.
___
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] Please fill out the following form

2010-06-04 Thread Taco Hoekwater

Michael Saunders wrote:

more acrobat and initialization and so ... some of these things change
per version; which version of acrobat? test file?


I have Adobe Reader 9.3.2, which I think is the latest.  The following test:

\starttext
\dorecurse{1000}{\tooltip[middle]{test}{test}}
\stoptext

produces a pdf which opens up with the purple band at the top.  There
is a button (which doesn't look much like a button) on the left of
this band that will hide it when pressed.  Still I'd like to control
it.


In my Reader 8, there is a prefs setting:

Edit - Preferences - Forms - Always hide forms document message bar

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] tooltips and glossary

2010-05-06 Thread Hans Hagen

On 4-5-2010 11:44, Michael Saunders wrote:


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:


Aangezien een antwoord in het engels voor jou meer vragen oproept dan 
antwoorden, reageer ik maar even in het Nederlands. Wellicht dat de 
google translator je een perfecte vertaling oplevert.


Omdat iedere gebruiker wel wat anders wil, is het onmogelijk om alles in 
te bouwen zonder dat het ontaard in een veelheid aan commandos. Het is 
dan ook vaak beter bestaande mechanismes te combineren. Veel mechanismes 
hebben een 'command hook' en het is niet zo lastig om bijvoorbeeld het 
synoniem mechanisme op die manier uit te breiden met een tooltip.


Er zijn inmiddels verschillende suggesties gedaan en ik ga daar niets 
aan toevoegen. Het is niet mijn probleem als een gebruiker gebrek heeft 
aan fantasie danwel suggesties niet gebruikt cq. zijn mails zodanig 
formuleert dat er niemand zin heeft om te reageren. Het verbaast me 
zowieso dat er gereageerd wordt, zeker als de toonzetting ronduit 
beledigend is, maar dat kan aan mijn gebrekkige engels liggen.


Overigens, in een perl of lua handleiding zie je ook geen kant en klare 
antwoorden. Men mag er zelf wel wat voor doen.



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:


Lijkt me logisch, waarom zou ik een glossary beschrijven als het over 
een index gaat. Je bent de eerste die hier deze twee door elkaar haalt.


Overigens, in mkiv kun je user data laten meereizen en gebruiken maar 
dat leg ik nog wel eens uit (of misschien ook nooit, want ik waag me 
niet meer aan Engels).



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:


Ach ja, gsub(manual,index,glossary) zal je niet geven wat je zoekt 
vrees ik. Overigens, we hebben dat soort 'begrippenlijsten in vrijwel 
elk van onze projekten dus het kan echt wel.


Etc etc.

Overigens, als ik zoveel commentaar had op een programma en de manuals, 
dan was ik al lang afgehaakt dus een doorzetter ben je wel.


Hans


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

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


Re: [NTG-context] tooltips and glossary

2010-05-06 Thread Taco Hoekwater


Just being helpful here:

Hans Hagen wrote:


Aangezien een antwoord in het engels voor jou meer vragen oproept dan 
antwoorden, reageer ik maar even in het Nederlands. Wellicht dat de 
google translator je een perfecte vertaling oplevert.


Since an answer in English you calls more questions than answers, I 
react but just as in Dutch. Possibly that the google translator you 
produce a perfect translation.


Omdat iedere gebruiker wel wat anders wil, is het onmogelijk om alles in 
te bouwen zonder dat het ontaard in een veelheid aan commandos. Het is 
dan ook vaak beter bestaande mechanismes te combineren. Veel mechanismes 
hebben een 'command hook' en het is niet zo lastig om bijvoorbeeld het 
synoniem mechanisme op die manier uit te breiden met een tooltip.


Because every user, however, what differently wants, it is impossible 
everything build in without it degenerated in a multiplicity to 
commandos. It is thus frequently better existing combine mechanisms. 
Many mechanisms have ' command hook' and it is not this way cumbersome 
for example the synonymous extend mechanism this way with a tool tip.


Er zijn inmiddels verschillende suggesties gedaan en ik ga daar niets 
aan toevoegen. Het is niet mijn probleem als een gebruiker gebrek heeft 
aan fantasie danwel suggesties niet gebruikt cq. zijn mails zodanig 
formuleert dat er niemand zin heeft om te reageren. Het verbaast me 
zowieso dat er gereageerd wordt, zeker als de toonzetting ronduit 
beledigend is, maar dat kan aan mijn gebrekkige engels liggen.


Several suggestions have been meanwhile done and I will add to that 
nothing. It is not my problem if a user to fantasia or suggestions have 
not used lack cq. to be mails as such formulate that there nobody has to 
react sense. It astonishes me zowieso that there is reacted, the more so 
if the toonzetting is simply offending, but that can lie to my poor 
English.


Overigens, in een perl of lua handleiding zie je ook geen kant en klare 
antwoorden. Men mag er zelf wel wat voor doen.


Moreover, in perl or lua guide to see you side also no and klare 
answering. One can do there himself, however, what kind of.


Lijkt me logisch, waarom zou ik een glossary beschrijven als het over 
een index gaat. Je bent de eerste die hier deze twee door elkaar haalt.


Me seems logical, for which I would describe glossary if it concerns an 
index. You are the first which obtains here these two by each other.


Overigens, in mkiv kun je user data laten meereizen en gebruiken maar 
dat leg ik nog wel eens uit (of misschien ook nooit, want ik waag me 
niet meer aan Engels).


Moreover, in mkiv can to user let travel with you to data and use but 
that explanation I still once (or perhaps also never, because I venture 
myself no longer to English).


Ach ja, gsub(manual,index,glossary) zal je niet geven wat je zoekt 
vrees ik. Overigens, we hebben dat soort 'begrippenlijsten in vrijwel 
elk van onze projekten dus het kan echt wel.


At last, gsub (manual,  index ,  glossary) you will not give what 
zoekt you apprehension I. Moreover, we have that type ' term lists in 
nearly each of our projects therefore are possible it really, however.



Etc etc.


Etc etc.

Overigens, als ik zoveel commentaar had op een programma en de manuals, 
dan was ik al lang afgehaakt dus een doorzetter ben je wel.


Moreover, if I had so much comment on a programme and the manuals, then 
I had been for a long time pulled out therefore a doorzetter am you, 
however.




___
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-06 Thread luigi scarso
On Wed, May 5, 2010 at 6:36 AM, Michael Saunders odrad...@gmail.com wrote:
 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.}
Synonyms are defined in
strc-syn.mkii (or strc-syn.mkiv, if you are using mkiv) ;
maybe it can help you in defining your own macros (just to avoid to
reinvent the wheel, possibly)


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

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


Re: [NTG-context] tooltips and glossary

2010-05-06 Thread Michael Saunders
Philipp:

Thank you---I appreciate your effort on glossarium.lua very much, but
I don't want to be dependent on you every time I want to tweek my
glossary.  I find it difficult to change the appearance and behavior
of anything in Context, but I think my chances are better with it than
with trying to work in lua.

So, I have pursued the problem via the \definesynonyms approach.  What
I have so far can do all the basic things I imagined, and only seems
to need some cosmetic work now.  This is what I have:

In the preamble:

\definesynonyms[gentry][gentries][\infull][\inshort]
%to connect headwords to entries
\definesynonyms[gloss][glosses][\tttext][\ttkey]
%to make short glosses available for tooltips
\def\gldef#1#2#3{\gloss{#1}{#2}\gentry{#1}{#3 {(p.\at[g:#1])}}}
\def\hint#1{\tooltip[middle]{#1}{\tttext{#1}}}
\def\glref#1{\reference[g:#1]{}}
%to place at a substantive reference in the text

%then you have a file of definitions like this one:
\gldef{vibrato}{a periodic fluctuation in pitch}{A periodic
fluctuation of pitch, typically in the range 6--12~Hz.}


Then, in the text, when you use an unfamiliar word and the reader
could benefit from a quick, pop-up gloss:

\hint{vibrato}  (I just need a more sophisticated version of this that
can deal with variants of the word).

And, when you are about to engage in a substantive discussion of a
word or phrase that appears in the glossary (for a given headword,
there might be zero, one, or several such points in the text):

\glref{vibrato}  (This causes a page reference after the glossary entry.)

I have two questions remaining:

1. I was somehow able to guess that \definesynonyms[gentry][gentries]
creates a new command called \setupgentries[], and I imagine this
command must inherit its possible keys and values from another
command, but I don't know what.  Where can I look it up?

2. How can I modify the appearance/location/behavior of tooltips?  I
tried \setuptooltips, but apparently that's not it.

I'll tinker with this and test it for a while.   Eventually I hope to
contribute a glossaries my way to the garden.


Hans:

No problem!  I'm sure whatever I put in the Google translator was just
as articulate as what came out of it.   Really, I think the mistake is
mine.  All along I have been assuming that Context was like LaTeX:  a
system for end-users, a language where an author could easily
manipulate the appearance of his document.  Apparently, it's more like
a supporting infrastructure for that.  Maybe it needs a layer of
macros sitting on top of it to make it accessible and friendly to
users/writers.  I'm hoping Idris's book will shed light on this.

Thanks, everyone.
___
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-05 Thread Philipp Gesang
Hello again,


On 2010-05-04 23:36:17, Michael Saunders wrote:
 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]
Here you are! Now the link back to the main explanation (yes, that's
what \usegloss[#1]#2 with a nonempty first argument does) is carried by
a page reference at the end of the entry. Let me know if you want me to
change the formatting.

 There probably is some advantage in using the lua script for this, but
 I don't know what it is.
No advantage other than time saving …
 
 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
I had a look at that, he is creating pdf forms and uses them as tooltips
-- consequentially I couldn't even see them in xpdf.

 (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?
Well, it is form-(“widget”-)based and at least some forms use js. The
omniscient landfill has some info about this:
http://en.wikipedia.org/wiki/Pdf#Interactive_elements
But with those elements not even working I have no way to tell them
apart. You might be interested in a thread on c.t.t. where widgets and
the phantom-box approach are used to accomplish the same in latex:
http://groups.google.com/group/comp.text.tex/browse_thread/thread/863613f3d13337f1/989369a06aaf7a34?lnk=raot

 (by the way:  I've not broken the thread again, have I?)
Unfortunately, yes, gmail is again misbehaving.


Phg

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


pgp9RMNd0tUfn.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 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] 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

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  : http://foundry.supelec.fr/projects/contextrev

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


Re: [NTG-context] beta: \dopresetsymbol

2009-08-11 Thread Peter Rolf

Hans Hagen schrieb:

Peter Rolf wrote:

Hi,

the macro \dopresetsymbol is used in \dohandlefitfield 
(scrn-fld.mkiv), but no longer defined.


can you make a small example

yep! seems to be used with tooltips, as the attached example breaks with 
the same error.



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___ 





\setupinteraction[state=start]

\starttext
A simple \tooltip{tooltip}{tooltip}.
\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
___


[NTG-context] beta (14.05.2009,16:44): PDF layer

2009-05-15 Thread Peter Rolf

Hi,

as already mentioned there is a problem with PDF layer...
or with the way I use them. This is an old example, so it's maybe outdated.

Both marks produce non valid PDF here.


\setupcolors[state=start]
\setupinteraction[state=start]
\pdfcompresslevel0

\defineproperty[layerA][layer][title={layer_A},state=start]

\starttext

\startproperty[layerA]
text
%\framed[width=160mm,height=120mm]{\tooltip{A text with...{a tooltip}}%
\stopproperty

\stoptext



Peter



___
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] beta (11.05.2009): js interaction

2009-05-11 Thread Peter Rolf

Hi,

some problems with js interaction stuff. I get

! Undefined control sequence.
\dopresetfieldsymbol #1-\checkobjectreferences

for nearly all interaction fields in mkiv. Mkii compiles, but the pop-up 
tooltip is only a black box (not the text 'tooltip').


I also had some problems with PDF layer in mkiv (corrupt pdf with older 
betas; will investigate after this one is fixed).


*Not urgent at all.*


Minimal example:


\setupinteraction[state=start]

\starttext
Just a \tooltip{test}{tooltip}.
\stoptext


Time for some good news. There is nearly nothing left, that I have not 
tested (well, most is MP related). No further problems here 
(luatex0.40.1, mpost1.2). And hex colors in mkii work again :)



Best wishes,  Peter

___
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] beta (11.05.2009): js interaction

2009-05-11 Thread Hans Hagen

Peter Rolf wrote:

Hi,

some problems with js interaction stuff. I get

! Undefined control sequence.
\dopresetfieldsymbol #1-\checkobjectreferences

for nearly all interaction fields in mkiv. Mkii compiles, but the pop-up 
tooltip is only a black box (not the text 'tooltip').


I also had some problems with PDF layer in mkiv (corrupt pdf with older 
betas; will investigate after this one is fixed).


*Not urgent at all.*


no big deal ... just an obsolete macro (for mkiv) ... eventuall we will 
have a complete mkii/mkiv split and it takes a while to remove not 
needed code and test it


fixed

Hans

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

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


[NTG-context] \pdfannot and \tooltip won't work with Chinese

2008-07-29 Thread Suman_Tripathy
Can I get the .tex file? I am not expert in Latex and not understanding what 
exactly is the solution. Where is \doPDFinsertcomment defined?
-Suman


DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.
___
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] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
\synchronizationbar[name][alternative=page|local][settings]
\synchronize
\synonym[text]{text}{text}
\tab{text} text
# \tbox
\tex{text}
\textreference[reference]{text}
\textrule[top|bottom]{text}
\textvariable[name]
\thinrule
\thinrules[settings]
# \tightlayer
\title[references]{text}
# \to
\tooltip[left|right|middle]{text}{text}
\translate[name=text]
\typ{text}
\type{text}
\typebuffer[name]
\typefile[name]{text}
\underbar{text}
\underbars{text text}
# \unexpanded
# \unprotect
# \unprotected
\useblocks[names][names]
\usecommands{text}
\usedirectory[names|reset]
\useencoding[names]
\useexternaldocument[name][file][text]
\useexternalfigure[name][file][options]
\useexternalfile[name][name][file][font options]
\useexternalfiles[name][options]
\useexternalsoundtrack[name][file]
# \useJSscripts
\usemodule[names]
\usereferences[files]
\usespecials[names|reset]
\usesymbols[name]
# \usetypescript
# \usetypescriptfile
\useURL[name][URL][file][text]
# \useXMLfilter
\version[final|concept|temporary]
# \verticalstrut
# \vfilll
# \VL
\vl[number]
# \vpos
\WEEKDAY{text}
\weekday{text}
\whitespace
\WORD{text}
\Word{text}
\wordright{text}
\WORDS{text text}
\Words{text text}
\writebetweenlist[section|name]{text}
\writetolist[section|name]{text}{text}
\writetoreferencelist[name]{text}{text}
\writetoregister[singular][text]{text+text+text}
# \XMLerase
# \XMLflush
# \XMLop
# \XMLpar
# \zerocount
# \zerodimen
# \zeropoint

signature.asc
Description: This is a digitally signed message part.
___
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] \pdfannot and \tooltip won't work with Chinese characters

2007-04-17 Thread Zhichu Chen

Thanks Hans,

It works. But only the /Contents part was converted correctly, the /T part
is still not so good. So I redefined your \doPDFinsertcomment macro and
changed the third line from

  \doifelsenothing{#1}
{\let\PDFidentifier\empty}
{\def\PDFidentifier{/T (#1)}}%

to

  \doifelsenothing{#1}
{\let\PDFidentifier\empty}
{\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T
\ifPDFunicode \PDFcommenttitle\else (\PDFcommenttitle)\fi}}%


Now it's OK for me. I hope there's a more clever way that I don't need to
copy such long codes to my source file.


On 4/17/07, Hans Hagen [EMAIL PROTECTED] wrote:


Zhichu Chen wrote:
 Hi

 I've been looking at some core codes and the PDF reference, still have
no
 idea.

 Somehow, I was told that LaTeX can do such things using hyperref
 package
 and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...}
 should
 be OK.

can you try

\PDFunicodetrue

Hans



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context





--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \pdfannot and \tooltip won't work with Chinese characters

2007-04-17 Thread Hans Hagen
Zhichu Chen wrote:
 Hi

 I've been looking at some core codes and the PDF reference, still have no
 idea.

 Somehow, I was told that LaTeX can do such things using hyperref 
 package
 and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...} 
 should
 be OK.

can you try 

\PDFunicodetrue 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \pdfannot and \tooltip won't work with Chinese characters

2007-04-17 Thread Hans Hagen
Zhichu Chen wrote:
 Thanks Hans,

 It works. But only the /Contents part was converted correctly, the /T 
 part
 is still not so good. So I redefined your \doPDFinsertcomment macro and
 changed the third line from
 
   \doifelsenothing{#1}
 {\let\PDFidentifier\empty}
 {\def\PDFidentifier{/T (#1)}}%
 
 to
 
   \doifelsenothing{#1}
 {\let\PDFidentifier\empty}
 {\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T
 \ifPDFunicode \PDFcommenttitle\else (\PDFcommenttitle)\fi}}%
 

 Now it's OK for me. I hope there's a more clever way that I don't need to
 copy such long codes to my source file.
just patch spec-fdf 

i changed it here so it will be in the next release 

(which reminds me that for luatex i need to make a driver file dealing with 
such issues) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \pdfannot and \tooltip won't work with Chinese characters

2007-04-17 Thread Zhichu Chen

Hi, Hans

It may be useless, but I really hope I can pass some options to the comment.
e.g., use \comment[color=blue][title]{some contents} will make some
contents blue. So I think we can use /RC instead of /Contents.


On 4/17/07, Hans Hagen [EMAIL PROTECTED] wrote:


Zhichu Chen wrote:
 Thanks Hans,

 It works. But only the /Contents part was converted correctly, the /T
 part
 is still not so good. So I redefined your \doPDFinsertcomment macro and
 changed the third line from
 
   \doifelsenothing{#1}
 {\let\PDFidentifier\empty}
 {\def\PDFidentifier{/T (#1)}}%
 
 to
 
   \doifelsenothing{#1}
 {\let\PDFidentifier\empty}
 {\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T
 \ifPDFunicode \PDFcommenttitle\else (\PDFcommenttitle)\fi}}%
 

 Now it's OK for me. I hope there's a more clever way that I don't need
to
 copy such long codes to my source file.
just patch spec-fdf

i changed it here so it will be in the next release

(which reminds me that for luatex i need to make a driver file dealing
with such issues)

Hans

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context





--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \pdfannot and \tooltip won't work with Chinese characters

2007-04-13 Thread Zhichu Chen

Hi

I've been looking at some core codes and the PDF reference, still have no
idea.

Somehow, I was told that LaTeX can do such things using hyperref package
and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...} should
be OK.


On 4/11/07, Zhichu Chen [EMAIL PROTECTED] wrote:


Hi everybody,

Since \inmargin won't break through pages and I've tried everything but
still can't make it, I bended. Now I want to comment some words with
\pdfannot. It seems that this command don't support Chinese very well, the
annotations appeared like lookaheaduchar 73 and something. Then I turned
to \tooltip, and this time it showed nothing.

Can anybody help me?

--
Sincerely yours,
Chen


  Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
 No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
 tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
   | www.sinap.ac.cn






--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \pdfannot and \tooltip won't work with Chinese characters

2007-04-10 Thread Zhichu Chen

Hi everybody,

Since \inmargin won't break through pages and I've tried everything but
still can't make it, I bended. Now I want to comment some words with
\pdfannot. It seems that this command don't support Chinese very well, the
annotations appeared like lookaheaduchar 73 and something. Then I turned
to \tooltip, and this time it showed nothing.

Can anybody help me?

--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] beta: bug with transparent colors in fields

2006-11-14 Thread Hans Hagen
Peter Rolf wrote:
 Hi Hans,

 the support of transparent colors in fields seems to be broken (beta
 03.11.06). The attached example works with a non transparent
 backgroundcolor, but breaks with a transparent one. Same behaviour on
 ConTeXt Live.

 \definecolor
   [notebackgroundcolor]
 %  [s=.85]
   [s=1,a=1,t=.9]

 There is another problem with field activation (not in this example).
 When the doc opens, the fields (region in/out) are kind of inactive.
 Normally a tooltip note is shown/hidden, if the area is entered/left.
 Only after activating the fields by pressing R and H in Acrobat,
 they become alive. After that they work as expected. I am still working
 on a minimal example for this case.

 Greetings, Peter
   
 

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   
can you test the beta i'm uploading now?

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] beta: bug with transparent colors in fields

2006-11-14 Thread Peter Rolf
Hans Hagen wrote:
 Peter Rolf wrote:
 Hi Hans,

 the support of transparent colors in fields seems to be broken (beta
 03.11.06). The attached example works with a non transparent
 backgroundcolor, but breaks with a transparent one. Same behaviour on
 ConTeXt Live.

 \definecolor
   [notebackgroundcolor]
 %  [s=.85]
   [s=1,a=1,t=.9]

 There is another problem with field activation (not in this example).
 When the doc opens, the fields (region in/out) are kind of inactive.
 Normally a tooltip note is shown/hidden, if the area is entered/left.
 Only after activating the fields by pressing R and H in Acrobat,
 they become alive. After that they work as expected. I am still working
 on a minimal example for this case.

 Greetings, Peter
   
 

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   
 can you test the beta i'm uploading now?
 
Thanks Hans! Trasparency works again. The inactive bug still occurs
(but no minimal example yet).

Greetings, Peter
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] beta: bug with transparent colors in fields

2006-11-13 Thread Peter Rolf
Hi Hans,

the support of transparent colors in fields seems to be broken (beta
03.11.06). The attached example works with a non transparent
backgroundcolor, but breaks with a transparent one. Same behaviour on
ConTeXt Live.

\definecolor
  [notebackgroundcolor]
%  [s=.85]
  [s=1,a=1,t=.9]

There is another problem with field activation (not in this example).
When the doc opens, the fields (region in/out) are kind of inactive.
Normally a tooltip note is shown/hidden, if the area is entered/left.
Only after activating the fields by pressing R and H in Acrobat,
they become alive. After that they work as expected. I am still working
on a minimal example for this case.

Greetings, Peter
\setupoutput[pdf]
\setuppapersize[S6][S6]

\startJSpreamble {Notes} used now

  var lastNote =  ;

  function Show_Note ( Name )
{ if (Name != lastNote)
{ Hide_Note () ;
  var v = this.getField(Name) ; if (v)
{ console.println(Show Note:  + Name) ;
  v.display = display.visible ;
  v.readonly = false ;
%  v.richText = true ;
%  v.multiline = true ;
%  v.lineWidth = 3 ;
%  v.rect = [0, 0, 200, 150] ;
  this.dirty = false ;
  lastNote = Name } }
else {Hide_Note () ;}
 }

  function Hide_Note ( )
{ if (lastNote != )
{ var v = this.getField(lastNote) ; if (v)
{ console.println(Hide Note:  + lastNote) ;
  v.display = display.hidden ;
  v.readonly = true ;
  this.dirty = false } }
  lastNote =  }


  function Set_Tooltip ( Name )
  { if (Name != )
{ var v= this.getField(Name) ; if (v)
  { v.userName=This may help... ; }
}
  }




\stopJSpreamble

\newcounter\AnotherNote

\def\SomeNote#1#2%
  {\hbox
 {\doglobal\increment\AnotherNote
  \definesymbol[note:\AnotherNote:on][\WhatANote{#2}]%
%  \setupfield[notes][offset=overlay,frame=off,option={readonly,hidden}]
% this confuses acrobat, probably some interference bug, I spent too much 
time on that
  \setupfield[notes][offset=overlay,frame=off,option={readonly,hidden},%
%regionin=JS(Hide_Note),
regionout=JS(Hide_Note),
username={Test!},
%clickin=JS(Hide_Note),
%clickout=JS(Hide_Note),
]
  
\definefield[note:\AnotherNote][check][notes][note:\AnotherNote:on,note:\AnotherNote:on][note:\AnotherNote:on]%

  \doifreferencefoundelse{note:\AnotherNote}

{\setlayer[notes][page=\currentrealreference]{\fitfield[note:\AnotherNote]}}
{\setlayer[notes]{\fitfield[note:\AnotherNote]}}%
  
\pagereference[note:\AnotherNote]\goto{#1}[JS(Show_Note{note:\AnotherNote})]}}

\setupinteraction
  [state=start,
   openpageaction=JS(Hide_Note),
   closepageaction=JS(Hide_Note)]

\definereference[CloseNote][JS(Hide_Note)]

\setupfootertexts[{\goto{Close Note}[CloseNote]}][]

\setupcolors
  [state=start]

\definecolor
  [notebackgroundcolor]
%  [s=.85]
  [s=1,a=1,t=.9]

\defineframedtext
  [WhatANote]
  [bodyfont=9pt,
   background=color,
   backgroundcolor=notebackgroundcolor,
   width=.4\textwidth,
   height=fit,
   align=normal]

\definelayer
  [notes]
  [width=\paperwidth,
   height=\paperheight,
   preset=rightbottom,
   offset=1cm]

\setupbackgrounds
  [page]
  [background={notes,foreground}]

\starttext

\startbuffer
\input ward   \SomeNote{[[ward]]}  {\input ward  \relax} \input ward   \blank
\input knuth  \SomeNote{[[knuth]]} {\input knuth \relax} \input knuth  \blank
\input tufte  \SomeNote{[[tufte]]} {\input tufte \relax} \input tufte  \blank
\input bryson \SomeNote{[[bryson]]}{\input bryson\relax} \input bryson \blank
\stopbuffer

\dorecurse{10}{\getbuffer}

\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] widgets in layers (property)

2006-01-04 Thread Peter Rolf
New year, old problem...

Hi all,

I want to use widgets (tooltip, buttons,..) in some stacked pdf layers.
My problem is, that the widgets are somehow not bound to the state of
their layer. They are still active, even if the surrounding layer is
deactivated.

I add a mimimal example (it's best to open the 'Layers' tab in acrobat).
The first layer with tooltip is not active, the second one is active,
but has no tooltip.
Just move the mouse over the text and you can see the tooltip from the
deactivated layer one. I have also tried it with a fieldstack, but
'annotations cannot be inside an XForm'.

Any hints are welcome.

Peter



% interface=en output=pdftex
% Time-stamp: Freitag, 30 Dezember 2005 13:54:11; test.tex
%
\setupcolors[state=start]
\setupinteraction[state=start]


\starttext

\def\Stackbox#1{\nointerlineskip\vbox\bgroup\wd#1=\zeropoint\ht#1=\zeropoint\dp#1=\zeropoint
  \dontleavehmode\noindent\box#1\egroup}

\defineproperty[layer1][layer][title={one}, state=stop]
\defineproperty[layer2][layer][title={two}, state=start]


\newbox\Layerbox

\startproperty[layer1]
\setbox\Layerbox\vbox{\framed[width=160mm,height=120mm,framecolor=red]
  {\tooltip{First Layer with tooltip}{widget of layer one is active}}}
\Stackbox\Layerbox
\stopproperty
\startproperty[layer2]
\setbox\Layerbox\vbox{\framed[width=160mm,height=120mm,framecolor=green,frameoffset=1pt]
  {Second Layer without tooltip}}
\Stackbox\Layerbox
\stopproperty


\stoptext


%%% Local Variables:
%%% mode: context
%%% TeX-master: 
%%% End:


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] widgets in layers (property)

2005-12-30 Thread Peter Rolf
Hi all,

I want to use widgets (tooltip, buttons,..) in some stacked pdf layers.
My problem is, that the widgets are somehow not bound to the state of
their layer. They are still active, even if the surrounding layer is
deactivated.

I add a mimimal example (it's best to open the 'Layers' tab in acrobat).
The first layer with tooltip ist not active, the second one is active,
but has no tooltip.
Just move the mouse over the text and you can see the tooltip from the
deactivated layer one. I have also tried it with a fieldstack, but
'annotations cannot be inside an XForm'.

Any hints are welcome.

Peter
% interface=en output=pdftex
% Time-stamp: Freitag, 30 Dezember 2005 13:54:11; test.tex
%
\setupcolors[state=start]
\setupinteraction[state=start]


\starttext

\def\Stackbox#1{\nointerlineskip\vbox\bgroup\wd#1=\zeropoint\ht#1=\zeropoint\dp#1=\zeropoint
  \dontleavehmode\noindent\box#1\egroup}

\defineproperty[layer1][layer][title={one}, state=stop]
\defineproperty[layer2][layer][title={two}, state=start]


\newbox\Layerbox

\startproperty[layer1]
\setbox\Layerbox\vbox{\framed[width=160mm,height=120mm,framecolor=red]
  {\tooltip{First Layer with tooltip}{widget of layer one is active}}}
\Stackbox\Layerbox
\stopproperty
\startproperty[layer2]
\setbox\Layerbox\vbox{\framed[width=160mm,height=120mm,framecolor=green,frameoffset=1pt]
  {Second Layer without tooltip}}
\Stackbox\Layerbox
\stopproperty


\stoptext


%%% Local Variables:
%%% mode: context
%%% TeX-master: 
%%% End:
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context