Re: [NTG-context] Expandable \doifelse tests

2017-09-08 Thread Meer, Hans van der
While going through the posts I had stowed away because I found them 
interesting, I came along this one.
There is not a problem here, just a tiny observation.

In order to work
   \doifelse{a}{\doifelse{x}{x}{a}{b}}{yes}{no}
properly it is sufficient that the inner \doifelse is of the expandable kind.

Thus
   \doifelse{a}{\expdoifelse{x}{x}{a}{b}}{yes}{no}
yields the same as
  \expdoifelse{a}{\expdoifelse{x}{x}{a}{b}}{yes}{no}

Hans van der Meer




On 21 May 2017, at 10:21, Wolfgang Schuster 
> wrote:

\starttext

\expdoifelse{a}{\expdoifelse{x}{x}{a}{b}}
  {yes}
  {no}

\stoptext

Wolfgang

Henri Menke
21. Mai 2017 um 10:14
Dear list,

Motivated by this question on TeX.SX 
https://tex.stackexchange.com/questions/370868 I was fiddling around with the 
\doifelse conditionals. I noticed that most of them are not expandable, which 
makes it very difficult to concatenate them. Here a simple example

\starttext

\doifelse{a}{%
\doifelse{x}{x}{a}{b}% <- evaluates to "a" but not expandable
}{yes}{no}

\stoptext

This outputs "no" even though "a" is equal to "a".

Would it be possible to substitute these conditionals by expandable ones? I 
would volunteer to help make them expandable.

Cheers, Henri
___
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
___

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

___
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] Background with rounded corners (Metafun)

2017-09-08 Thread Meer, Hans van der

> \defineornament
>[FrameTitle]
>[preset=lefttop]

I tried this example and I wonder what the  [preset=lefttop] does. Because 
whatever I fill in for lefttop, the ornament appears always in the topleft 
corner and nowhere else.
Hans van der Meer




> On 23 Aug 2017, at 00:50, Aditya Mahajan  wrote:
> 
> On Wed, 23 Aug 2017, Fabrice Couvreur wrote:
> 
>> Hello,
>> I would like to have three corners rounded as in the figure.
> 
> Not sure if you had simplified your example or not. But if all you want is a 
> rounded corner, you can consider using corner=number parameter of framed and 
> framed text:
> 
> http://wiki.contextgarden.net/Framed#Rounded_Corners
> 
> Here is an example (that does not use metapost).
> 
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
> 
> \defineornament
>[FrameTitle]
>[preset=lefttop]
>[
>  frame=off,
>  foregroundstyle=\bfx,
>  foregroundcolor=white,
>  background=color,
>  backgroundcolor=MyColorB,
>]
> 
> \defineframedtext
>  [FramedText]
>  [
>offset=0.6em,
>toffset=\lineheight,
>background=color,
>backgroundcolor=MyColorA,
>foregroundstyle={\switchtobodyfont[10pt]},
>align=verytolerant,
>frame=off,
>corner=01,
>  ]
> 
> 
> \showframe
> \starttext
> 
> \FrameTitle{Info}{\startFramedText[width=10cm]
>  L'équivalent vingt pieds (EVP) est une unité de mesure de conteneurs
> (de longueur courante 20 pieds, soit environ \unit{6,1 meter}).
> 
>  1 EVP représente environ \unit{38,5 cubic meter}.
>\stopFramedText}
> 
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] about "unknown script 'context.lus' or 'max-context.lua'"

2017-09-01 Thread Meer, Hans van der
Allthough I am working with the ConTeXt beta version, I hope you will get 
things running in TeXShop by analogy as it does for me.

On OSX there are directories used by TeXShop one of which is  
~/Library/Engines. The text files there contain scripts that callup a tex run. 
In my case I have a text file called BetaCur.engine to be found in the run 
popup button of TeXShop. In it I have:
#!/bin/bash
source ~/.bashrc
mtxrun --script context "$1"

In the .bashrc file in my home directory the directory where the ConTeXt files 
reside is given amongst other defines:
CONTEXTROOT=$HOME/Applications/TeX-programs/directory-of-my-contextbeta-files/tex
export CONTEXTROOT
PATH=$PATH:$CONTEXTROOT/texmf-osx-64/bin

I hope this will help you to customize things to your setup.

Hans van der Meer




On 1 Sep 2017, at 10:27, Jeong Dal > wrote:

Dear all,

1. Today, I installed TeXlive 2017 using MacTeX and do a simple test using 
TeXshop.

When I run a sample file using “ConTeXt(LuaTeX)”, then I got an error message:

mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

I also did “mtxrun —generate”in the terminal which runs well.  But “luatools 
—generate” also issue the similar error message:

mtxrun  | unknown script ‘base.lua’ or 'mtx-base.lua'

However, it runs well under Stand-alone ConTeXt.
What I have to do to make TeXlive work?

2. Recently, I also installed Textadept in OS X for test, and follow the steps 
explained in the wiki.

If I open textadept in the terminal(open -a textadept), ConTeXt, lua, Python 
worked OK.
But it  issued an error message as following  when I open it directly from the 
application folder.

> mtxrun --autogenerate --script context --autopdf --purge --synctex=-1 
> "Main.tex"
Failed to execute child process "mtxrun" (No such file or directory)
> exit status: 256

In the terminal, echo $PATH contains the folder “/Library/TeX/texbin” which 
contains all executables of TeXlive 2017.
Is there anything that I have to do more?

Thank you for reading.

Best regards,

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

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

2017-07-21 Thread Meer, Hans van der

> On 21 Jul 2017, at 07:00, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 07/20/2017 10:06 PM, Meer, Hans van der wrote:
>> I did use: \setupnotes[footnote][split=verystrict,scope=page] so I guess
>> there is not much hope here.
>> 
>> A related question: the numbering of endnotes is placed in the
>> leftmargin. Is there a parameter setting that forces them in the
>> textarea of the page?  I tried \setupnotes[endnote][location=text] but
>> without success.
> 
> Hans,
> 
> \setupnotation[endnote][alternative=serried] is what you need.

Does the trick. Thanks. I was afraid I had to make an ad hoc macro, but this is 
far better.

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

Re: [NTG-context] footnote placement

2017-07-20 Thread Meer, Hans van der
I did use: \setupnotes[footnote][split=verystrict,scope=page] so I guess there 
is not much hope here.

A related question: the numbering of endnotes is placed in the leftmargin. Is 
there a parameter setting that forces them in the textarea of the page?  I 
tried \setupnotes[endnote][location=text] but without success.

Hans van der Meer




On 20 Jul 2017, at 21:33, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 7/20/2017 9:14 PM, Meer, Hans van der wrote:
Pablo,
[scope=page] does not help.
I did a few experiments with the following result.
If the footnote is close to the previous page, than obviously the float 
mechanism may decide to put the footnote on the previous page. This happens 
even when the footnote is in the second paragraph of that page. Only when the 
footnote is far enough from the top of the page (I have no inkling how far is 
far enough) will the footnote appear on the current page, as where one expects 
it.
I guess this is a tricky one, but perhaps Hans Hagen will know what to do or 
what to change. I am convinced he will not be afraid of some trickery:-)

if verystrict is not helping there is not much that we can do as tex decides if 
keeping note and reference on one page is possible at all given other 
constraints

(of course there can be a bug in context)

Hans van der Meer
On 20 Jul 2017, at 20:28, Pablo Rodriguez <oi...@gmx.es<mailto:oi...@gmx.es>> 
wrote:

On 07/20/2017 11:16 AM, Meer, Hans van der wrote:
It happens that a footnote generated on a certain page is typeset on
the page preceding it. Rather than that, I would like to force a
footnote to appear either on the page where it is defined or on the
following page. Can such behaviour be enforced?
Currently this is my footnote setup:
\setupnotes   [footnote][split=verystrict]

Hans,

I would add "scope=page", but that would prevent moving the footnote to
the next page.

I don’t know whether this would prevent the footnote to be placed in the
page before where it is defined.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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<mailto:ntg-context@ntg.nl> / 
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl<http://www.pragma-ade.nl/> / 
http://context.aanhet.net<http://context.aanhet.net/>
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net<http://contextgarden.net/>
___


--

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.nl<http://www.pragma-ade.nl/> | 
www.pragma-pod.nl<http://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<mailto:ntg-context@ntg.nl> / 
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl<http://www.pragma-ade.nl/> / 
http://context.aanhet.net<http://context.aanhet.net/>
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net<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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] footnote placement

2017-07-20 Thread Meer, Hans van der
Pablo,

[scope=page] does not help. 

I did a few experiments with the following result.
If the footnote is close to the previous page, than obviously the float 
mechanism may decide to put the footnote on the previous page. This happens 
even when the footnote is in the second paragraph of that page. Only when the 
footnote is far enough from the top of the page (I have no inkling how far is 
far enough) will the footnote appear on the current page, as where one expects 
it.

I guess this is a tricky one, but perhaps Hans Hagen will know what to do or 
what to change. I am convinced he will not be afraid of some trickery:-)

Hans van der Meer




> On 20 Jul 2017, at 20:28, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 07/20/2017 11:16 AM, Meer, Hans van der wrote:
>> It happens that a footnote generated on a certain page is typeset on
>> the page preceding it. Rather than that, I would like to force a
>> footnote to appear either on the page where it is defined or on the
>> following page. Can such behaviour be enforced?
>> Currently this is my footnote setup:
>> \setupnotes   [footnote][split=verystrict]
> 
> Hans,
> 
> I would add "scope=page", but that would prevent moving the footnote to
> the next page.
> 
> I don’t know whether this would prevent the footnote to be placed in the
> page before where it is defined.
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] footnote placement

2017-07-20 Thread Meer, Hans van der
It happens that a footnote generated on a certain page is typeset on the page 
preceding it. Rather than that, I would like to force a footnote to appear 
either on the page where it is defined or on the following page. Can such 
behaviour  be enforced? 
Currently this is my footnote setup:
\setupnotes   [footnote][split=verystrict]
\setupnotation[footnote][way=bypage,numberconversion=set 2,headstyle=small]

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

Re: [NTG-context] whitespace between endnotes

2017-07-14 Thread Meer, Hans van der
Exactly what I was looking for. Thanks!

Hans van der Meer




> On 14 Jul 2017, at 17:07, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 07/14/2017 02:44 PM, Meer, Hans van der wrote:
>> \placenotes[endnote] puts a list of endnotes spaced out with the
>> setting of \setupwhitespace. Is there a means to keep
>> \setupwhitespace undisturbed but changing this for the endnotes
>> alone? Some parameter to be specified in \setupnote, \setupnotation
>> or one of its friends perhaps?
> Hans,
> 
> I guess this is what you need:
> 
>\startsetups[setups:endnotes]
>\setupwhitespace[5em]
>\stopsetups
> 
>\setupnote
>[endnote]
>[before=\directsetup{setups:endnotes}]
> 
>\starttext
>\dorecurse{5}{\input zapf\endnote{\input knuth}}
>\placenotes[endnote]
>\stoptext
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] whitespace between endnotes

2017-07-14 Thread Meer, Hans van der
\placenotes[endnote] puts a list of endnotes spaced out with the setting of 
\setupwhitespace. Is there a means to keep  \setupwhitespace undisturbed 
but changing this for the endnotes alone? Some parameter to be specified in 
\setupnote, \setupnotation or one of its friends perhaps?


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

[NTG-context] test on front/body/backmatter

2017-07-14 Thread Meer, Hans van der
Is there a test usable in a macro to determine if one is inside frontmatter, 
bodymatter, backmatter?

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

[NTG-context] nested \xmlprocessfile calls

2017-06-13 Thread Meer, Hans van der
In a document
 
a series of xml files is processed.

The nodes processed are as usual defined in
\xmlsetsetup{#1}\writestatus{}{MARKER}{node1|node2|..}{name:*}\stopxmlsetups
\xmlregistersetup{name:setups}

The root is called with \xmlprocessfile{root}{filename}{} and has a setup as 
follows:
\startxmlsetups name:root
% each inner  node is in turn called with
  \xmlprocessfile{root-node in file}{filename from attribute}{}
\stopxmlsetups

The problem is that the \xmlsetsetup is called each time one of the file's is 
processed, as shown by the MARKER in the log. However, it is the intention to 
process the setups one and for all.
How can the apparent rereading on the defining setups be restricted to an 
inital setup only?

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

Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?

2017-06-07 Thread Meer, Hans van der

> On 7 Jun 2017, at 17:45, Alan BRASLAU  wrote:
> 
> On Wed, 7 Jun 2017 17:12:44 +0200
> Otared Kavian  wrote:
> 
>> The results are correct using \over in both cases, while the first
>> one is weird when using \frac and 
> 


> I have been massacred on this list for ever preferring \over to \frac...

Do not be sad, we will bring flowers to console you - some of us do not hate 
\over  ;-) ;-) ;-)

> __

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

2017-04-27 Thread Meer, Hans van der

I had this code:

99 \placeformula\startformula
100 \eqalignno{
101 >>  H(I,J) &= H(I) + H(J|I)\qquad&\hbox{\ineq[eq:equivoc]}\cr
102 W(I,J) &= H(J) - H(J|I)\qquad&\hbox{\ineq[eq:wedinfo]}\cr
103 }
104 \stopformula

On 26 Apr 2017, at 16:38, Otared Kavian 
> wrote:

It is better to use the construction such as:

\placeformula
\startformula
\startalign
\NC H(I,J) \NC = H(I) + H(J|I) \NR[eq:equivoc]
\NC W(I,J) \NC = H(J) - H(J|I) \NR[eq:wedinfo]
\stopalign
\stopformula

Below I illustrate why this is not better, and I did not find a way how to 
remedy its effect.

This is the original produced by the \eqalignno. See the active links to 
previous equations in green, produced by my \ineq-macro.
The equation numbers here are from the 7th chapter, in the latter (shortened) 
examples the chapter number will be 1.
[cid:6BEAFFEE-7FE7-4CE4-AD45-DB0341A2EA25]

The suggested code gives:
[cid:CEBB66EC-83A5-4A10-A7E3-729FBBB24BD9]

Wrong because the numbers should refer to equations 1.21 and 1.28 instead of 
numbering forward.
Putting my \ineq-macro there
 \NC W(I,J) \NC H(J) - H(J|I)\NR\hbox{\ineq[eq:wedinfo]}
gives an equally unacceptable result:
[cid:ACE1072E-59D0-4310-8FC5-4E9E1FF3485C]



On 26 Apr 2017, at 16:38, Otared Kavian 
> also wrote:

Hi Hans,

Since a few weeks (or months?…) ago the use of \eqno and \eqalignno has been 
changed in mkiv.

A remark afterwards I really regret making. But I cannot understand why 
\eqalignno and friends have been changed from their original behaviour. It 
breaks older products of mine without warning. In fact I wouldn't have spotted 
this, had not a colleague drawn my attention to it. Is this the only math macro 
behaving differently, giving a TeX error? Are there others?

I cannot but ask most strongly not to let mkiv deviate in this manner from 
basic TeX's behaviour. I am doing a lot in ConTeXt but I mix it with parts of 
basic TeX. When I can no longer trust TeX doing like TeX I really don't know 
how to go further. Please return the original behaviour.

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

[NTG-context] eqalignno failing

2017-04-26 Thread Meer, Hans van der
This code now fails where before contextbeta had no problems:

tex error   > tex error on line 101 in file Info/waarneming.tex: ! 
Misplaced alignment tab character &

 &



l.101 H(I,J) &
 = H(I) + H(J|I)\qquad&\hbox{\ineq[eq:equivoc]}\cr

  99 \placeformula\startformula
100 \eqalignno{
101 >>  H(I,J) &= H(I) + H(J|I)\qquad&\hbox{\ineq[eq:equivoc]}\cr
102 W(I,J) &= H(J) - H(J|I)\qquad&\hbox{\ineq[eq:wedinfo]}\cr
103 }
104 \stopformula

This happens in ConTeXt  ver: 2017.04.16 12:32 MKIV beta  fmt: 2017.4.16  int: 
english/english
I am not sure when this started to happen, but for sure after 2016-02-12.

Here is a minimal example to run:

\starttext
\placeformula\startformula
\eqalignno{
3x - 4y &= 5   \cr
x  +  7 &= -2y \cr
z &= 2
}
\stopformula
\stoptext

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

Re: [NTG-context] location of command reference

2017-04-16 Thread Meer, Hans van der
Thanks to both of you. 

It thus turns out there are two copies of the Command Reference!

Grepping for command or reference did find neither of them and "qrcs" didn't 
ring a bell when searching 'by eye'.
I will provide a link in my contextbeta install script in order to not losing 
them again when installing a new beta.
But I think it would be a good idea to change there names to something like 
command-ref.pdf

Hans van der Meer



> On 15 Apr 2017, at 13:19, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
> 
> Look for the files at the following path: 
> tex/texmf-context/doc/context/documents/general/qrcs
> 


> On 15 Apr 2017, at 11:10, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 04/14/2017 03:09 PM, Meer, Hans van der wrote:
>> Where is the handy Command Reference to be found in the beta distribution?
>> I do not see it in ./tex/texmf-context/doc/context/documents/general/manuals
>> and could not spot it elsewhere.
> 
> Hans,
> 
> the ConTeXt Suite has it at
> tex/texmf-context/tex/context/interface/mkiv/i-context.pdf.
> 
> I hope it helps,
> 
> -- 

___
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] Finding OSX fonts

2017-04-14 Thread Meer, Hans van der


> On 14 Apr 2017, at 20:04, Henning Hraban Ramm <te...@fiee.net> wrote:
> 
> Am 2017-04-14 um 14:43 schrieb Meer, Hans van der <h.vanderm...@uva.nl>:
> 
>> OK, --pattern instead of pattern. But then still nothing:
>> 
>> 122 texmf: mtxrun --script fonts --list --pattern="Comic*" --all
> 
> For me it worked (also on OSX), so it’s not the command that’s wrong.
> --script font or fonts seems not the matter.
> 
> Did you refresh the database? 
> i.e.
> mtxrun --script font --reload
> additionally try --force
> 

The reload was necessary, indeed.
Do I then correctly understand that the mtxrun --list call is searching the 
ConTeXt internal fontbase and not the macOS system directly, as I had 
(innocently) expected it was doing?

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

[NTG-context] location of command reference

2017-04-14 Thread Meer, Hans van der
Where is the handy Command Reference to be found in the beta distribution?
I do not see it in ./tex/texmf-context/doc/context/documents/general/manuals
and could not spot it elsewhere.

This is but an old one [cid:DC85F3AF-C98C-4991-8D72-D1B7A5E32800] .

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

Re: [NTG-context] Finding OSX fonts

2017-04-14 Thread Meer, Hans van der
OK, --pattern instead of pattern. But then still nothing:

122 texmf: mtxrun --script fonts --list --pattern="Comic*" --all

resolvers   | trees | analyzing '/Users/hansm/Documents/TeX/texmf'
identifier   familyname   fontname   filename   subfont   instances


Hans van der Meer




On 14 Apr 2017, at 12:31, Henning Hraban Ramm 
<te...@fiee.net<mailto:te...@fiee.net>> wrote:

Am 2017-04-14 um 11:38 schrieb Meer, Hans van der 
<h.vanderm...@uva.nl<mailto:h.vanderm...@uva.nl>>:

mtxrun --script fonts --list pattern="Comic*" --all

it’s --pattern


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
___

___
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] Inline stacking of text

2017-04-14 Thread Meer, Hans van der
The following was in answer to 3/11/2017 4:52 PM, Pavneet Arora:
On 13 Mar 2017, at 00:27, Hans Hagen > 
wrote:

\starttext
   \start
   \definefont[whatever][Sans at 50pt]
\dontleavehmode\inframed
   [foregroundstyle=whatever,
frame=off,
location=middle,
align=flushleft]
   {TITLE---}%
   \dontleavehmode\inframed
   [foregroundstyle=whatever,
frame=off,
location=middle,
align=flushleft]
   {\definedfont[Sans at 25pt] SUB-TITLE}%
   \stopoverlay}
\stoptext

A question about this code. The final } is equivalent to \stop and closes to 
\start at the beginning.
But I canot see the \stopoverlay matching a \startoverlay, as I would have 
expected.
What am I missing here?

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

[NTG-context] Finding OSX fonts

2017-04-14 Thread Meer, Hans van der
I tried in vain to list the MacOSX fonts in mtxrun.

In my .bashrc set:
OSFONTDIR=$HOME/Library/Fonts:/Library/Fonts:/System/Library/Fonts
export OSFONTDIR

Then issuing the following commands:
source ~/.bashrc
echo $OSFONTDIR
/Users/hansm/Library/Fonts:/Library/Fonts:/System/Library/Fonts
mtxrun --script fonts --list pattern="Comic*" --all
resolvers   | trees | analyzing '/Users/hansm/Documents/TeX/texmf'
identifier   familyname   fontname   filename   subfont   instances

Allthough there are definitely Comic fonts (such as Comic Sans MS.ttf) in 
directory /Library/Fonts these are not listed by mtxrun.

What is happening, or better, not happening here?

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

Re: [NTG-context] XML inclusion

2017-04-12 Thread Meer, Hans van der


On 9 Apr 2017, at 16:42, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> wrote:

On 4/7/2017 1:42 PM, Meer, Hans van der wrote:
The command \xmlinclude{}{}{} includes the file specified by attribute 
IDENTIFIER of the element located by LPATH at NODE.
What I would like to do is including a bunch of .xml files where the directory 
to load from is given.

Is this a possibility or could this be a feature added to the ConTeXt 
XML-processing in a new beta?

can you be more explicit

Current setup is as follows:


   


And called in with: \xmlinclude{#1}{include}{file}

The question is: how can this be generalized to include not one file, but by 
giving a directory on the  node including all xml files inside that 
directory (or more generally files given by a pattern like *.xml).

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

[NTG-context] XML inclusion

2017-04-07 Thread Meer, Hans van der
The command \xmlinclude{}{}{} includes the file specified by attribute 
IDENTIFIER of the element located by LPATH at NODE.
What I would like to do is including a bunch of .xml files where the directory 
to load from is given.

Is this a possibility or could this be a feature added to the ConTeXt 
XML-processing in a new beta?

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

Re: [NTG-context] directlua in xml-environment

2016-11-14 Thread Meer, Hans van der
Beste Hans,

Je bent weer terug, alles goed met je, hoop ik.
Twee opmerkingen hier.

(1) Inmiddels na veel pogingen ook een andere oplossing gevonden: 
tex.print(0,string) i.p.v. tex.print(string). Het duurde nogal lang voordat ik 
doorhad wat het LuaTeX-manual bedoelde. De truc met tex.print(0,string) bleek 
nodig om een comma-list komend uit een \xmlatt te kunnen verwerken. Ik heb het 
zo opgelost, misschien iet de beste manier maar het werkt wel:
-- Return comma separated list called with macro name:
hvdm.commalist = function (name, argument)
local s
for s in string.gmatch(argument,"%a+") do
tex.print(0,"\\"..name.."{"..s.."}")
end
end
in een macro aangeroepen met: \directlua{hvdm.commalist("name","#1")}

(2) Ik heb de door mij aangevulde \xmlchainatt en \xmlchainattdef in een aantal 
situaties gebruikt en zo te zien werkt het nu zoals ik uit de xml-mkiv manual 
begrijp: afbreken zodra er een match is en in geval van ..def de default 
teruggeven. Ik recapituleer voor het gemak nog even de veranderingen in 
lxml-tex.lua, in mijn versie vanaf regel 1407:

local function chainattribute(collected,arguments,default) -- AANGEVULD MET 
,default
if collected and #collected > 0 then
local e = collected[1]
while e do
local at = e.at
if at then
local a = at[arguments]
if a then
contextsprint(notcatcodes,a)
return  -- RETURN TOEGEVOEGD
end
else
break -- error
end
e = e.__p__
end
end
if default then -- DEZE IF TOEGEVOEGD
contextsprint(notcatcodes,default)
end
end

Ik hoop dat het de weg naar de volgende beta vindt en dat ik hiermee weer een 
bescheiden bijdrage heb kunnen leveren aan het ConTeXt-'kunstwerk'.

met vriendelijke groet
Hans van der Meer




> On 13 Nov 2016, at 18:23, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 11/13/2016 2:56 PM, Meer, Hans van der wrote:
>> Here is something I do not understand. Possibly I am doing something wrong.
>> 
>> The following code is fine, within <<>> the current contextversion is 
>> printed.
>>  \def\mymacro{\directlua{tex.print("\\contextversion")}}
>>  \starttext
>>   calling mymacro <<\mymacro>>\par
>>  \stoptext
>> 
>> However calling \mymacro from inside \startxmlsetup .. \stopxmlsetup does 
>> not work and results in <<\contextversion>>. I guess that the catcode regime 
>> in that environment is to blame.
>> But how do I change that in order to get things working? I looked into the 
>> LuaTeX-manual where catcodes in relation to tex.print are treated, but in 
>> vain and could not find how to.
>> 
>> What do I have to change?
> \starttexcode
> ...
> \stoptexcode
> 
>> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] directlua in xml-environment

2016-11-13 Thread Meer, Hans van der
Here is something I do not understand. Possibly I am doing something wrong.

The following code is fine, within <<>> the current contextversion is printed.
  \def\mymacro{\directlua{tex.print("\\contextversion")}}
  \starttext
   calling mymacro <<\mymacro>>\par
  \stoptext

However calling \mymacro from inside \startxmlsetup .. \stopxmlsetup does not 
work and results in <<\contextversion>>. I guess that the catcode regime in 
that environment is to blame.
But how do I change that in order to get things working? I looked into the 
LuaTeX-manual where catcodes in relation to tex.print are treated, but in vain 
and could not find how to.

What do I have to change?

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

[NTG-context] \xmlchainatt behaviour

2016-11-11 Thread Meer, Hans van der
I might be doing wrong, but for now I have the strong impression that 
\xmlchainatt is at fault. It does not break the callchain as soon as a match is 
found.
Also according the manual xml-mkiv, \xmlchainatt{#1}{testx}{no-test} should 
return "no-test" but returns nothing. I would very much helped if these macros 
react is I thin they should.
Is this my fault?

Hans van der Meer

Minimal example

% test chainttribute failure.
\startxmlsetups demo:chainatt
\xmlsetsetup{#1}{root|node|innernode}{demo:chainatt:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:chainatt}
\startxmlsetups demo:chainatt:root
root: xmlatt  = <\xmlatt{#1}{test}>\crlf
root: xmlchainatt  = <\xmlchainatt{#1}{test}>\crlf
\xmlall{#1}{*}
\stopxmlsetups
\startxmlsetups demo:chainatt:node
-- node: xmlatt test = <\xmlatt{#1}{test}>\crlf
-- node: xmlchainatt  = \xmlchainatt{#1}{test}\crlf
-- node: xmlchainattdef  = 
\xmlchainattdef{#1}{notest}{no-test}\crlf

\stopxmlsetups
\startxmlsetups demo:chainatt:innernode
 innernode: xmlatt test = <\xmlattdef{#1}{test}{nono}>\crlf
 innernode: xmlchainatt  = \xmlchainatt{#1}{test}\crlf
\stopxmlsetups
\startbuffer[chainatt]

  

  

\stopbuffer
\starttext
\ConTeXt-version=\contextversion\blank
Manual on xml-mkiv page 22 on \tex{xmlchainatt} reads:
returns the value of attribute NAME or empty if no such attribute exists; 
backtracks till a match is found\blank
\xmlprocessbuffer{demo}{chainatt}{}\blank
However, does not stop when backtracking finds "a match".
\stoptext






xml-tex-chainattribute.pdf
Description: xml-tex-chainattribute.pdf
___
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
___

[NTG-context] indenting and whitespace in framedtext

2016-11-09 Thread Meer, Hans van der
Quoting from the command reference:

\startframedtext inherits \setupframedtext
and
\setupframedtext ... indenting = inherits \setupindenting

I interprete this as \setupindenting is carried to the inside of the framedtext 
but this thus not happen. Instead one explicitely sets it on the call of 
\startframedtext.
Why doesn't \startframedtext inherit the value from the document? This is a 
problem because I need this setup for framedtexts called in an inner module.

A second, even more serious problem for me is that the framedtext is ignoring 
the \setupwhitespace.

For both problems see the example below.

Hans van der Meer


\setupindenting[yes,first,medium]
\setupwhitespace[big]
\starttext
\ConTeXt-version = \contextversion

Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.

Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.

\tex{startframedtext[width=\textwidth]}\crlf
\startframedtext[width=\textwidth]
Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.

Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.
\stopframedtext

\tex{startframedtext[width=\textwidth,indenting={yes,first,medium}]}\crlf
\startframedtext[width=\textwidth,indenting={yes,first,medium}]
\setupwhitespace[big]\tex{setupwhitespace[big]}\par
Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.

Text for testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset.
\stopframedtext
\stoptext








indenting-framedtext.pdf
Description: indenting-framedtext.pdf
___
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] indenting

2016-11-09 Thread Meer, Hans van der
Indeed!
But it is a bit surprising that the default space for turning on indenting is 
identing by zero.

Hans van der Meer

On 9 Nov 2016, at 11:38, Mikael P. Sundqvist 
<mic...@gmail.com<mailto:mic...@gmail.com>> wrote:

On Wed, Nov 9, 2016 at 11:12 AM, Meer, Hans van der 
<h.vanderm...@uva.nl<mailto:h.vanderm...@uva.nl>> wrote:
I do not understand why this is not indented by the latest ConTeXt beta.
Neither do options [yes] or [first] on \setupindenting.

Hans van der Meer


\setupindenting[always]
\setupwhitespace[big]
\starttext
\ConTeXt version = \contextversion

Text fot testing indenting of praragraphs. A lot of nonsense just to fill
the paragraph so that more than one line is typeset. A lot of nonsense just
to fill the paragraph so that more than one line is typeset. A lot of
nonsense just to fill the paragraph so that more than one line is typeset.

Text fot testing indenting of praragraphs. A lot of nonsense just to fill
the paragraph so that more than one line is typeset. A lot of nonsense just
to fill the paragraph so that more than one line is typeset. A lot of
nonsense just to fill the paragraph so that more than one line is typeset.

Text fot testing indenting of praragraphs. A lot of nonsense just to fill
the paragraph so that more than one line is typeset. A lot of nonsense just
to fill the paragraph so that more than one line is typeset. A lot of
nonsense just to fill the paragraph so that more than one line is typeset.
\stoptext

I think you have to give the amount of indenting as well. Try for example

\setupindenting[always,medium]

/Mikael
___

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

[NTG-context] indenting

2016-11-09 Thread Meer, Hans van der
I do not understand why this is not indented by the latest ConTeXt beta. 
Neither do options [yes] or [first] on \setupindenting.

Hans van der Meer


\setupindenting[always]
\setupwhitespace[big]
\starttext
\ConTeXt version = \contextversion

Text fot testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset. A lot of nonsense just to 
fill the paragraph so that more than one line is typeset.

Text fot testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset. A lot of nonsense just to 
fill the paragraph so that more than one line is typeset.

Text fot testing indenting of praragraphs. A lot of nonsense just to fill the 
paragraph so that more than one line is typeset. A lot of nonsense just to fill 
the paragraph so that more than one line is typeset. A lot of nonsense just to 
fill the paragraph so that more than one line is typeset.
\stoptext






indenting.pdf
Description: indenting.pdf
___
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] context xml manual

2016-10-12 Thread Meer, Hans van der
Thanks. I did a context run and now I am asking: shouldn't the API details 
given for each setup?
For example:
\xmlflush{NODE}
\xmltext{NODE}{LPATH}

Not all are so evident, see for example on page 18 the explanation for 
\xmlprocessbuffer:
registers buffer NAME as NAME and ...
Which I think could be better (iff I do understand correctly)
\xmlprocessbuffer{NAME}{BUFFER}{XMLSETUP}

Hans van der Meer



> On 12 Oct 2016, at 16:54, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
>
>> Meer, Hans van der 12. Oktober 2016 um 16:49
>> Did a small disaster happen in typesetting the XML manual? I find "MISSING 
>> SETUP"s all over the place. See the sample page.
>> This is ConTeXt  ver: 2016.10.08 00:11 MKIV beta
> xml-mkiv.tex (line 24):
>
> -\loadsetups[i-en-xml.xml]
> +\loadsetups[i-xml.xml]
>
> 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://context.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___



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

[NTG-context] context xml manual

2016-10-12 Thread Meer, Hans van der
Did a small disaster happen in typesetting the XML manual? I find "MISSING 
SETUP"s all over the place. See the sample page.
This is ConTeXt  ver: 2016.10.08 00:11 MKIV beta

Hans van der Meer






xml-mkiv-page.pdf
Description: xml-mkiv-page.pdf
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] loading and executing xml-buffer

2016-10-12 Thread Meer, Hans van der
I did not succeed in on-the-fly loading data from an xml-buffer and 
subsequently executing its content.
The accompanying minimal example of a  shows what I strive to 
accomplish.
The node  contains the buffered data (abc meant to be set in bold) and 
node  executing the typesetting. As can be seen the output the 
xyz outside  is correctly set in bold, but the contents of 
 is not processed: the xml is just reproduced. Obviously there is some 
misunderstanding on my part.
I would like to be pointed in the right direction.

Hans van der Meer

\startbuffer[demo-xml]



abc



xyz

\stopbuffer

\enabletrackers[lxml.loading,lxml.setups]

\startxmlsetups xml:demo:base
\xmlsetsetup{#1}{document|buffer|getbuffer|execbuffer|b}{xml:demo:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:buffer
... enter  for "\xmlatt{#1}{name}"\crlf
\xmltobuffer{#1}{.}{\xmlatt{#1}{name}}
\stopxmlsetups

\startxmlsetups xml:demo:getbuffer
... enter  for "\xmlatt{#1}{name}"\crlf
\xmlprocessbuffer{}{\xmlatt{#1}{name}}{xml:demo:execbuffer}
\stopxmlsetups

\startxmlsetups xml:demo:execbuffer
... enter \crlf
\xmlall{#1}{buffer/*}
\stopxmlsetups

\startxmlsetups xml:demo:b
\xmlstripnolines{#1}{.}
{\bf\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:demo:document
\writestatus{TEST}{start document}
start document "\xmldocument"\blank
\xmlflush{#1}\blank
stop document "\xmldocument"\blank
\writestatus{TEST}{stop document}
\stopxmlsetups

\starttext
\textrule{Demo of buffer: demo.xml}
==\crlf
\xmlprocessbuffer{demo}{demo-xml}{}
==\crlf
\stoptext






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

[NTG-context] buffering inside xmlsetups

2016-10-11 Thread Meer, Hans van der
A problem I am obviously not able to solve.
It can be described as follows.

I have an xmlsetup .. that typesets texcode embedded in an xml 
document. Now it is needed to embed initializing a buffer and typesetting 
lateron with \getbuffer. Alas, doing the following does not woek:

\startbuffer[name]
bufferdata
\stopbuffer

because the TeX input hangs. My guess being that the \stopbuffer fails to 
terminate the data intake.

I then tried to split off the buffer filling with a separate xmlsetup. But here 
too, the TeX input halts:

% Usage: 
\startxmlsetups xmlcommon:buffer
\startbuffer[name=\xmlatt{#1}{name}]
\xmlflush{#1}
\stopbuffer
\stopxmlsetups
% Usage: 
\startxmlsetups xmlcommon:getbuffer
\xmlflushcontext{\getbuffer[name=\xmlatt{#1}{name}]}
\stopxmlsetups

and as input: inputdata followed by .
The getbuffer setup is not even reached, as is obvious.

I tried \xmltofile to put the data into an intermediate file, but to no avail 
because it produces the following, leading at best to recursion when processed 
by \xmlprocessfile.




bufferdata


Is there a solution to 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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \showmathfontcharacters ?

2016-10-10 Thread Meer, Hans van der

> On 10 Oct 2016, at 18:18, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Meer, Hans van der 10. Oktober 2016 um 18:07
>> Put at front of the test document
>> \usemodule[math-repertoire]
>> \setupbodyfont[modern,12pt]

Already did this.
>> 
>> Observations:
>> 
>> (1) \showmathcharacterssetbodyfonts{modern}
>> No output
> The command set the fonts which are shown in the document but you still need 
> the \showmathfontrepertoire command to generate the pages.

Then I do not understand its use. Because with or without this command the 
glyphs of the bodyfont are produced by \showmathfontrepertoire.

By the way, most glyphs have a yellow background, but some a green one. What 
does this signify?


>> (2) \showmathfontcharacters[alternative=,option=,modern]}
>> Breaking off after page 2067 with a TeX error "Too many }'s"?
> 1. You’re mixing keywords and assignments.
My mistake. However after correction it looks as if 

\usemodule[math-repertoire]
\setupbodyfont[schola,12pt]
\showmathfontcharacters[alternative=,option=]{modern}
\stoptext

does exactly the same as 

\usemodule[math-repertoire]
\setupbodyfont[schola,12pt]
\showmathfontrepertoire
\stoptext

Because instead of "modern" the first page has the title "schola".

> 
> 2. You have a extra } after \showmathfontcharacters.
>> (3) \showmathfontrepertoire
>> 2067 pages output, one character a page
Very silly of me.

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

Re: [NTG-context] \showmathfontcharacters ?

2016-10-10 Thread Meer, Hans van der
Put at front of the test document
\usemodule[math-repertoire]
\setupbodyfont[modern,12pt]

Observations:

(1) \showmathcharacterssetbodyfonts{modern}
No output

(2) \showmathfontcharacters[alternative=,option=,modern]}
Breaking off after page 2067 with a TeX error "Too many }'s"?

(3) \showmathfontrepertoire
2067 pages output, one character a page

So about (1) and (2) I do not understand what happens.

Hans van der Meer




> On 10 Oct 2016, at 14:44, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 10/10/2016 12:55 PM, Meer, Hans van der wrote:
>> 
>>> On 09 Oct 2016, at 15:51, Hans Hagen <pra...@wxs.nl
>>> <mailto:pra...@wxs.nl>> wrote:
>>> 
>>> On 10/9/2016 1:07 PM, Meer, Hans van der wrote:
>>>> Not more than 3 years ago the addition of \usemodule[math-10] solved
>>>> the Undefined control sequence error for \showmathfontcharacters.
>>>> But at least in ConTeXt  ver: 2016.07.23 13:35 this problem cropped
>>>> up again.
>>>> Where is \showmathfontcharacters defined nowadays?
>>> 
>>> >mtxrun --script grep showmathfontcharacters *.mkiv
>>> 
>>> ./s-math-characters.mkiv125: \unexpanded\def\showmathfontcharacters
>>> ./s-math-characters.mkiv190: \showmathfontcharacters
>>> ./s-math-repertoire.mkiv447:
>>> {\showmathfontcharacters[alternative=,option=,check=yes,#1]
>>> ./s-math-repertoire.mkiv448:
>>> \showmathfontcharacters[alternative=,option=,#1]}
>>> 
>> 
>> Then why do I get an error with:
>> \starttext
>> \showmathfontcharacters[alternative=,option=,lmodern]}
>> \stoptext
>> 
>> system  > ConTeXt  ver: 2016.10.08 00:11 MKIV beta  fmt:
>> 2016.10.10  int: english/english
>> tex error   > tex error on line 4 in file
>> /Users/hansm/Documents/TeX/texmf/texnotes/tester.tex: ! Undefined
>> control sequence
>> 
>> l.4 \showmathfontcharacters
>> [alternative=,option=,lmodern]}
> 
> because you don't load that module (you can run the modules themselves as 
> test)
> 
> 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
> ___

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

[NTG-context] typeset page in page

2016-10-10 Thread Meer, Hans van der
I would like to typeset a page in small format (for example A5) and immediately 
put the result on the current page (for example in A4 format). In this way I 
can demo the result of some operations like variations in footnote parameters 
in a running text, etc.
If this can be accomplished, how?

+--+
|   enclosing page A4  |
|  |
|  |
|   +-+|
|   |  embedded   ||
|   |  page A5||
|   |  format ||
|   | ||
|   | ||
|   | ||
|   | ||
|   +-+|
|  |
|  |
|  |
|  |
|  |
|  |
|  |
+--+


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] \showmathfontcharacters ?

2016-10-10 Thread Meer, Hans van der

On 09 Oct 2016, at 15:51, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 10/9/2016 1:07 PM, Meer, Hans van der wrote:
Not more than 3 years ago the addition of \usemodule[math-10] solved the 
Undefined control sequence error for \showmathfontcharacters.
But at least in ConTeXt  ver: 2016.07.23 13:35 this problem cropped up again.
Where is \showmathfontcharacters defined nowadays?

>mtxrun --script grep showmathfontcharacters *.mkiv

./s-math-characters.mkiv125: \unexpanded\def\showmathfontcharacters
./s-math-characters.mkiv190: \showmathfontcharacters
./s-math-repertoire.mkiv447: 
{\showmathfontcharacters[alternative=,option=,check=yes,#1]
./s-math-repertoire.mkiv448: 
\showmathfontcharacters[alternative=,option=,#1]}


Then why do I get an error with:
\starttext
\showmathfontcharacters[alternative=,option=,lmodern]}
\stoptext

system  > ConTeXt  ver: 2016.10.08 00:11 MKIV beta  fmt: 2016.10.10  
int: english/english
tex error   > tex error on line 4 in file 
/Users/hansm/Documents/TeX/texmf/texnotes/tester.tex: ! Undefined control 
sequence

l.4 \showmathfontcharacters
 [alternative=,option=,lmodern]}

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] MKIV caption separator, revisited

2016-10-10 Thread Meer, Hans van der
Thanks I did not know the correct designations for the various parts of the 
captionlabel: the prefixconnector and the numberstopper. It is clear now.
Hans van der Meer




On 10 Oct 2016, at 10:40, Wolfgang Schuster 
> wrote:

Wolfgang Schuster
10. Oktober 2016 um 10:39
prefixconnector is the separator between the section number (=prefix) and the 
float number (=figure number), the symbol at the end of the float number is 
called numberstopper. In your example you don’t have a section which can act as 
prefix number no did you change which prefixes should be shown (by default only 
chapters are used as prefix).

The suffix key you use (together with suffixconnector and suffixstopper) is 
used to show the number for subfigures, e.g. figure 3.a.
Here is a working example for the use of the prefixconnector key.

\starttext

\section{This is a section}

\setupcaptions[prefixsegments=section,prefixconnector=-]

\startplacefigure[title=\tex{setupcaptions[prefixconnector=-]}]
\externalfigure[dummy][width=.5\textwidth]
\stopplacefigure

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

___
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] Last version standalone ConTeXt issue.

2016-10-10 Thread Meer, Hans van der
This is an interesting feature for handling a call to an undefined macro (as 
might result from \csnam#1\endcsname, for example.

>
> \starttext
>
> \startluacode
>
> function interfaces.defined(name)
>return token.get_cmdname(token.create(name)) ~= "undefined_cs"
> end
>
> if interfaces.defined("foo") then
>context("foo")
> else
>interfaces.setmacro("foo","bar")
> end
>
> \stopluacode
>
> \foo
>
> \stoptext
>
> I'll add interfaces.defined to the core.
>
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | www.pragma-ade.com | 
> www.pragma-pod.nl
> -

As an example I executed the following code:

\starttext
\framed{\ConTeXt-version = \contextversion}\blank

\def\nofoo{This is nofoo}
\startluacode
if interfaces.defined("foo") then
   context("foo")
else
   interfaces.setmacro("foo","nofoo")
end
\stopluacode
\tex{foo} is undefined: "\foo"\crlf
\def\foo{This is foo}
\tex{foo} is defined: "\foo"\crlf
\stoptext

The result of the first call to \foo, however, is not "This is nofoo" but the 
name of the nofoo macro. I expected that \nofoo would have been executed 
instead. That would have been beneficial, because the missing macro \foo can 
then be substituted for something the programmer thinks useful.
Is this correct? Or am I doing something wrong?

Hans van der Meer





tester.pdf
Description: tester.pdf
___
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] MKIV caption separator, revisited

2016-10-10 Thread Meer, Hans van der
Here is the example. \setupcaptions has no effect, however \setupfloatcaption 
does (assuming of course I didn't make a silly mistake ;-). Thus it is no 
problem to get the effect desired, but possibly \setupcaptions should be 
deprecated, or perhaps reimplemented to calling \setupfloatcaption. I could 
have missed the change, but I guess a lot of other people might have missed it 
too. In that case we could spare them the trouble of finding out what happened.

Hans van der Meer

\starttext

\setupcaptions[prefixconnector=-]
\startplacefigure[title=\tex{setupcaptions[prefixconnector=-]}]
\externalfigure[test.jpg][scale=300]
\stopplacefigure

\setupfloatcaption[suffix=-]
\startplacefigure[title=\tex{setupfloatcaption[suffix=-]}]
\externalfigure[test.jpg][scale=300]
\stopplacefigure

\stoptext

On 09 Oct 2016, at 21:44, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
9. Oktober 2016 um 14:36
Is this still valid? Using \setupcaptions[prefixconnector=-] doesn't seem to 
make a difference for \startplacefigure.
Do you have a example?

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

maillist : ntg-context@ntg.nl<mailto: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
___



tester.pdf
Description: tester.pdf
___
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] Slides/material from the Context User Meeting

2016-10-09 Thread Meer, Hans van der
Is there a list of the recently new and updated ones? Because to download all 
of the files on the overview page might be a massive overkill for me. Alas, the 
entries in the list do not have a production date attached.

Hans van der Meer




On 09 Oct 2016, at 17:19, Mohammad Hossein Bateni 
> wrote:


On Thu, Oct 6, 2016 at 4:08 PM, Henning Hraban Ramm 
> wrote:
Am 2016-10-06 um 18:16 schrieb Mohammad Hossein Bateni 
>:

> If I recall correctly someone mentioned on the list that you typically 
> collect the slides during the meeting.  Would it be possible to share them if 
> you have done so this year?

An important part are the updated and added manuals, have a look at
http://www.pragma-ade.com/overview.htm

LuaTeX 1.0.0 is announced and distributed.

Minimals contain a new cowfont (with colorable backgrounds) and some (most? 
all?) of the manuals.

Oh, and the new interface files (texmf-context/tex/context/interface)!

I guess, I was following these gradually as they were happening but I was 
thinking maybe other material from the meeting could be shared.  That's why I 
mentioned the slides of the talks.

> In general, is there any material related to the meeting that unlucky 
> non-participants can access?  I mean, besides the group photo that's up on 
> the website :)

The bitbucket mirror has not been updated since September 24.  Is that normal 
or the result of some configuration mismatch?
___
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] MKIV caption separator, revisited

2016-10-09 Thread Meer, Hans van der
Is this still valid? Using \setupcaptions[prefixconnector=-] doesn't seem to 
make a difference for \startplacefigure.

Hans van der Meer

On 22 Apr 2014, at 08:25, Wolfgang Schuster 
> wrote:


Am 22.04.2014 um 02:57 schrieb Rik Kabel 
>:

Has any progress been made in the past few years implementing modifiable 
separators for captions under MKIV? This was raised as an issue by (at least) 
Mojca Miklavec in December 2010 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg51542.html) and by Andy 
Thomas 18 months later 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg63937.html).
 (Their issues with stopper have been resolved. In MKIV it is numberstopper.)

Here is an MWE demonstrating the problem. It compiles cleanly, but the 
separator remains the default period. With MKII, it generates a figure with a 
hyphen and not a period.
\setupcaptions[separator=-]
\setupcaptions[prefixconnector=-]

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] \showmathfontcharacters ?

2016-10-09 Thread Meer, Hans van der
Not more than 3 years ago the addition of \usemodule[math-10] solved the 
Undefined control sequence error for \showmathfontcharacters.
But at least in ConTeXt  ver: 2016.07.23 13:35 this problem cropped up again.
Where is \showmathfontcharacters defined nowadays?

Hans van der Meer


> On 01 May 2013, at 22:36, Wolfgang Schuster  
> wrote:
> 
> 
> Am 01.05.2013 um 19:15 schrieb "Meer, H. van der" :
> 
>> Why do I get an error on
>> 
>> \starttext
>> \showmathfontcharacters
>> \stoptext
>> 
>> When that macro is defined in s-mat-10.mkiv as
>> \unexpanded\def\showmathfontcharacters
>>   {\dodoubleempty\doshowmathfontcharacters}
>> 
>> 
>> ConTeXt  ver: 2013.04.16 12:08 MKIV beta  fmt: 2013.4.19  int: 
>> english/english
>> ! Undefined control sequence.
>> 9 >>  \showmathfontcharacters
> 
> Add \usemodule[math-10] to your document.
> 
> 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] \mainlanguage[pe]

2016-07-08 Thread Meer, Hans van der
When naming these macros I would recommend to not use abbreviations like \jday, 
\jdate but rather using more explicite names like for example \jalaliday. 
Otherwise confusion with \jdate as a date in the Julian calendar easily could 
result.

Hans van der Meer




> On 07 Jul 2016, at 23:28, Hans Hagen  wrote:
> 
> On 7/7/2016 2:40 PM, Mohammad Hossein Bateni wrote:
>> While you're at it, could you also add something like jday, jmonth, jmm,
>> jyear, etc. to use the Jalali calendar instead of the Gregorian?  I see
>> that the—commented—conversion code exists in core-con.lua.  I am willing
>> to provide test cases for the conversion.
> 
> sure.
> 
> 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
> ___

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

2016-06-29 Thread Meer, Hans van der
Thanks.

For those who are curious as to how I became confused about the 
uppercase-lowercase for smallcaps: look at session "803 Typography and Fonts" 
in Apple's WWDC2016 conference, just after 23 minutes and you will understand.

Hans van der Meer




On 29 Jun 2016, at 11:00, Wolfgang Schuster 
> wrote:

dr. Hans van der Meer

29. Juni 2016 um 10:05
I do not understand the behaviour of the \sc macro. I thought smallcaps would 
turn out to be smaller than capitals. But I see no difference between them 
except a subtle difference in letterspacing. Am I doing something wrong here?

Hans van der Meer

Minimal example and output:

\setuppapersize[A5][A5]
\starttext
\setupbodyfont[lmodern]
lmodern: uppercase  smallcaps\blank
\setupbodyfont[cambria]
cambria: uppercase  smallcaps\blank
\LuaTeX-version=0.\the\luatexversion\crlf
\ConTeXt-version=\contextversion\crlf
\stoptext
Smallcaps changes only the layout of lowercase letters but some fonts let you 
also change uppercase letters.

In the example below you can see how you can change uppercase and lowercase 
letter with the smcp and c2sc features.

\definefontfeature[f:smcp][smcp=yes]
\definefontfeature[f:c2sc][c2sc=yes]

\setupbodyfont[pagella]

\starttext

An easy and breezy Sunday morning.

{\feature[+][f:smcp]An easy and breezy Sunday morning.}

{\feature[+][f:c2sc]An easy and breezy Sunday morning.}

{\feature[+][f:c2sc,f:smcp]An easy and breezy Sunday morning.}

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

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

2016-06-27 Thread Meer, Hans van der

> On 27 Jun 2016, at 10:38, Hans Hagen  wrote:
> 
> The next beta will support this (for mp lovers)
> 
> \definecolor[maincolor]   [r=.5]
> \startMPpage
>fill fullcircle scaled 10cm withcolor "maincolor" ;
>...

> \stopMPpage
> 
> So, in many cases you can use strings instead of \MPcolor{...}.

Thanks. A change making the code imho much more 'attractive' to the eye.

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] Adjusting Kerning/Spacing between Letter

2016-05-25 Thread Meer, Hans van der

> On 02 Jan 2015, at 11:42, Hans Hagen  wrote:
> 
> On 1/2/2015 12:56 AM, Malte Stien wrote:
>> Hi,
>> 
>> I am trying to typeset some strings in {\tt ...}, but they turn out to be 
>> pretty wide. So, I would like to compress those bits of text a little. Any 
>> hints on how I could do that locally, that is without adjusting the entire 
>> font.
> 
> \starttext
>\definecharacterkerning[tight][factor=-.5]
> 
>test {\tt \setcharacterkerning[tight]tight} test
> 
> \stoptext
> 
> (Btw, there is a narrow monospaced lm font)

I implemented it by redefining \tt: 
  \definecharacterkerning[tight][factor=-.075]
  \let\oldtt=\tt 
  \def\tt{\setcharacterkerning[tight]\oldtt}

However, I find this a bit of a kludge. But opinions may differ, of course.
Can this be done in a more general way? For example by setting some font 
feature?
 
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] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

On 24 May 2016, at 17:00, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
24. Mai 2016 um 16:28

Thanks, I really didn't know that, it could not spot it in my copy of "Fonts in 
Context".

But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section.
Why do you think \usebodyfont can be used to change the font size in your 
document, is this mentioned in a manual?
There it keeps the size derived from the section title. Both commands however, 
are reported to inherit from \setupbodyfont (where the reset is named). Should 
that be correct?
IIRC \usebodyfont can be used to preload a typeface at the begin of a document 
which make switching to it later in the document with \switchtobodyfont or 
\setupbodyfont faster but this also means settings like the font size have no 
effect. The reference manual shows "inherits from XXX" in such a case because 
a) it is true that the command inherits its values from another command b) it’s 
faster to document (can be changed but one has to check which arguments are 
valid).


Never too old to learn something I didn't fully understood before. Thanks.

met vriendelijke groet
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] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

> On 24 May 2016, at 15:57, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Meer, Hans van der  24. Mai 2016 um 15:04
>> 
>> Can someone explain to me the changes in fontsize in the following example?
>> Enclosing the fontswitches in a group did not change the behaviour.
>> 
>> \setupbodyfont[dejavu,12pt]
>> \def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red 
>> Master\egroup}}
>> \def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red 
>> Master\egroup}}
>> \starttext
>> \startsection[title=\MarkMasterA First title]
>> \input hawking
>> \MarkMasterA
>> \input hawking
>> \stopsection
>> \startsection[title=\MarkMasterB First title]
>> \input hawking
>> \MarkMasterB
>> \input hawking
>> \blank
>> contextversion=\contextversion
>> \stopsection
>> \stoptext
>> 
>> In the first section the absolute value of 9 pt appears not to be honoured 
>> but it looks as if there is a reduction relative to the surrounding font.
>> In the second section the size does not change and looks even bigger than 
>> the first one above.
>> 
>> I am baffled and do not understand why not all fontsizes are the same 
>> absolute 9pt as requested?
> When you flush the margin text in the heading its style (e.g. \tfa) is added 
> to your font size for the margin text.
> 
> To get rid of the size change from \section in your example you can add the 
> "reset" keyword to \switchtobodyfont.

Thanks, I really didn't know that, it could not spot it in my copy of "Fonts in 
Context".

But although reset works for \switchtobodyfont, it is not working in 
\usebodyfont[reset,9pt] in the second section. There it keeps the size derived 
from the section title. Both commands however, are reported to inherit from 
\setupbodyfont (where the reset is named). Should that be correct?

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
___

[NTG-context] fontsize changes not understood

2016-05-24 Thread Meer, Hans van der

Can someone explain to me the changes in fontsize in the following example?
Enclosing the fontswitches in a group did not change the behaviour.

\setupbodyfont[dejavu,12pt]
\def\MarkMasterA{\inmargin[location=left]{\bgroup\switchtobodyfont[9pt]\red 
Master\egroup}}
\def\MarkMasterB{\inmargin[location=left]{\bgroup\usebodyfont[9pt]\red 
Master\egroup}}
\starttext
\startsection[title=\MarkMasterA First title]
\input hawking
\MarkMasterA
\input hawking
\stopsection
\startsection[title=\MarkMasterB First title]
\input hawking
\MarkMasterB
\input hawking
\blank
contextversion=\contextversion
\stopsection
\stoptext

In the first section the absolute value of 9 pt appears not to be honoured but 
it looks as if there is a reduction relative to the surrounding font.
In the second section the size does not change and looks even bigger than the 
first one above.

I am baffled and do not understand why not all fontsizes are the same absolute 
9pt as requested?

Hans van der Meer






marginfontsize.pdf
Description: marginfontsize.pdf
___
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] Bugs with minimals 2015.05.24 12:42

2016-05-24 Thread Meer, Hans van der

> On 02 Jun 2015, at 14:51, Hans Hagen  wrote:
> 
> If you install extra fonts and files, you should put them in
> 
> tex/texmf-fonts
> tex/texmf-project
> 
> as these are left untouched. That has always been the recommendation. The 
> other trees will be synchronized in an update and that also includes deleting 
> obsolete files.

I guess the same applies to /tex/texmf-local?

And how is that with tex/texmf-modules? I am asking because there is also a 
modules directory:
context/tex/texmf-context/tex/context/modules 
It would be nice if I safely can put my modules there instead of burying them 
somewhere else in the trees.

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] smaller size for particular style

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 20:01, Meer, Hans van der <h.vanderm...@uva.nl> wrote:
> 
> 
>> On 22 May 2016, at 18:08, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
>> wrote:
>> 
>>> Meer, Hans van der 22. Mai 2016 um 10:33
>>> As usual I do a setup for the font with for example: 
>>> \setupbodyfont[cambria].
>>> For most style variants this is fine, but for \tt I find the size too big.
>>> Thus I would like to keep the sizes as setup by the \setupbodyfont for 
>>> everything except for \tt: there all variants (like \tt, \ttx, \ttxx) 
>>> should have the size as if the bodyfont had been setup with 
>>> \setupbodyfont[cambria,small].
>>> 
>>> How to effectuate this?
>> You can define your own typeface where you change the scaling.
>> 
>> \definetypeface [hans] [rm] [serif] [cambria] [default]
>> \definetypeface [hans] [tt] [mono]  [dejavu]  [default] [rscale=0.85]
>> \definetypeface [hans] [mm] [math]  [cambria] [default]
>> 
>> \setupbodyfont[hans]
>> 
>> \starttext
>> a{\tt a} e{\tt e} A{\tt A}
>> \stoptext
>> 
>> Wolfgang
> 
> Am I right that to change nothing more than the size of \tt it is sufficient 
> to just redefine that one only:
> 
> \setupbodyfont[afont]
> \definetypeface [hans][tt][mono][\fontclass][default][rscale=0.85]
> \setupbodyfont[hans]
> 
> and leaving everything else as is?
> 
> Hans van der Meer
> 
> 

No I already guess I am wrong here: in order to keep cambria for rm etc I 
should add also:
\definetypeface [hans][rm][serif][\fontclass][default]
etc.
Right?

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] smaller size for particular style

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 18:08, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Meer, Hans van der 22. Mai 2016 um 10:33
>> As usual I do a setup for the font with for example: \setupbodyfont[cambria].
>> For most style variants this is fine, but for \tt I find the size too big.
>> Thus I would like to keep the sizes as setup by the \setupbodyfont for 
>> everything except for \tt: there all variants (like \tt, \ttx, \ttxx) should 
>> have the size as if the bodyfont had been setup with 
>> \setupbodyfont[cambria,small].
>> 
>> How to effectuate this?
> You can define your own typeface where you change the scaling.
> 
> \definetypeface [hans] [rm] [serif] [cambria] [default]
> \definetypeface [hans] [tt] [mono]  [dejavu]  [default] [rscale=0.85]
> \definetypeface [hans] [mm] [math]  [cambria] [default]
> 
> \setupbodyfont[hans]
> 
> \starttext
> a{\tt a} e{\tt e} A{\tt A}
> \stoptext
> 
> Wolfgang

Am I right that to change nothing more than the size of \tt it is sufficient to 
just redefine that one only:

\setupbodyfont[afont]
\definetypeface [hans][tt][mono][\fontclass][default][rscale=0.85]
\setupbodyfont[hans]

and leaving everything else as is?

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] \page[header]

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 17:44, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Meer, Hans van der 22. Mai 2016 um 17:40
>> 
>> It is not clear as yet.
>> \starttext
>> \input knuth
>> \page[header,yes]
>> \input knuth
>> \page[header,yes]
>> \input knuth
>> \stoptext
>> Here I get three pages, the first two without the last with header. That I 
>> understand.
>> 
>> \starttext
>> \input knuth
>> \page[header]
>> \page
>> \input knuth
>> \stoptext
>> Both pages keep their header.
>> 
>> \starttext
>> \input knuth
>> \page
>> \page[header]
>> \input knuth
>> \stoptext
>> Both pages keep their header.
>> 
>> Should I conclude that the state change occurs if and onlyif when in the 
>> same macrocall a real pagebreak is realize?
>> Because otherwise I do not observe a state change.
> Change the order of the keywords (yes before header).
> 
> The header and footer keywords can be used when you want to hide header and 
> footer texts
> on empty left pages before a chapter etc. in a doublesided document.

That is clear to me. But my question was: why do neither \page\page[header] nor 
\page[header]\page make any difference unless in these cases \page[haeder] is 
effectively a noop.

> 
> \setuppagenumbering[alternative=doublesided]
> \setuphead[chapter][page={yes,header,right}]
> \starttext
> \chapter{First chapter}
> \chapter{Second chapter}
> \stoptext
> 
> Wolfgang


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] name current font

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 17:32, Aditya Mahajan <adit...@umich.edu> wrote:
> 
> On Sun, 22 May 2016, Meer, Hans van der wrote:
> 
>> How do I get the name of the currently set font?
>> macro \currentfont does not exist.
> 
> \fontclass?
> 
> Also see: http://tex.stackexchange.com/a/287123/323
> 
> Aditya

Thanks. I had guessed at \currentfont and not thought of \fontclass.

After \setupbodyfont{...} with \fontname{}, \fontfamily{}, \truefontname{}, 
\fontsize{} existing, how do I pass the fontparameter in there?

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] \page[header]

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 16:32, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 5/22/2016 2:32 PM, Meer, Hans van der wrote:
>> According to the description of \page in the contextgarden:
>> "header - set header off temporarily"
>> 
>> But although this gives two pages numbered 1 and 2:
>> \starttext
>> \input knuth
>> \page
>> \input knuth
>> \stoptext
>> 
>> This one does not honour the new page but typesets everything on page 1:
>> \starttext
>> \input knuth
>> \page[header]
>> \input knuth
>> \stoptext
>> 
>> Is that as intended?
> 
> yes, it just changes a state, but you can use \page[header,yes]

It is not clear as yet.
\starttext
\input knuth
\page[header,yes]
\input knuth
\page[header,yes]
\input knuth
\stoptext
Here I get three pages, the first two without the last with header. That I 
understand.

\starttext
\input knuth
\page[header]
\page
\input knuth
\stoptext
Both pages keep their header.

\starttext
\input knuth
\page
\page[header]
\input knuth
\stoptext
Both pages keep their header.

Should I conclude that the state change occurs if and onlyif when in the same 
macrocall a real pagebreak is realize?
Because otherwise I do not observe a state change.

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
___

[NTG-context] name current font

2016-05-22 Thread Meer, Hans van der
How do I get the name of the currently set font?
macro \currentfont does not exist.

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] new features

2016-05-22 Thread Meer, Hans van der

On 22 May 2016, at 15:11, Hans Hagen > 
wrote:

Finally, when \definemode makes testing a lot faster why than not implement 
this always? That is, using \enablemode or \disablemode the first time implies 
a \definemode for that mode. Doing so avoids another macro to remember: less 
clutter for my brain ;-)

because one property of modes is that one doesn't have to define them, you'd be 
quite unhappy if you would have to define all possible modes that could be 
introduced in styles

The idea was not to have the user define the mode, but let ConTeXt 
automatically do the defining when it encounters a specific mode the first 
time. The work is done by ConTeXt then (would make me even more happy ;-)

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
___

[NTG-context] \page[header]

2016-05-22 Thread Meer, Hans van der
According to the description of \page in the contextgarden:
"header - set header off temporarily"

But although this gives two pages numbered 1 and 2:
\starttext
\input knuth
\page
\input knuth
\stoptext

This one does not honour the new page but typesets everything on page 1:
\starttext
\input knuth
\page[header]
\input knuth
\stoptext

As that as intended?

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
___

[NTG-context] flushleft and startplacefigure

2016-05-22 Thread Meer, Hans van der
\startplacefigure inherits a lot of location settings but among these flushleft 
and flushright are missing.
Thus the \setupfloat in the example cannot be omitted. Wouldn't it be a logical 
step to make possible also:
\startplacefigure[location=flushleft] 
dito for flushright?

\starttext
% example to extend figure into the left margin (Hans Hagen, 2014-07-25)
\setupfloat[figure][location=flushleft]
\startplacefigure
   \framed[width=1.1\textwidth]{location=flushleft}
\stopplacefigure
\stoptext

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] smaller size for particular style

2016-05-22 Thread Meer, Hans van der

> On 22 May 2016, at 12:07, L.S.-Soc <axteff...@gmail.com> wrote:
> 
> Did you try\setupbodyfontenvironment?
> 
> http://wiki.contextgarden.net/Command/setupbodyfontenvironment

Didn't help, because I cannot deduce from this how to systematically change the 
series of fontsizes for one style (tt) only.

> 
> I hope that helps.
> 
> Greetings, Seba
> 
> Am 22.05.2016 um 10:33 schrieb Meer, Hans van der:
>> As usual I do a setup for the font with for example: \setupbodyfont[cambria].
>> For most style variants this is fine, but for \tt I find the size too big.
>> Thus I would like to keep the sizes as setup by the \setupbodyfont for 
>> everything except for \tt: there all variants (like \tt, \ttx, \ttxx) should 
>> have the size as if the bodyfont had been setup with 
>> \setupbodyfont[cambria,small].
>> 
>> How to effectuate this?
>> 
>> Hans van der Meer
>> 

met vriendelijke groet
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] Support for Optional Content Groups

2016-05-22 Thread Meer, Hans van der

> On 03 Jul 2014, at 19:54, Hans Hagen  wrote:
> 
> I tried this in acrobat:
> 
> \defineviewerlayer[visibleandprint]  [printable=yes,state=start]
> \defineviewerlayer[visibleandnotprint]   [printable=no, state=start]
> \defineviewerlayer[notvisibleandprint]   [printable=yes,state=stop]
> \defineviewerlayer[notvisibleandnotprint][printable=no, state=stop]
> 
> \setupinteraction[state=start]
> 
> \starttext
> 
> \startviewerlayer[visibleandprint]   visible and print \stopviewerlayer 
> \blank
> \startviewerlayer[visibleandnotprint]visible and not print 
> \stopviewerlayer \blank
> \startviewerlayer[notvisibleandprint]not visible and print 
> \stopviewerlayer \blank
> \startviewerlayer[notvisibleandnotprint] not visible and not print 
> \stopviewerlayer \blank
> 
> \stoptext
> 
> and found out that we need an extra piece of info for acrobat to be happy. 
> I'll upload a beta with that addition.
> 
> I wonder if other viewers handle layers well.

I tried this today and report the results, curious to see how on my Apple 
Macintosh the following readers cope with this:

- Adobe Acrobat Reader DC version 15.016.20041 (most recent): does as is 
intended
- Apple Preview: shows all four, definitely a bad score for Apple here. 

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
___

[NTG-context] smaller size for particular style

2016-05-22 Thread Meer, Hans van der
As usual I do a setup for the font with for example: \setupbodyfont[cambria].
For most style variants this is fine, but for \tt I find the size too big.
Thus I would like to keep the sizes as setup by the \setupbodyfont for 
everything except for \tt: there all variants (like \tt, \ttx, \ttxx) should 
have the size as if the bodyfont had been setup with 
\setupbodyfont[cambria,small].

How to effectuate 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] bibliography tool

2016-05-22 Thread Meer, Hans van der

> On 30 Jun 2014, at 17:33, Wolfgang Schuster  
> wrote:
> 
> 
> Am 30.06.2014 um 17:29 schrieb Gour :
> 
>> Hans Hagen  writes:
>> 
>>> beware: the mkii derived bibliograpic support for mkiv is replaced so
>>> that page is kind of obsolete (the new manual is in the distribution)
>> 
>> You mean this one http://wiki.contextgarden.net/Bibliography_mkiv is
>> also obsolete?
>> 
>> Where is the new manual and is the manual going to be published in paper
>> form?
> 


> There should be a pdf named mkiv-publications.pdf in your context directory.
> 

This no longer seems to be true. I cannot find such a document in directory
   /tex/texmf-context/doc/context/documents/general/manuals
nor have I found the sources in the corresponding directory.
I presume this is "Bibliographies the ConTeXt Way" by Hans Hagen and Alan 
Braslau I got from somewhere (and alas forgot wherefrom).

It would be nice to have it there, because if time permits I intend to play 
with the new bib-macros in order to familiarize with them.

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] new features

2016-05-22 Thread Meer, Hans van der

> On 26 Jun 2014, at 12:08, Hans Hagen  wrote:
> 
> Another addition is that
> 
> \definemode[something][keep]
> 
> define an undefined mode; the keep makes sure that the already set value is 
> kept (another option is 'yes').
> 
> Using defined modes (that is, set with: \enablemode, \disablemode or 
> \definemode) can be tested about twice as fast as undefined modes which can 
> make a small difference 


I do not understand this fully: 
- if the mode is undefined, how can "define an undefined mode" for a mode that 
has already been given a value with either \enablemode or \disablemode keep a 
value? Must not \enablemode, \disablemode do some sort of 'defining' in order 
to facilitate testing? Does "define" here implements some other mechanism than 
the 'defining' done by \enablemod, \disablemode?

Is this what happens:
- if \enablemode or \disablemode has been used before to set a value for the 
mode, than \definemode[themode][keep] stashes some special definition of that 
mode and does not change c.q. transfers its value;
- \definemode[themode][yes] and \definemode[themode][no] always set that value 
for the mode in case, regardless of what has been done by a preceding 
\enablemode or \disablemode.

Is that the correct interpretation? Just to make sure I understand.

Finally, when \definemode makes testing a lot faster why than not implement 
this always? That is, using \enablemode or \disablemode the first time implies 
a \definemode for that mode. Doing so avoids another macro to remember: less 
clutter for my brain ;-)

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] command reference not searchable

2016-05-20 Thread Meer, Hans van der
Remembered that Hans Hagen recently told me (and Jean-Pierre reminded me of 
this) that the document can be generated with:
   context --extra=setups --overview i-context.xml
I did this and the resultant document now has in the document properties:
  PDF Producer: LuaTeX-0.95.0
  PDF Version : 1.7 (Acrobat 8.x)
This document is searchable indeed, both in Adobe Acrobat Reader DC and in 
Apple's Preview.
Conclusion: the problem must be --at least on my perfectly normal straight 
out-of-the-box MacOSX-- located in the producer "Mac OSX (version) Quartz 
PDFContext". Why? About that I am in the dark.

> On 19 May 2016, at 23:09, Wolfgang Schuster  
> wrote:
> 
>> Jean-Pierre Delange 19. Mai 2016 um 21:59
>> Hi fellows ConTeXt users,
>> 
>> I think the issue comes from Mac OS X PDF reader installation. On Windows, 
>> one can pass the following command:
>> context --extra=setups --overview cont-en.xml which print a PDF file 
>> (ConTeXt Extra) very searchable.
> cont-en.xml is the old reference file (which still exists because it is used 
> in manuals), the updated list is in i-context.xml and all sub files 
> (i-xxx.xml).

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
___

[NTG-context] transparent colors

2016-05-19 Thread Meer, Hans van der
With \definecolor[colorname][r=,g=,b=] one defines a color of name "colorname" 
for use in ConTeXt and in Metapost.
A transparentcolor comes with \definecolor[transparentcolorname][r=,g=,b=,a=,t=]

Problem: how to define a transparent color with 
\definetransparentcolor[#1][#2][#3]{...}. 
To be called for example as 
\definetransparentcolor[transparentcolorname][colorname][0.5] for color 
"colorname" with transparency 0.5.

I tried to do this by intercepting from \definecolor the vales "r=,g=,b=" in a 
macro \colornamergb to be called as \csname..\endcsname for the varying 
colorname and feeding that to a definecolor-variant. However, the parsing of  
r=,g=,b= then goes wrong (\futurelet balking).

Question: is there a direct way to derive a transparent colorvariant from a 
parent one without transparency? The usefulness of this comes from the fact 
that for things like \definecolor[lighthoneydew][r=.894117,g=.95,b=.894117] the 
numbers need not be feed more than once.

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] command reference not searchable

2016-05-19 Thread Meer, Hans van der
Very weird. I haven't the faintest idea why this pdf is not searchable and 
similar ones in the same folder do. 
Checked the permissions but they are the same.
However, I have another document that cannot be searched, the context reference 
manual from 2013 and there seems to be a difference between these two and the 
others.
Those I cannot search have in their properties as PDF producer "Mac OSX 
(version) Quartz PDFContext" (older pdf versions 1.3 and 1.4), the others have 
Luatex as producer (pdf version 1.7).
Therefore, I strongly suspect that the Quartz producer is the culprit, weird as 
it may be.
Is it possible to produce the command reference with Luatex as producer 
excluding the Mac Quartz producer?
It is the only difference I am aware of that matches the behaviour.

> On 19 May 2016, at 19:08, Alan BRASLAU <alan.bras...@cea.fr> wrote:
> 
> I can search this document using any and all pdf tools to which I have
> access on my system.
> 
> Alan
> 
> On Thu, 19 May 2016 16:49:31 +
> "Meer, Hans van der" <h.vanderm...@uva.nl> wrote:
> 
>> Checked again also on a MacBook, definitely not searchable here.
>> I am running El Capitan, and the command reference version is the one
>> from May 17, 2016, found in one of the latest contextbeta
>> distributions.
>> 
>>> On 19 May 2016, at 18:02, Hans Åberg <haber...@telia.com> wrote:
>>> 
>>> 
>>>> On 19 May 2016, at 17:00, Meer, Hans van der <h.vanderm...@uva.nl>
>>>> wrote:
>>>> 
>>>> The command reference in file i-context.pdf is highly useful, but
>>>> that document is not searchable, neither with Preview nor Adobe
>>>> Reader.   
>>> 
>>> Searches work for me in Preview.
> 

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] command reference not searchable

2016-05-19 Thread Meer, Hans van der
Checked again also on a MacBook, definitely not searchable here.
I am running El Capitan, and the command reference version is the one from May 
17, 2016, found in one of the latest contextbeta distributions.

> On 19 May 2016, at 18:02, Hans Åberg <haber...@telia.com> wrote:
> 
> 
>> On 19 May 2016, at 17:00, Meer, Hans van der <h.vanderm...@uva.nl> wrote:
>> 
>> The command reference in file i-context.pdf is highly useful, but that 
>> document is not searchable, neither with Preview nor Adobe Reader. 
> 
> Searches work for me in Preview.
> 


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
___

[NTG-context] command reference not searchable

2016-05-19 Thread Meer, Hans van der
The command reference in file i-context.pdf is highly useful, but that document 
is not searchable, neither with Preview nor Adobe Reader. Files luatex.pdf, 
xml-mkiv.pdf for example are searchable. It would be nice if the command 
reference can be searched too, because for now looking up a command needs a lot 
of page skipping. Can this be done? I would very much appreciate it.

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
___

[NTG-context] MacOsX OSFONTDIR environment variable

2016-05-19 Thread Meer, Hans van der

> On 25 Oct 2013, at 00:13, Hans Hagen  wrote
(in a discussion on the OSFONTDIR environment variable in MacOSX)

> anyway, in a next beta you can set this in texmf.cnf.lua:
> 
> return {
>content = {
>directives = {
>["fonts.usesystemfonts"] = false,
>},
>},
> }
> 
> Best do that in texmf-local as a next update will overwrite the main cnf 
> file. Entries in the he local file overload main ones.

I took the liberty to look again into this matter because the above advice does 
not what I should expect it does: ignoring the MacOSX font directories.
This is what I found in various experiments, OSFONTDIR not defined in the 
environment.

(1) I guess the name of the cnf file should be texmfcnf.lua not texmf.cnf.lua 
because a file with the latter name has no effect, the MACOSX font directories 
still appear in the log.
(2) That file in texmf.local does nothing because again the MacOSX font 
directories are still in the log, but there is a reference to a file of that 
name:
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
(3) Moving texmfcnf.lua to a directory /texmf.local/web2c/ is desastrous, the 
log tells me:
resolvers   | trees | analyzing '/Users/hansm/Documents/TeX/texmf'
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

Questions therefore:
- is the name texmfcnf.lua indeed?
- what should be its location in texmf.local? 
  (texmf/web2c doesn't exist on my system because I restrict myself to the beta)
- is the content of texmfcnf.lua as given above complete?

Referring to a dummy font directory in OSFONTDIR still seems the most viable 
option. Is that correct?

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] ConTeXt commands

2016-05-18 Thread Meer, Hans van der

On 18 May 2016, at 15:41, Hans Hagen > 
wrote:

the setups have always been there but i never really kept them in sync with the 
latest additions but ... recently they have been upgraded to describe nearly 
all commands (also low level ones) .. a pretty impressive effort by Wolfgang 
... the intetface files have been split in smaller files and are under the 
interface subpath alongside base

He is to be praised!

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] ConTeXt commands

2016-05-18 Thread Meer, Hans van der

> On 18 May 2016, at 14:39, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 5/18/2016 2:09 PM, Meer, Hans van der wrote:
>> What is the latest edition of "ConTeXt commands"? The one I have here is 
>> dated July 1,2015. It is missing some commands however: \setupnotes to name 
>> an example.
>> 
>> I find it a very handy document, but alas it is not standard in the 
>> contextbeta distribution as for example the LuaTeX manual in latest editiion 
>> is.
>> Otherwise, where is it to be found? It seems absent from the Contextgarden 
>> homepage.
> 
> search for i-context.pdf
> 

Found it, but wouldn't have looked for the pdf in the mkiv-sources directory. 
May I express the wish that it will be standard located in 
"tex/texmf-context/doc/context/documents/general/manuals" where the other ones 
are? Then I need one symbolic link only "to find them all" (for the Tolkien 
fans )

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
___

[NTG-context] ConTeXt commands

2016-05-18 Thread Meer, Hans van der
What is the latest edition of "ConTeXt commands"? The one I have here is dated 
July 1,2015. It is missing some commands however: \setupnotes to name an 
example.

I find it a very handy document, but alas it is not standard in the contextbeta 
distribution as for example the LuaTeX manual in latest editiion is. 
Otherwise, where is it to be found? It seems absent from the Contextgarden 
homepage.

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] Overlays as background in textbackground

2016-05-18 Thread Meer, Hans van der
This code from three years back ia a reply to a question of placing an overlay 
background. Because the cow is very black I am curious if the \externalfigure 
can have a paramter to change the alpha of the cow, making it more transparent. 
By the way, it is not out of curiosity only. If possible it would forego the 
need to make separate pictures of different transparency beforehand.

> On 15 Jul 2013, at 11:22, Hans Hagen  wrote:
> 
> \definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
> 
> \startuseMPgraphic{mpos:region:whatever}
>for i=1 upto nofmultipars :
>draw textext("\externalfigure[cow.pdf]") rotated 10 shifted center 
> multipars[i] ;
>endfor ;
> \stopuseMPgraphic
> 
> \starttext
> 
>  \startmybackgroundOverlay
>\dorecurse{10}{\input knuth \par}
>  \stopmybackgroundOverlay
> 
> \stoptext

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] Reviewing old messages

2016-05-16 Thread Meer, Hans van der


On 16 May 2016, at 16:41, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
16. Mai 2016 um 16:31
Thanks.

I redid the examples with the autostrut parameter set to respectively yes and 
no. In the former case I see all have an hbox and in the latter case all have a 
vbox. So it seems not the align, but the strut being the one determining the 
box variant.
No, the align settings determines the box type. The \strut at the begin forces 
horizontal mode which results in both \hbox’es in the same line.

Ok. But when using "strut=no,autostrut=no" I see for all values of align the 
abc/xyz below each other and none having abcxyz. Doesn't that suggest that all 
boxes are vbox and that the strut merely forces horizontal mode? Otherwise I do 
not understand what happens.

Thus I did the experiment again, for all options with 
\framed[strut=no,autostrut=no,align=OPTION]{\ifvmode V\else H\f.
I  found a V at the front of the output in each and every case.


\starttext

\ifvmode Vertical \else Horizontal \fi mode

\strut
\ifvmode Vertical \else Horizontal \fi mode

\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] Reviewing old messages

2016-05-16 Thread Meer, Hans van der
Thanks.

I redid the examples with the autostrut parameter set to respectively yes and 
no. In the former case I see all have an hbox and in the latter case all have a 
vbox. So it seems not the align, but the strut being the one determining the 
box variant.

Hans van der Meer




On 16 May 2016, at 16:03, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
16. Mai 2016 um 15:50
Sifting through my TeX-mailbox, I came along this post of Wolfgang Schuster and 
decided to try all variations given to the align parameter on \framed.
Curious in which cases the \hbox and in which the \vbox is chosen, not 
unimportant of course.
I did this by typesetting \hbox{abc}\hbox{xyz} inside a framed. For \hbox want 
expects abcxyz as output and for \vbox abc and below it xyz. As can be seen in 
the first two examples.
To my surprise none of the \framed[align=..] options exhibits \vbox character!

Thus my question: has the behaviour of \framed[align=..] changed in the mean 
time? Three years is of course an eternity when seen in the perspective of the 
speed with which ConTeXt is evolving . Or is there another reason why the 
\vbox effect is not shown in any of the examples?
\framed adds a \strut at the begin and end of the content.

\starttext

\vbox{\hbox{First}\hbox{Second}}

\vbox{\strut\hbox{First}\hbox{Second}}

\framed[align=flushleft]{\hbox{First}\hbox{Second}}

\framed[align=flushleft,strut=no,autostrut=no]{\hbox{First}\hbox{Second}}

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

[NTG-context] Reviewing old messages

2016-05-16 Thread Meer, Hans van der
Sifting through my TeX-mailbox, I came along this post of Wolfgang Schuster and 
decided to try all variations given to the align parameter on \framed.
Curious in which cases the \hbox and in which the \vbox is chosen, not 
unimportant of course.
I did this by typesetting \hbox{abc}\hbox{xyz} inside a framed. For \hbox want 
expects abcxyz as output and for \vbox abc and below it xyz. As can be seen in 
the first two examples.
To my surprise none of the \framed[align=..] options exhibits \vbox character!

Thus my question: has the behaviour of \framed[align=..] changed in the mean 
time? Three years is of course an eternity when seen in the perspective of the 
speed with which ConTeXt is evolving . Or is there another reason why the 
\vbox effect is not shown in any of the examples?
I am enclosing a minmal example and its output. Just curious.

Hans van der Meer


On 18 Apr 2013, at 15:46, Wolfgang Schuster 
> wrote:


Am 18.04.2013 um 15:39 schrieb "Meer, H. van der" 
>:

Why does the [align=middle] makess such a difference?

\framed can use a \hbox or a \vbox to place the content, by default it uses a 
\hbox
but when you set the correct value for the align key it uses a \vbox.

Wolfgang

% testting hbox-vbox behaviour for framed.
\starttext
input:\verbatim{\hbox{\hbox{abc}\hbox{xyz}}}\crlf
\hbox{\hbox{abc}\hbox{xyz}}\blank
input:\verbatim{\vbox{\hbox{abc}\hbox{xyz}}}\crlf
\vbox{\hbox{abc}\hbox{xyz}}\blank
\setupframed[width=0.7\textwidth]
\leftaligned{these are in the command reference}\blank
input:\verbatim{\framed[align=OPTION]{\hbox{abc}\hbox{xyz}}}\blank
inner:\crlf
\framed[align=inner]{\hbox{abc}\hbox{xyz}}\blank
outer:\crlf
\framed[align=outer]{\hbox{abc}\hbox{xyz}}\blank
left:\crlf
\framed[align=left]{\hbox{abc}\hbox{xyz}}\blank
right:\crlf
\framed[align=right]{\hbox{abc}\hbox{xyz}}\blank
flushleft:\crlf
\framed[align=flushleft]{\hbox{abc}\hbox{xyz}}\blank
flushright:\crlf
\framed[align=flushright]{\hbox{abc}\hbox{xyz}}\blank
middle:\crlf
\framed[align=middle]{\hbox{abc}\hbox{xyz}}\blank
center:\crlf
\framed[align=center]{\hbox{abc}\hbox{xyz}}\blank
normal:\crlf
\framed[align=normal]{\hbox{abc}\hbox{xyz}}\blank
no:\crlf
\framed[align=no]{\hbox{abc}\hbox{xyz}}\blank
yes:\crlf
\framed[align=yes]{\hbox{abc}\hbox{xyz}}\blank
broad:\crlf
\framed[align=broad]{\hbox{abc}\hbox{xyz}}\blank
last:\crlf
\framed[align=last]{\hbox{abc}\hbox{xyz}}\blank
r2l:\crlf
\framed[align=r2l]{\hbox{abc}\hbox{xyz}}\blank
l2r:\crlf
\framed[align=l2r]{\hbox{abc}\hbox{xyz}}\blank
\leftaligned{these are extra in the contextgarden}\blank
high:\crlf
\framed[align=high]{\hbox{abc}\hbox{xyz}}\blank
low:\crlf
\framed[align=low]{\hbox{abc}\hbox{xyz}}\blank
lohi:\crlf
\framed[align=lohi]{\hbox{abc}\hbox{xyz}}\blank
\stoptext




framedbox.pdf
Description: framedbox.pdf
___
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] definebodyfontenvironment

2016-05-14 Thread Meer, Hans van der
I think I did not state the problem clear enough.
The solution given here supposes that the fontsize is known beforehand.
However, what I am doing is calculating a font size based on the current one 
and than switch to that size.
It is part of a fontsize changing mechanism inside an xmlsetup. In short what I 
am doing is:

\scratchdimen=\the\dimexpr\bodyfontsize\relax
\advance\scratchdimen 'somevalue' \relax
% \definebodyfontenvironment[\the\scratchdimen]
\begingroup
% must keep the change local
\switchtobodyfont[\the\scratchdimen]
...
\endgroup

The commented out \definebodyfontenvironment kills a lot of the font messages 
but I fear that each the time the same work is done as without it. The only 
benefit being the suppression of the font messages in the log ;-)

It might be impossible to accomplish this efficiently -- that is execute the 
font calculations once only for the given size. But at least I would like to 
give it a try.

Hans van der Meer




On 14 May 2016, at 20:00, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
14. Mai 2016 um 17:55
I like to execute this statement
\definebodyfontenvironment[somevalue]
in order to avoid lots of error messages as such:
fonts > bodyfont '8.0pt' is defined (can better be done global

Is this definebodyfontenvironment macro fully executed each time it is called 
or does ConTeXt remember and execute it once only?
Just put it at the begin of the document.

\definebodyfontenvironment[18pt]

\starttext

\dorecurse{10}
  {\begingroup
   \switchtobodyfont[18pt]
   \endgroup}

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

[NTG-context] definebodyfontenvironment

2016-05-14 Thread Meer, Hans van der
I like to execute this statement
\definebodyfontenvironment[somevalue]
in order to avoid lots of error messages as such:
fonts > bodyfont '8.0pt' is defined (can better be done global

Is this definebodyfontenvironment macro fully executed each time it is called 
or does ConTeXt remember and execute it once only?

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] xml expression error

2016-05-12 Thread Meer, Hans van der
I think I have the problem nailed down to the fact that in the comparison:
something >= -1234
the parser in question separates the minus in the negative number into a 
separate child node, apart from the digits; witness the errormessage in the log 
below.
Changing the number  -1234 in the arithmetic expression to number("-1234") 
(mind the quotes) does give a correctly evaluated expression.

Still, I am baffled by the fact that in arithmetic expressions positive and 
negative numbers are treated differently in the filtering operation.

Hans van der Meer


On 29 Apr 2016, at 15:04, Meer, Hans van der 
<h.vanderm...@uva.nl<mailto:h.vanderm...@uva.nl>> wrote:

Here is a minimal example showing that even a number as -1 is not correctly 
handled by the lpath[selection]-code.
I really am convinced that not handling negative numbers should qualify as a 
mistake.

Hans van der Meer


% failure of negative number comparison.
\startxmlsetups demo:numberfail
\xmlsetsetup{#1}{root|node}{demo:numberfail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:numberfail}
\startxmlsetups demo:numberfail:root
@atta >= 1:\crlf
\xmlfilter{#1}{/[number(@atta) >= 1]/command(demo:numberfail:node)}
\blank
@atta >= -1:\crlf
\xmlfilter{#1}{/[number(@atta) >= -1]/command(demo:numberfail:node)}
\xmlfilter{#1}{/[number(@atta) >= number(-1)]/command(demo:numberfail:node)}
\stopxmlsetups
\startxmlsetups demo:numberfail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[numberfail]




\stopbuffer
\starttext
\xmlprocessbuffer{demo}{numberfail}{}
the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
-1]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= -1 => 
expr.number((ll.at<http://ll.at/> and ll.at<http://ll.at/>['atta'])) >= 
expr.child(ll,'-')1
\stoptyping

the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
number(-1)]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= number(-1) => 
expr.number((ll.at<http://ll.at/> and ll.at<http://ll.at/>['atta'])) >= 
expr.number(expr.child(ll,'-')1)
\stoptyping
\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] typesetting content of attribute

2016-04-30 Thread Meer, Hans van der

On 30 Apr 2016, at 19:08, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 4/30/2016 3:28 PM, Meer, Hans van der wrote:
The aim is to typeset a TeX-command given in an attribute on an xml node.
Example
...
\xmlatt{#1}{style}
...
where the node has


The problem is that this produces the macrotext\bf and does not execute
the \bf.
I guess that the catcoderegime is not that of TeX here.
With what (magical) incantation to do this?

Nb. I know that here I could have coded 'bf" and called with
\csname..\endcsname, but this is but a simple example and would not work
for '\it\bf', etc.

\starttexcode \stoptexcode


Either I am doing something the wrong way, or it isn't that simple. See the 
example and its output.

Hans van der Meer


% failure to typeset attribute.
\startxmlsetups demo:texatt
\xmlsetsetup{#1}{root|node}{demo:texatt:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:texatt}
\startxmlsetups demo:texatt:root
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups demo:texatt:node
node: attribute textstyle = \xmlchainatt{#1}{textstyle}\crlf
now use \tex{it}:
{\starttexcode
\xmlchainatt{#1}{textstyle}"should be italic"
\stoptexcode
}\crlf
\stopxmlsetups
\startbuffer[texatt]



\stopbuffer
\starttext
\xmlprocessbuffer{demo}{texatt}{}
\stoptext





xml-tex-attribute.pdf
Description: xml-tex-attribute.pdf
___
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] typesetting content of attribute

2016-04-30 Thread Meer, Hans van der
The aim is to typeset a TeX-command given in an attribute on an xml node.
Example
...
\xmlatt{#1}{style}
...
where the node has


The problem is that this produces the macrotext \bf and does not execute the 
\bf.
I guess that the catcoderegime is not that of TeX here.
With what (magical) incantation to do this?

Nb. I know that here I could have coded 'bf" and called with 
\csname..\endcsname, but this is but a simple example and would not work for 
'\it\bf', etc.

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
___

[NTG-context] evaluation of != and ~=

2016-04-29 Thread Meer, Hans van der
This one took the better part of an afternoon from me, but I finally found the 
(unexpected) culprit.
In the xml documentation on page 31 it is said:
 The given expression between [] is converted to a LUA expression so you can 
use the use operators: == ~= <= >= < > not and or ()
In addition, = equals == and != is the same as ~=.

This is not true as the following demonstrates. The use of != is as expected 
but the ~= leads to an error and this should not be:

xml> lpath > error in expression: number(@atta) ~= 1 => 
expr.number((ll.at and ll.at['atta'])) ~== 1


Hans van der Meer


% failure of test on inequality.
\startxmlsetups demo:comparefail
\xmlsetsetup{#1}{root|node}{demo:comparefail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:comparefail}
\startxmlsetups demo:comparefail:root
compare \type{!=}\crlf
\xmlfilter{#1}{/[number(@atta) != 1]/command(demo:comparefail:node)}
compare \type{~=}\crlf
\xmlfilter{#1}{/[number(@atta) ~= 1]/command(demo:comparefail:node)}
\stopxmlsetups
\startxmlsetups demo:comparefail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[comparefail]




\stopbuffer
\starttext
\xmlprocessbuffer{demo}{comparefail}{}
Note the absence of output in the second \tex{xmlfilter}.
\stoptext



xml-compare.pdf
Description: xml-compare.pdf
___
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] xml expression error

2016-04-29 Thread Meer, Hans van der

On 28 Apr 2016, at 22:13, Pablo Rodriguez > 
wrote:

On 04/28/2016 05:06 PM, dr. Hans van der Meer wrote:
Why is there anexpression error here? I would expect that the expression
number(-1101) evaluates to a negative number taking part in the
comparsion. It looks as if the minus sign is not seen as an unary minus,
while -1101 should have be evaluated by Lua's tonumber(-1101).

relevant code snippet is:
\xmlfilter{#1}{lpath[number(@date) <= number(-1101)]/command(...)

I wouldn’t get it, even with a minimal sample, but xml-mkiv.pdf includes
the shortcut for this function.

Here is a minimal example showing that even a number as -1 is not correctly 
handled by the lpath[selection]-code.
I really am convinced that not handling negative numbers should qualify as a 
mistake.

Hans van der Meer


% failure of negative number comparison.
\startxmlsetups demo:numberfail
\xmlsetsetup{#1}{root|node}{demo:numberfail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:numberfail}
\startxmlsetups demo:numberfail:root
@atta >= 1:\crlf
\xmlfilter{#1}{/[number(@atta) >= 1]/command(demo:numberfail:node)}
\blank
@atta >= -1:\crlf
\xmlfilter{#1}{/[number(@atta) >= -1]/command(demo:numberfail:node)}
\xmlfilter{#1}{/[number(@atta) >= number(-1)]/command(demo:numberfail:node)}
\stopxmlsetups
\startxmlsetups demo:numberfail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[numberfail]




\stopbuffer
\starttext
\xmlprocessbuffer{demo}{numberfail}{}
the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
-1]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= -1 => 
expr.number((ll.at and ll.at['atta'])) >= 
expr.child(ll,'-')1
\stoptyping

the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
number(-1)]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= number(-1) => 
expr.number((ll.at and ll.at['atta'])) >= 
expr.number(expr.child(ll,'-')1)
\stoptyping
\stoptext




xml-number.pdf
Description: xml-number.pdf
___
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] xml expression error

2016-04-28 Thread Meer, Hans van der

> On 28 Apr 2016, at 22:13, Pablo Rodriguez  wrote:
> 
> On 04/28/2016 05:06 PM, dr. Hans van der Meer wrote:
>> Why is there anexpression error here? I would expect that the expression
>> number(-1101) evaluates to a negative number taking part in the
>> comparsion. It looks as if the minus sign is not seen as an unary minus,
>> while -1101 should have be evaluated by Lua's tonumber(-1101).
>> 
>> relevant code snippet is:
>> \xmlfilter{#1}{lpath[number(@date) <= number(-1101)]/command(...)
> 
> Sorry, Hans, I guess my question will be stupid, but why don’t use
> "tonumber(-1101)"?

It is convenient to use positive numbers for dates after the year 0: AD = Anno 
Domine,
and negative numbers for years before: BC = Before Christ.
Comparing dates is easy in both eras.

> 
> I wouldn’t get it, even with a minimal sample, but xml-mkiv.pdf includes
> the shortcut for this function.
> 
> Just in case it might even help ;-),

Has to wait until tomorrow, because it is already late in the evening.

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] Updating ConTeXt standalone problem on Mac OS X

2016-04-26 Thread Meer, Hans van der
I am running the same OSX El Capitan (from a non-administrator account) and I 
have no problems installing the ConTeXt-beta with the following script executed 
inside a fresk and empty directory:

#!/bin/bash
rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
chmod a+x first-setup.sh
mkdir tex
cd tex
ln -s ~/Documents/TeX/texmf texmf-local
cd ..
sh ./first-setup.sh --context=beta >first-setup.log
#sh ./first-setup.sh --context=current >first-setup.log
#sh ./first-setup.sh --context=date >first-setup.log
exit


On 26 Apr 2016, at 11:34, Mojca Miklavec 
> wrote:

On 26 April 2016 at 11:21, Jaroslav Hajtmar wrote:
Hello ConTeXist
I have a problem with updating ConTeXt on my Mac OS X (El Captain). When you
run the update script to me an error message appears, which surprises me,
since I logged on as the system administrator. Can anyone advise me on what
could be the problem.

Running rsync as an administrator has an ugly consequence that you end
up copying the UID and GUID as-is, so you might end up with files
owned by very strange or perhaps even non-existing users.

Maybe you could play with
   --chown=USER:GROUP
when calling rsync from first-setup.sh to start with.

Who currently owns bin and bin/luatex?

It is not impossible that something changed yesterday though (I was
messing with the server), but the installation works for me. What
happens if you run the installation as a regular user (to a fresh
directory)?

We should look into it, but I need some proper diagnosis first.

Mojca
___

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] useMPgraphic scaling

2016-04-26 Thread Meer, Hans van der

On 25 Apr 2016, at 16:34, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 4/25/2016 3:46 PM, Meer, Hans van der wrote:
Thanks,

Your reply popped up here exactly the moment I saw the light! Must be
something
Messed up the order things:

Was:
\scale[\scalesetting]{%
   \expanded{\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters%

And of course had to be:
\expanded{\scale[\scalesetting]{%
   \useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters%

is the \expanded really needed?

Sure, is needed. Checked it again.
I define \scalesetting as
\edef\scalesetting{scale=\xmlattdef{#1}{scale}{1000}}
But I am not sure why this needs the expansion..

The enclosing \rotate[rotation=\xmlattdef{#1}{rotation}{0}]{...} does not need 
the \expanded.

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] useMPgraphic scaling

2016-04-25 Thread Meer, Hans van der
Thanks,

Your reply popped up here exactly the moment I saw the light! Must be something
Messed up the order things:

Was:
\scale[\scalesetting]{%
\expanded{\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters%

And of course had to be:
\expanded{\scale[\scalesetting]{%
\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters%

On 25 Apr 2016, at 13:22, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 4/25/2016 1:11 PM, Meer, Hans van der wrote:
With images one can scale them on placement, for example 
\externalfigure[][scale=250,height=..] etc.
Is such a scaling or separate height,width setting also possible with the 
placement of useMPgraphic?
Or needs all scaling of thesebe done within the metapost/metafun code?

\scale[...]{}


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
___

[NTG-context] useMPgraphic scaling

2016-04-25 Thread Meer, Hans van der
With images one can scale them on placement, for example 
\externalfigure[][scale=250,height=..] etc.
Is such a scaling or separate height,width setting also possible with the 
placement of useMPgraphic?
Or needs all scaling of thesebe done within the metapost/metafun code?

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] typebuffer different from typefile

2016-04-24 Thread Meer, Hans van der
The point is not that I am without options for a practical solution here. 
My point is that the difference between \typebuffer and \typefile breaks the 
strict and so much appreciated congruence between like macro calls.
Therefore my post must rather be seen as a plea to the maintainer(s) of these 
to consider a change in the given direction.

Hans van der Meer

> On 24 Apr 2016, at 17:04, Pablo Rodriguez  wrote:
> 
> On 04/24/2016 10:31 AM, dr. Hans van der Meer wrote:
>> Why is there a difference in syntax between typing buffers and typing files?
>> For files enclosure in {} for buffers in [], for files optional
>> parameters, for buffers not.
>> Is it possible to make the syntax of these two the same, because their
>> usage parallels each other?
> 
> Hi Hans,
> 
> I wonder whether any of these two options may help you:
> 
>\setuptyping[buffer][style=\ttx]
>\startbuffer[test]
>content of buffer
>\stopbuffer
>\starttext
>\typebuffer[test][style=\ss\red]
>\typefile[style=\ttx\blue]{test.txt}
>\stoptext
> 
> Again, just in case it might help,
> 
> Pablo





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

2016-04-23 Thread Meer, Hans van der
For those still interested in the inclusion of nodes into the root of the 
xml-tree.
With the help of a hint by Hans Hagen, the following is the best I am able to 
produce.
The code below includes the contents of the file twice as can be seen in the 
pdf.

\startbuffer[test]





\stopbuffer

\startxmlsetups notes:setups
\xmlinclude{#1}{include}{file}
\xmlsetsetup{#1}{takenotes}{notes:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{notes:setups}

\startxmlsetups notes:takenotes
\xmlshow{\xmldocument}
\stopxmlsetups

\starttext
\xmlprocessbuffer{demo}{test}{}
\stoptext


Hans van der Meer






mini.pdf
Description: mini.pdf
___
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] xml input

2016-04-22 Thread Meer, Hans van der

On 21 Apr 2016, at 10:41, Hans Hagen > 
wrote:


your

\xmlsetsetup{#1}{*}{-}

makex takenotes into a nothing ... (comment that line if needed to see effects 
in your code)


I got that line from your first demo program in "Dealing with XML in ConTeXt 
Mkiv":

\startxmlsetups xml:demo:base
(1)   \xmlsetsetup{#1}{*}{-}
(2)   \xmlsetsetup{#1}{document|section|p}{xml:demo:*}
\stopxmlsetups

The comment on page 7 with that demo:
(1) \xmlsetup{demo}{*}{-} sets the default for each element (the *) to 'just 
ignore it' (the -). A + would...
(2) followed by  "this means that at this point we only handle" and I 
understood from this that because of the 'section' in statement (2) the 
 node will get processed. Congruent with this example I wrote in my 
example:

\startxmlsetups notes:setups
   \xmlinclude{#1}{include}{file}
   \xmlsetsetup{#1}{*}{-}
   \xmlsetsetup{#1}{takenotes}{notes:*}
\stopxmlsetups

expecting this to mean that  will be activated by it. Is that a 
misunderstanding?

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] xml input

2016-04-21 Thread Meer, Hans van der
A week ago I posted here by accident part of a private conversation (in Dutch) 
with Hans Hagen. I already apologized for this.

On 15 Apr 2016, at 00:47, Mica Semrick 
> wrote:

I'm interested in this thread too... But I'm american, so English only. I 
appreciate your understanding!


>From reactions I understood that other people are interested in this subject 
>of \xmlinclude too, but at that moment I could not produce a coherent story.
After having produced some minimal (1) working, (2)  not working and (3) 
crashing examples, I dare hope that my contribution of these will be of some 
use. And perhaps they will spawn better suggestions and better understanding of 
what happens, because I must confess I am somewhat unsure with functional 
language behaviour, being raised with Assembler, Algol, Pascal, Fortran, and so 
on ;-)

Find below my examples. One can call each of them by commenting out the 
\starthiding.
The last one can be executed by removing the 's at the front of the 
offending statement.
Again, I hope this post will be of some use.

Hans van der Meer

contents of file minimal-example.xml:



Body of first note


Body of second note



Three exampel programs:

\enabletrackers[lxml.loading,lxml.setups]
\startbuffer[notes-xml]




\stopbuffer

\starthiding
% Test #1
\startxmlsetups notes:setups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{notes}{notes:*}
\stopxmlsetups
\xmlregisterdocumentsetup{notes}{notes:setups}
\startxmlsetups notes:notes
\xmlinclude{#1}{include}{file}
\xmlshow{#1}
===> number of  = \xmlcount{#1}{note}
\stopxmlsetups
\starttext
Ok with \type{\xmlprocessbuffer{notes}{notes-xml}{notes:notes}}\crlf
\xmlprocessbuffer{notes}{notes-xml}{notes:notes}
\blank
Not ok with \type{\xmlprocessbuffer{notes}{notes-xml}{}}\crlf
\xmlprocessbuffer{notes}{notes-xml}{}
\textrule{end of test \#1}
\stoptext
\stophiding

\starthiding
% Test #2
\startxmlsetups notes:setups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{takenotes}{notes:*}
\stopxmlsetups
\xmlregisterdocumentsetup{notes}{notes:setups}
\startxmlsetups notes:takenotes
\xmlinclude{#1}{include}{file}
\xmlshow{#1}
===> number of  = \xmlcount{#1}{note}
\stopxmlsetups
\startxmlsetups notes:setups
\xmlflush{#1}
\stopxmlsetups
\starttext
Nothing with \type{\xmlprocessbuffer{takenotes}{notes-xml}{}}\crlf
\xmlprocessbuffer{takenotes}{notes-xml}{}
\blank
Not ok with \type{\xmlprocessbuffer{notes}{notes-xml}{}}\crlf
\xmlprocessbuffer{notes}{notes-xml}{}
\blank
Not ok with \type{\xmlprocessbuffer{notes}{notes-xml}{notes:takenotes}}\crlf
\xmlprocessbuffer{notes}{notes-xml}{}
\textrule{end of test \#2}
\stoptext
\stophiding

%\starthiding
% Test #3
\startxmlsetups notes:setups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{notes}{notes:*}
\stopxmlsetups
\xmlregisterdocumentsetup{notes}{notes:setups}
\startxmlsetups notes:notes
\xmlfilter{#1}{takenotes/include/command(notes:include)}
\xmlshow{#1}
===> number of  = \xmlcount{#1}{note}
\stopxmlsetups
\startxmlsetups notes:include
\writestatus{DEBUG}{enter notes: include file 
\xmlattribute{#1}{../include}{file}}
\xmlinclude{#1}{../include}{file}
\stopxmlsetups
\starttext
\type{\xmlprocessbuffer{notes}{notes-xml}{notes:notes}} will crash
\xmlprocessbuffer{notes}{notes-xml}{notes:notes}
\crlf prints in the log:
\crlf \type{DEBUG > enter notes: include file minimal-example.xml}
\crlf \type{lxml  > tex > including file 'minimal-example.xml'}
\crlf \type{lua error ... attempt to index field 'settings' (a nil value) 
...tail calls}
\textrule{end of test \#3}
\stoptext
\stophiding


___
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] convert old dvi files

2016-04-19 Thread Meer, Hans van der
I need to convert some old dvi files into pdf.
One of the routes seems dvi --(dvips) ->- ps --> pdf
But dvips (taken from the ConTeXt-beta distribution) complains "Couldn't find 
header file: tex.pro"

Where can I find it? It doesn't seem present in the above mentioned 
distribution.
Or is there a ConTeXt mtxrun-call or such, that can do it directly?

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] xml input

2016-04-14 Thread Meer, Hans van der
My fault, wholly my fault! 
Just didn't look precise enough in replying. 
Thought to answer Hans Hagen in private but was a little offguard.
No offense taken.

Hans van der Meer

> On 14 Apr 2016, at 22:56, Pablo Rodriguez  wrote:
> 
> Hans,
> 
> 
> My apologies for the comment, if the message was intended as private.
> 
> 
> Pablo
> 

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

2016-04-14 Thread Meer, Hans van der

On 14 Apr 2016, at 10:45, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>> 
wrote:

On 4/13/2016 4:21 PM, Meer, Hans van der wrote:
I would like to process several input sources as one xml tree. Like this:







with the sources having the structure

...
...


and the code for  containing:
read from all sources given on -notes
afterwards process all content at once

Thus the content of the various source should be read into one tree to
be processed, but I cannot get this done.
How to amalgam this separate sources into one?

a clue: \xmlinclude

By the way: hoe laad ik de inhoud van een buffer net als van een file, is er 
een buffer equivalent van \xmlinclude?

Hans, het spijt me zeer, maar ik begrijp er geen hout meer van want er volgt 
een crash met een lua-error.
Ik lees voor \xmlinclude dat \xmlinclude{NODE}{LPATH}{ATTRIBUTE} de file in het 
attribuut laadt.

Ik heb wat in de code rondgeneusd.
Uit  lxml> tex > including file 'notes-example.xml'
in de log blijkt dat in function lxml.include(id,pattern,attribute,options)
moet zijn uitgevoerd

if trace_loading then
report_lxml("including file %a",filename)
end
noffiles, nofconverted = noffiles + 1, nofconverted + 1
return resolvers.loadtexfile(filename) or ""

Met resolvers tracking komt hier nog tussen:
lxml> tex > including file 'notes-example.xml'
resolvers   > methods > resolving, method 'finders', how 'uri', handler 
'file', argument 'notes-example.xml'
resolvers   > resolving > remembering file 'notes-example.xml' using hash 
'xml::notes-example.xml'
resolvers   > files > file finder: 'notes-example.xml' found
resolvers   > methods > resolving, method 'loaders', how 'uri', handler 
'file', argument 'notes-example.xml'
resolvers   > files > file loader: 'notes-example.xml' loaded
het lijkt erop dat de gezochte file wel geladen is en dat pas daarna ConTeXt 
het opgeeft met de error.

De log geeft me hier:

HVDM-NOTE-DEBUG > enter notes:include
HVDM-NOTE-DEBUG > ..looking for file notes-example.xml
lxml> tex > including file 'notes-example.xml'

lua error   > lua error on line 14 in file 
/Users/hansm/Documents/TeX/texmf/publications/takenotes/take notes.tex:

...-35/tex/texmf-context/tex/context/base/mkiv/lxml-aux.lua:428: attempt to 
index field 'settings' (a nil value)
stack traceback:
...-35/tex/texmf-context/tex/context/base/mkiv/lxml-aux.lua:428: in function 
'include'
...-35/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:579: in function 
<...-35/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:567>
(...tail calls...)


De navolgende code is toch niet fout?

De main input is


  



De file notes-example.xml bevat slechts
 subnodes  etc
omsluiten met ... doet niets anders.

Ik doe het volgende (met loading tracker enabled
\startxmlsetups notes:takenotes
  % Include files and buffers.
  \xmlfilter{#1}{/include/command(notes:include)}
\stopxmlsetups

\startxmlsetups notes:include
  % Include from file.
 \doifnot{\xmlatt{#1}{file}}{\empty}
{\writestatus{HVDM-NOTE-DEBUG}{..looking for file \xmlatt{#1}{file}}
 \xmlinclude{#1}{}{file}}
\stopxmlsetups

Zelfde crash in de volgende gevallen
\xmlinclude{#1}{}{file}
\xmlinclude{#1}{.}{file}
\xmlinclude{#1}{../include}{file}

met vriendelijke groet
Hans van der Meer
met vriendelijke groet
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] xml input

2016-04-13 Thread Meer, Hans van der
Just a thought.

\xmlprocessbuffer and \xmlprocessfile{id}... register the tree they read under 
id. Is there a way to merge several id's to one tree?

Hans van der Meer

On 13 Apr 2016, at 16:21, Meer, Hans van der 
<h.vanderm...@uva.nl<mailto:h.vanderm...@uva.nl>> wrote:

I would like to process several input sources as one xml tree. Like this:







with the sources having the structure

...
...


and the code for  containing:
read from all sources given on -notes
afterwards process all content at once

Thus the content of the various source should be read into one tree to be 
processed, but I cannot get this done.
How to amalgam this separate sources into one?

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
___

[NTG-context] xml input

2016-04-13 Thread Meer, Hans van der
I would like to process several input sources as one xml tree. Like this:







with the sources having the structure

...
...


and the code for  containing:
read from all sources given on -notes
afterwards process all content at once

Thus the content of the various source should be read into one tree to be 
processed, but I cannot get this done.
How to amalgam this separate sources into one?

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] \startuseMPgraphic

2016-04-11 Thread Meer, Hans van der
But why should typing \MPcolor{\MPvar{color}}be necessary or useful when 
\MPvar(color) obviously is sufficient?
Or is there a special reason for the nested macros?

> On 11 Apr 2016, at 19:16, Aditya Mahajan <adit...@umich.edu> wrote:
> 
> On Mon, 11 Apr 2016, Meer, Hans van der wrote:
> 
>> 
>> On 11 Apr 2016, at 16:17, Alan BRASLAU 
>> <alan.bras...@cea.fr<mailto:alan.bras...@cea.fr>> wrote:
>> 
>> Remember that ConTeXt colors can be accessed in MP as
>> \MPcolor{orange}
>> 
>> Alan
>> 
>> However with the snippet below I see the default black with MPcolor and the 
>> wanted red with \MPvar. Thus?
>> 
>> Hans van der Meer
>> 
>> \starttext
>> \startuseMPgraphic{example1}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>withcolor \MPcolor{color};
> 
> This is looking for a color named 'color'. You need \MPcolor{\MPvar{color}}.
> 
> 
>> \stopuseMPgraphic
>> \startuseMPgraphic{example2}{color}
>>   pickup pencircle scaled 1mm;
>>   draw unitsquare scaled 1cm
>>withcolor \MPvar{color};
>> \stopuseMPgraphic
>> \useMPgraphic{example1}{color=red}
>> \useMPgraphic{example2}{color=red}
>> \stoptext
> 
> Aditya

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

2016-04-11 Thread Meer, Hans van der
Wolfgang, Hans,
Thanks for your explanations.
Hans van der Meer

On 11 Apr 2016, at 19:10, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

Meer, Hans van der<mailto:h.vanderm...@uva.nl>
11. April 2016 um 18:49


Could be of course. But the question is: from where the counterintuitive 
behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)
It’s easy to explain on the following example.

 begin example
\starttext

\hfil Text\hfil

\hfill Text\hfill

\stoptext
 end example

At the end of a paragraph TeX removes the last skip and inserts the 
\parskipfill [1] value which is by default "0pt plus 1fil".

For the first text line this results in the expected output but not for the 
second line because the inserted “fil” is smaller than the needed “fill”. You 
can check this when you change the \parskipfill stretchability from fil to fill:

 begin example
\starttext

\hfill Text\hfill

\start \parfillskip = 0pt plus 1 fill
\hfill Text\hfill \par
\stop

\stoptext
 end example

[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp

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

maillist : ntg-context@ntg.nl<mailto: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
___

met vriendelijke groet
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
___

  1   2   >