[NTG-context] annotation?

2014-05-18 Thread H. van der Meer
Sorry if this question reaches you twice, but the first time I used an email 
address not registered with this newsgroup.

The following mathml code typesets x+1 twice. 

How can I select between either the mathml code or the annotation form? Thus 
avoiding having them typeset both.

Hans van der Meer

\startbuffer[example-1]
?xml version=1.0 encoding=UTF-8?
 !DOCTYPE math PUBLIC -//W3C//DTD MathML 2.0//EN
  http://www.w3.org/Math/DTD/mathml2/mathml2.dtd;
math mode=display xmlns=http://www.w3.org/1998/Math/MathML;
mrowmi x /mi mo + /mo mn 1 /mn /mrow
 annotation encoding=TeX
x + 1
 /annotation
/math


___
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] mathml mtext behaviour

2014-05-18 Thread H. van der Meer
Sorry if this question reaches you twice, but the first time I used an email address not registered with this newsgroup.The short example below typeset with\usemodule[mathml]\starttext\typebuffer\blank\processxmlbuffer\stoptextand "ConTeXt ver: 2014.04.04 00:08 MKIV beta" shows that the mtext element does not honour the tags within. This severely restricts the presentation.Can this be remedied?Hans van der Meer

mathmlproduction.pdf
Description: Adobe PDF document

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] Lucida fonts with ConTeXt

2014-01-29 Thread H. van der Meer

On 29 jan. 2014, at 20:04, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote:

 Hi, 
 I want to use the Lucida fonts. I understand that these are commercial fonts 
 that I must buy. What should buy and where ? 

Available from lucida-ad...@tug.org.

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] unknown library 'loc'

2014-01-03 Thread H. van der Meer
Has someone an idee what causes the unknown library message as in the log 
below? Is it harmful?

fontstypescripts  unknown library 'loc'
(/Users/hansm/tex/context-16/tex/texmf-context/tex/context/base/type-imp-texgyre.mkiv){/Users/hansm/tex/context-16/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/hansm/tex/context-16/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/Users/hansm/tex/context-16/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map})

ConTeXt  ver: 2013.12.26 12:50 MKIV beta  fmt: 2013.12.29  int: english/english

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] boxedcolumns weirdness

2013-12-29 Thread H. van der Meer

I am typesetting a series of items with boxedcolumns enclose in a framedtext:
\startframedtext[width=\makeupwidth,offset=0pt,frame=off,align=tolerant]
\startboxedcolumns[n=2,separator=rule]

Occasionally it happens that material at the end of the first column is not 
typeset.

It occurs haphazardly in a large (more than 300) series of items. Depending on 
the length of the first columns material (I introduced extra space with \crlf, 
\blank, \blank[dimension]) other items exhibit the effect.

Because of this haphazard character, the large data set and the fact that I 
could not isolate it in a few items, I regrettably do not have a minimal 
example. Thus I can only signal it here, in case others encounter it too. Or in 
case the person maintaining this code happens to spot the problem from the 
observation alone.

Hans van der Meer

ConTeXt  ver: 2013.12.26 12:50 MKIV beta  fmt: 2013.12.29  int: english/english


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] pdf format

2013-12-24 Thread H. van der Meer
I understand. But related to this, how can I add Document Properties? Such as 
setting the Author, Title, Subject, etc. fields as shown in the Adobe Document 
Properties dialogue.
Mind that I have the Adobe Reader only.

Hans van der Meer



On 23 dec. 2013, at 18:07, Hans Hagen pra...@wxs.nl wrote:

 On 12/23/2013 5:43 PM, H. van der Meer wrote:
 In the past, when viewing the pdf produced by ConTeXt in the viewer of
 my browser (Safari) there is shown one page at a time. Old ones still do
 this.
 But pdf produced nowadyas is different, 4 pages appear in the browser
 window. The same happens for example looking at the latest LuaTeX manual.
 
 Has something changed in pdf production?
 Perhaps some parameter that the Adobe-plugin of the browser lets show
 the pdf that way?
 
 And if this is indeed the case, how can I get the original behaviour of
 one page per view back?
 
 it's a browser setup (although a document does contain info about it being 
 doublesided so that a viewer can adapt accordingly)
 
 if i remember right, in the past the pdf shown in safari was a just a 
 vertical sequence of bitmaps
 
 at some point browsers like chrome got a pdf viewer built-in too, but i 
 always disable that (somewhat crippled) one in favour of the reader plugin.
 
 Hans
 
 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
 -
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

2013-12-23 Thread H. van der Meer
In the past, when viewing the pdf produced by ConTeXt in the viewer of my 
browser (Safari) there is shown one page at a time. Old ones still do this. 
But pdf produced nowadyas is different, 4 pages appear in the browser window. 
The same happens for example looking at the latest LuaTeX manual. 

Has something changed in pdf production? 
Perhaps some parameter that the Adobe-plugin of the browser lets show the pdf 
that way?

And if this is indeed the case, how can I get the original behaviour of one 
page per view back?

Hans van der Meer



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] interaction strangeness

2013-12-06 Thread H. van der Meer
Something strange happened here with the interaction in a pdf produced.
There are chapters reacting when clicked in the table of contents but some are 
not. Moreover, this behaviour changes with the version of context used.

I tried 3 versions of the beta:
ConTeXt  ver: 2013.10.15 13:52 MKIV beta
ConTeXt  ver: 2013.11.10 12:23 MKIV beta
One specific chapter does not jump to the starting page when clicked.

ConTeXt  ver: 2013.12.04 11:34 MKIV beta
Nothing changed in the source but now another chapter link also becomes 
inactive!

There is no ready explanation I can think of. Because the document in question 
is about 500 pages I do not yet have a minimal example at hand. And as I 
suspect the problem can have its origin in the complexity and/or size of the 
document, I fear the construction of a minimal example will be difficult. 
Therefore I am first asking if this problem is known already. Afterwards I will 
try to find a small example, of course.

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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
In the table of contents my items are numbers 1, 2, etc. At the number the 
aligning is wrong, the tens are shifted to the right. I tried to remedy with a 
setup:
\setupitemgroup[itemize][each][5,autointro][…]
But changing width, distance, textdistance, itemalign do not have effect on the 
toc.
How to accomplish?

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] interaction strangeness

2013-12-06 Thread H. van der Meer
Some further experimentation: interchanging two chapters makes the problem go 
away. 

It is reproducible, because putting the chapters back als brings the problem 
back. Even stranger, sitting at chapter 5 it kills the interaction for chapter 
6 and 8, leaving the interactivity for the  intervening and later chapters 
intact.

Addition of content to the start of chapter 5 helped for chapter 6 but not for 
chapter 8, which seems strange.
Addition of content to the end of chapter 5 also helped for chapter 6

Addition of content to the start of chapter 7 did help to solve for chapter 8.

So I fear it has in some way to do with the moment the output routine is called 
in relation to the reference processing in \startchapter[title=,reference=].

Hans van der Meer



On 6 dec. 2013, at 12:42, H. van der Meer h.vanderm...@uva.nl wrote:

 Something strange happened here with the interaction in a pdf produced.
 There are chapters reacting when clicked in the table of contents but some 
 are not. Moreover, this behaviour changes with the version of context used.
 
 I tried 3 versions of the beta:
 ConTeXt  ver: 2013.10.15 13:52 MKIV beta
 ConTeXt  ver: 2013.11.10 12:23 MKIV beta
 One specific chapter does not jump to the starting page when clicked.
 
 ConTeXt  ver: 2013.12.04 11:34 MKIV beta
 Nothing changed in the source but now another chapter link also becomes 
 inactive!
 
 There is no ready explanation I can think of. Because the document in 
 question is about 500 pages I do not yet have a minimal example at hand. And 
 as I suspect the problem can have its origin in the complexity and/or size of 
 the document, I fear the construction of a minimal example will be difficult. 
 Therefore I am first asking if this problem is known already. Afterwards I 
 will try to find a small example, of course.
 
 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
 ___

___
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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
The table of contents results from:

\startfrontmatter
\input front
\let\ChapterTOC\relax   % Only then chapters typeset !?
\completecontent
\stopfrontmatter

The table of contents is typeset from the completecontent, so I guess the 
answer to your question will be \setuplist.

There I have set

\setupcombinedlist[content][list=chapter]%  [list={chapter,section}]
\setupcombinedlist[section][list=section]

Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc 
giving the chapters, whereas in the seperate chapters the sections therin 
should appear in their own toc.

Hans van der Meer



On 6 dec. 2013, at 14:44, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 13:53 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 In the table of contents my items are numbers 1, 2, etc. At the number the 
 aligning is wrong, the tens are shifted to the right. I tried to remedy with 
 a setup:
 \setupitemgroup[itemize][each][5,autointro][…]
 But changing width, distance, textdistance, itemalign do not have effect on 
 the toc.
 How to accomplish?
 
 Where is the problem, in your table of contents which is controlled by 
 \setuplist or in your itemize which is controlled by \setupitemgroup?
 
 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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
Which numbers are wrong, the section numbers or the page numbers?The chapter numbers. See the jpg below. The 10 with its separator is too far to the right.
Hans van der Meer


On 6 dec. 2013, at 15:13, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:Am 06.12.2013 um 14:59 schrieb H. van der Meer h.vanderm...@uva.nl:The table of contents results from:\startfrontmatter	\input front		\let\ChapterTOC\relax	% Only then chapters typeset !?		\completecontent\stopfrontmatterThe table of contents is typeset from the completecontent, so I guess the answer to your question will be \setuplist.There I have set\setupcombinedlist[content][list=chapter]%	[list={chapter,section}]\setupcombinedlist[section][list=section]Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc giving the chapters, whereas in the seperate chapters the sections therin should appear in their own toc.Which numbers are wrong, the section numbers or the page numbers?\starttext\title{Table of contents}\placecontent[list=chapter]\dorecurse{20} {\chapter{Chapter #1} \placecontent % lists are local unless you use criterium=all \dorecurse{5} {\section{Section #1.##1}}}\stoptextWolfgang___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : 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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a wider 
field.

But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 
still aligns with the units from the lower chapters instead of aligning to the 
zero.

I looked up \setuplist in the command catalogue but cannot find a parameter to 
align this number, either to the right or to the left. It just seems to stick 
with the builtin default.

I tried something like \setupitemgroup[chapter][][][itemalign=left (also tried 
right)] but to no avail.

 Hans van der Meer



On 6 dec. 2013, at 17:41, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 17:32 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 
 Which numbers are wrong, the section numbers or the page numbers?
 
 The chapter numbers. See the jpg below. The 10 with its separator  is too 
 far to the right.
 
 This is normal because the numbers are aligned on the left margin, when the 
 space for the number
 is too narrow you have to increase the width value, e.g. 
 \setuplist[chapter][width=3em].
 
 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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
 \define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
 
 \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]

This now gives a toc looking the way I like.
May I lay at your foot a plea for a change/additional parameter here? 
\setuplist[][itemalign=left/right] or something in that sense.
For numbered chapters I consider an alignment as below most natural, although 
opinions may differ.
 8
 9
10
11
instead of
8
9
10
11

By the way, the \define[1] eludes me. Why this particular [1] there?

 Why do you think lists use the itemgroup/itemize mechanism?

I didn’t think that exactly, but just tried it in despair and having the idea 
that toc items are set as an itemized list (it looks that way, isn’t it?).

Hans van der Meer



On 6 dec. 2013, at 20:36, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 20:20 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a 
 wider field.
 
 But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 
 still aligns with the units from the lower chapters instead of aligning to 
 the zero.
 
 I looked up \setuplist in the command catalogue but cannot find a parameter 
 to align this number, either to the right or to the left. It just seems to 
 stick with the builtin default.
 
 \define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
 
 \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]
 
 \starttext
 
 \title{Table of contents}
 
 \placecontent
 
 \dorecurse{20}{\chapter{Chapter #1}}
 
 \stoptext
 
 I tried something like \setupitemgroup[chapter][][][itemalign=left (also 
 tried right)] but to no avail.
 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] xml selection on attribute expressions

2013-12-03 Thread H. van der Meer
Following an example in the chapter on Expressions and filters for 
xml-processing one can select on an attribute ‘name’ in the node file 
name=“whatever”/

   file[@name==whatever”]/command(todo) 

However, I would like to select on a combination of alternatives, so that 
equivalent are
file name=“whatever”/ and  file src=“whatever”/

I tried several variations but none of them work.
   \xmlfilter{#1}{file([@name==whatever”] or [@src==whatever”])/command(todo)
   \xmlfilter{#1}{file[@name==whatever”] or [@src==whatever”]/command(todo)
   \xmlfilter{#1}{file[@name==whatever”] or 
file[@src==whatever”]/command(todo)
   \xmlfilter{#1}{(file[@name==whatever”]|file[@src==whatever”])/command(todo)


How to? Or is this impossible?

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 selection on attribute expressions

2013-12-03 Thread H. van der Meer
Sorry for the noise, but I just forget to try the obvious and correct solution:

   \xmlfilter{#1}{file[@name==whatever or @src==whatever]/command(todo)}

Must have been a temporary ‘blindness’.

Hans van der Meer



On 3 dec. 2013, at 10:14, H. van der Meer h.vanderm...@uva.nl wrote:

 Following an example in the chapter on Expressions and filters for 
 xml-processing one can select on an attribute ‘name’ in the node file 
 name=“whatever”/
 
file[@name==whatever”]/command(todo) 
 
 However, I would like to select on a combination of alternatives, so that 
 equivalent are
 file name=“whatever”/ and  file src=“whatever”/
 
 I tried several variations but none of them work.
\xmlfilter{#1}{file([@name==whatever”] or 
 [@src==whatever”])/command(todo)
\xmlfilter{#1}{file[@name==whatever”] or [@src==whatever”]/command(todo)
\xmlfilter{#1}{file[@name==whatever”] or 
 file[@src==whatever”]/command(todo)

 \xmlfilter{#1}{(file[@name==whatever”]|file[@src==whatever”])/command(todo)
 
 
 How to? Or is this impossible?
 
 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
 ___

___
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] hanging on fonts

2013-11-12 Thread H. van der Meer
Context hangs with this in the console:

fontsnames  identifying system font files with suffix 'otf'
fontsnames  'OSFONTDIR' specifies path 
'/Users/hansm/Library/Fonts'
fontsnames  'OSFONTDIR' specifies path '/Library/Fonts'
fontsnames  'OSFONTDIR' specifies path '/System/Library/Fonts'
fontsnames  globbing path '/Users/hansm/Library/Fonts/**.otf'
fontsnames  globbing path '/Library/Fonts/**.otf'

ConTeXt  ver: 2013.10.15 13:52 MKIV beta  fmt: 2013.10.20  int: english/english

Putting OSFONTDIR=“” export OSFONTDIR did not help, ConTeXt keeps using the 
MacOSX libraries. How to kill these? Without a solution I cannot typeset.

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] hanging on fonts

2013-11-12 Thread H. van der Meer
Indeed, pointing OSFONTDIR to some dummy directory works here (MACOSX 10.9) 
latest beta.
Perhaps superfluous but users of TeXShop should make that assignment in their 
engine files. If there is a more general way to put this environment variable 
in TeXShop in will be glad to hear.

Thanks.

Hans van der Meer



On 12 nov. 2013, at 20:06, Aditya Mahajan adit...@umich.edu wrote:

 On Tue, 12 Nov 2013, H. van der Meer wrote:
 
 Context hangs with this in the console:
 
 fontsnames  identifying system font files with suffix 'otf'
 fontsnames  'OSFONTDIR' specifies path 
 '/Users/hansm/Library/Fonts'
 fontsnames  'OSFONTDIR' specifies path '/Library/Fonts'
 fontsnames  'OSFONTDIR' specifies path '/System/Library/Fonts'
 fontsnames  globbing path '/Users/hansm/Library/Fonts/**.otf'
 fontsnames  globbing path '/Library/Fonts/**.otf'
 
 ConTeXt  ver: 2013.10.15 13:52 MKIV beta  fmt: 2013.10.20  int: 
 english/english
 
 Putting OSFONTDIR=“” export OSFONTDIR did not help, ConTeXt keeps using the 
 MacOSX libraries. How to kill these? Without a solution I cannot typeset.
 
 See http://tex.stackexchange.com/a/136073/323
 
 Aditya___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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


[NTG-context] columns

2013-10-03 Thread H. van der Meer
I have some difficulties with columns inside a framedtext. The example below 
shows that columns does not work inside framedtext, whereas simplecolumns does. 
However, the latter does not show rules between the columns. Can I have both?

Is columns definitely not working here or is it temporarily until something is 
fixed? Or will simplecolumns be extended to show the rules?

% test columns within framedtext
\starttext
\startframedtext[width=\makeupwidth]
\startcolumns[n=2,rule=on,balance=yes]
\input tufte
\stopcolumns
\stopframedtext
\startframedtext[width=\makeupwidth]
\blank
\startsimplecolumns[n=2,rule=on,balance=yes]
\input tufte
\stopsimplecolumns
\stopframedtext
\stoptext


Hans van der Meer


column-sinside.pdf
Description: Adobe PDF document




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

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

Re: [NTG-context] columns

2013-10-03 Thread H. van der Meer
Thanks, 

But I think mixedcolumns has to solve a problem width the width of the 
frametext. Whereas boxedcolumns honors the width of the enclosing framedtext, 
mixedcolumns does not. See the example.

% NOT OK WIDTH NOT RESPECTED
\startframedtext[width=.8\makeupwidth,align=verytolerant]
\startmixedcolumns[n=2,separator=rule,balance=yes]
\input tufte
\stopmixedcolumns
\stopframedtext
\blank
% OK
\startframedtext[width=.8\makeupwidth,align=verytolerant]
\startboxedcolumns[n=2,separator=rule,balance=yes]
\input tufte
\stopboxedcolumns
\stopframedtext

Hans van der Meer



columns-inside.pdf
Description: Adobe PDF document

On 3 okt. 2013, at 11:09, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 03.10.2013 um 10:21 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 I have some difficulties with columns inside a framedtext. The example below 
 shows that columns does not work inside framedtext, whereas simplecolumns 
 does. However, the latter does not show rules between the columns. Can I 
 have both?
 
 Is columns definitely not working here or is it temporarily until something 
 is fixed? Or will simplecolumns be extended to show the rules?
 
 % test columns within framedtext
 \starttext
 \startframedtext[width=\makeupwidth]
 \startcolumns[n=2,rule=on,balance=yes]
 \input tufte
 \stopcolumns
 \stopframedtext
 \startframedtext[width=\makeupwidth]
 \blank
 \startsimplecolumns[n=2,rule=on,balance=yes]
 \input tufte
 \stopsimplecolumns
 \stopframedtext
 \stoptext
 
 The new mixedcolumns environment can be used to the typeset columns in a 
 frame.
 
 There is also a predefined bolxedcolumns environment which changes the width 
 of
 the columns when you use it in \startframed etc.
 
 \setupalign[verytolerant]
 
 \starttext
 
 \startboxedcolumns[separator=rule]
 \input tufte
 \stopboxedcolumns
 
 \startframedtext[width=max,align=verytolerant]
 \startboxedcolumns[separator=rule]
 \input tufte
 \stopboxedcolumns
 \stopframedtext
 
 \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] columns

2013-10-03 Thread H. van der Meer
If I remember well, framedtext sets a localhsize for the width of its content. 
I guess that is why boxedcolumns stays within the width specified. But is there 
a specific reason why mixedcolumns in general does not?

Hans van der Meer



On 3 okt. 2013, at 12:07, Wolfgang Schuster schuster.wolfg...@gmail.com
 wrote:

 
 Am 03.10.2013 um 12:02 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 Thanks, 
 
 But I think mixedcolumns has to solve a problem width the width of the 
 frametext. Whereas boxedcolumns honors the width of the enclosing 
 framedtext, mixedcolumns does not. See the example.
 
 Boxedcolumns are a instance of mixedcolumns and are defined as
 
   \definemixedcolumns[boxedcolumns]
 
 
 You can also use them this way:
 
   \startmixedcolumns[boxedcolumns]
   …
   \stopmixedcolumns
 
 
 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
___


[NTG-context] once from the inside?

2013-10-03 Thread H. van der Meer
I know how to force ConTeXt doing not more then one run with the --once 
parameter on the call. Is it, however, possible to do the same from within the 
ConTeXt document? Some of my documents do not need a second but still get 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] chapter titles

2013-03-21 Thread H. van der Meer
I would like to put something directly after each chapter number, like so:

Chapter 5 add something everytime Title of Chapter

Is there an option for this? \setuphead? \setupheader? which parameter?

I looked up the wiki, but it made me no wiser.

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] date problem

2013-03-20 Thread H. van der Meer
There is a nasty problem when defining the \date.

First approach:
***  macro:-\date 
\def\thedate{\date}\writestatus{***}{\meaning\thedate}
Alas, I get lateron a luatex error on \date:
! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\d'.

Second approach, use \edef to get an expanded value.
\edef\thedate{\date}\writestatus{***}{\meaning\thedate}
***  macro:-\date 
Alas, the date is still the unexpanded macro and not something like 20 march 
2013.

How to?

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] date handling maltreated?

2013-03-20 Thread H. van der Meer
Trying to do some date and time processing myself, I ran into problems caused 
by ConTeXt makeing it incompatibel with the original plain TeX itself!

In the TeX-book, Appendix B one finds
citation
(Some parameters are set by TeX itself as it runs, so it is inappropriate to 
initialize them: \time, \day, \month, and year are established at the beginning 
of a job; ..
/citation

Now the results in ConTeXT with a minimal example, put into the log for easier 
copying into the mail:
\starttext
\writestatus{}{\meaning\date - \date}
\writestatus{}{\meaning\day - \the\day}
\writestatus{}{\meaning\month - \month WHY NOT monthname?}
\writestatus{}{\meaning\year - \the\year}
\writestatus{}{\meaning\time - \the\time}
\stoptext

Result:
 \time- \time 
 \protected macro:-\dodoubleempty \syst_converters_date - 
\date 
 \day- 20
 macro:#1-\ctxcommand {monthname(#1)}- \labeltext 
{unknown}RROR
 \year- 2013
 \time- 982

I strongly ask that ConTeXt abstains from changing the definition of \month and 
reverts to the exact result as given by plain TeX, i.e. a number in the range 
[1-12]. Because the change makes it impossible to do calculations on the month.

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] date handling maltreated?

2013-03-20 Thread H. van der Meer
Trying to do some date and time processing myself, I ran into problems caused 
by ConTeXt makeing it incompatibel with the original plain TeX itself!

In the TeX-book, Appendix B one finds
citation
(Some parameters are set by TeX itself as it runs, so it is inappropriate to 
initialize them: \time, \day, \month, and year are established at the beginning 
of a job; ..
/citation

Now the results in ConTeXT with a minimal example, put into the log for easier 
copying into the mail:
\starttext
\writestatus{}{\meaning\date - \date}
\writestatus{}{\meaning\day - \the\day}
\writestatus{}{\meaning\month - \month WHY NOT monthname?}
\writestatus{}{\meaning\year - \the\year}
\writestatus{}{\meaning\time - \the\time}
\stoptext

Result:
 \protected macro:-\dodoubleempty \syst_converters_date - \date 
 \day- 20
 macro:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}HY NOT monthname?
 \year- 2013
 \time- 989

Plain TeX here gives:
\message{\meaning\day - \the\day}
\message{\meaning\month - \the\month}
\message{\meaning\year - \the\year}
\message{\meaning\time - \the\time}
\end

Result:
(./plaindates.tex \day- 20 \month- 3 \year- 2013 \time- 991 )

I strongly ask that ConTeXt abstains from changing the definition of \month and 
reverts to the exact result as given by plain TeX, i.e. a number in the range 
[1-12]. Because the change in ConTeXt makes it impossible to do calculations on 
the month.

Furthermore I encountered problems with defining expanded macros for 
currentdate and currenttime. This seems impossible to accomplish, at least in a 
simple manner. See the results from these to examples:
\edef\thedate{\currentdate}\writestatus{}{\meaning\thedate - \thedate}
\edef\thetime{\currenttime}\writestatus{}{\meaning\thetime - \thetime}
giving:
 macro:-\currentdate - \currentdate 
 macro:-\currenttime - \currenttime 

This is most unhappy, because one really should be able to put the expansions 
of these macros somewhere.
I hope the next beta will have solutions for these problems.

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

2013-03-20 Thread H. van der Meer
As can be seen in the following example, within an itemized list the framedtext sticks out to the right, instead of having its right edge aligned with the outer ones.Is there a simple remedy or is it an unwanted effect?I would like the right edges line up perfectly.
Hans van der Meer

\starttext\startframedtext[width=local]\input tufte\stopframedtextBefore list.\startitemize\startitem item one\stopitem\startitem item two\startframedtext[width=local]\input tufte\stopframedtext\stopitem\startitem item three\stopitem\stopitemizeAfter list.\startframedtext[width=local]\input tufte\stopframedtext\stoptext

frameplace.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] narrower and whitespace

2013-03-16 Thread H. van der Meer
I find that in

intro text
\startnarrower
narrow text
\stopnarrower
after text

blank vertical space is inserted both before and after the narrower block.
How can I avoid that?


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] noalign hassles

2013-03-16 Thread H. van der Meer
I am stuck with the following problem.

Inside an \halign (table) I can insert a colored rule with:
  \noalign{\color[red]{\hrule height#1 depth\zeropoint}}

Now I want something more involved like:
  \color[red]{\hrule height#1 width2mm}% fixed length colored block
  \color[black]{\hrule height#1}% filling the width left
  \color[red]{\hrule height#1 width2mm}% fixed length colored block
producing
  [red][black black black …][red]

However, this doesn't work. I tried various options as: enclosing in \vbox, 
\hbox, box with leaders. Nothing worked out.
Is there some guru who knows how to accomplish 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
___


[NTG-context] garden example at fault

2013-03-11 Thread H. van der Meer
I tried this sample from the garden to look at the top and bottom, see 
Command/setuplayout.
Below a copy of the garden page (pagesize changed from A10 to A6):
\setuppapersize[A6]

%% This is an example for showing the effect of the vertical parameters
%% top, topdistance, bottom, bottomdistance and topspace.
%% Just play around with these parameters.

\showframe

%% Show the top and the bottom with blue color:
\setupbackgrounds[header, footer][background=color, backgroundcolor=blue]

\def\MyLength{10pt}

\setuplayout[
  top=\MyLength, 
  topdistance=\MyLength,
  bottom=\MyLength, 
  bottomdistance=\MyLength,
  topspace=\dimexpr(\topheight + \topdistance),
  height=fit]

\starttext
\input thuan
\stoptext

This is LuaTeX, Version beta-0.75.0-2013030308 (rev 4589)
ConTeXt  ver: 2013.03.04 18:28 MKIV  fmt: 2013.3.4  int: english/english

The top and bottom should have been blue as in the screenshot from the garden 
(figure to the left). The reality however is no blue sections at all (figure at 
right). What is wrong: the (fairly recent) context or the example in the garden?

Hans van der Meer


inline: garden.tiff

headfoot.pdf
Description: Adobe PDF document


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

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

[NTG-context] code after \stopbuffer

2013-02-13 Thread H. van der Meer
Is it possible to have a command automatically executed each time \stopbuffer 
has been read? Preferably coupled to a specific named \startbuffer[this_one], 
iff possible at all of course.

Thus:
\startbuffer[this_one]
..contents..
\stopbuffer % in execution followed by \command

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] using different xml-tree's?

2013-02-13 Thread H. van der Meer
I would like to process my dvd nodes in more than one way but I am stuck with 
the implementation.

The trees could start in a different setup:
\startxmlsetups xml:dvdfirst:dvd .. \stopxmlsetups
\startxmlsetups xml:dvdfirst:setups
\xmlsetsetup{\xmldocument}
{error|setup|dvd ..

and

\startxmlsetups xml:dvdsecond:dvd .. \stopxmlsetups
\startxmlsetups xml:dvdsecond:setups .. 

I thought I could call the variants (data collected in a buffer) with:

\xmlprocessbuffer{dvd}{data.xml}{xml:dvdfirst:dvd}
en
\xmlprocessbuffer{dvd}{data.xml}{xml:dvdsecond:dvd}

But this does not work. Neither for example ..{xml:dvdfirst}

Guess I am mistreating the 3rd parameter of 
\xmlprocessbuffer{}{}{initial-xml-setup}. The manual says process the tree 
starting with initial-xml-setup.

What am I doing wrong?

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] What is changed?

2013-02-04 Thread H. van der Meer
The following worked without a hitch:

\def\IsNilReturn#1{\edef\tmp{#1}\doifelse{\tmp}{nil}{\color[red]{ERROR}}{\tmp}}
\def\formatDuration#1{\ctxlua{
local s = string.gsub(#1,\%D,)
local d = tostring(hvdm.time:match(s))
tex.print(string.sub(d,1,2) ~= 0: and d or string.sub(d,3))
}}
\def\FormatDuration#1{\IsNilReturn{\formatDuration{#1}}}
Called by something like \FormatDuration{11929} (meaning: 1 hour 19 minutes 29 
seconds)

Now I get an error in
ConTeXt  ver: 2013.01.27 21:24 MKIV  fmt: 2013.1.28  int: english/english
! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\%'.
\formatDuration ...0: and d or string.sub(d,3)) }  
   
\IsNilReturn #1-\edef \tmp {#1
   }\doifelse {\tmp }{nil}{\color [red]{ERROR}}{...

Whereas in a previous Context all went well:
ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.2.4  int: english/english

What did change? Why? And how to repair?

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] local picture not found anymore

2013-02-04 Thread H. van der Meer
Having a file picture.jpg worked fine. Now it results in inclusion of The 
picture package by Heiko Oberdiek. Suddenly file searching doesn't start with 
the current directory anymore but somewhere in the /tex-chain.

Were the significant changes here? Something to do with Luatex? I didn't follow 
the developments for the last few months, so I may have missed an important 
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] firstsetup

2012-12-11 Thread H. van der Meer
I guess my first-setup.sh is outdated, because running it the site called from 
within cannot be found. There might have been a recent post about this, but 
then I must confess either having missed this or forgotton to save that post.
Will someone be so kind as to post a zipped actual first-setup.sh or point out 
its current location? Thanks in advance.

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

2010-07-18 Thread H. van der Meer

I have a comment on the name of macro \xmldoiftext.
The name as is, seems specifically to point to something like:
nodesome_text/node
Luckily the manual mentions here when .. node has some content and  
this implies the {yes}-branch will be taken also in case of the  
presence of subnodes, even if these lack text content:

nodesubnode//node
I am happy to find that this is indeed the behaviour, because it is  
what I need.


Thus I am inclined to consider \xmldoifcontent as a better  
descriptive name instead of \xmldoiftext. Or is it already too late  
to change its name?


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 path expression

2010-06-08 Thread H. van der Meer

I would like to combine the xml path search of two different levels.
An example, the xml can be either
  case #1: main a bc//b bc//b /a /main
or
  case #2: main bc//b bc//b /main

Now I want to process the c elements from the main level and loop  
through them with the position function:

  \xmlfilter{#1}{/(a/b|b)/name/position(\the\scratchcounter)}
This however does not work, I tried various path expressions, for  
example with * but to no avail.


Is there a path expression that can select either /a/b or /b ?

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] presence of xml-attribute

2010-06-08 Thread H. van der Meer
In order to differentiate between the case of an absent or an empty  
attribute on an xml-element I now use the following macro to set a TeX- 
\if:


% #1=node #2=attribute #3 defaultvalue: execute \attributetrue/false
\def\setFlagToAttribute#1#2#3{%
  \doifnot{\xmlattdef{#1}{#2}{NOTPRESENT}}{NOTPRESENT}%
{\doifelse{\xmlatt{#1}{#2}}{\empty}%
  {\xmlvalue{choice}{#3}{\iftrue}}%
  {\xmlvalue{choice}{\xmlatt{#1}{#2}}{\iftrue}}%
\csname#2true\endcsname\else\csname#2false\endcsname\fi
}%
}

I find the use of the NOTPRESENT not very elegant. Is there a path  
expression and function that can tell the presence or absence of an  
attribute, just as its value can be filtered with a/b...@option==value]?


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] startbuffer fails with %

2010-01-05 Thread H. van der Meer

\startbuffer[ABC]%
{} Braces at beginning fails with buffer
\stopbuffer
\starttext
\getbuffer[ABC]
\stoptext

Error message:
! File ended while scanning use of \dododowithbuffer.
inserted text
\par

Remove the {}'s at the beginning and all is well.
The culprit however is the % in the first line; remove and the braces  
do no harm.
I suspect that a missed newline is the cause. If that cannot be  
remedied, I advise adding a warning in the manual.


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
___