[NTG-context] \reference and \setupinteraction[focus=...] not working

2015-09-14 Thread Christoph Reller
Hi,

In the following MWE, the interactive link work only when setting focus=fit.

The resulting PDF differs as follows:

- focus=fit: This PDF has no named destinations. The link annotations on
page 3 include destinations directly, and these destinations are correct.

- focus=: This PDF has named destinations in Root->Names
with names (#2) and (#3) and these named destinations are completely
correct. The problem is that the link annotations on page 3 reference named
destinations by the names (tuf) and (knu).

\setupinteraction[state=start,focus=standard] %focus=fit
\starttext
\startsection[title=Hi There]
  \reference[tuf]{Tufte}%
  \input tufte
  \page
  \reference[knu]{Knuth}%
  \input knuth
  \page
  \about[tuf] and \about[knu].
\stopsection
\stoptext

This seems to be a bug. If so, then please confirm and tell if you intend
to fix this.

Interestingly, with focus=standard, automatically generated links (e.g.
with sections and \about) work as expected.

Regards,
Christoph
___
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] suppress header-footers

2015-09-14 Thread Pablo Rodriguez
On 09/14/2015 11:01 AM, Meer, Hans van der wrote:
> With \noheaderandfooterlines one can suppress the header and footer lines on 
> the current page.
> 
> When using \setuplayout[location=doublesided] a blank page is
> generated if necessary. However this generated page does contain
> header/footer, notwhithstanding the use of \noheaderandfooterlines. Is
> it possible to avoid this?

Hi Hans,

\setuppagenumbering[alternative=doublesided] is the command I know to work.

You can add either blank or header and footer to page break option, such
as in:

\setuppagenumbering[alternative=doublesided]
\setuphead[chapter][page={yes, header, footer, right}]
\setupheadertexts[Header]
\setupfootertexts[Footer]
\starttext
\dorecurse{3}{\chapter{Chapter}\noheaderandfooterlines}
\stoptext

For some strange reason (at least, unknown to me), header and footer
must be placed before right (if specified at all). Although blank may be
placed before or after right.

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
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] Custom XML Export

2015-09-14 Thread Henning Hraban Ramm
Am 2015-09-15 um 00:09 schrieb Jan Tosovsky :

> XSLT 1.0 is capable to handle anything (turing machine).
> XSLT 2.0 brings some syntactic sugar.
> XSLT 3.0 supports streaming.
> 
> If you need 2.0 features, you can use Saxon-B 9.1.0.8 (free, but not
> maintained any more).

Thank you, I’ll first try xsltproc.

>> ... I would need are global variables.
> 
> In pure XSLT any variable is fixed and its value cannot be changed. There
> are, however, different approaches how to accomplish this. Most common is
> defining template parameters and passing the proper values via them, see
> below.
> 
>> E.g. if I don’t markup all my paragraphs (because it clutters the
>> source too much and is tedious), I get s between the original
>> paragraphs. I could convert these to HTML s like:
>> 
>> 
>> 0
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 1
>> 
>> 0
>> 
> 
> 
> 
>   
>   
>   
> 
> 
> 
>   
>   
> 

Thank you very much!


> Btw, istead of 
> 
> 
> you can write 
> 

No,  ist not !

I want to get from

text text text

text text text

(when I don’t use \start/stopparagraph)

to


text text text


text text text


But *if* there is paragraph markup,  should become . That’s why 
I tried to use a status variable to know if there was a explicit paragraph 
start.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] suppress header-footers

2015-09-14 Thread Wolfgang Schuster

Pablo Rodriguez 
14. September 2015 19:13

Hi Hans,

\setuppagenumbering[alternative=doublesided] is the command I know to 
work.


You can add either blank or header and footer to page break option, such
as in:

\setuppagenumbering[alternative=doublesided]
\setuphead[chapter][page={yes, header, footer, right}]
\setupheadertexts[Header]
\setupfootertexts[Footer]
\starttext
\dorecurse{3}{\chapter{Chapter}\noheaderandfooterlines}
\stoptext

For some strange reason (at least, unknown to me), header and footer
must be placed before right (if specified at all).

I will explain it for you.

When your text from the previous chapter ends on a right page the "yes" ends
the page end we move to the next left page. With the "header" and "footer"
keywords we disable the header and footer lines on this page. The last
keyword "right" moves us from the now empty left page to the following 
right page.


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] Custom XML Export

2015-09-14 Thread Jan Tosovsky
On 2015-09-12 Henning Hraban Ramm wrote:
> Am 2015-09-12 um 18:14 schrieb luigi scarso :
> 
> > Do you know a good XSLT processor except Saxon? Its free version is
> > just too limited.
> > 
> > xsltproc for xslt 1.0, but you are looking for xslt 2.0 , right ?
> 
> No, the only extension from commercial Saxon ...
 
XSLT 1.0 is capable to handle anything (turing machine).
XSLT 2.0 brings some syntactic sugar.
XSLT 3.0 supports streaming.
 
If you need 2.0 features, you can use Saxon-B 9.1.0.8 (free, but not
maintained any more).

> ... I would need are global variables.

In pure XSLT any variable is fixed and its value cannot be changed. There
are, however, different approaches how to accomplish this. Most common is
defining template parameters and passing the proper values via them, see
below.

> E.g. if I don’t markup all my paragraphs (because it clutters the
> source too much and is tedious), I get s between the original
> paragraphs. I could convert these to HTML s like:
> 
> 
> 0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1
> 
> 0
> 



   
   
   



   
   



Btw, istead of 


you can write 



> Maybe there’s another solution, but I’m not comfortable enough in XSL
> to see it.

Yes, functional programming requires different approaches, but I undestand
it can be tough. As for me in early stages :-)

Jan
<>___
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] suppress header-footers

2015-09-14 Thread Wolfgang Schuster

Pablo Rodriguez 
14. September 2015 21:28

Many thanks for the explanation, Wolfgang.

I have only a question: why doesn’t blank behave the same way? Is blank
a switch?

What do you expect from blank?

\setupbackgrounds[page][background=color,backgroundcolor=yellow]

\setuppagenumbering
  [alternative=doublesided,
% page={yes,blank,right},
  ]

\starttext

\dorecurse{3}{\input knuth\par}
\page[yes,blank,right]
\dorecurse{6}{\input knuth\par}
\page[yes,blank,right]
\dorecurse{3}{\input knuth\par}

\stoptext

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] suppress header-footers

2015-09-14 Thread Pablo Rodriguez
On 09/14/2015 08:33 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 14. September 2015 19:13
>> [...]
>> For some strange reason (at least, unknown to me), header and footer
>> must be placed before right (if specified at all).
> 
> I will explain it for you.
> 
> When your text from the previous chapter ends on a right page the "yes" ends
> the page end we move to the next left page. With the "header" and "footer"
> keywords we disable the header and footer lines on this page. The last
> keyword "right" moves us from the now empty left page to the following
> right page.

Many thanks for the explanation, Wolfgang.

I have only a question: why doesn’t blank behave the same way? Is blank
a switch?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] suppress header-footers

2015-09-14 Thread Meer, Hans van der
With \noheaderandfooterlines one can suppress the header and footer lines on 
the current page.

When using \setuplayout[location=doublesided] a blank page is generated if 
necessary. However this generated page does contain header/footer, 
notwhithstanding the use of \noheaderandfooterlines. Is it possible to avoid 
this?

Hans van der Meer




___
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] Custom XML Export

2015-09-14 Thread luigi scarso
On Sat, Sep 12, 2015 at 2:28 PM, Henning Hraban Ramm  wrote:

> Am 2015-09-12 um 18:14 schrieb luigi scarso :
>
> >> Do you know a good XSLT processor except Saxon? Its free version is
> just too limited.
> >
> > xsltproc for xslt 1.0, but you are looking for xslt 2.0 , right ?
>
> More like 3.0, I guess ;)
>

Saxonica has also an opensource java/c# xslt 2.0
http://www.saxonica.com/products/latest.xml

(xslt 3.0 is still a draft right ?)

-- 
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] Custom XML Export

2015-09-14 Thread Henning Hraban Ramm
Am 2015-09-13 um 02:53 schrieb Aditya Mahajan :

>> Do you know a good XSLT processor except Saxon? Its free version is just too 
>> limited.
> 
> Why not just use your favorite programming language; most languages have a 
> decent XML parsing library?

Yes of course (mine is Python). I don’t know why I stick to shell scripts so 
much.
It’s maybe just that "everyone and his dog" suggests XSLT to transform XML 
files.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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