[NTG-context] \pushbackground for header/footer

2016-07-03 Thread Mohammad Hossein Bateni
Hi,

Can one use {push,pop}background to save/restore backgrounds for
header*text and/or footer*text areas?  I'm trying to typeset a document
where one page has a special background, which I set using
\setupbackgrounds[header][text][background=color,backgroundcolor=gray].
Can I go back to the default setting afterwards or do I need to specify it
explicitly.  I know I can save whatever I put in \setupbackgrounds[page]
using \pushbackground[page] and \popbackground.  I could not get it to work
with header/footer.

\setupcolors[state=start]
\showframe
\setupbackgrounds[header][text][background=color,backgroundcolor=yellow]

\starttext

One
\page

%\pushbackground[page]

\pushbackground[header][text]
\setupbackgrounds[header][text][background=color,backgroundcolor=gray]

Two
\page
\popbackground

Three
\stoptext


Thanks,
MHB
___
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] hz in MkIV

2016-07-03 Thread Mohammad Hossein Bateni
Hi,

In MkIV, the syntax for using hz seems to have changed from
\setupfonthandling to \setupfontexpansion (similarly for protrusion).  What
is the equivalent of the following?  Is this feature supported in MkIV and
LuaTeX?  I tried changing/adding entries to
fonts.expansions.vectors.quality (and .default) to no apparent avail.


\startfonthandling [hz]
  \defineadjustfactor A .5
  \defineadjustfactor B .7
  \defineadjustfactor C .7
  ...
\stopfonthandling


In any case, I'm happy that hz works for Arabic/Farsi despite some warnings
suggesting the contrary (
https://mailman.ntg.nl/pipermail/ntg-context/2008/029765.html).  It does
make certain Farsi texts look better, however, support for tatweel/kashida
would be ideal.  In fact, I was trying to see if I could somehow get it to
work, building on top of hz.  Hans, do you have any suggestions for this?
Would this be feasible and/or worth trying?

I once converted Vafa Khalighi's XeTeX-based code to Lua but ran into
several setbacks.  (The idea is to insert a sequence of
(ZWJ,\nobreak,stretchable leader,\nobreak,ZWJ) between certain character
pairs that join one another.)  Here are some of the issues I faced:
1) This could not be turned off and on within a paragraph because I was
hooking into processors.before action.
2) The mechanism for some (all?) center alignments (including default
figure captions) interferes with what I was hacking (or, to be more
precise, it's the other way around) and causes unnecessary use of tatweel
in those settings.
3) Later I noticed that the added sequence did not inherit many properties
(like font style or color).
4) The optimum values for the stretches I put in depend on the context,
particularly because some environments manipulate \spaceskip for other
reasons.

Sorry for the mumbling.  I can explain more if anyone is interested in
helping to improve this functionality.  Attached is what I have now.

Thanks,
MHB


p-dabeer-kashida.mkiv
Description: Binary data
___
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] RTL bug in textbackground

2016-07-03 Thread Hans Hagen

On 7/3/2016 6:46 PM, Mohammad Hossein Bateni wrote:

Hello,

When using \definetextbackground in RTL setting, the boundaries are not
determined correctly (both for location=paragraph and location=text) and
colors gets messed up.

Here a sort-of-minimal example adapted from details.pdf.  Is there any
particular keys I should use in RTL to fix the issue?


\setupcolors[state=start]
\definecolor[infogray][s=0.5]
\definecolor[textgray][s=0.8]

\definetextbackground[intro]
 [backgroundcolor=infogray,
   backgroundoffset=.25cm,
   offset=.5cm,
   frame=on,framecolor=red,
   location=paragraph,
   color=white]

\definetextbackground[subintro]
 [backgroundcolor=textgray,
   backgroundoffset=0pt,
   offset=0pt,
   frame=off,
   location=text,
   color=blue]

\starttext

\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground

\blank[3*big]

\righttoleft
\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground
\stoptext


I think i fixed it (no upload yet) but this kind of tricky things 
probably need some time to get sorted out.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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] Equivalent of extras option in new bibliography system?

2016-07-03 Thread Thomas A. Schmitz

On 07/02/2016 02:07 AM, Alan Braslau wrote:

Yes. Consider:

\cite[righttext={{, p.~24},{, p.~xx}}] [Author:2016,Author2:2015]

The comma gets parsed (as always) to separate multiple right texts,
assigned here to each citation reference.

The solution to your problem is:

\cite[righttext={{, p.~24}}][Author:2016]

Alternately (if you find the {{ }} strange), you can type
\cite[righttext={\btxcomma p.~24}] [Author:2016]

The macro \btxcomma also takes care of spacing.


I know I shouldn't be asking but answering questions on this topic, but 
here comes anyway: what is the magic incantation to have the righttext 
included within the brackets in authornum styles? So for


\cite[righttext={{,\,100}}][Hagen]

I want the result to look like Hagen [1, 100]. I tried

\definebtx
  [default:cite:author:num] % todo
  [default:cite:authornum]
  [left={\btxleftbracket},
   right={\currentbtxrighttext\btxrightbracket}]

but I get Hagen [1], 100. Any pointers what I should try?

Thomas
___
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] RTL bug in textbackground

2016-07-03 Thread Mohammad Hossein Bateni
Hello,

When using \definetextbackground in RTL setting, the boundaries are not
determined correctly (both for location=paragraph and location=text) and
colors gets messed up.

Here a sort-of-minimal example adapted from details.pdf.  Is there any
particular keys I should use in RTL to fix the issue?


\setupcolors[state=start]
\definecolor[infogray][s=0.5]
\definecolor[textgray][s=0.8]

\definetextbackground[intro]
 [backgroundcolor=infogray,
   backgroundoffset=.25cm,
   offset=.5cm,
   frame=on,framecolor=red,
   location=paragraph,
   color=white]

\definetextbackground[subintro]
 [backgroundcolor=textgray,
   backgroundoffset=0pt,
   offset=0pt,
   frame=off,
   location=text,
   color=blue]

\starttext

\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground

\blank[3*big]

\righttoleft
\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground
\stoptext


Thanks,
MHB
___
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] book

2016-07-03 Thread Mica Semrick
Congratulations! I published my first book using context back in March :)

On July 3, 2016 5:27:24 AM PDT, Andrea Valle  wrote:
>I’d like to thank Hans and all the community for allowing me to do
>this:
>
>http://www.logos-verlag.de/cgi-bin/engbuchmid?isbn=4017=eng
>
>
>It’s been a pleasure.
>
>Thanks
>
>-a-
>
>--
>Andrea Valle
>--
>CIRMA - StudiUm
>Università degli Studi di Torino
>--> http://www.cirma.unito.it/andrea/
>--> http://www.fonurgia.unito.it/andrea/
>--> http://www.flickr.com/photos/vanderaalle/sets/
>--> http://vimeo.com/vanderaalle
>--> andrea.va...@unito.it
>--
>
>"This is a very complicated case, Maude. You know, a lotta ins, a lotta
>outs, a lotta what-have-yous." 
>(Jeffrey 'The Dude' Lebowski)
>
>
>
>
>
>___
>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] trying to delete an attribute reference of a non attribute node

2016-07-03 Thread Thomas A. Schmitz

On 07/03/2016 11:39 AM, Marco Patzer wrote:

has been fixed already

Confirmed, the new beta works. Thanks for the quick fix.



Amazingly, this has also fixed a long-standing bug I had with one of my 
files; I got the same error message. I hadn't been able to find a 
minimal example to reproduce it, so I'm very glad Marco did, thank you 
too! And of course, thanks Hans...


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

2016-07-03 Thread Andrea Valle
I’d like to thank Hans and all the community for allowing me to do this:

http://www.logos-verlag.de/cgi-bin/engbuchmid?isbn=4017=eng 


It’s been a pleasure.

Thanks

-a-

--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> andrea.va...@unito.it
--

"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous." 
(Jeffrey 'The Dude' Lebowski)

___
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] trying to delete an attribute reference of a non attribute node

2016-07-03 Thread Marco Patzer
On Sun, 3 Jul 2016 11:22:20 +0200
Hans Hagen  wrote:

> On 7/2/2016 12:42 PM, Marco Patzer wrote:
> > On Thu, 30 Jun 2016 18:23:18 +0200
> > Marco Patzer  wrote:
> >  
> >> The following example throws the error:
> >>
> >>   ! error:  (nodes): trying to delete an attribute reference of a
> >> non attribute node mtx-context | fatal error: return code: 1
> >>
> >> \setbreakpoints [compound]
> >> \useMPlibrary [dum]
> >>
> >> \starttext
> >>   \startTABLE
> >> \NC \externalfigure [foo-bar] [width=\textwidth] \NC
> >> foo bar foo bar foobarfoobar \bold{} \NC\NR
> >>   \stopTABLE
> >> \stoptext  
> >
> > Any ideas?  
> 
> has been fixed already

Confirmed, the new beta works. Thanks for the quick fix.

Marco
___
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] web site

2016-07-03 Thread Hans Hagen

Hi,


for those accessing the website (for updates) best use prgama-ade.nl 
instead of pragma-ade.com


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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] trying to delete an attribute reference of a non attribute node

2016-07-03 Thread Hans Hagen

On 7/2/2016 12:42 PM, Marco Patzer wrote:

On Thu, 30 Jun 2016 18:23:18 +0200
Marco Patzer  wrote:


The following example throws the error:

  ! error:  (nodes): trying to delete an attribute reference of a non
attribute node mtx-context | fatal error: return code: 1

\setbreakpoints [compound]
\useMPlibrary [dum]

\starttext
  \startTABLE
\NC \externalfigure [foo-bar] [width=\textwidth] \NC
foo bar foo bar foobarfoobar \bold{} \NC\NR
  \stopTABLE
\stoptext


Any ideas?


has been fixed already

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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] ConTeXt and LilyPond problem

2016-07-03 Thread Axel Kielhorn

> Am 29.06.2016 um 10:47 schrieb Robert Blackstone 
> :

> I think I have solved my problem.
> Somehow I managed to get Lilypond working from Terminal.  Then I placed the 
> ConTeXt-example with the LilyPond filter that I tried to compile in the same 
> directory als the lilypond binary. Compiling it, as usual, from TeXShop it 
> still did not start LilyPond and the .pdf still had: "[[output file missing"  
> where the musical example should have been.

You probably had to include 
/Applications/LilyPond.app/Contents/Resources/bin
into $PATH.

This PATH is only known in the Terminal.
When you call ConTeXt from the GUI (via TeXShop) you only have the default PATH.

Since TeXShop calls context via an engine file, you can add the PATH in the 
engine:

Change this line (actual path to context may differ):

set path= (/usr/local/texlive/context/tex/texmf-osx-64/bin /usr/local/bin $path 
)

to

set path= (/usr/local/texlive/context/tex/texmf-osx-64/bin /usr/local/bin 
/Applications/LilyPond.app/Contents/Resources/bin $path )

You will find the engines in:
~/Library/TeXShop/Engines

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