Re: [NTG-context] Skipped figure numbers

2016-03-31 Thread Aditya Mahajan

On Thu, 31 Mar 2016, Alan BRASLAU wrote:


On Thu, 31 Mar 2016 17:51:07 -0400
Aditya Mahajan  wrote:


@Hans: Does it make sense to disable \incrementcounter if
\trialtypesetting is active?


I was going to suggest such things...


My motivation is different. If you have any macro in a table (or anything 
that requires multiple runs to get the size right) that uses a counter 
(e.g., enumeration), then the numbers will be off. That would not happen 
if a counter is frozen when trialtypesetting is on.



P.S. Would not the use of \startcombination\stopcombination be an
alternative to the placefigures within a table?


combinations only give regular grid. Sometimes you want an irregular grid. 
For example, the OP wanted


+--+--+
|  |  |
|  | Fig2 |
| Fig1 +--+
|  | Fig3 |
|  |  |
+--+--+

Such layouts are not possible using combinations.

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
___

Re: [NTG-context] Skipped figure numbers

2016-03-31 Thread Alan BRASLAU
On Thu, 31 Mar 2016 17:51:07 -0400
Aditya Mahajan  wrote:

> @Hans: Does it make sense to disable \incrementcounter if 
> \trialtypesetting is active?

I was going to suggest such things...

Here is a case where a float is not being used as a floating object in
that we want to control placement through location=here or, better,
location=force. We do this as users for we want to produce a caption
as well as make an entry into the list.

However, floats have some limitations: for example they cannot usually
handle multiple pages (except for some table splits), nor can they take
\startcolumns \stopcolumns, and I am sure that there are others.

Does anyone have suggestions/ideas around these kinds of issues? Should
a float with location=force be treated any differently?

Another annoying issue with floats: \startplacefloat\stopplacefloat
initiates a paragraph break. If one refers to a float (figure or table)
somewhere in a long paragraph, one might like the float to be anchored
starting from that location. I achieve this using
\startpostponing [+0]
  \startplacefigure
  \stopplacefigure
\stoppostponing
but this does not always work well. In addition, this is not very
satisfying (as it makes for ugly source code). Also, one might want to
use location=right or location=left without using "hang" and counting
lines. Hans has repeated that floats are complicated beasts and such
features would interfere with paragraph building. OK (But dare I say
that LaTeX does not seem to have any problem with this.)

Alan

P.S. Would not the use of \startcombination\stopcombination be an
alternative to the placefigures within a table?
___
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] [OT] Bash comes to Windows

2016-03-31 Thread Mojca Miklavec
It seems that we'll have to extend the support of our bash
installation script to support Windows:

https://www.youtube.com/watch?v=kJGqZHQzNRo

(Note that this video was uploaded on 30th March, not the 1st April.)

Mojca
___
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] Skipped figure numbers

2016-03-31 Thread Aditya Mahajan

On Thu, 31 Mar 2016, Aidan Nichol wrote:


On Wed, 30 Mar 2016, Aidan Nichol wrote:


I have been looking at various options for controlling how figures are placed 
on a page and based on answers to similar questions in this mailing list I  
tried various options. The most flexible one seems to be using tables e.g.

\setupexternalfigures[location={default}]

\starttext

\placefigure[]{}{\externalfigure[hacker][height=1in]}

\startxtable[frame=off,align=low]
\startxrow
\startxcell[ny=2]
\placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
 \stopxcell
 \startxcell
   \placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
 \stopxcell
\stopxrow
\startxrow
\startxcell
  \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
\stopxcell
\stopxrow
\stopxtable

It seems to work well except that figure numbers are being skipped. In this 
example hacker=1 mill=8, spider=9 and cow=10.
Varying the contents of the table reveals that It is skipping two times the 
number of figures in the table.

Is this an invalid combination of features I’m using or am I doing something 
wrong?


The contents of a table are typeset multiple times to get an idea of the
height and width. Here is one option:

\useMPlibrary[dum]

\starttext

\bTABLE[frame=off,align=low]
\bTR
\bTD[ny=2]
 \placefigure[here,\iftrialtypesetting nonumber \fi]
 []{left twoup}{\externalfigure[mill][width=2in,height=4in]}
\eTD
\bTD
 \placefigure[here,\iftrialtypesetting nonumber \fi]
 []{the first}{\externalfigure[spider][width=2in,height=2in]}
\eTD
\eTR
\bTR
\bTD
 \placefigure[here,\iftrialtypesetting nonumber \fi]
 []{the second}{\externalfigure[cow][width=2in,height=2in]}
\eTD
\eTR
\eTABLE
\stoptext


Thanks Aditya

That solved the problem


@Hans: Does it make sense to disable \incrementcounter if 
\trialtypesetting is active?


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
___

Re: [NTG-context] Protrusion cancellation by index term

2016-03-31 Thread Wolfgang Schuster

Jan Tosovsky 
31. März 2016 um 21:28

Wow, I am quite satisfied with this solution.

Btw, I couldn't find any details for that \leftboundary command either 
in TeX [1] or ConTeXt [2] command references.
The \leftboundary command uses a new LuaTeX primitive which means you 
can’t find it in a TeX [1] reference.


spac-ver.mkiv:

\unexpanded\def\leftboundary   {\boundary\plusone}
\unexpanded\def\rightboundary  {\boundary\plustwo}

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] Recent changes in paragraph composing

2016-03-31 Thread Schmitz Thomas A.

> On 31 Mar 2016, at 22:17, Jan Tosovsky  wrote:
> 
> In time of producing the result image it was sufficient to set the tolerance
> to 'strict'.
> 
> (1) How can this be fixed efficiently?
> (2) What has changed internally?
> 
> Thanks for any hints, 

The example is missing the language setup:

\setuplanguage [en] [patterns={en,agr}]

\mainlanguage [en]

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

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

[NTG-context] Recent changes in paragraph composing

2016-03-31 Thread Jan Tosovsky
Dear All,

when generating example in the following article, I can't get rid of
overfull in Old greek paragraph even if the tolerance is set to
'verytolerant'.

http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV

In time of producing the result image it was sufficient to set the tolerance
to 'strict'.

(1) How can this be fixed efficiently?
(2) What has changed internally?

Thanks for any hints, 

Jan

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

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

Re: [NTG-context] Error - font-otj.lua:1503: attempt to perform arithmetic on local 'rightkern'

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 9:11 PM, Jan Tosovsky wrote:
> >
> > when generating example from
> >
> > http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> >
> > I am getting the following error in the latest beta (0.90):
> 
> fixed in next beta (kerning with spaces is new and still somewhat
> untested)

Thanks a lot for a quick fix!

Jan

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

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

Re: [NTG-context] Protrusion cancellation by index term

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 9:53 PM, Jan Tosovsky wrote:
> > On 2016-03-22 Hans Hagen wrote:
> >> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> >>> On 2014-02-23 Hans Hagen wrote:
>  On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> > On 2014-02-22 Jan Tosovsky wrote:
> >>
> >> when a punctuated phrase appears at the beginning of the 
> >> line, it is not protruded correctly when preceded by an 
> >> index term.
> >>
> >> ... \index{foo}>Bar< ...
> >>
> >> A minimal example is available at
> >> http://drifted.in/other/sample.tex
> >
> > I'd be grateful for ignoring any non document content 
> > preceding punctuation to avoid its influence on protrusion.
> >>
> >> it's not that trivial
> >>
> >> for the index we can cheat a bit but then i also need to 
> >> check lots of other cases for possible interference
> 
> you can try to do this:
> 
> \leftboundary\hbox{\index{foo}}
 
Wow, I am quite satisfied with this solution.

Btw, I couldn't find any details for that \leftboundary command either in TeX 
[1] or ConTeXt [2] command references.

I've tried it just with \hbox{} and it works as well.

Couldn't this be generalized in a way - if you want protrusion even in edge 
cases, any inline commands have to be wrapped in \hbox{} ?

Jan

___
[1] https://www.tug.org/utilities/plain/cseq.html
[2] http://www.pragma-ade.com/general/qrcs/setup-en.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] Alignment for narrower text

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 8:55 PM, Jan Tosovsky wrote:
> > On 2014-01-30 Jan Tosovsky wrote:
> >>
> >> I'd expect that starting french quote sign outside the left 
> >> text edge - similarly like it is aligned the main flow when 
> >> the hanging feature is enabled.
> >>
> >> Now I've found it works as expected when the indenting is
> >> disabled...
> >
> > http://tracker.luatex.org/view.php?id=884
> 
> indenting prohibits protrusion
> 

Good to know, thanks. I take it rather as a limitation.

Use case:
- book uses global indentation
- there is poem typeset in narrower block
- there is punctuation in the first verse which disrupt optical margin alignment

Are there alternative ways?

Btw, from end user perspective I'd expect it should work by default without 
further tweaking.

Jan

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

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

Re: [NTG-context] Skipped figure numbers

2016-03-31 Thread Aidan Nichol
Thanks Aditya

That solved the problem
> 
> 
> On Wed, 30 Mar 2016, Aidan Nichol wrote:
> 
>> I have been looking at various options for controlling how figures are 
>> placed on a page and based on answers to similar questions in this mailing 
>> list I  tried various options. The most flexible one seems to be using 
>> tables e.g.
>> 
>> \setupexternalfigures[location={default}]
>> 
>> \starttext
>> 
>> \placefigure[]{}{\externalfigure[hacker][height=1in]}
>> 
>> \startxtable[frame=off,align=low]
>> \startxrow
>> \startxcell[ny=2]
>> \placefigure[force][]{left twoup}{\externalfigure[mill][height=4in]}
>>  \stopxcell
>>  \startxcell
>>\placefigure[force][]{the first}{\externalfigure[spider][height=1.5in]}
>>  \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell
>>   \placefigure[force][]{the second}{\externalfigure[cow][height=1.5in]}
>> \stopxcell
>> \stopxrow
>> \stopxtable
>> 
>> It seems to work well except that figure numbers are being skipped. In this 
>> example hacker=1 mill=8, spider=9 and cow=10.
>> Varying the contents of the table reveals that It is skipping two times the 
>> number of figures in the table.
>> 
>> Is this an invalid combination of features I’m using or am I doing something 
>> wrong?
> 
> The contents of a table are typeset multiple times to get an idea of the
> height and width. Here is one option:
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \bTABLE[frame=off,align=low]
> \bTR
> \bTD[ny=2]
>  \placefigure[here,\iftrialtypesetting nonumber \fi]
>  []{left twoup}{\externalfigure[mill][width=2in,height=4in]}
> \eTD
> \bTD
>  \placefigure[here,\iftrialtypesetting nonumber \fi]
>  []{the first}{\externalfigure[spider][width=2in,height=2in]}
> \eTD
> \eTR
> \bTR
> \bTD
>  \placefigure[here,\iftrialtypesetting nonumber \fi]
>  []{the second}{\externalfigure[cow][width=2in,height=2in]}
> \eTD
> \eTR
> \eTABLE
> \stoptext
> 
> 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
___

Re: [NTG-context] duplex printing and doublesided

2016-03-31 Thread Hans Hagen

On 3/15/2016 1:26 PM, Pablo Rodriguez wrote:

Hi Hans,

I have the following sample:

 \setuppagenumbering[alternative=doublesided]
 \setupinteractionscreen[option=portrait]
 \starttext
 No duplex printing.
 \page[right]
 In this document.
 \stoptext

I’m afraid that doublesided alternative disables duplex printing.


sure, that's why we have 'portrait' and 'landscape' as directives


This would be a good reason to implement the features already asked at
https://mailman.ntg.nl/pipermail/ntg-context/2016/084298.html.

Many thanks for your help,

Pablo




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] beta / current

2016-03-31 Thread Hans Hagen

On 3/30/2016 8:35 PM, Pablo Rodriguez wrote:

On 03/30/2016 12:51 PM, Hans Hagen wrote:

Hi,

As texlive code freeze is on the horizon, we are close to a new current
release. The current beta will probably not change much till that
moment. We now have luatex 0.90 but might as well end up with 0.95 in
texlive 2016 (because as usual we can test it with the garden
distribution).


Hans,

would it be possible that next current could have orphans and widows
controlled in \startlines...\stoplines?


that is not a quick patch as each line is a paragraph so not for the 
next current



Here you have a minimal sample that shows the issue:

 \showframe\showgrid
 \setuppapersize[A5]
 \setuplayout[setups=*lessstrict, topspace=4.5cm, height=middle]
 \startsetups[*lessstrict]
 \setup[reset]
 \widowpenalty=1
 \clubpenalty=1
 \brokenpenalty=1
 \stopsetups
 \starttext
 \dorecurse{5}{\input quevedo-es\par}
 \page
 \dorecurse{5}{\input knuth\par}
 \stoptext

Many thanks for your help,


Pablo




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Bug/change in fillinrules

2016-03-31 Thread Hans Hagen

On 3/31/2016 8:19 AM, Mari Voipio wrote:

Darn, a bug. Thank you, Wolfgang. I figured out a workaround that's ok
for now, but of course I hope that in the long run this gets fixed.


Mari

On Tue, Mar 29, 2016 at 7:09 PM, Wolfgang Schuster
 wrote:

Mari Voipio
29. März 2016 um 14:13
Hello,

after I updated to about newest ConTeXt, I found out that \fillinrules
doesn't work any more as expected, i.e. instead of filling the rest of
the first line, the rule now starts on the second line, below the text
that precedes \fillinrules. This doesn't match the behaviour indicated
in http://wiki.contextgarden.net/Command/fillinrules . Is this a bug
or should I change something in my code? Now I have


\setupfillinrules
[n=1, %one rule per command \fillinrules
width=broad] %leaves some space between the text and the line

\starttext

\fillinrules{Refractometer serial no:}
\fillinrules{Customer:}
\fillinrules{Address:}
\fillinrules{Fax:}
\fillinrules{Email:}
\fillinrules{Sample description:}
\fillinrules{Solvent (water/other):}
\fillinrules{Laboratory method:}
\fillinrules{Date:}
\fillinrules{Data collected by:}

\stoptext

It’s a \thinrules bug which inserts a line break when you have only a single
line.

\starttext

Left \thinrules[n=1] Right

\blank

Left \thinrules[n=2] Right

\blank

Left \thinrules[n=3] Right

\stoptext


fixed in next beta



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] Bug/change in fillinrules

2016-03-31 Thread Mari Voipio
Darn, a bug. Thank you, Wolfgang. I figured out a workaround that's ok
for now, but of course I hope that in the long run this gets fixed.


Mari

On Tue, Mar 29, 2016 at 7:09 PM, Wolfgang Schuster
 wrote:
> Mari Voipio
> 29. März 2016 um 14:13
> Hello,
>
> after I updated to about newest ConTeXt, I found out that \fillinrules
> doesn't work any more as expected, i.e. instead of filling the rest of
> the first line, the rule now starts on the second line, below the text
> that precedes \fillinrules. This doesn't match the behaviour indicated
> in http://wiki.contextgarden.net/Command/fillinrules . Is this a bug
> or should I change something in my code? Now I have
>
>
> \setupfillinrules
> [n=1, %one rule per command \fillinrules
> width=broad] %leaves some space between the text and the line
>
> \starttext
>
> \fillinrules{Refractometer serial no:}
> \fillinrules{Customer:}
> \fillinrules{Address:}
> \fillinrules{Fax:}
> \fillinrules{Email:}
> \fillinrules{Sample description:}
> \fillinrules{Solvent (water/other):}
> \fillinrules{Laboratory method:}
> \fillinrules{Date:}
> \fillinrules{Data collected by:}
>
> \stoptext
>
> It’s a \thinrules bug which inserts a line break when you have only a single
> line.
>
> \starttext
>
> Left \thinrules[n=1] Right
>
> \blank
>
> Left \thinrules[n=2] Right
>
> \blank
>
> Left \thinrules[n=3] Right
>
> \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
___