Re: [NTG-context] Keeping titles together with the following text when grid is on

2013-12-03 Thread Hans Hagen

On 12/2/2013 9:02 PM, Jan Tosovsky wrote:

On 2013-12-02 H. Özoguz wrote:

On 2013-12-01 Jan Tosovsky wrote:


when grid is on, orphan and widows have to be eliminated using

additional

penalty settings. Whereas it works fine for body text, section titles

are

still sometimes left at the bottom of the page.


this is not the same question as handling orphan and widows - because
you surely do not want some titles with only 2-3 lines of body text
after them.

I always use \testpage[x] to handle those issues, see your example
with testpage:

\setuphead[section][before={\testpage[8]\blank}]


\blank[samepage,big]


Thanks, it works! Another magic command not documented anywhere in the
ConTeXt Guide or Wiki...

I was looking for any alternative for XSL-FO's keep-with-next=always. This
is a different approach, but it doesn't matter.

Btw, I still don't understand why keeping the title and text behaves
differently when grid is on...

Jan

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

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




--

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

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


Re: [NTG-context] line notes compress

2013-12-03 Thread Hans Hagen

On 12/2/2013 9:04 PM, Pablo Rodriguez wrote:

On 12/02/2013 03:31 PM, Hans Hagen wrote:

Hi,

The linenote compression options (and control) has been upgraded:


Hi Hans,

many thanks for the new compression options.


Keep in mind that paragraph notes are somewhat special so some tolerance
in alignment helps.


This is not directly related to linenotes, but to paragraph notes. There
are some cases a note starts in the next page to body text it refers to.

With the following scenario (I have seen this): poetry with verses
numbered to the page, two apparatus (critical and similar) and the first
linenote on at least one apparatus comes from the previous page (so
numbers in this apparatus go from 30 to 2).

Is \setupnote[linenote][split=verystrict,scope=page] a reliable method
to avoid this?


Hard to predict as many factors determine this. Best is to be somewhat 
tolerant and have enough space available before the footnote(rule) but 
even then there can be casas where no other solution is left than to 
split the note over a page. A magic interplay of penalties.



I mean, if you have to typeset a critical edition of the Illiad or the
Odyssey, you cannot check every single page looking for displaced linenotes.

Many thanks for your help,


Pablo




--

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

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


[NTG-context] 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] Command for the caption location inside \startplacefigure

2013-12-03 Thread Géry Ogam
Hello,

What is the option to specify the CAPTION location in \startplacefigure (I
already now that you can do it from \setupcaption)?

I thought the first argument of 'location' was for the FIGURE location, and
the second one for the CAPTION location, but the second one has no effect:

\startplacefigure[location={left, top}, title=A cow]
\externalfigure[cow]
\stopplacefigure

Best regards.
___
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] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Lars Huttar
On 11/28/2013 1:34 PM, Hans Hagen wrote:

 That macro was never meant for mixed columns. I made a variant that
 works ok in mixed columns which will be in the next beta.

 \setuptolerance[verytolerant]

 \starttext

 \startmixedcolumns

 \dorecurse{4}{\input ward \par}

 \testcolumn[10][-1pt] % 10 lines - 1pt slack

 \dorecurse{2}{\input ward \par}

 \stopmixedcolumns

 \stoptext

Ok. It looks like the second parameter to \testcolumn is now required
(it didn't used to be).
What does this slack value do? Does it mean that the minimum amount of
space left in the column is 10 lines minus 1pt?

Also, in the Dec. 2 beta (current version: 2013.12.02 15:22),  the
\column command now causes an error when we come to the \stopmixedcolumns.
I don't know if it's connected with the above change, or something else.

MWE: change the \testcolumn command above to \column.
I get the following error output:

! LuaTeX error
C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474
: attempt to compare number with nil
stack traceback:
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:474: in function 'process_penalty'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:572: in function 'setsplit'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:687: in function 'setsplit'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:819: in function 'mixsetsplit'
[string \directlua ]:1: in main chunk.

system   tex  error on line 14 in file
C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex:
LuaTeX error  ...

 4
 5 \startmixedcolumns
 6
 7 \dorecurse{4}{\input ward \par}
 8
 9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack
10 \column
11
12 \dorecurse{2}{\input ward \par}
13
14   \stopmixedcolumns
15
16 \stoptext
17


\ctxcommand #1 -\directlua {commands.#1}
   
\page_mix_routine_construct ...\else false\fi , }}
  \deadcycles
\zerocount
\page_mix_routine_continue ...ine_construct \v!no
 
\page_mix_routine_package ...
\page_otr_command_routine ...mix_routine_continue
  \or
\page_mix_routine_bala...
\page_otr_triggered_output_routine ...and_routine
  \fi
output ...eforeoutput \page_otr_triggered_output_routine
  \relax \the
\everyafterout...
...
l.14 \stopmixedcolumns
   
? X


Thanks again for your work on this.
We're continually reevaluating whether we can use the beta or need to
stick with the stable version. At the moment, it looks like we'll be
sticking with the stable version. But we'd like to use the beta, if the
problems can be ironed out.

Lars

___
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] Keeping titles together with the following text when grid is on

2013-12-03 Thread Wolfgang Schuster

Am 03.12.2013 um 09:52 schrieb Hans Hagen pra...@wxs.nl:

 On 12/2/2013 9:02 PM, Jan Tosovsky wrote:
 On 2013-12-02 H. Özoguz wrote:
 On 2013-12-01 Jan Tosovsky wrote:
 
 when grid is on, orphan and widows have to be eliminated using
 additional
 penalty settings. Whereas it works fine for body text, section titles
 are
 still sometimes left at the bottom of the page.
 
 this is not the same question as handling orphan and widows - because
 you surely do not want some titles with only 2-3 lines of body text
 after them.
 
 I always use \testpage[x] to handle those issues, see your example
 with testpage:
 
 \setuphead[section][before={\testpage[8]\blank}]
 
 \blank[samepage,big]

This doesn’t work because “samepage” is ignored when the grid is enabled.

%\setuplayout[grid=yes,lines=10]
\setuplayout[lines=10]

\showgrid

\starttext
\dontleavehmode\blank[fixed,8*line]
text
\blank[samepage,line]
text
\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] vertical square root upstroke (instead of having a slant)

2013-12-03 Thread Sanjoy Mahajan
 a radical has a couple of increasing sizes (discrete steps, if they
 have a slant depends of the font designer) before it switches to an
 extensible that then normally has no slant

Interesting.  That explains the difference:  The \rho made the radical
big enough to switch to the extensible, unslanted version.

 (in context one can hook in a mp variant that keeps the slant)
 (if needed we can make it an option to omit steps and always use upright)

My math-typography sense is far from developed, and mostly comes from
having read lots of math books.  With that caveat, my gut feelings are
that (1) the switch from slant to upright is a bit surprising for a
reader, and (2) that the slant version is more common, so an
always-upright radical would also be a bit surprising.

But perhaps you or others with a more developed typographical eye have a
more principled way of judging?

-Sanjoy
___
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] (critical edition) Examples of bib files

2013-12-03 Thread luigi scarso
We are currently seeing the part of bibliography and we are looking for
real examples in utf.
You can post the examples on this ml, or  send me privately.


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

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

Re: [NTG-context] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Hans Hagen

On 12/3/2013 3:10 PM, Lars Huttar wrote:

On 11/28/2013 1:34 PM, Hans Hagen wrote:


That macro was never meant for mixed columns. I made a variant that
works ok in mixed columns which will be in the next beta.

\setuptolerance[verytolerant]

\starttext

\startmixedcolumns

 \dorecurse{4}{\input ward \par}

 \testcolumn[10][-1pt] % 10 lines - 1pt slack

 \dorecurse{2}{\input ward \par}

\stopmixedcolumns

\stoptext


Ok. It looks like the second parameter to \testcolumn is now required
(it didn't used to be).


i'll fix that


What does this slack value do? Does it mean that the minimum amount of
space left in the column is 10 lines minus 1pt?


indeed


Also, in the Dec. 2 beta (current version: 2013.12.02 15:22),  the
\column command now causes an error when we come to the \stopmixedcolumns.
I don't know if it's connected with the above change, or something else.


no, more to making section breaks working better in columns (i forgot to 
rename a variable)



MWE: change the \testcolumn command above to \column.
I get the following error output:

! LuaTeX error
C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474
: attempt to compare number with nil
stack traceback:

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:474: in function 'process_penalty'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:572: in function 'setsplit'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:687: in function 'setsplit'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:819: in function 'mixsetsplit'
 [string \directlua ]:1: in main chunk.

system   tex  error on line 14 in file
C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex:
LuaTeX error  ...

  4
  5 \startmixedcolumns
  6
  7 \dorecurse{4}{\input ward \par}
  8
  9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack
10 \column
11
12 \dorecurse{2}{\input ward \par}
13
14   \stopmixedcolumns
15
16 \stoptext
17


\ctxcommand #1 -\directlua {commands.#1}

\page_mix_routine_construct ...\else false\fi , }}
   \deadcycles
\zerocount
\page_mix_routine_continue ...ine_construct \v!no

\page_mix_routine_package ...
\page_otr_command_routine ...mix_routine_continue
   \or
\page_mix_routine_bala...
\page_otr_triggered_output_routine ...and_routine
   \fi
output ...eforeoutput \page_otr_triggered_output_routine
   \relax \the
\everyafterout...

l.14 \stopmixedcolumns

? X


Thanks again for your work on this.
We're continually reevaluating whether we can use the beta or need to
stick with the stable version. At the moment, it looks like we'll be
sticking with the stable version. But we'd like to use the beta, if the
problems can be ironed out.


fyi: i'll not patch the stable version

new beta


Lars

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




--

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

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


[NTG-context] [***SPAM***] OT: Generating Command reference from source code

2013-12-03 Thread Jan Tosovsky
Dear All,

in another thread I was dreaming ... to have always the complete and up to
date command/macro reference with basic descriptions and list all of the
parameter/options...

'Spoiled' by goodies offered by various Java APIs (based on
http://en.wikipedia.org/wiki/Javadoc ) I am missing this a lot.

Example of the result:
http://docs.oracle.com/javase/7/docs/api/index.html?overview-summary.html

In Java there is the following structure (simplified):
1) 'packages' defining the hierarchy
2) 'classes' defining objects
3) 'properties' and 'methods' for every particular 'class'

I've roughly scanned the ConTeXt source structure and bringing the following
idea:

1) There is no 'packages' counterpart in ConTeXt, but it would be handy to
think of any logical structure to group commands to logical groups (even
nested). Maybe the filename title prefix could be taken as a starting point
for this.
2) 'classes' = all individual .mkiv files
3) 'methods' = all public \def, \define etc in mkiv files (+maybe other
contructs I am not aware)

Supposing that ...
a) every .mkiv file is enhanced by 'package' annotation
b) every public command/macro contains a description with the list of all
available params
(sensible subset of JavaDoc annotations)

... I can imagine to extract this info and:

A) build the static command reference website with all the hyperlinks
B) eventually generate PDF variant of the same
C) export it into the form which can be imported into the WIKI (with
read-only mode)

If every change of behaviour was reflected immediately in the description,
if any newly added parameter was added into the parameter list, the main
goal would be achieved.

But I understand there is lot of to do in the beginning... with disputable
effect in the end.

I can help with some coding, transforming ... 

Jan

Btw, would it be sufficient to scan texmf-context\tex\context\base\*.mkiv
files or there are other parts somewhere else? There are approx 500 files
now. It is huge number, but finite :-)


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