[NTG-context] searching in subdirectories with project structure

2016-05-05 Thread Javier M Mora

Hi, (this is my first email to the list)

I've created a project for my Thesis. The file tree is:

/prod_thesis/
/prod_thesis.tex
/envi_thesis.tex
/comp_chap1/
   /comp_chap1.tex
   /envi_chap1.tex
   /images/
  /image1.jpg
  /image2.jpg
(...)
   /tables/
  /table1.tex
  /table2.tex
(...)
/comp_chap2/
   /comp_chap2.tex
   /envi_chap2.tex
   /images/
  /image1b.jpg
  /image2b.jpg
(...)
   /tables/
  /table1b.tex
  /table2b.tex
(...)

(...)

envi_chap1.tex has:

\startenvironment envi_chap1
\product prod_thesis
\usepath[images]
\usepath[tables]
\stopenvironment

comp_chap1.tex has:
\startcomponent comp_chap1.tex
\product prod_thesis
\environment envi_chap1

blah blah blah

\placefigure[here][fig:img1]{img1}{
\externalfigure[image1.jpg]
}

blah blah blah

\input tables/table1

blah blah blah
\stopcomponent

prod_thesis.tex has:
\startproduct prod_thesis
\environment envi_thesis

blah blah blah
\component comp_chap1
\component comp_chap2
(...)

\stopproduct

and finally, envi_thesis.tex has:
\startenvironment envi_thesis

\usepath[{comp_chap1,comp_chap2}]

blah (about styles) blah
\stopenvironment


If I cd into comp_chap1 dir and exec:

texexec -xtx comp_chap1.tex

the chapter1 is generated without any problem. All images and tables are 
inserted ok. But if I cd into prod_thesis and exec:


texexec -xtx prod_thesis.tex

all images are replace by "dummy images", and tables are not found 
(raising an error in compilation of document).


In prod_thesis compilation (is it correct to say "compilation of 
document"?), context is looking for file /prod_thesis/tables/table1.tex 
but isn't not looking in /prod_thesis/comp_chap1/tables/table1.tex. I've 
created a copy of tables in /prod_thesis/ and document compiled good. 
But i don't like to pollute prod_thesis directory.



Questions:

What is the canonical way to keep subdirectories of dependencies in a 
component? (to be reused later in product compilation)




I thought \usepath was to indicate where look for input files. I have to 
use "\input tables/table1" to find table 1. \usepath didn't work in 
envi_chap1.tex.


Cheers.
___
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] figures in tables

2016-04-01 Thread Hans Hagen

Hi,

I've added support for

\starttext

\useMPlibrary[dum]

\bTABLE
\bTR
\bTD
\placefigure{}{\externalfigure[dummy][width=4cm]}%
\eTD
\eTR
\eTABLE

\bTABLE[split=yes]
\dorecurse{10}{
\bTR
\bTD \placefigure{}{\externalfigure[dummy][width=4cm]} \eTD
\bTD \placefigure{}{\externalfigure[dummy][width=4cm]} \eTD
\eTR
\bTR
\bTD[nx=2] 
\placefigure{}{\externalfigure[dummy][width=12cm,height=3cm]} \eTD

\eTR
\bTR
\bTD 
\placefigure{}{\externalfigure[dummy][width=4cm]} \eTD
\bTD[ny=2] 
\placefigure{}{\externalfigure[dummy][width=4cm,height=8cm]} \eTD

\eTR
\bTR
\bTD 
\placefigure{}{\externalfigure[dummy][width=4cm]} \eTD

\eTR
}
\eTABLE

\stoptext

somewhat experimental (and I will not support floats in all kind of 
constructs ... after all, they are floats)


(btw, \placefigure[force,always] is pretty much a local float)

Hans


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

2016-04-01 Thread Aidan Nichol
> On Thu, 31 Mar 2016 21:49:56 -0400 (EDT)
> Aditya Mahajan  wrote:
> 
> 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?

And \startcombination\stopcombination fails when you use \placefigure instead 
of \externalfigure because you want the captions to be numbered and included in 
the list of figures. You get an error like this one 

  > tex error on line 7 in file virtual: . . .  ! You can't use 
`\prevdepth' in restricted horizontal mode

Using \startfloatcombinations\stopfloatcombination (which appears to be 
undocumented) avoids this error.


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

I thought that nesting combinations might enable this type of combination but 
it didn’t work. see
https://mailman.ntg.nl/pipermail/ntg-context/2016/084926.html 
<https://mailman.ntg.nl/pipermail/ntg-context/2016/084926.html>

Using tables is a better solution because it has the syntax to handle figures 
that span rows or columns

> 
> Aditya
> 
Lots of things seem to work well with external figures but as soon as you embed 
them in a \placefigure, which makes them a float, you make things more complex 
and run into the possibility of triggering the restricted horizontal mode  
error.

It seems to me that once you place an object that is normally a float inside 
another float you want the inner one to lose it floating characteristics. Is 
there a way do this explicitly i.e. instead of creating an inner float with

\placefigure[force][ref1]{this is the caption 
}{\externalfigure[cow][width=3in,height=1in]}

could we create a non-floating version with something explicit like

\externalfigure[cow][width=3in,height=1in]
\addcaption[figure][ref1]{this is the caption }

Aidan


___
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-04-01 Thread Hans Hagen

On 3/31/2016 11:51 PM, Aditya Mahajan wrote:

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?


btw, floats are just that: floats ...

\starttext

\useMPlibrary[dum]

\dorecurse{34}{test\par}

\bTABLE[split=yes]
\dorecurse{10}{
\bTR
\bTD \placefigure{}{\externalfigure[dummy][width=2cm]} \eTD
\bTD \placefigure{}{\externalfigure[dummy][width=2cm]} \eTD
\eTR
\bTR
\bTD[nx=2] 
\placefigure{}{\externalfigure[dummy][width=4cm]} \eTD

\eTR
}
\eTABLE

\stoptext


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

2016-04-01 Thread Hans Hagen

On 3/31/2016 11:51 PM, Aditya Mahajan wrote:

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?


depends a bit .. other mechanisms do a save, increment, restore, which 
better reflects the number to be rendered (otherwise you can get 
oscillating runs)


Hans

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

2016-03-30 Thread Aditya Mahajan

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
___

[NTG-context] Skipped figure numbers

2016-03-30 Thread Aidan Nichol
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?
___
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] placefigure and listoffigures

2016-03-15 Thread Alan BRASLAU
On Tue, 15 Mar 2016 23:01:46 +0100
Wolfgang Schuster  wrote:

> \startplacefigure [location={inmargin,none}]

Thank you, clean and elegant (and much easier than Willi's suggestion).
The syntax is a bit magical, though ("location" of the caption).

Alan
___
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] placefigure and listoffigures

2016-03-15 Thread Wolfgang Schuster

Alan BRASLAU 
15. März 2016 um 21:43
Hi,

How can one suppress the addition of a placed figure to the
listoffigures?

In the following MWE, list=no places "no" as an alternative to the
(blank) title.

Alan


\starttext

\startplacefigure [location=inmargin,number=no,list=no]

\startplacefigure [location={inmargin,none}]

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] placefigure and listoffigures

2016-03-15 Thread Willi Egger
I would define another float and assign this not to be listed float to this new 
float-type something like \definefloat[Notlisted][figure] and then
\startplaceNotlisted
\externalf…
\stopplaceNotlisted

Best wishes

Willi
> On 15 mrt. 2016, at 21:43, Alan BRASLAU  wrote:
> 
> Hi,
> 
> How can one suppress the addition of a placed figure to the
> listoffigures?
> 
> In the following MWE, list=no places "no" as an alternative to the
> (blank) title.
> 
> Alan
> 
> 
> \starttext
> 
> \startplacefigure [location=inmargin,number=no,list=no]
>  \externalfigure [cow] [width=1cm]
> \stopplacefigure
> \input knuth
> 
> \blank
> 
> \placelistoffigures [criterium=all]
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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] placefigure and listoffigures

2016-03-15 Thread Alan BRASLAU
Hi,

How can one suppress the addition of a placed figure to the
listoffigures?

In the following MWE, list=no places "no" as an alternative to the
(blank) title.

Alan


\starttext

\startplacefigure [location=inmargin,number=no,list=no]
  \externalfigure [cow] [width=1cm]
\stopplacefigure
\input knuth

\blank

\placelistoffigures [criterium=all]

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

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

Re: [NTG-context] text wrapped around \textwidth sized images unwantedly.

2016-02-02 Thread Hans Hagen

On 2/1/2016 11:08 PM, d_jan wrote:

I use ConTeXt for a document with many images. The text should float
around the images, if possible.

The floating itself works fine, but some images are equal or larger than
\textwidth (so they are maxwidth=\textwidth). Instead of breaking above
the image and starting below it again, the algorithm tries to float a
bit of text (about 2-4 characters each line) around the image using
space outside the text area (which naturally causes overfull \hbox-es).

Is there any way to prevent this?

If not, I define another float for these images and assign it to the
affected images, but I wonder if I can get around this.


try this:

\setupfloat[figure][criterium=10cm,fallback=here]

\placefigure[left]{}{\framed[width=5cm]{}} \input tufte

\placefigure[left]{}{\framed[width=\textwidth]{}} \input tufte



-
  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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Aditya Mahajan

On Fri, 29 Jan 2016, Hans Hagen wrote:


On 1/29/2016 9:30 PM, d_jan wrote:

 Hello fellow ConTeXt users,


 I want to place figures left so that text wraps around them if they have
 less width than \textwidth. The figure captions should be aligned left
 (flushleft).

 What happens: The captions are all centered.


What happens is that a caption < width kicks in.


But we already have a way to get around that: width=max

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft, width=max]

\starttext

\placefigure{my figure caption a really long 
caption}{\externalfigure[images/image1.jpg]}

\input knuth

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}
\input tufte
\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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Hans Hagen

On 1/30/2016 12:26 AM, Aditya Mahajan wrote:

On Fri, 29 Jan 2016, Hans Hagen wrote:


On 1/29/2016 9:30 PM, d_jan wrote:

 Hello fellow ConTeXt users,


 I want to place figures left so that text wraps around them if they
have
 less width than \textwidth. The figure captions should be aligned left
 (flushleft).

 What happens: The captions are all centered.


What happens is that a caption < width kicks in.


But we already have a way to get around that: width=max

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft, width=max]

\starttext

\placefigure{my figure caption a really long
caption}{\externalfigure[images/image1.jpg]}
\input knuth

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}
\input tufte
\stoptext


indeed, you're right, no need to change something (i'll add an example 
to the test suite)


Hans


-
  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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Hans Hagen

On 1/29/2016 9:30 PM, d_jan wrote:

Hello fellow ConTeXt users,


I want to place figures left so that text wraps around them if they have
less width than \textwidth. The figure captions should be aligned left
(flushleft).

What happens: The captions are all centered.


What happens is that a caption < width kicks in.

% put this on cont=-new.mkiv

\unprotect

\def\strc_floats_prepare_side_caption_fit
  {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
 \setbox\b_strc_floats_caption\vbox
   {\forgetall % needed?
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}%
   \else
  \setbox\b_strc_floats_caption\hpack
{\strc_floats_make_complete_caption}%
   \fi}

\protect

% then you can do this (maybe Wolfgang can check the logic too):

\starttext

\setupfloat[figure][default={left,nonumber}]

\placefigure{my figure caption my figure 
caption}{\framed[width=4cm,height=1cm]{}} \input tufte
\placefigure{my figure caption} 
{\framed[width=4cm,height=1cm]{}} \input tufte


\setupfloat[figure][location=left]

\placefigure{my figure caption my figure 
caption}{\framed[width=4cm,height=1cm]{}} \input tufte
\placefigure{my figure caption} 
{\framed[width=4cm,height=1cm]{}} \input tufte


\stoptext

don't use flushleft as that won't work ok for location


Details:

If I use default={here,nonumber} instead of default={left,nonumber}
in\setupfloat[figure][default=..., the captions are aligned left, just
like they should.

It does not matter if the text warps around the captioned image, the
centered is present for all figure-captions, regardless of their width.


Code demonstrating the behaviour:
-

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft] %prefix: section-wis 3

\starttext

%here is some text...
Lorem Ipsum

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


%here is some text
Lorem Ipsum
\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


Is there any way to left-place figures and have the captions flushleft
aligned? (Ideally while keeping the content after starttext the same)

addition: I tried with an comes-with-Ubuntu-14.04 and a LiveTex2015
Version of ConTeXt, no difference in behavior.

Kind Regards,
  Jan

PS.: Previously posted this on tex.stackexchange too
(http://tex.stackexchange.com/questions/289752/if-figures-are-placed-left-left-aligned-captions-are-unwantedly-centered-conte),
but without answers so far.
___
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 | 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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread d_jan
Hello fellow ConTeXt users,


I want to place figures left so that text wraps around them if they have
less width than \textwidth. The figure captions should be aligned left
(flushleft).

What happens: The captions are all centered.

Details:

If I use default={here,nonumber} instead of default={left,nonumber}
in\setupfloat[figure][default=..., the captions are aligned left, just
like they should.

It does not matter if the text warps around the captioned image, the
centered is present for all figure-captions, regardless of their width.


Code demonstrating the behaviour:
-

   \setupfloat[figure][default={left,nonumber}]

   \setupcaption[figure][align=flushleft] %prefix: section-wis 3

   \starttext

   %here is some text...
   Lorem Ipsum

   \placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


   %here is some text
   Lorem Ipsum
   \placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


Is there any way to left-place figures and have the captions flushleft
aligned? (Ideally while keeping the content after starttext the same)

addition: I tried with an comes-with-Ubuntu-14.04 and a LiveTex2015
Version of ConTeXt, no difference in behavior.

Kind Regards,
 Jan

PS.: Previously posted this on tex.stackexchange too
(http://tex.stackexchange.com/questions/289752/if-figures-are-placed-left-left-aligned-captions-are-unwantedly-centered-conte),
but without answers so far.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] RTL problem with figure numbers

2016-01-17 Thread Mohammad Hossein Bateni
I just found a solution to the last question:

\defineseparatorset[dashsep][][{--}]
\setuphead[section][sectionseparatorset=dashsep]

On Mon, Jan 18, 2016 at 1:01 AM, Mohammad Hossein Bateni 
wrote:

> Thanks, this works for figures.
>
> I couldn't get the same to work for chapters, sections, etc.
>
> \setuphead[chapter,section][conversion=lefttorightnumber]
>
> This does not have any effect.
>
>
> The solution I had in the first email of this thread (see below) has
> another issue, which I discovered later.
>
> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
>
> The 12th section in the first chapter is written as 1.12 instead of 12.1;
> I want the latter because of r2l align.
>
> Another question: how do I change the separator to something else, say
> --?  I have played with separator and separatorset, but neither seems to
> work.
>
>
> On Sat, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
>
>> Mohammad Hossein Bateni 
>> 3. Januar 2016 um 20:46
>> Hi,
>>
>> Again this has been partly discussed on the list and solutions were
>> already there but I didn't see anyone mention the issue with figures.
>>
>> In the following MWE we have 20 pages of a simple text with a section, a
>> footnote and a figure on each page.  The page numbers and footnote numbers
>> are fine.  Section numbers need some care to appear correctly.  I couldn't
>> figure out a similar mechanism for figure numbers, though.  The example
>> does not use Indic numbers, which does not have any effect on the problem.
>>
>>
>> \setupdirections[bidi=global,method=two]
>> \setupalign[r2l]
>>
>> %% If we don't provide the numbercommand, we'll see reverse numbering
>> starting from 10.
>> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
>> %% The following does not accept any numbercommand but it has
>> numberconversion.
>> %% As a result figure numbers are shown in reverse.
>> \setupcaptions[numberstopper={:}]
>> %% Footnotes are fine and accept conversion.
>> %% Page numbers are also okay.
>>
>> \starttext
>>
>> \dorecurse{20}{
>>
>> \section{Test}
>> This is a very simple text.
>> And we have a footnote\footnote{Footnote text}.
>>
>> \placefigure
>> [][]
>> {Test figure.}
>> {\centerline{FIGURE BODY}}
>>
>> \page
>> }
>>
>> \stoptext
>>
>> You can use processors.
>>
>> \setupalign[righttoleft]
>>
>> \defineprocessor [lefttoright][style=\lefttoright]
>> \defineconversionset[lefttorightnumber][][lefttoright->n]
>>
>> \setupcaption[figure][numberconversionset=lefttorightnumber]
>>
>> \starttext
>>
>> \chapter{Chapter}
>>
>> \dorecurse{20}{\placefigure{Dummy
>> figure}{\blackrule[width=8cm,height=2cm]}}
>>
>> \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] RTL problem with figure numbers

2016-01-17 Thread Mohammad Hossein Bateni
Thanks, this works for figures.

I couldn't get the same to work for chapters, sections, etc.

\setuphead[chapter,section][conversion=lefttorightnumber]

This does not have any effect.


The solution I had in the first email of this thread (see below) has
another issue, which I discovered later.

\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]

The 12th section in the first chapter is written as 1.12 instead of 12.1; I
want the latter because of r2l align.

Another question: how do I change the separator to something else, say --?
I have played with separator and separatorset, but neither seems to work.


On Sat, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni 
> 3. Januar 2016 um 20:46
> Hi,
>
> Again this has been partly discussed on the list and solutions were
> already there but I didn't see anyone mention the issue with figures.
>
> In the following MWE we have 20 pages of a simple text with a section, a
> footnote and a figure on each page.  The page numbers and footnote numbers
> are fine.  Section numbers need some care to appear correctly.  I couldn't
> figure out a similar mechanism for figure numbers, though.  The example
> does not use Indic numbers, which does not have any effect on the problem.
>
>
> \setupdirections[bidi=global,method=two]
> \setupalign[r2l]
>
> %% If we don't provide the numbercommand, we'll see reverse numbering
> starting from 10.
> \setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
> %% The following does not accept any numbercommand but it has
> numberconversion.
> %% As a result figure numbers are shown in reverse.
> \setupcaptions[numberstopper={:}]
> %% Footnotes are fine and accept conversion.
> %% Page numbers are also okay.
>
> \starttext
>
> \dorecurse{20}{
>
> \section{Test}
> This is a very simple text.
> And we have a footnote\footnote{Footnote text}.
>
> \placefigure
> [][]
> {Test figure.}
> {\centerline{FIGURE BODY}}
>
> \page
> }
>
> \stoptext
>
> You can use processors.
>
> \setupalign[righttoleft]
>
> \defineprocessor [lefttoright][style=\lefttoright]
> \defineconversionset[lefttorightnumber][][lefttoright->n]
>
> \setupcaption[figure][numberconversionset=lefttorightnumber]
>
> \starttext
>
> \chapter{Chapter}
>
> \dorecurse{20}{\placefigure{Dummy
> figure}{\blackrule[width=8cm,height=2cm]}}
>
> \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] RTL problem with figure numbers

2016-01-09 Thread Wolfgang Schuster

Mohammad Hossein Bateni <mailto:bat...@gmail.com>
3. Januar 2016 um 20:46
Hi,

Again this has been partly discussed on the list and solutions were 
already there but I didn't see anyone mention the issue with figures.


In the following MWE we have 20 pages of a simple text with a section, 
a footnote and a figure on each page.  The page numbers and footnote 
numbers are fine.  Section numbers need some care to appear 
correctly.  I couldn't figure out a similar mechanism for figure 
numbers, though.  The example does not use Indic numbers, which does 
not have any effect on the problem.



\setupdirections[bidi=global,method=two]
\setupalign[r2l]

%% If we don't provide the numbercommand, we'll see reverse numbering 
starting from 10.

\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
%% The following does not accept any numbercommand but it has 
numberconversion.

%% As a result figure numbers are shown in reverse.
\setupcaptions[numberstopper={:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also okay.

\starttext

\dorecurse{20}{

\section{Test}
This is a very simple text.
And we have a footnote\footnote{Footnote text}.

\placefigure
[][]
{Test figure.}
{\centerline{FIGURE BODY}}

\page
}

\stoptext

You can use processors.

\setupalign[righttoleft]

\defineprocessor [lefttoright][style=\lefttoright]
\defineconversionset[lefttorightnumber][][lefttoright->n]

\setupcaption[figure][numberconversionset=lefttorightnumber]

\starttext

\chapter{Chapter}

\dorecurse{20}{\placefigure{Dummy figure}{\blackrule[width=8cm,height=2cm]}}

\stoptext

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

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

[NTG-context] RTL problem with figure numbers

2016-01-03 Thread Mohammad Hossein Bateni
Hi,

Again this has been partly discussed on the list and solutions were already
there but I didn't see anyone mention the issue with figures.

In the following MWE we have 20 pages of a simple text with a section, a
footnote and a figure on each page.  The page numbers and footnote numbers
are fine.  Section numbers need some care to appear correctly.  I couldn't
figure out a similar mechanism for figure numbers, though.  The example
does not use Indic numbers, which does not have any effect on the problem.


\setupdirections[bidi=global,method=two]
\setupalign[r2l]

%% If we don't provide the numbercommand, we'll see reverse numbering
starting from 10.
\setuphead[chapter,title,section,subject][numbercommand=\righttoleft]
%% The following does not accept any numbercommand but it has
numberconversion.
%% As a result figure numbers are shown in reverse.
\setupcaptions[numberstopper={:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also okay.

\starttext

\dorecurse{20}{

\section{Test}
This is a very simple text.
And we have a footnote\footnote{Footnote text}.

\placefigure
[][]
{Test figure.}
{\centerline{FIGURE BODY}}

\page
}

\stoptext


I use TeXLive 2015 on Mac OS X,
 CONTEXT 2015.05.18 12:26, and
 LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238).

Thanks a lot!
—MHB
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Unexpected float numbering in unnumbered subsubsection

2015-12-15 Thread Jan Willem Flamma
Dear list members,

I ran into the following issue related to figure/float numbering.

I use numbered chapters, sections, subsections and unnumbered subsubsections. 
See minimal example below.

Figure numbering works as expected in the numbered chapters, sections and 
subsections.
Figures get numbered: Figure 1.1

The figure numbering is unexpected in the unnumbered sub subsection:
Figures get numbered: Figure 2 (in stead of the expected Figure 1.2)

I would like all figures (and floats) to be numbered in sequence according the 
chapter numbering:
Chapter 1: Figure 1.1, Figure 1.2, Table 1.3, Figure 1.4, etc
Chapter 2: Figure 2.1, Figure 2.2 etc

I've tried several \setupcaptions options but was unable to solve so far.
Everything works as expected when using a numbered subsubsection so the problem 
is somehow related to the number=no option

Minimal example:
\setuphead[chapter, section, subsection]
\setuphead[subsubsection]
[number=no]

\starttext

\startchapter[title=Chapter title]
\input ward

\startsection[title=Section title1]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\startsubsubsection[title=Subsubsection title]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\stopsubsubsection
\stopsection

\startsection[title=Section title2]
\input ward

\placefigure[here][]{Caption}
{\externalfigure[dummy]}

\stopsection

\stopchapter
\stoptext

Would appreciated some advise on how to solve this.

Best regards,
Jan Willem Flamma___
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] MetaPost Question

2015-12-07 Thread Context NTG
I guess the code I am looking for is the below to hatch the cut-out
section. How can I load the MetaPost hatching package in Context minimals
so it understands the hatchfill command?

Thanks
Jeroen

\startMPinclusions

input hatching;

\stopMPinclusions


\starttext


\placefigure[here,force][fig:tubing]{Tubular Linear Volumetric Capacity}

{\startMPcode


% inner circle

draw fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,0);

draw (0,0) -- (0,-5cm) dashed evenly;

draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly;

draw fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,-5cm) dashed
evenly;


%outer circle

draw fullcircle xscaled 2.9cm yscaled 1cm shifted (1.25cm,0);

draw (-.2cm,0) -- (-.2cm,-5cm);

draw (2.7cm,0) -- (2.7cm,-5cm);

draw halfcircle scaled 2.9cm yscaled 0.012cm shifted (1.25cm,-5cm) dashed
evenly;

draw halfcircle scaled 2.9cm yscaled 0.012cm rotated 180 shifted
(1.25cm,-5cm);


%cut-out section

hatchfill circle withcolor (45, 5mm, -.5bp);

fill fullcircle xscaled 2.5cm yscaled 0.7cm shifted (1.25cm,-2.7cm)
withcolor (.6,.6,.6);

label.top("tubular",(1.26cm,-1.3cm));

label.top("inside area",(1.28cm,-1.8cm));

label.top("($in^2$)",(1.28cm,-2.4cm));


%arrows and label ID

drawarrow (0,-4.1cm) -- (2.5cm,-4.1cm);

drawarrow (2.5cm,-4.1cm) -- (0,-4.1cm);

label.top("ID ($in$)",(1.26cm,-4.15cm));


%arrows and label tubular length

draw (3.25cm,-5cm) -- (3.25cm,0);

drawarrow (3.25cm,-5) -- (3.25cm,0);

drawarrow (3.25cm,0) -- (3.25cm,-5cm);

label.top("tubular length ($in$)",(5.2cm,-2.75cm));


\stopMPcode}


\stoptext

2015-12-06 21:54 GMT+01:00 Context NTG :

> I am trying to graph a cylinder. Is there a way to draw a more elliptic
> top/bottom. This one seems some flattened at the top and bottom. I would
> like to hatch the mid elliptic that is collored grey now. Is there a way to
> do this.
>
> Thanks
> Jeroen
>
>
>
> \placefigure
>
> [here,force]
>
> [fig:tubing]
>
> {Tubular Linear Volumetric Capacity}
>
> {\startMPcode
>
>
> draw (0,0){up} ... (1.25cm, 2mm) ... (2.5cm,0){down} ... (1.25cm, -2mm)
> ... cycle;
>
> draw (0,0) -- (0,-5cm) dashed evenly;
>
> draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly;
>
> draw (0,-5cm){up} ... (1.25cm, -4.8cm) ... (2.5cm,-5cm){down} ... (1.25cm,
> -5.2cm) ... cycle dashed evenly;
>
>
> draw (-.2cm,0){up} ... (1.25cm, 3.5mm) ... (2.7cm,0){down} ... (1.25cm,
> -3.5mm) ... cycle;
>
> draw (-.2cm,0) -- (-.2cm,-5cm);
>
> draw (2.7cm,0) -- (2.7cm,-5cm);
>
> draw (-.2cm,-5cm){up} ... (1.25cm, -4.7cm) ... (2.7cm,-5cm){down} dashed
> evenly;
>
> draw (-.2cm,-5cm){down} ... (1.25cm, -5.3cm) ... (2.7cm,-5cm){up};
>
>
> fill (0,-2.5cm){up} ... (1.25cm, -2.3cm) ... (2.5cm,-2.5cm){down} ...
> (1.25cm, -2.7cm) ... cycle withcolor (.6,.6,.6) dashed evenly;
>
> label.top("tubular",(1.26cm,-1.1cm));
>
> label.top("inside area",(1.28cm,-1.6cm));
>
> label.top("($in^2$)",(1.28cm,-2.2cm));
>
>
> draw (3.25cm,-5cm) -- (3.25cm,0);
>
> drawarrow (3.25cm,-5) -- (3.25cm,0);
>
> drawarrow (3.25cm,0) -- (3.25cm,-5cm);
>
> label.top("tubular length ($in$)",(5.2cm,-2.75cm));
>
>
> \stopMPcode}
>
___
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] MetaPost Question

2015-12-06 Thread Alan BRASLAU
Please change your mailing name and address.


In order to draw 3D perspective diagrams in MetaPost,
you will need to transform 3D paths to a 2D projection.
There are many methods to accomplish this, and there are several MP
modules that have been written to address this issue.

One fairly simple and elegant approach is available from Urs Oswald:
http://www.ursoswald.ch/metapost/tutorial.html

Alan



On Sun, 6 Dec 2015 21:54:38 +0100
Context NTG  wrote:

> I am trying to graph a cylinder. Is there a way to draw a more
> elliptic top/bottom. This one seems some flattened at the top and
> bottom. I would like to hatch the mid elliptic that is collored grey
> now. Is there a way to do this.
> 
> Thanks
> Jeroen
> 
> 
> 
> \placefigure
> 
> [here,force]
> 
> [fig:tubing]
> 
> {Tubular Linear Volumetric Capacity}
> 
> {\startMPcode
> 
> 
> draw (0,0){up} ... (1.25cm, 2mm) ... (2.5cm,0){down} ... (1.25cm,
> -2mm) ... cycle;
> 
> draw (0,0) -- (0,-5cm) dashed evenly;
> 
> draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly;
> 
> draw (0,-5cm){up} ... (1.25cm, -4.8cm) ... (2.5cm,-5cm){down} ...
> (1.25cm, -5.2cm) ... cycle dashed evenly;
> 
> 
> draw (-.2cm,0){up} ... (1.25cm, 3.5mm) ... (2.7cm,0){down} ...
> (1.25cm, -3.5mm) ... cycle;
> 
> draw (-.2cm,0) -- (-.2cm,-5cm);
> 
> draw (2.7cm,0) -- (2.7cm,-5cm);
> 
> draw (-.2cm,-5cm){up} ... (1.25cm, -4.7cm) ... (2.7cm,-5cm){down}
> dashed evenly;
> 
> draw (-.2cm,-5cm){down} ... (1.25cm, -5.3cm) ... (2.7cm,-5cm){up};
> 
> 
> fill (0,-2.5cm){up} ... (1.25cm, -2.3cm) ... (2.5cm,-2.5cm){down} ...
> (1.25cm, -2.7cm) ... cycle withcolor (.6,.6,.6) dashed evenly;
> 
> label.top("tubular",(1.26cm,-1.1cm));
> 
> label.top("inside area",(1.28cm,-1.6cm));
> 
> label.top("($in^2$)",(1.28cm,-2.2cm));
> 
> 
> draw (3.25cm,-5cm) -- (3.25cm,0);
> 
> drawarrow (3.25cm,-5) -- (3.25cm,0);
> 
> drawarrow (3.25cm,0) -- (3.25cm,-5cm);
> 
> label.top("tubular length ($in$)",(5.2cm,-2.75cm));
> 
> 
> \stopMPcode}



-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS UMR 3680
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] MetaPost Question

2015-12-06 Thread Context NTG
I am trying to graph a cylinder. Is there a way to draw a more elliptic
top/bottom. This one seems some flattened at the top and bottom. I would
like to hatch the mid elliptic that is collored grey now. Is there a way to
do this.

Thanks
Jeroen



\placefigure

[here,force]

[fig:tubing]

{Tubular Linear Volumetric Capacity}

{\startMPcode


draw (0,0){up} ... (1.25cm, 2mm) ... (2.5cm,0){down} ... (1.25cm, -2mm) ...
cycle;

draw (0,0) -- (0,-5cm) dashed evenly;

draw (2.5cm,0) -- (2.5cm,-5cm) dashed evenly;

draw (0,-5cm){up} ... (1.25cm, -4.8cm) ... (2.5cm,-5cm){down} ... (1.25cm,
-5.2cm) ... cycle dashed evenly;


draw (-.2cm,0){up} ... (1.25cm, 3.5mm) ... (2.7cm,0){down} ... (1.25cm,
-3.5mm) ... cycle;

draw (-.2cm,0) -- (-.2cm,-5cm);

draw (2.7cm,0) -- (2.7cm,-5cm);

draw (-.2cm,-5cm){up} ... (1.25cm, -4.7cm) ... (2.7cm,-5cm){down} dashed
evenly;

draw (-.2cm,-5cm){down} ... (1.25cm, -5.3cm) ... (2.7cm,-5cm){up};


fill (0,-2.5cm){up} ... (1.25cm, -2.3cm) ... (2.5cm,-2.5cm){down} ...
(1.25cm, -2.7cm) ... cycle withcolor (.6,.6,.6) dashed evenly;

label.top("tubular",(1.26cm,-1.1cm));

label.top("inside area",(1.28cm,-1.6cm));

label.top("($in^2$)",(1.28cm,-2.2cm));


draw (3.25cm,-5cm) -- (3.25cm,0);

drawarrow (3.25cm,-5) -- (3.25cm,0);

drawarrow (3.25cm,0) -- (3.25cm,-5cm);

label.top("tubular length ($in$)",(5.2cm,-2.75cm));


\stopMPcode}
___
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] goto

2015-11-28 Thread Willi Egger
Hello Hans,

I read your post today ;-|

In the past, that is in the pdfTeX time, I used this feature as follows:

\useexternaldocument[Taptones][c_tap-tones.pdf][Chapter about using tap-tones]

\starttext

This is a test to jump to another file
\goto{Jump to tap-tones}[Taptones::]

\stoptext

I tested it with a recent version of MKIV and it works.

I hope this can help you setup your project successfully.

Willi

On 18 okt. 2015, at 11:49, Meer, Hans van der  wrote:
> 
> I would like to be able to go directly to a local document by an interaction 
> statement. The \goto command seems to be meant for this.
> However, the descriptions in the command reference and the Wiki do not 
> explain all of its parameters:
> In \goto{1}{2}[3] parameters 1 and 2 are marked CONTEXT and 3 is marked 
> REFERENCE. I could find parameter {1} typeset in the text and [3] as the 
> reference in for example a \placefigure.
> 
> What is {2} supposed to do? \goto{}Something}[] does not places Something to 
> find.
> 
> I tried to effect the jump to a document on my system with
> \goto{local-doc}[/Volumes/Users/myhome/Documents/myfigure.jpg]
> but this does not works as I hoped.
> 
> 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
> ___

___
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] place figure at the top left corner of the header

2015-11-26 Thread massifr
Hello list,
I need to place a figure with its topleft corner on the topleft corner of the 
header.
The figure would be large as the textframe and covering all the header and
part of the textframe, leaving the text flow below the figure.

In other words, a normal figure \textwidth large, but starting out of the 
textframe,
at the header top, as if the textframe had the same topleft corner of the 
header.

Which is the best way to obtain it? Do I need a custom page makeup, a layer or
simply configuring \placefigure?

Thank you,
Massi
___
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] Dropcaps in ConTeXt

2015-10-27 Thread josephcanedo
Dear all,





I try to typeset some text with dropcaps which are pdf files in a 2 column 
text. I came up with 3 possibilities as shown in the sample below (attached 
D1.pdf). So far best solution seems to use the lettrine module, but I wondered 
if it would be possible to cope with the issue with figure and text overlapping 
if the first paragraph is very short (ie avoid using \\) ? Had a look to 
lettrine module source and wondered where I could find some documentation on 
the low level ConTeXt commands used in there ? For example to amend the code to 
avoid Lines= and use the actual figure size.


Sample follows:


\definecolumnset[TwoColumns][n=2]


\usemodule[lettrine]


\starttext


\startcolumnset [TwoColumns]


\placefigure[left,none]{}{\externalfigure[D1.pdf]} % how to have left side 
figure with text wrapping around it ?
This is a first paragraph.


\input tufte


\starthanging{\externalfigure[D1.pdf]}
This is a first paragraph.\\ % how to have \par here ?
\input tufte
\stophanging


\lettrine[Image=yes, Lines=4, Nindent=0pt, Findent=0.5em]{D1.pdf} % avoid Lines 
and use actual figure size ?
This is a first paragraph.\\ % how to have \par here ?
\input tufte


\stopcolumnset


\stoptext



Thanks

Regards


Joseph Canedo

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

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

[NTG-context] goto

2015-10-18 Thread Meer, Hans van der
I would like to be able to go directly to a local document by an interaction 
statement. The \goto command seems to be meant for this.
However, the descriptions in the command reference and the Wiki do not explain 
all of its parameters:
In \goto{1}{2}[3] parameters 1 and 2 are marked CONTEXT and 3 is marked 
REFERENCE. I could find parameter {1} typeset in the text and [3] as the 
reference in for example a \placefigure.

What is {2} supposed to do? \goto{}Something}[] does not places Something to 
find.

I tried to effect the jump to a document on my system with
\goto{local-doc}[/Volumes/Users/myhome/Documents/myfigure.jpg]
but this does not works as I hoped.

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
___

Re: [NTG-context] reference points with double colons (::) are not working

2015-10-10 Thread Eidenbenz Michael
Dear Hans,

thanks for your answer.
i found a workaround by using only the key for the crossref and adding the 
"img::" in the macro. 

below is the working example (just for the record)

regards michael


---

\startbuffer[duane]

@image {tug2014,
title   = "TUG 2014",
url = "http://tug.org/tug2014/";,
url_image   = "http://tug.org/art/tug2014-color.jpg";,
url_thumb   = "http://tug.org/tug2014/t2014-thumb.jpg";,
description = "Official drawing of the TUG 2014 conference",
author  = "Duane Bibby",
year= 2014,
}

\stopbuffer

\definebtxdataset
 [duane]

\usebtxdataset
 [duane]
 [duane.buffer]

\usebtxdefinitions  
 [duane]

\definebtxrendering
[duane]
[dataset=duane,
 method=local, 
]

\setupbtxlist
[duane]
[number=no]

\startsetups btx:duane:cite:image
   {\externalfigure[\btxfield{url_image}][width=10cm]}
\stopsetups

 \def\bild[#1]#2%
{\placefigure[here][#1]{#2}{\cite[image][duane::#1]}}%

\def\bildref[#1]%
{\in{\bf Fig.}[#1]}

\startsetups btx:duane:list:image
  \btxfield{title} 
\stopsetups

\starttext

   %\enabletrackers
   % [publications.setups]
   
   \bild[tug2014]\par
   
   \input tufte
 
   \bildref[tug2014]

   \page

   \placebtxrendering[duane]

\stoptext






On 10.10.2015, at 11:35, Hans Hagen 
 wrote:

> On 10/10/2015 10:26 AM, Eidenbenz  Michael wrote:
>> Hello,
>> 
>> I have double colons (::) in my reference points.
>> (It's actually the same string I also use to refer to my publication 
>> database)
>> But they wont show up as you can see in the example below.
>> 
>> Is there any way to fix this?
>> 
>> Thanks for your help and best regards
> 
> :: and ::: have special meaning (:; for another document and ::: for 
> components and such)
> 
>> Michael
>> 
>> -
>> 
>> \starttext
>> 
>> \placefigure[here][img:cow]{This is a cow}{\externalfigure[cow.jpg]}\par
>> \placefigure[here][img::mill]{This is a mill}{\externalfigure[mill.png]}\par
>> 
>> The picture in \in{Figure}[img:cow] is a cow\par
>> The picture in \in{Figure}[img::mill] is a mill (cross reference is not 
>> working)\par
>> 
>> \stoptext
>> 
>> -
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>> 
> 
> 
> -- 
> 
> -
>  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
___

Re: [NTG-context] reference points with double colons (::) are not working

2015-10-10 Thread Hans Hagen

On 10/10/2015 10:26 AM, Eidenbenz  Michael wrote:

Hello,

I have double colons (::) in my reference points.
(It's actually the same string I also use to refer to my publication database)
But they wont show up as you can see in the example below.

Is there any way to fix this?

Thanks for your help and best regards


:: and ::: have special meaning (:; for another document and ::: for 
components and such)



Michael

-

\starttext

\placefigure[here][img:cow]{This is a cow}{\externalfigure[cow.jpg]}\par
\placefigure[here][img::mill]{This is a mill}{\externalfigure[mill.png]}\par

The picture in \in{Figure}[img:cow] is a cow\par
The picture in \in{Figure}[img::mill] is a mill (cross reference is not 
working)\par

\stoptext

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

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




--

-
  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] reference points with double colons (::) are not working

2015-10-10 Thread Eidenbenz Michael
Hello,

I have double colons (::) in my reference points. 
(It's actually the same string I also use to refer to my publication database)
But they wont show up as you can see in the example below.

Is there any way to fix this?

Thanks for your help and best regards 

Michael

-

\starttext

\placefigure[here][img:cow]{This is a cow}{\externalfigure[cow.jpg]}\par
\placefigure[here][img::mill]{This is a mill}{\externalfigure[mill.png]}\par

The picture in \in{Figure}[img:cow] is a cow\par
The picture in \in{Figure}[img::mill] is a mill (cross reference is not 
working)\par 

\stoptext

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

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

[NTG-context] custom :cite setups with new bibliography system

2015-10-06 Thread Eidenbenz Michael
This works only with method=dataset in current context.
In beta the method=local works, but then \btxfield is broken for the :cite 
setups

Is there a workaround or is this temporaily broken? 

Thanks and best regards

Michael


--


\startbuffer[duane]

@image {tug2014,
title   = "TUG 2014",
url = "http://tug.org/tug2014/";,
url_image   = "http://tug.org/art/tug2014-color.jpg";,
url_thumb   = "http://tug.org/tug2014/t2014-thumb.jpg";,
description = "Official drawing of the TUG 2014 conference",
author  = "Duane Bibby",
year= 2014,
}

@image {tug2013,
title   = "TUG 2013",
url = "http://tug.org/tug2013/";,
url_image   = "http://tug.org/tug2013/tug2013-color-300.jpg";,
url_thumb   = "http://tug.org/tug2013/t2013-thumb.jpg";,
description = "Official drawing of the TUG 2013 conference",
author  = "Duane Bibby",
year= 2013,
}

@image {tug2012,
title   = "TUG 2012",
url = "http://tug.org/tug2012/";,
url_image   = "http://www.tug.org/art/tug2012-color.jpg";,
url_thumb   = "http://www.tug.org/tug2012/t2012-thumb.jpg";,
description = "Official drawing of the TUG 2012 conference",
author  = "Duane Bibby",
year= 2012,
}

\stopbuffer

\definebtxdataset
 [duane]

\usebtxdataset
 [duane]
 [duane.buffer]

\usebtxdefinitions  
 [duane]

\definebtxrendering
[duane]
[dataset=duane,
 method=dataset, 
]

%method=local only works with beta, but then \btxfield in :cite:image (not in 
:list:image) is broken


\setupbtxlist
[duane]
[number=no]

\startsetups btx:duane:cite:image
   
\placefigure[left]{\btxfield{description}}{\externalfigure[\btxfield{url_image}][width=10cm]}
\stopsetups

\startsetups btx:duane:list:image
  \btxfield{title} 
\stopsetups

\starttext

   %\enabletrackers
   %  [publications.setups]
   
   \cite[image][duane::tug2014]
   
   \page

   \placebtxrendering[duane]

\stoptext

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

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

Re: [NTG-context] Ordered list of references (figures)

2015-10-05 Thread Henning Hraban Ramm
Hi Taco, thank you for this interesting insight!

Now, I’m still stuck with my main concern, "inlining" the entries.
And I need a way to get entries like "Cover" into the list, since 
\writetoregister doesn’t seem to be defined in MkIV.

Best, Hraban

Am 2015-09-30 um 15:34 schrieb Taco Hoekwater :

> Hi Hraban,
> 
> Here is what I can do at short notice. After this, I would probably just 
> cut&paste
> the final result back in after some tweaking. In any case, I am out of time 
> right now.
> 
> Good luck,
> Taco
> 
> 
> \newif\iffirstFIDXpage
> 
> \def\textcommand#1{#1\global\firstFIDXpagetrue}
> \def\pagecommand#1{\iffirstFIDXpage (p.~\fi \global\firstFIDXpagefalse #1}
> \def\stopregisterpages{)\dostoptagged\endgroup}
> 
> \defineregister[fidx]
> \setupregister[fidx][%
>   n=1, align=no,
>   %alternative=B,
>   compress=yes,
>   indicator=no,
>   textcommand=\textcommand,
>   pagecommand=\pagecommand,
>   distance=0.5em,
>   before={},
>   after={},
>   prefix=none]
> 
> 
> 
>> On 30 Sep 2015, at 09:51, Henning Hraban Ramm  wrote:
>> 
>> Hi Taco,
>> sorry, I should have provided a minimal example.
>> Thanks in advance!
>> 
>> Am 2015-09-29 um 12:30 schrieb Taco Hoekwater :
>> 
>>> Hi Hraban,
>>> 
>>> I would be happy to help with this (i've done some registers in the past 
>>> myself), but I will need a test file to play with...
>>> 
>>> Best wishes,
>>> Taco
>>> 
>>>> On 28 Sep 2015, at 06:28, Henning Hraban Ramm  wrote:
>>>> 
>>>> PING! I would really appreciate an answer.
>>>> 
>>>>> Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :
>>>>> 
>>>>>> Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
>>>>>> 
>>>>>> Hi wizards,
>>>>>> 
>>>>>> in my current book projects I need a list of figure references, ordered 
>>>>>> by author and page number.
>>>>>> Like this:
>>>>>> 
>>>>>> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
>>>>>> (p.3ff.)
>>>>>> 
>>>>>> How can I do that? I.e.
>>>>>> - How can I assign an author name/reference to a figure?
>>>>>> – How can I output that list?
>>>>>> 
>>>>>> About like this?:
>>>>>> 
>>>>>> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>>>>>>  Ramm}
>>>>>> 
>>>>>> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
>>>>>> called by \listoffigures ?
>>>>>> 
>>>>>> 
>>>>>> Extension: I need to integrate some unnumbered pages into the list, like 
>>>>>> the cover.
>>>>> 
>>>>> Ok, I can use registers for that:
>>>>> 
>>>>> \defineregister[fidx]
>>>>> \setupregister[fidx][%
>>>>> n=1,
>>>>> compress=yes,
>>>>> indicator=no,
>>>>> distance=0.5em,
>>>>> before={},
>>>>> after={,},
>>>>> prefix=none,
>>>>> ]
>>>>> \setupheadtext[fidx=Figures]
>>>>> 
>>>>> I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
>>>>> 
>>>>> That gets me as far as:
>>>>> 
>>>>> Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 
>>>>> 35
>>>>> Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
>>>>> 
>>>>> But I’d like to have
>>>>> 
>>>>> Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 
>>>>> 33, 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 
>>>>> 29–30, 32–33)
>>>>> 
>>>>> 
>>>>> For inserting a page name like "Cover" I tried
>>>>> \writetoregister[fidx][Picasso]{Cover}
>>>>> 
>>>>> But \writetoregister is undefined!? (As well as \writetofidx)
>>>>> 
>>>>> What else can I use?
>>>>> 
>>>>> 
>>>>> Greetlings, Hraban
>>>>> ---
>>>>> http://www.fiee.net
>>>>> http://wiki.contextgarden.net
>>>>> https://www.cacert.org (I'm an assurer)


indextest.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Ordered list of references (figures)

2015-09-30 Thread Taco Hoekwater
Hi Hraban,

Here is what I can do at short notice. After this, I would probably just 
cut&paste
the final result back in after some tweaking. In any case, I am out of time 
right now.

Good luck,
Taco


\newif\iffirstFIDXpage

\def\textcommand#1{#1\global\firstFIDXpagetrue}
\def\pagecommand#1{\iffirstFIDXpage (p.~\fi \global\firstFIDXpagefalse #1}
\def\stopregisterpages{)\dostoptagged\endgroup}

\defineregister[fidx]
\setupregister[fidx][%
n=1, align=no,
%alternative=B,
compress=yes,
indicator=no,
textcommand=\textcommand,
pagecommand=\pagecommand,
distance=0.5em,
before={},
after={},
prefix=none]



> On 30 Sep 2015, at 09:51, Henning Hraban Ramm  wrote:
> 
> Hi Taco,
> sorry, I should have provided a minimal example.
> Thanks in advance!
> 
> Am 2015-09-29 um 12:30 schrieb Taco Hoekwater :
> 
>> Hi Hraban,
>> 
>> I would be happy to help with this (i've done some registers in the past 
>> myself), but I will need a test file to play with...
>> 
>> Best wishes,
>> Taco
>> 
>>> On 28 Sep 2015, at 06:28, Henning Hraban Ramm  wrote:
>>> 
>>> PING! I would really appreciate an answer.
>>> 
>>>> Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :
>>>> 
>>>>> Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
>>>>> 
>>>>> Hi wizards,
>>>>> 
>>>>> in my current book projects I need a list of figure references, ordered 
>>>>> by author and page number.
>>>>> Like this:
>>>>> 
>>>>> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
>>>>> (p.3ff.)
>>>>> 
>>>>> How can I do that? I.e.
>>>>> - How can I assign an author name/reference to a figure?
>>>>> – How can I output that list?
>>>>> 
>>>>> About like this?:
>>>>> 
>>>>> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>>>>>  Ramm}
>>>>> 
>>>>> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
>>>>> called by \listoffigures ?
>>>>> 
>>>>> 
>>>>> Extension: I need to integrate some unnumbered pages into the list, like 
>>>>> the cover.
>>>> 
>>>> Ok, I can use registers for that:
>>>> 
>>>> \defineregister[fidx]
>>>> \setupregister[fidx][%
>>>>  n=1,
>>>>  compress=yes,
>>>>  indicator=no,
>>>>  distance=0.5em,
>>>>  before={},
>>>>  after={,},
>>>>  prefix=none,
>>>> ]
>>>> \setupheadtext[fidx=Figures]
>>>> 
>>>> I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
>>>> 
>>>> That gets me as far as:
>>>> 
>>>> Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
>>>> Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
>>>> 
>>>> But I’d like to have
>>>> 
>>>> Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 
>>>> 33, 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 
>>>> 29–30, 32–33)
>>>> 
>>>> 
>>>> For inserting a page name like "Cover" I tried
>>>> \writetoregister[fidx][Picasso]{Cover}
>>>> 
>>>> But \writetoregister is undefined!? (As well as \writetofidx)
>>>> 
>>>> What else can I use?
>>>> 
>>>> 
>>>> Greetlings, Hraban
>>>> ---
>>>> http://www.fiee.net
>>>> http://wiki.contextgarden.net
>>>> https://www.cacert.org (I'm an assurer)
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> 

___
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] Ordered list of references (figures)

2015-09-30 Thread Henning Hraban Ramm
Hi Taco,
sorry, I should have provided a minimal example.
Thanks in advance!

Am 2015-09-29 um 12:30 schrieb Taco Hoekwater :

> Hi Hraban,
> 
> I would be happy to help with this (i've done some registers in the past 
> myself), but I will need a test file to play with...
> 
> Best wishes,
> Taco
> 
>> On 28 Sep 2015, at 06:28, Henning Hraban Ramm  wrote:
>> 
>> PING! I would really appreciate an answer.
>> 
>>> Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :
>>> 
>>>> Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
>>>> 
>>>> Hi wizards,
>>>> 
>>>> in my current book projects I need a list of figure references, ordered by 
>>>> author and page number.
>>>> Like this:
>>>> 
>>>> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
>>>> (p.3ff.)
>>>> 
>>>> How can I do that? I.e.
>>>> - How can I assign an author name/reference to a figure?
>>>> – How can I output that list?
>>>> 
>>>> About like this?:
>>>> 
>>>> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>>>>  Ramm}
>>>> 
>>>> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
>>>> called by \listoffigures ?
>>>> 
>>>> 
>>>> Extension: I need to integrate some unnumbered pages into the list, like 
>>>> the cover.
>>> 
>>> Ok, I can use registers for that:
>>> 
>>> \defineregister[fidx]
>>> \setupregister[fidx][%
>>>   n=1,
>>>   compress=yes,
>>>   indicator=no,
>>>   distance=0.5em,
>>>   before={},
>>>   after={,},
>>>   prefix=none,
>>> ]
>>> \setupheadtext[fidx=Figures]
>>> 
>>> I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
>>> 
>>> That gets me as far as:
>>> 
>>> Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
>>> Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
>>> 
>>> But I’d like to have
>>> 
>>> Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 
>>> 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 
>>> 32–33)
>>> 
>>> 
>>> For inserting a page name like "Cover" I tried
>>> \writetoregister[fidx][Picasso]{Cover}
>>> 
>>> But \writetoregister is undefined!? (As well as \writetofidx)
>>> 
>>> What else can I use?
>>> 
>>> 
>>> Greetlings, Hraban
>>> ---
>>> http://www.fiee.net
>>> http://wiki.contextgarden.net
>>> https://www.cacert.org (I'm an assurer)



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)


indextest.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Ordered list of references (figures)

2015-09-27 Thread Henning Hraban Ramm
PING! I would really appreciate an answer.

Am 2015-09-22 um 17:39 schrieb Henning Hraban Ramm :

> Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :
> 
>> Hi wizards,
>> 
>> in my current book projects I need a list of figure references, ordered by 
>> author and page number.
>> Like this:
>> 
>> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
>> (p.3ff.)
>> 
>> How can I do that? I.e.
>> - How can I assign an author name/reference to a figure?
>> – How can I output that list?
>> 
>> About like this?:
>> 
>> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>>  Ramm}
>> 
>> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is 
>> called by \listoffigures ?
>> 
>> 
>> Extension: I need to integrate some unnumbered pages into the list, like the 
>> cover.
> 
> Ok, I can use registers for that:
> 
> \defineregister[fidx]
> \setupregister[fidx][%
>   n=1,
>   compress=yes,
>   indicator=no,
>   distance=0.5em,
>   before={},
>   after={,},
>   prefix=none,
> ]
> \setupheadtext[fidx=Figures]
> 
> I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.
> 
> That gets me as far as:
> 
> Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
> Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33
> 
> But I’d like to have
> 
> Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 
> 35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 
> 32–33)
> 
> 
> For inserting a page name like "Cover" I tried
> \writetoregister[fidx][Picasso]{Cover}
> 
> But \writetoregister is undefined!? (As well as \writetofidx)
> 
> What else can I use?
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> 
> ___
> 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] formatting section and figure numbers

2015-09-25 Thread Pablo Rodriguez
On 09/25/2015 04:15 PM, Meer, Hans van der wrote:
> I do number my chapters with roman numerals with:
>   \setuphead[chapter][conversion=Romannumerals]
> I would expect then that sections are numbered roman.arabic for example IX.1
> This is not the case. While the chapter is numbered IX the sections are
> numbered 9.1 instead of IX.1.
> The numbering of floats with \placefigure luckily does the caption
> numbering right, i.e. there I see IX.1 as its number.
> 
> Using
>   \setuphead[section][conversion=Romannumerals]
> fails because then IX.I is produced, clearly not what is desired
> although the caption numbering is not influenced.
> 
> Using
>   \setuphead[section][number=no]
> does not help either, because then the captions loose their chapter number.
> 
> What to do?

Hi Hans,

I think this is what you need:

\definestructureconversionset[sectionnumbers][0,R][n]
\setupheads[sectionconversionset=sectionnumbers]
\starttext
\dorecurse{5}{\chapter{Chapter}\section{Section}}
\stoptext

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] formatting section and figure numbers

2015-09-25 Thread Meer, Hans van der
I do number my chapters with roman numerals with:
  \setuphead[chapter][conversion=Romannumerals]
I would expect then that sections are numbered roman.arabic for example IX.1
This is not the case. While the chapter is numbered IX the sections are 
numbered 9.1 instead of IX.1.
The numbering of floats with \placefigure luckily does the caption numbering 
right, i.e. there I see IX.1 as its number.

Using
  \setuphead[section][conversion=Romannumerals]
fails because then IX.I is produced, clearly not what is desired although the 
caption numbering is not influenced.

Using
  \setuphead[section][number=no]
does not help either, because then the captions loose their chapter number.

What to do?

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] Ordered list of references (figures)

2015-09-22 Thread Henning Hraban Ramm
Am 2015-09-22 um 10:49 schrieb Henning Hraban Ramm :

> Hi wizards,
> 
> in my current book projects I need a list of figure references, ordered by 
> author and page number.
> Like this:
> 
> Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm 
> (p.3ff.)
> 
> How can I do that? I.e.
> - How can I assign an author name/reference to a figure?
> – How can I output that list?
> 
> About like this?:
> 
> \placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban
>  Ramm}
> 
> \ref[t][someref] (\at{p.}[someref]) % put this in some command that is called 
> by \listoffigures ?
> 
> 
> Extension: I need to integrate some unnumbered pages into the list, like the 
> cover.

Ok, I can use registers for that:

\defineregister[fidx]
\setupregister[fidx][%
n=1,
compress=yes,
indicator=no,
distance=0.5em,
before={},
after={,},
prefix=none,
]
\setupheadtext[fidx=Figures]

I can influence the order like \fidx[spinoza]{Baruch Spinoza}, great.

That gets me as far as:

Hraban 2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 35
Picasso 1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33

But I’d like to have

Hraban (p.2–3, 5, 7, 9–10, 12, 14, 16–17, 19, 21, 23–24, 26, 28, 30–31, 33, 
35), Picasso (p.1–2, 4–5, 8–9, 11–12, 15–16, 18–19, 22–23, 25–26, 29–30, 32–33)


For inserting a page name like "Cover" I tried
\writetoregister[fidx][Picasso]{Cover}

But \writetoregister is undefined!? (As well as \writetofidx)

What else can I use?


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Ordered list of references (figures)

2015-09-21 Thread Henning Hraban Ramm
Hi wizards,

in my current book projects I need a list of figure references, ordered by 
author and page number.
Like this:

Photos: Hans Hagen (p.1,4,6,7), Taco Hoekwater (p.2,12–20), Hraban Ramm (p.3ff.)

How can I do that? I.e.
- How can I assign an author name/reference to a figure?
– How can I output that list?

About like this?:

\placefigure[top][someref]{\externalfigure[somepic]}\reference[someref]{Hraban 
Ramm}

\ref[t][someref] (\at{p.}[someref]) % put this in some command that is called 
by \listoffigures ?


Extension: I need to integrate some unnumbered pages into the list, like the 
cover.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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 in placefloat at right

2015-09-05 Thread Hans Hagen

On 9/5/2015 10:31 PM, Alan BRASLAU wrote:

On Fri, 4 Sep 2015 22:12:29 +0200
Hans Hagen  wrote:


On 9/3/2015 10:32 PM, Otared Kavian wrote:

Hi Hans,

As it was reported by Fabrice Couvreur in another thread, there is
a bug with placing floats on the right in


i'll fix it


I did not test with a new beta, but
   \startplacefigure [number=no,location=left]
(or location=right) appears to reserve room for the legend even when it
is not placed.

I suggest that number=no (with title=,) should suppress this space
(without any particular setups).


location={left,none}

(or \placefigure[left,none])

-
  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] float in columns

2015-09-01 Thread Meer, H. van der
I seem to remember that it was possible to place a figure over the whole width 
of the page inside columns as for example

\startsimplecolumns[n=2]
text in 2 columns
placefigure-over-fullwidth
further text in 2 columns
\stopsimplecolumns

However, I cannot find with what command this was accomplished.
Can someone enlighten me?

Hans van der Meer

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

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

Re: [NTG-context] Bug: Paragraph formatting on new page after placefigure

2015-08-25 Thread Rik Kabel

On 2015-08-25 03:41, Andreas Becker wrote:

ConTeXt version: 2015.08.21 19:57

In the PDF output of the following code, the first text line on the second page 
only
spans half the textwidth. However, below the figure, the text should span the
whole width.

\starttext
\placefigure[right][]{caption}
{
\externalfigure[nop][width=0.5\textwidth,height=19cm]
}
\input lorem
\input lorem
\input lorem
\stoptext



Andreas,

This is a long-recognized issue that appears to have no resolution. It 
was previously raised by Gerhard Kugler in March 2007 (figure occupies 
space into next page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg21273.html>) and by 
me in March 2014 (Caption whitespace overflows page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg73904.html>) and 
possibly by others I did not come across.


The only resolution I have found is to reduce the size of the figure 
enough to prevent the reserved space from intruding on the text area of 
the next page.


--
Rik Kabel
___
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] Bug: Figure numbers do not correspond to their order

2015-08-25 Thread Andreas Becker
ConTeXt version: 2015.08.21 19:57

When the «page» position key is used, the figure numbers do not match their 
order in
the document. In the following example, Figure 2 precedes Figure 1.

\starttext
\placefigure[page][]{}
{
\externalfigure[nop][width=0.5\textwidth]
}

\placefigure[][]{}
{
\externalfigure[nop][width=0.5\textwidth]
}
\stoptext

Regards,
Andreas Becker
___
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] Bug: Paragraph formatting on new page after placefigure

2015-08-25 Thread Andreas Becker
ConTeXt version: 2015.08.21 19:57

In the PDF output of the following code, the first text line on the second page 
only
spans half the textwidth. However, below the figure, the text should span the
whole width.

\starttext
\placefigure[right][]{caption}
{
\externalfigure[nop][width=0.5\textwidth,height=19cm]
}
\input lorem
\input lorem
\input lorem
\stoptext

Regards,
Andreas Becker
___
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] Text around a figure in a framedtext

2015-08-14 Thread Fabrice Couvreur
Hi Rik,
I actually read that Wolfgang had written, but there is some confusion for
me. Indeed, my environment uses a frame and Wolfgang said to be used \
starthanging ... \stophanging rather than \placefigure. But my text contains
a blank line which is to create a new paragraph and so I should use \
placefigure !!!

2015-08-14 3:38 GMT+02:00 Rik Kabel :

> On 2015-08-13 11:19, Fabrice Couvreur wrote:
>
> Hi,
> Sorry to revive this discussion (which I initiated), but the text in the
> following code does not wrapped around the figure.
> Why ?
> Fabrice
>
>
> \setupcolors
>   [state=start]
>
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
>   [MyText]
>   [frame=off,
>background=MyFrame,
>width=\textwidth,
>height=fit,
>location=left,
>style=italic]
>
> \defineoverlay
>   [MyFrame]
>   [\useMPgraphic{MyFrame}]
>
> \definelabel
>   [Définition]
>   [headstyle=\bf\smallcaps]
>
> \startuseMPgraphic{MyFrame}
> path b ;
> picture p ;
> p := textext.rt("\white\Définition") ;
> p := p shifted (2BodyFontSize,OverlayHeight-ypart center
> p+.25ExHeight) ;
> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
> fill OverlayBox withcolor \MPcolor{MyColorA} ;
> fill b withcolor \MPcolor{MyColorB} ;
> draw p ;
> \stopuseMPgraphic
>
> \starttext
>
> \startMyText
>
> \starthanging[location=right]
> {\startMPcode
>   path p ;
>   p := fullcircle xscaled 4cm yscaled 2cm ;
>   fill p withcolor  cmyk(0,0.62,1,0) ;
>   path q ; q := fullcircle scaled 1cm shifted (1cm, ypart center
> p) ;
>   fill q withcolor blue ;
>   picture r ;
>   r := textext("\white E")shifted (-0.75cm,ypart center p) ;
>   picture s ;
>   s := textext("\white A")shifted (1cm, ypart center p) ;
>   draw r ;
>   draw s ;
>   draw p ;
>   draw q ;
>  \stopMPcode}
> Soit A une partie d'un ensemble E.
>
> Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et de A,
> la {\bi proportion} des éléments de A dans E est le quotient
> $p=\frac{n_A}{n_E}$.
> \stophanging
>
> \stopMyText
>
>
> Wolfgang wrote on the list a few days ago (
> <http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html>
> http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html):
>
> The \starthangaround environment reserves space for the image etc. only for
> the first paragraph
>
> while \placefigure includes more paragraphs if necessary.
>
> --
> Rik
>
>
> ___
> 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] Text around a figure in a framedtext

2015-08-13 Thread Rik Kabel

On 2015-08-13 11:19, Fabrice Couvreur wrote:

Hi,
Sorry to revive this discussion (which I initiated), but the text in 
the following code does not wrapped around the figure.

Why ?
Fabrice


\setupcolors
  [state=start]

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]

\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   width=\textwidth,
   height=fit,
   location=left,
   style=italic]

\defineoverlay
  [MyFrame]
  [\useMPgraphic{MyFrame}]

\definelabel
  [Définition]
  [headstyle=\bf\smallcaps]

\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt("\white\Définition") ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center 
p+.25ExHeight) ;

b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
\stopuseMPgraphic

\starttext

\startMyText

\starthanging[location=right]
{\startMPcode
  path p ;
  p := fullcircle xscaled 4cm yscaled 2cm ;
  fill p withcolor  cmyk(0,0.62,1,0) ;
  path q ; q := fullcircle scaled 1cm shifted (1cm, ypart 
center p) ;

  fill q withcolor blue ;
  picture r ;
  r := textext("\white E")shifted (-0.75cm,ypart center p) ;
  picture s ;
  s := textext("\white A")shifted (1cm, ypart center p) ;
  draw r ;
  draw s ;
  draw p ;
  draw q ;
 \stopMPcode}
Soit A une partie d'un ensemble E.

Si $n_E$ et $n_A$ sont respectivement les nombres d'éléments de E et 
de A, la {\bi proportion} des éléments de A dans E est le quotient 
$p=\frac{n_A}{n_E}$.

\stophanging

\stopMyText


Wolfgang wrote on the list a few days ago 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg79347.html):


   The \starthangaround environment reserves space for the image etc.
   onlyfor the first paragraph

   while \placefigure includes more paragraphs if necessary.

--
Rik
___
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] Strange behavior (TikZ)

2015-08-11 Thread Fabrice Couvreur
Hi,
Strange behavior: why is the colored text ?
Thanks,
Fabrice

\usemodule[tikz]

\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic

\defineoverlay[titled][\uniqueMPgraphic{titled}]

\define[2]\ChapterCommand
  {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
   \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
   \framed
 [background=titled,frame=off,offset=0pt]
 {\box\scratchbox
  \hskip\leftmargindistance
  #2}}

\setuphead
  [chapter]
  [command=\ChapterCommand,
   textstyle=\ss,
   color=darkred,
   conversion=Characters]

\setuphead
  [section]
  [command=\ChapterCommand,
   textstyle=\ss,
   color=darkred,
   sectionsegments=section:section]

\starttext

\startchapter
  [title={Activités d'approche}]

\startsection
  [title={Sans carreaux}]

\placefigure[right,none]{}
{
\hbox{
\starttikzpicture[>=stealth,scale=0.8]
\draw [->,color=blue,ultra thick] (0,0)--(5,2);
\draw [->,color=green,ultra thick] (6,1.5)--(5,0);
\draw [->,color=red,ultra thick] (4,-0.8)--(2,-0.1);
\draw [color=blue](2.5,1) node[above] {$\vec{u}$};
\draw [color=green](5.5,0.75) node[right] {$\vec{v}$};
\draw [,color=red](3,-0.45)   node[above] {$\vec{w}$};
\node (A) at (0.5,-0.5) {A};
\node [above right] at (A) {$\times$};
\stoptikzpicture}}
\startitemize[n][stopper={)},style=bold]
On a tracé trois vecteurs et placé un point A sur la figure ci-contre.
\startitemize[a][stopper={)},style=bold]
\item Construire le point C tel que $\vec{\rm{AC}}=\vec{u} + \vec{v}$.
\item Construire le point B tel que  $\vec{\rm{AB}}=\vec{u} + \vec{v} +
\vec{w} $.
\stopitemize
\stopitemize

\stopsection

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

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

Re: [NTG-context] Text around a figure in a framedtext (Wolfgang Schuster)

2015-08-08 Thread Wolfgang Schuster

Jeong Dal <mailto:hak...@me.com>
8. August 2015 15:49
Dear Wolfgang,


Thank you for letting me know the command “starthanging”.
I tried the command “\startfiguretext … \stopfiguretext”, and found 
that there is no text below the square.


\startframedtext[width=\textwidth]{
\startfiguretext[right,none]{}{%
\startMPcode
draw unitsquare scaled 2cm ;
\stopMPcode}
\input knuth
\stopfiguretext}
\stopframedtext

Your example worked fine, but if we replace tufte by knuth, then text 
is written over the square while the tufte’s text was witten surround 
the square.

Is it expected result?
The \starthangaround environment reserves space for the image etc. only 
for the first paragraph

while \placefigure includes more paragraphs if necessary.

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] Text around a figure in a framedtext

2015-08-08 Thread Fabrice Couvreur
Hi Otared,
A small mistake on your part : do not write \input knuth.tex but \input
knuth.
Then I want the text in the first framedtext wrapped around the figure as in
the second.
Fabrice

2015-08-08 6:18 GMT+02:00 Otared Kavian :

> Hi,
>
> You should use the same width if you want to obtain the same result (by
> the way, you have to say also \stopframedtext in your source file):
>
> \startframedtext[width=\textwidth]{
> \placefigure[right,none]{}{%
>  \startMPcode
>   draw unitsquare scaled 2cm ;
>   \stopMPcode}
> \input knuth.tex }
> \stopframedtext
>
> Best regards: OK
>
> > On 08 Aug 2015, at 00:49, Fabrice Couvreur 
> wrote:
> >
> > Hi,
> > Why the text does not move in the first framedtext like the second
> framedtext ?
> > Thank you.
> > Fabrice
> >
> > \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> > \definecolor[MyColorA][.75(MyColorB,white)]
> >
> > \defineframedtext
> >   [MyText]
> >   [frame=off,
> >background=MyFrame,
> >width=\textwidth,
> >location=right]
> >
> > \defineoverlay
> >   [MyFrame]
> >   [\useMPgraphic{MyFrame}]
> >
> > \definelabel
> >   [Définition]
> >   [headstyle=\bf\smallcaps]
> >
> > \startuseMPgraphic{MyFrame}
> > path b ;
> > picture p ;
> > p := textext.rt("\white\Définition") ;
> > p := p shifted (2BodyFontSize,OverlayHeight-ypart center
> p+.25ExHeight) ;
> > b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
> > fill OverlayBox withcolor \MPcolor{MyColorA} ;
> > fill b withcolor \MPcolor{MyColorB} ;
> > draw p ;
> > \stopuseMPgraphic
> >
> > \starttext
> > \startMyText
> > \placefigure[right,none]{}{%
> >  \startMPcode
> >   draw unitsquare scaled 2cm ;
> >   \stopMPcode}
> > \input knuth
> > \stopMyText
> >
> > \startframedtext{
> > \placefigure[right,none]{}{%
> >  \startMPcode
> >   draw unitsquare scaled 2cm ;
> >   \stopMPcode}
> > \input knuth}
> >
> > \stoptext
> >
> ___
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> > archive  : http://foundry.supelec.fr/projects/contextrev/
> > wiki : http://contextgarden.net
> >
> ___
>
>
> ___
> 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] Text around a figure in a framedtext

2015-08-07 Thread Otared Kavian
Hi,

You should use the same width if you want to obtain the same result (by the 
way, you have to say also \stopframedtext in your source file):

\startframedtext[width=\textwidth]{
\placefigure[right,none]{}{%
 \startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
\input knuth.tex }
\stopframedtext

Best regards: OK

> On 08 Aug 2015, at 00:49, Fabrice Couvreur  
> wrote:
> 
> Hi,
> Why the text does not move in the first framedtext like the second framedtext 
> ?
> Thank you.
> Fabrice
> 
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]  
> 
> \defineframedtext
>   [MyText]
>   [frame=off,
>background=MyFrame,
>width=\textwidth,
>location=right]
> 
> \defineoverlay
>   [MyFrame]
>   [\useMPgraphic{MyFrame}]
> 
> \definelabel
>   [Définition]
>   [headstyle=\bf\smallcaps]
> 
> \startuseMPgraphic{MyFrame}
> path b ;
> picture p ;
> p := textext.rt("\white\Définition") ; 
> p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ;
> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
> fill OverlayBox withcolor \MPcolor{MyColorA} ;
> fill b withcolor \MPcolor{MyColorB} ;
> draw p ;
> \stopuseMPgraphic
> 
> \starttext
> \startMyText
> \placefigure[right,none]{}{%
>  \startMPcode
>   draw unitsquare scaled 2cm ;
>   \stopMPcode}
> \input knuth
> \stopMyText
> 
> \startframedtext{
> \placefigure[right,none]{}{%
>  \startMPcode
>   draw unitsquare scaled 2cm ;
>   \stopMPcode}
> \input knuth}
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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] Text around a figure in a framedtext

2015-08-07 Thread Fabrice Couvreur
Hi,
Why the text does not move in the first framedtext like the second
framedtext ?
Thank you.
Fabrice

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]

\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   width=\textwidth,
   location=right]

\defineoverlay
  [MyFrame]
  [\useMPgraphic{MyFrame}]

\definelabel
  [Définition]
  [headstyle=\bf\smallcaps]

\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt("\white\Définition") ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight)
;
b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
\stopuseMPgraphic

\starttext
\startMyText
\placefigure[right,none]{}{%
 \startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
\input knuth
\stopMyText

\startframedtext{
\placefigure[right,none]{}{%
 \startMPcode
  draw unitsquare scaled 2cm ;
  \stopMPcode}
\input knuth}

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

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

Re: [NTG-context] Bug: Figures in columnset not displayed or compilation fails

2015-07-13 Thread Hans Hagen

On 7/11/2015 9:17 AM, Andreas Becker wrote:


Example #2:
\starttext
\startcolumnset
\chapter{chap}
\input lorem \input lorem
\input lorem
\placefigure[][]{}{\externalfigure[bla][height=2cm]}
\placefigure[][]{}{\externalfigure[bla][height=9cm]}
\input lorem
\stopcolumnset
\stoptext


fixed in next beta ... fyi: i need to redo part of columnsets in a more 
mkiv-ish way


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
___

[NTG-context] Bug: Figures in columnset not displayed or compilation fails

2015-07-13 Thread Andreas Becker
ConTeXt version: 2015.07.10 00:05

When I attempt to compile the minimal examples listed below with «context», 
wrong
behavior can be observed.  No problems occur if it is compiled with «texexec».

The problems seem to arise when there are figures in a columnset in proximity 
to a
page break. If there are two consecutive figures at the page end, the 
compilation
fails in some cases.

In example #1, if the figure height is large enough that the figure does not 
fit on
the first page, the figure is not displayed at all. I tried different position 
keys
and observed no difference. The last occurence of «\input lorem» is mandatory 
for
this behavior.

In example #2, if the height of either of the figures so large, that is it not
possible to put both figures on the first page, and the size of the other 
figure is
small enough, that this single figure would fit on the page, the compilation 
error #1
occurs. This is independent of the consecutive text, i. e. the last «\input 
lorem»
line.  If the position keyword «top» is assigned to the smaller figure, it is
displayed, unlike the other, large figure.  If both figure heights are large, no
figure is displayed (like in example #1) unless we remove the last «\input 
lorem»
line.

By the way, the path in \externalfigure does not point to an existing file.

Regards, Andreas

Example #1:
\starttext
\startcolumnset
\chapter{chap}
\input lorem \input lorem
\input lorem
\placefigure[][]{}{\externalfigure[bla][height=7cm]}
\input lorem
\stopcolumnset
\stoptext

Example #2:
\starttext
\startcolumnset
\chapter{chap}
\input lorem \input lorem
\input lorem
\placefigure[][]{}{\externalfigure[bla][height=2cm]}
\placefigure[][]{}{\externalfigure[bla][height=9cm]}
\input lorem
\stopcolumnset
\stoptext

Error #1:
lua error   > lua error on line 9 in file /home/user/contest/bla.tex:
...ext-minimals/texmf-context/tex/context/base/node-aux.lua:92: You cannot set 
field list in a node of type glue_spec
stack traceback:
[C]: in function 'setfield'
...ext-minimals/texmf-context/tex/context/base/node-aux.lua:92: in 
function 'takebox'
...ext-minimals/texmf-context/tex/context/base/node-aux.lua:100: in 
function 'textakebox'
...ext-minimals/texmf-context/tex/context/base/page-flt.lua:137: in 
function <...ext-minimals/texmf-context/tex/context/base/page-flt.lua:133>
(...tail calls...)
 1 \starttext
 2 \startcolumnset
 3 \chapter{chap}
 4 \input lorem \input lorem
 5 \input lorem
 6 \placefigure[][]{}{\externalfigure[bla][height=2cm]}
 7 \placefigure[][]{}{\externalfigure[bla][height=9cm]}
 8 \input lorem
 9 >>  \stopcolumnset
10 \stoptext

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

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

Re: [NTG-context] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-06-30 Thread Alan BRASLAU
On Sun, 28 Jun 2015 12:59:26 +0200
"Dr. Dominik Klein"  wrote:

> 2.) Images without alternate text:
> According to Section 14.9.3 of [1], alternate descriptions in human 
> readable text should be provided for images. It would be really
> helpful, if these could be defined in the source tex file, and then
> automatically added when creating the object in the structure tree.
> I.e. it would be nice to have something like:
> 
> \placefigure[top][Image Reference]{Caption}{
> \externalfigure[cow.pdf][width=10cm][alternate text = "This images
> shows a beautiful cow."]
> }

Maybe the syntax could be:

\externalfigure [cow] [width=10cm,marking={This image shows a beautiful
cow}]

(conforming to ConTeXt style)

Alan
___
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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-06-30 Thread luigi scarso
On Sun, Jun 28, 2015 at 12:59 PM, Dr. Dominik Klein <
dominik.kl...@outlook.com> wrote:

> Context is the only Tex-based system that allows to properly tag a pdf.
> Tagged PDFs are one major requirement for accessibility.
>
> Indeed, in several large organizations/universities, accessibility is
> mandated by law, and this is a major obstacle for using Tex. In practice
> compliance is often assessed with Acrobat Pro's
> accessibility checker.
>
> Context produces a nice tag-structure, but there are some minor issues
> that prevent compliance to [1], and hence Acrobat Pro complains during the
> check. The main issues are:
>
> 1.) Elements that are not contained in the structure tree are not marked
> as an artifact. Consider this example:
>
> ---
> \setuptagging[state=start]
>
> \setuppagenumbering
> [location=,
>  alternative=doublesided]
>
> \setupheadertexts
>   [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
>   [{Header Right}]
>   [{Header Left}]
>   [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
>
> \setupfootertexts
>   [Organization Name]
>   [pagenumber]
>   [pagenumber]
>   [Organization Name]
>
> \starttext
> \startfrontmatter
> something
> \stopfrontmatter
>
> \startbodymatter
> some more text here
> \stopbodymatter
> \stoptext
> ---
>
> Header, footer, pagenumber etc. will not be included in the tag structure.
> Of course this makes absolutely sense and is correct, however according to
> Section 14.8.2.2.2 of [1], then this content that is not in the structure
> tree should be marked as an artifact, i.e.
>
> /Artifact
>   BMC
>   ..
>   EMC
>
> or in an advanced way with /Artifact PropertyList where the type of
> Artifact can be defined. It would be nice if those elements that are not
> included in the tag tree would be marked as artifacts by default. The same
> holds for \startelement[ignore] when one wants to explicitly remove
> something from the structure tree.
>
> 2.) Images without alternate text:
> According to Section 14.9.3 of [1], alternate descriptions in human
> readable text should be provided for images. It would be really helpful,
> if these could be defined in the source tex file, and then automatically
> added when creating the object in the structure tree. I.e. it would be
> nice to have something like:
>
> \placefigure[top][Image Reference]{Caption}{
> \externalfigure[cow.pdf][width=10cm][alternate text = "This images shows a
> beautiful cow."]
> }
>
> The same holds for formulas: Whereas the mathml-like tagging of Context is
> very advanced, sometimes it might be still helpful to supply a textual
> description (alt-text ="The definition of the Pythagorean theorem: a^2 +
> b^2 = c^2")
>
> 3.) Tag names of the resulting tag structure:
> Section 14.8.4 of [1] defines standard structure types, such as , ,
>  etc. Context creates a tag-tree that uses names directly
> representing the structure names of the context laguage, such as
> . This should however be mapped to something standard, such
> as . Interestingly these mappings seem to have been considered in
> strc-tag.mkiv but I was unable to generate such a tagged pdf.
> Editing/Outcommenting things in strc-tag.mkiv didn't work for me. It would
> be nice if there was a switch somewhere, i.e.
> \setuptagging[state=start,tagnames=pdf17] - or maybe I overlooked something?
>
> 4.) Acrobat Pro always complains that the language for the whole document
> is not set.
>
> 5.) Tables
> The generated structure looks something like this:
> 
>  
>
>...
>  
>
>  ...
>
> Here, not only are the tag names non-compliant, also the tag structure
> should distinguish between the table header (THead), and table rows
> (TBody), c.f. Section 14.8.4.3.1 of [1]. A simple heuristic would be
> to always put the first line into THead tags, and the rest of the able
> into TBody.
>
> 6.) It would be nice if a flat tag structure could be created optionally.
> This is not a required feature according to [1], and in fact a properly
> nested structure is surely preferable for the final output; for debugging
> or checking during document creation however, a flat structure tree
> sometimes is easier to browse through.
>
> All in all, these seem to be the only issues that prevent accessible PDF
> documents with context. For those within an organization where
> accessibility is required legally for all publications, compliance to at
> least Acrobat Pro's checks is a huge issue. I do not know how difficult
> these things are to implement in Context (personally I am ju

[NTG-context] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-06-30 Thread Dr. Dominik Klein
Context is the only Tex-based system that allows to properly tag a pdf. 
Tagged PDFs are one major requirement for accessibility.


Indeed, in several large organizations/universities, accessibility is 
mandated by law, and this is a major obstacle for using Tex. In practice 
compliance is often assessed with Acrobat Pro's

accessibility checker.

Context produces a nice tag-structure, but there are some minor issues 
that prevent compliance to [1], and hence Acrobat Pro complains during 
the check. The main issues are:


1.) Elements that are not contained in the structure tree are not marked 
as an artifact. Consider this example:


---
\setuptagging[state=start]

\setuppagenumbering
[location=,
 alternative=doublesided]

\setupheadertexts
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [{Header Right}]
  [{Header Left}]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]

\setupfootertexts
  [Organization Name]
  [pagenumber]
  [pagenumber]
  [Organization Name]

\starttext
\startfrontmatter
something
\stopfrontmatter

\startbodymatter
some more text here
\stopbodymatter
\stoptext
---

Header, footer, pagenumber etc. will not be included in the tag 
structure. Of course this makes absolutely sense and is correct, however 
according to Section 14.8.2.2.2 of [1], then this content that is not in 
the structure tree should be marked as an artifact, i.e.


/Artifact
  BMC
  ..
  EMC

or in an advanced way with /Artifact PropertyList where the type of 
Artifact can be defined. It would be nice if those elements that are not 
included in the tag tree would be marked as artifacts by default. The 
same holds for \startelement[ignore] when one wants to explicitly remove 
something from the structure tree.


2.) Images without alternate text:
According to Section 14.9.3 of [1], alternate descriptions in human 
readable text should be provided for images. It would be really helpful,

if these could be defined in the source tex file, and then automatically
added when creating the object in the structure tree. I.e. it would be
nice to have something like:

\placefigure[top][Image Reference]{Caption}{
\externalfigure[cow.pdf][width=10cm][alternate text = "This images shows 
a beautiful cow."]

}

The same holds for formulas: Whereas the mathml-like tagging of Context 
is very advanced, sometimes it might be still helpful to supply a 
textual description (alt-text ="The definition of the Pythagorean 
theorem: a^2 + b^2 = c^2")


3.) Tag names of the resulting tag structure:
Section 14.8.4 of [1] defines standard structure types, such as , 
,  etc. Context creates a tag-tree that uses names directly 
representing the structure names of the context laguage, such as 
. This should however be mapped to something standard, 
such as . Interestingly these mappings seem to have been considered 
in strc-tag.mkiv but I was unable to generate such a tagged pdf. 
Editing/Outcommenting things in strc-tag.mkiv didn't work for me. It 
would be nice if there was a switch somewhere, i.e. 
\setuptagging[state=start,tagnames=pdf17] - or maybe I overlooked something?


4.) Acrobat Pro always complains that the language for the whole 
document is not set.


5.) Tables
The generated structure looks something like this:

 
   
   ...
 
   
 ...

Here, not only are the tag names non-compliant, also the tag structure
should distinguish between the table header (THead), and table rows 
(TBody), c.f. Section 14.8.4.3.1 of [1]. A simple heuristic would be
to always put the first line into THead tags, and the rest of the able 
into TBody.


6.) It would be nice if a flat tag structure could be created 
optionally. This is not a required feature according to [1], and in fact 
a properly nested structure is surely preferable for the final output; 
for debugging or checking during document creation however, a flat 
structure tree sometimes is easier to browse through.


All in all, these seem to be the only issues that prevent accessible PDF 
documents with context. For those within an organization where 
accessibility is required legally for all publications, compliance to at 
least Acrobat Pro's checks is a huge issue. I do not know how difficult 
these things are to implement in Context (personally I am just lost in 
the code), but looking at e.g. tex.stackexchange
for question related to accessibility, this is indeed a major obstacle 
for several people.


cheers

- Dominik


[1] ISO 32000-1:2008, available at
http://www.adobe.com/devnet/pdf/pdf_reference.html
___
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/p

Re: [NTG-context] definereferencestructureprefix for floats

2015-06-22 Thread Aditya Mahajan

On Mon, 22 Jun 2015, Wolfgang Schuster wrote:




Aditya Mahajan <mailto:adit...@umich.edu>
22. Juni 2015 05:35
On Sun, 21 Jun 2015, Aditya Mahajan wrote:


Even the second example in strc-ref.mkvi does not work correctly.

\starttext
\chapter{test}
\placefigure[here][xx:1]{}{\framed{one}} 
\placefigure[here][xx:2]{}{\framed{three}}
\placetable [here][xx:3]{}{\framed{two}} \placetable 
[here][xx:4]{}{\framed{four}}

\start
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[float][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[figure][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank
\stoptext

The second case, (\setup...[default][prefix=no]) works correctly, but the 
last two cases (\setup...[float][default][prefix=no], etc) do not get rid 
of the prefix.

Did you fix the typo in strc-ref.lua and regenrate the format?


Yes. Do these two example work correctly for you with the latest beta 
(after fixing the typo and generating the format)?


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] definereferencestructureprefix for floats

2015-06-22 Thread Wolfgang Schuster



Aditya Mahajan <mailto:adit...@umich.edu>
22. Juni 2015 05:35
On Sun, 21 Jun 2015, Aditya Mahajan wrote:


Even the second example in strc-ref.mkvi does not work correctly.

\starttext
\chapter{test}
\placefigure[here][xx:1]{}{\framed{one}} 
\placefigure[here][xx:2]{}{\framed{three}}
\placetable [here][xx:3]{}{\framed{two}} \placetable 
[here][xx:4]{}{\framed{four}}

\start
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and 
\in{tab}[xx:4]

\stop \blank \start
\setupreferencestructureprefix[default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and 
\in{tab}[xx:4]

\stop \blank \start
\setupreferencestructureprefix[float][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and 
\in{tab}[xx:4]

\stop \blank \start
\setupreferencestructureprefix[figure][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and 
\in{tab}[xx:4]

\stop \blank
\stoptext

The second case, (\setup...[default][prefix=no]) works correctly, but 
the last two cases (\setup...[float][default][prefix=no], etc) do not 
get rid of the prefix.

Did you fix the typo in strc-ref.lua and regenrate the format?

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] definereferencestructureprefix for floats

2015-06-21 Thread Aditya Mahajan

On Sun, 21 Jun 2015, Aditya Mahajan wrote:


On Sat, 20 Jun 2015, Wolfgang Schuster wrote:




Aditya Mahajan <mailto:adit...@umich.edu>
20. Juni 2015 18:22
Hi,

How does one control the referenceprefix for floats. I want to refer to 
the 
figures as only Fig 1, Fig 2, etc, even when they are numbered 1.1, 1.2, 
etc.
There is a typo in strc-ref.lua which can by fixed by the following 

changes.

Thank you. But even after make the appropriate change in strc-ref.lua (and 
regenerating the format), the previous example does not give Fig 1, etc.


Am I missing something in the sttings?


Even the second example in strc-ref.mkvi does not work correctly.

\starttext
\chapter{test}
\placefigure[here][xx:1]{}{\framed{one}} 
\placefigure[here][xx:2]{}{\framed{three}}
\placetable [here][xx:3]{}{\framed{two}} \placetable 
[here][xx:4]{}{\framed{four}}
\start
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[float][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank \start
\setupreferencestructureprefix[figure][default][prefix=no]
\in{fig}[xx:1] and \in{fig}[xx:2] \in{tab}[xx:3] and \in{tab}[xx:4]
\stop \blank
\stoptext

The second case, (\setup...[default][prefix=no]) works correctly, but the 
last two cases (\setup...[float][default][prefix=no], etc) do not get rid 
of the prefix.


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
___

[NTG-context] definereferencestructureprefix for floats

2015-06-20 Thread Aditya Mahajan

Hi,

How does one control the referenceprefix for floats. I want to refer to 
the figures as only Fig 1, Fig 2, etc, even when they are numbered 1.1, 
1.2, etc.


The example from strc-ref.mkvi does not work (I get 1.I-A.1 and 1.I-A.2)

\defineconversionset[default][Character,number,Romannumerals,Character][number]
\defineseparatorset [default][.,.,--][.]
\setuphead[subsection][sectionstopper=),sectionsegments=4:4]
\setupreferencestructureprefix[default][prefixsegments=2:4]
\setupreferencestructureprefix[figure][default][prefixsegments=3:4]

\starttext
\chapter {One}
\section {One}
\subsection[sec:test]{Two}
See \in[sec:test] and \in[fig:xx] and \in[fig:yy]
\placefigure[here][fig:xx]{}{}
\placefigure[here][fig:yy]{}{}

\stoptext

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

[NTG-context] \placefigure[right,high] in two column mode

2015-06-11 Thread Mojca Miklavec
Hello,

Is it possible to place a figure to the right in two column mode? I
always get it centered for some reason.

\setupexternalfigures[location={local,global,default}]

\starttext

\startcolumns[two]

% doesn't work
\startplacefigure[location={nonumber,right,high}]
\externalfigure[cow][width=2cm]
\stopplacefigure
\input tufte

\stopcolumns

% works
\startplacefigure[location={nonumber,right,high}]
\externalfigure[cow][width=2cm]
\stopplacefigure
\input tufte

\stoptext

Thank you,
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] embeddedxtable

2015-05-25 Thread Wolfgang Schuster

> Am 25.05.2015 um 12:08 schrieb Meer, H. van der :
> 
> 
>> On 24 May 2015, at 22:53, Wolfgang Schuster > <mailto:schuster.wolfg...@gmail.com>> wrote:
>> 
>> 
>>> Am 24.05.2015 um 21:33 schrieb Meer, H. van der >> <mailto:h.vanderm...@uva.nl>>:
>>> 
>>> Here an example as minimal as I could construct.
>> 
>> The spaces in the output are produced by the spaces between the tags 
>> (\xmlstrip doesn’t seem to work)
>> and you have to use a combination of \removeunwantedspaces and \ignorespaces 
>> to remove them.
>> 
>> To center your table this isn’t necessary when you replace \midaligned with 
>> a framedtext
>> environment in combination with “location=middle” or use a float command 
>> like \placefigure.
>> 
> 
> I think I can reduce the number of places where spaces have to be suppressed. 
> With just 2 \removeunwantedspaces and 1 \ignorespaces I get rid of most of 
> them. The \framed[offset=0pt] shows where spurious space is still inserted.
> 
> Only 1 space remains inside the framed: in the vertical dimension below the 
> table. Any idea where this comes from? Some parameter to change in the 
> \framerd perhaps?

It’s impossible to tell what’s wrong with our code snippets, you have to create 
working minimal examples.

The following example shows where you have to take care of extra space and you 
don’t need them when you put the whole table in a \vbox (you can test by 
commenting all \ignorespaces and \removeunwantedspaces commands and replacing 
\ruledhbox with \ruledvbox).

\startxmlsetups xmlcommon
\xmlsetsetup{\xmldocument}{table|tbody|tr|td}{xmlcommon:*}
\stopxmlsetups

\xmlregistersetup{xmlcommon}

\startxmlsetups xmlcommon:table
%   \removeunwantedspaces
\startembeddedxtable
\xmlflush{#1}
\stopembeddedxtable
\ignorespaces
\stopxmlsetups

\startxmlsetups xmlcommon:tbody
%   \removeunwantedspaces
\startxtablebody
\xmlflush{#1}
\stopxtablebody
\ignorespaces
\stopxmlsetups

\startxmlsetups xmlcommon:tr
%   \removeunwantedspaces
\startxrow
\xmlflush{#1}
\stopxrow
\ignorespaces
\stopxmlsetups

\startxmlsetups xmlcommon:td
\removeunwantedspaces
\startxcell
\xmlflush{#1}
\stopxcell
\ignorespaces
\stopxmlsetups

\starttext

\startbuffer[table]





A
B


C
D




\stopbuffer

\ruledhbox{\xmlprocessbuffer{root}{table}{}}

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

2015-05-25 Thread Meer, H. van der

On 24 May 2015, at 22:53, Wolfgang Schuster 
mailto:schuster.wolfg...@gmail.com>> wrote:


Am 24.05.2015 um 21:33 schrieb Meer, H. van der 
mailto:h.vanderm...@uva.nl>>:

Here an example as minimal as I could construct.

The spaces in the output are produced by the spaces between the tags (\xmlstrip 
doesn’t seem to work)
and you have to use a combination of \removeunwantedspaces and \ignorespaces to 
remove them.

To center your table this isn’t necessary when you replace \midaligned with a 
framedtext
environment in combination with “location=middle” or use a float command like 
\placefigure.


I think I can reduce the number of places where spaces have to be suppressed. 
With just 2 \removeunwantedspaces and 1 \ignorespaces I get rid of most of 
them. The \framed[offset=0pt] shows where spurious space is still inserted.

Only 1 space remains inside the framed: in the vertical dimension below the 
table. Any idea where this comes from? Some parameter to change in the \framerd 
perhaps?

Of course I would be happier if none of these space-suppressing is necessary in 
my code, because ConTeXt takes care of them.

Hans van der Meer

\startxmlsetups xmlcommon:table
\bgroup
\setupxtable[% Setup defaults
leftmargindistance=0pt,rightmargindistance=0pt,
offset=2pt,height=fit,width=fit,
align={center,lohi},columndistance=0pt]
\setupxtableparameters{#1}
\startlocationbox{#1}
\startembeddedxtable
\xmlflush{#1}
\removeunwantedspaces
\stopembeddedxtable
\stoplocationbox
\egroup
\ignorespaces
\stopxmlsetups
\startxmlsetups xmlcommon:tr
\bgroup
\setupxtableparameters{#1}
\removeunwantedspaces
\startxrow
\xmlflush{#1}
\stopxrow
\egroup
\stopxmlsetups






xtablespace.pdf
Description: xtablespace.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] embeddedxtable

2015-05-25 Thread Meer, H. van der

> On 24 May 2015, at 22:53, Wolfgang Schuster  
> wrote:
>
>
>> Am 24.05.2015 um 21:33 schrieb Meer, H. van der :
>>
>>> In this case you have to provide a working minimal example.
>>>
>>> Wolfgang
>>
>> Here an example as minimal as I could construct.
>
> The spaces in the output are produced by the spaces between the tags 
> (\xmlstrip doesn’t seem to work)
> and you have to use a combination of \removeunwantedspaces and \ignorespaces 
> to remove them.
>
> To center your table this isn’t necessary when you replace \midaligned with a 
> framedtext
> environment in combination with “location=middle” or use a float command like 
> \placefigure.
>
>
> \startxmlsetups xmlcommon
>\xmlsetsetup{\xmldocument}{table|tr|td}{xmlcommon:*}
> \stopxmlsetups
>
> \xmlregistersetup{xmlcommon}
>
> \startxmlsetups xmlcommon:table
> % \removeunwantedspaces
>\startembeddedxtable
>\xmlflush{#1}
>\stopembeddedxtable
> % \ignorespaces
> \stopxmlsetups
>
> \startxmlsetups xmlcommon:tr
> % \removeunwantedspaces
>\startxrow
>\xmlflush{#1}
>\stopxrow
> % \ignorespaces
> \stopxmlsetups
>
> \startxmlsetups xmlcommon:td
> % \removeunwantedspaces
>\startxcell
>\xmlflush{#1}
>\stopxcell
> % \ignorespaces
> \stopxmlsetups
>

Input from file or from buffer doesn't make a difference.
I inserted the \removeunwantedspaces and \ignorespaces, as you suggested. The 
xmlstrip macros do not make any difference, either active or commented out. 
Then there still remains extra space at the end. See below.









xtablespace.pdf
Description: xtablespace.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] embeddedxtable

2015-05-24 Thread Wolfgang Schuster

> Am 24.05.2015 um 21:33 schrieb Meer, H. van der :
> 
>> In this case you have to provide a working minimal example.
>> 
>> Wolfgang
> 
> Here an example as minimal as I could construct.

The spaces in the output are produced by the spaces between the tags (\xmlstrip 
doesn’t seem to work)
and you have to use a combination of \removeunwantedspaces and \ignorespaces to 
remove them.

To center your table this isn’t necessary when you replace \midaligned with a 
framedtext
environment in combination with “location=middle” or use a float command like 
\placefigure.


\startxmlsetups xmlcommon
\xmlsetsetup{\xmldocument}{table|tr|td}{xmlcommon:*}
\stopxmlsetups

\xmlregistersetup{xmlcommon}

\startxmlsetups xmlcommon:table
%   \removeunwantedspaces
\startembeddedxtable
\xmlflush{#1}
\stopembeddedxtable
%   \ignorespaces
\stopxmlsetups

\startxmlsetups xmlcommon:tr
%   \removeunwantedspaces
\startxrow
\xmlflush{#1}
\stopxrow
%   \ignorespaces
\stopxmlsetups

\startxmlsetups xmlcommon:td
%   \removeunwantedspaces
\startxcell
\xmlflush{#1}
\stopxcell
%   \ignorespaces
\stopxmlsetups

\starttext

\startbuffer[a]




A



\stopbuffer

\startbuffer[b]


A

\stopbuffer

\ruledhbox{\xmlprocessbuffer{root}{a}{}}
\ruledhbox{\xmlprocessbuffer{root}{b}{}}

\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] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Hans Hagen

On 5/24/2015 2:36 PM, Aditya Mahajan wrote:




On May 24, 2015, at 5:48 AM, Mojca Miklavec  
wrote:


On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:

Hi,
Why the command \placerecipe{}{} does not with an environment
\starttikzpicture
\stoptikzpicture ?


In my opinion this is a "bug" in TikZ that has been pointed out a
while ago already. The picture creates a "wrong type of the box". If I
remember correctly the behaviour is different in LaTeX.

An easy workaround (that I always use) is to enclose the graphic into
an \hbox{}, like this:

\hbox{\starttikzpicture
...
% content
...
\stoptikzpicture}

(With \placefigure or \placerecipe or whatever used as usual before
the \hbox{}.)

We might want to coordinate a patch with the TikZ team.


Yes, it is a two line change in t-tikz that would not affect the latex or plain 
tex behavior.


it all depends how sensitive the environment is with respect to spaces 
as unwanted one can creep in when in horizontal mode


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
___

Re: [NTG-context] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Aditya Mahajan


> On May 24, 2015, at 5:48 AM, Mojca Miklavec  
> wrote:
> 
>> On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:
>> 
>> Hi,
>> Why the command \placerecipe{}{} does not with an environment
>> \starttikzpicture
>> \stoptikzpicture ?
> 
> In my opinion this is a "bug" in TikZ that has been pointed out a
> while ago already. The picture creates a "wrong type of the box". If I
> remember correctly the behaviour is different in LaTeX.
> 
> An easy workaround (that I always use) is to enclose the graphic into
> an \hbox{}, like this:
> 
> \hbox{\starttikzpicture
> ...
> % content
> ...
> \stoptikzpicture}
> 
> (With \placefigure or \placerecipe or whatever used as usual before
> the \hbox{}.)
> 
> We might want to coordinate a patch with the TikZ team.

Yes, it is a two line change in t-tikz that would not affect the latex or plain 
tex behavior. 

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] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Mojca Miklavec
On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:
>
> Hi,
> Why the command \placerecipe{}{} does not with an environment
> \starttikzpicture
> \stoptikzpicture ?

In my opinion this is a "bug" in TikZ that has been pointed out a
while ago already. The picture creates a "wrong type of the box". If I
remember correctly the behaviour is different in LaTeX.

An easy workaround (that I always use) is to enclose the graphic into
an \hbox{}, like this:

\hbox{\starttikzpicture
...
% content
...
\stoptikzpicture}

(With \placefigure or \placerecipe or whatever used as usual before
the \hbox{}.)

We might want to coordinate a patch with the TikZ team.

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] Prefix for figure number lost in unnumbered subsection

2015-05-13 Thread Hans Hagen

On 5/13/2015 10:25 PM, Mojca Miklavec wrote:


Thank you. This solves the problem, but isn't current behaviour
(without "incrementnumber=no") some kind of a bug?


maybe, but more a side effect i think .. the incrementnumber is the 
official way to have an unumbered section (in fact 'subject's are the way)



- Once a figure gets a number like "3.4", isn't it a bug if the
reference to that figure says "Figure 4"?
- (I find it a bit problematic that figures are numbered "1.1", "2", "1.3".)


there is a bit of history behind this:

- in mkii we stored the numbers like 1:2:3:4 in the utility file
- so in order to get less prefixes in for isntance a list we had to 
parse that number

- which was possible because we knew the level
- but then getting pieces colors or in an other font was kind of tricky 
(but diable)

- the same for converted numbers
- for mixed usage there was no way to distinguish rendering

but in mkiv, we do it different:

- each number is stored along with the used prefix so we can exactly 
match them
- but we can also configure them differently as we have all information 
available

- of course overloaded numbers are also handled


While I could at least understand why implementing the second thing
properly might be a bit more challenging, I don't understand why a
reference would ever be allowed to change the original label.


well, you think so, but all you can't imagine get requested ... the same 
for the way prefixes are dealt with; we have documents with several 
interwoven number systems and we can have more or less suffixes in 
different sections of a document, image, reference .. whatever, so 
whenever a number is requested there is now full control over the prefix 
(what components to use) as well as the number (what components to show) 
.. indeed complex


not much different from users mixing fonts that don't match well


I'm experiencing a similar problem with figures in appendices (I
already reported it, but I need to find that mail).


there are quite some example posts by wolfgang .. there are also some 
examples in the test suite



And there's another tiny problem that's partially a consequence of a
human mistake. If a reference is missing, \in[reference] would print
"??". But if one accidentally tries to reference some unnumbered
subsubsection, \in doesn't print anything to even remotely indicate an
error. (The origin of the error was initially referencing
subsubsections in one chapter, then removing numbers of subsubsections
for the sake of another chapter and it took a while until the problem
was spotted.)


maybe some day i'll add a bit more tracing but keep in mind that when 
one user asks for ?? another asks for nothing (the log can show some 
info too, and there is actually a truckload of trackers to help you)


\enabletrackers[*refer*]
\enabletrackers[*destin*]



Mojca



On Fri, May 8, 2015 at 5:36 PM, Mojca Miklavec wrote:


Hi,

Consider the following example where I wanted to remove subsubsection
numbers (as one ends with way too many numbers otherwise). The figure
numbering is screwed up, I get:
- Figure 1.1
- Figure 2
- Figure 1.3

\setuphead
  [subsubsection]
  [number=no]
\starttext
\chapter{Chapter A}
\section{Section B}
\subsection{Subsection C}
\placefigure[force]{correct prefix}{test}
\subsubsection{Subsubsection D}
\placefigure[force]{no prefix number}{test}
\subsection{Subsection E}
\placefigure[force]{correct prefix}{test}
\stoptext

How to fix that?

Thank you,
  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

___




--

-
   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] Prefix for figure number lost in unnumbered subsection

2015-05-13 Thread Mojca Miklavec
On Wed, May 13, 2015 at 12:04 PM, Hans Hagen wrote:
> On 5/13/2015 10:38 AM, Mojca Miklavec wrote:
>>
>> Hi,
>>
>> As this works properly in MkII: should I simply switch to MkII ;) or
>> is there some kind of a workaround in MkIV as well?
>
>
> \setuphead
>   [subsubsection]
>   [incrementnumber=no]

Thank you. This solves the problem, but isn't current behaviour
(without "incrementnumber=no") some kind of a bug?

- Once a figure gets a number like "3.4", isn't it a bug if the
reference to that figure says "Figure 4"?
- (I find it a bit problematic that figures are numbered "1.1", "2", "1.3".)

While I could at least understand why implementing the second thing
properly might be a bit more challenging, I don't understand why a
reference would ever be allowed to change the original label.

I'm experiencing a similar problem with figures in appendices (I
already reported it, but I need to find that mail).

And there's another tiny problem that's partially a consequence of a
human mistake. If a reference is missing, \in[reference] would print
"??". But if one accidentally tries to reference some unnumbered
subsubsection, \in doesn't print anything to even remotely indicate an
error. (The origin of the error was initially referencing
subsubsections in one chapter, then removing numbers of subsubsections
for the sake of another chapter and it took a while until the problem
was spotted.)

Mojca


>> On Fri, May 8, 2015 at 5:36 PM, Mojca Miklavec wrote:
>>>
>>> Hi,
>>>
>>> Consider the following example where I wanted to remove subsubsection
>>> numbers (as one ends with way too many numbers otherwise). The figure
>>> numbering is screwed up, I get:
>>> - Figure 1.1
>>> - Figure 2
>>> - Figure 1.3
>>>
>>> \setuphead
>>>  [subsubsection]
>>>  [number=no]
>>> \starttext
>>> \chapter{Chapter A}
>>> \section{Section B}
>>> \subsection{Subsection C}
>>> \placefigure[force]{correct prefix}{test}
>>> \subsubsection{Subsubsection D}
>>> \placefigure[force]{no prefix number}{test}
>>> \subsection{Subsection E}
>>> \placefigure[force]{correct prefix}{test}
>>> \stoptext
>>>
>>> How to fix that?
>>>
>>> Thank you,
>>>  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
>>
>> ___
>>
>
>
> --
>
> -
>   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
___

Re: [NTG-context] Prefix for figure number lost in unnumbered subsection

2015-05-13 Thread Hans Hagen

On 5/13/2015 10:38 AM, Mojca Miklavec wrote:

Hi,

As this works properly in MkII: should I simply switch to MkII ;) or
is there some kind of a workaround in MkIV as well?


\setuphead
  [subsubsection]
  [incrementnumber=no]



Thank you very much,
 Mojca

On Fri, May 8, 2015 at 5:36 PM, Mojca Miklavec wrote:

Hi,

Consider the following example where I wanted to remove subsubsection
numbers (as one ends with way too many numbers otherwise). The figure
numbering is screwed up, I get:
- Figure 1.1
- Figure 2
- Figure 1.3

\setuphead
 [subsubsection]
 [number=no]
\starttext
\chapter{Chapter A}
\section{Section B}
\subsection{Subsection C}
\placefigure[force]{correct prefix}{test}
\subsubsection{Subsubsection D}
\placefigure[force]{no prefix number}{test}
\subsection{Subsection E}
\placefigure[force]{correct prefix}{test}
\stoptext

How to fix that?

Thank you,
 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
___




--

-
  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] Prefix for figure number lost in unnumbered subsection

2015-05-13 Thread Mojca Miklavec
Hi,

As this works properly in MkII: should I simply switch to MkII ;) or
is there some kind of a workaround in MkIV as well?

Thank you very much,
Mojca

On Fri, May 8, 2015 at 5:36 PM, Mojca Miklavec wrote:
> Hi,
>
> Consider the following example where I wanted to remove subsubsection
> numbers (as one ends with way too many numbers otherwise). The figure
> numbering is screwed up, I get:
> - Figure 1.1
> - Figure 2
> - Figure 1.3
>
> \setuphead
> [subsubsection]
> [number=no]
> \starttext
> \chapter{Chapter A}
> \section{Section B}
> \subsection{Subsection C}
> \placefigure[force]{correct prefix}{test}
> \subsubsection{Subsubsection D}
> \placefigure[force]{no prefix number}{test}
> \subsection{Subsection E}
> \placefigure[force]{correct prefix}{test}
> \stoptext
>
> How to fix that?
>
> Thank you,
> 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] external figure sizing

2015-05-11 Thread Csikos Bela
"Peter Münster" írta:
>On Sat, May 09 2015, Csikos Bela wrote:
>
>> \placefigure, \externalfigure and combinations. The images should be scaled 
>> to the
>> same size, eg to .25\textwith and .3\textheight so that the  aspect ratios 
>> of the images
>> are kept and the appropriate value is used for width or height.
>
>What is the "appropriate" value?

The calculated value which pairs with < or = to the other calculated value.
For example if  the height calculated for .25\textwidth is less than 
.3\textheight
then .25\textwidth else .3\textheight should be used for calculating the size of
the image.


>> That is the smaller value from .25\textwith and .3\textheight is used
>> for the image size.
>
>"The smaller value from .25\textwith and .3\textheight" does only depend
>on the layout, but not on the image.

Of course, but the layout determines how the images has to be scaled.

>This is perhaps, what you need:  maxwidth=..., maxheight=...

Exactly, this is what I need. 

Thanks,

bcsikos
___
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] Bleeding pictures as floats?

2015-05-11 Thread Wolfgang Schuster

> Am 06.05.2015 um 07:06 schrieb Henning Hraban Ramm :
> 
> […]
> 
> \definemeasure[Bleed][3mm]
> \definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
> \definemeasure[maxHeight][\dimexpr \paperheight + 2\measure{Bleed}\relax]
> \definemeasure[topOffset][\dimexpr \topspace + \measure{Bleed}\relax]

You don’t have to use \dimexpr because the measure macros already us it.

> […]
> 
> \definefloat[bleedfigure][figure]
> \setupfloat[bleedfigure][
>   outermargindistance=-2\measure{Bleed},
>   %leftmargindistance=-2\measure{Bleed},
>   %rightmargindistance=-2\measure{Bleed},
>   maxwidth=\measure{maxWidth}
> ]

There is only a “outermargin”  key but not “outermargindistance”.

> […]
> 
> With this (perhaps not minimal) example I get nearly what I want, but the 
> image starts with the paper and is centered (x/y -1,5mm/0mm) where I want it 
> to start on -3mm/-3mm on a left page, 0mm/-3mm on a right page. I thought my 
> definitions should do that…

The space before the image isn’t fixed when you use \setuplayout[grid=yes] 
because ConTeXt has to change it to ensure the text after the floats stays on 
the page.

%\setuplayout[grid=yes] % uncomment to see how the space before the images 
changes

\showframe

\starttext

\chapter{Test}

\placefigure[top]{Dummy}{\externalfigure[dummy]}

\input tufte

\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] external figure sizing

2015-05-09 Thread Peter Münster
On Sat, May 09 2015, Csikos Bela wrote:

> \placefigure, \externalfigure and combinations. The images should be scaled 
> to the
> same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
> the images
> are kept and the appropriate value is used for width or height.

What is the "appropriate" value?


> That is the smaller value from .25\textwith and .3\textheight is used
> for the image size.

"The smaller value from .25\textwith and .3\textheight" does only depend
on the layout, but not on the image.


This is perhaps, what you need:  maxwidth=..., maxheight=...

-- 
   Peter
___
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] external figure sizing

2015-05-09 Thread Hans Hagen

On 5/9/2015 10:26 PM, Csikos Bela wrote:

Hello list members:

I would like to make a photo montage (4x3 images on one page) using
\placefigure, \externalfigure and combinations. The images should be scaled to 
the
same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
the images
are kept and the appropriate value is used for width or height. That is the 
smaller value
from .25\textwith and .3\textheight is used for the image size.

Using only \useexternalfigure[Fig1][1.jpg][width=.25\textwidth] may not give 
the correct
result if the image requires size adjustment by height and vice versa. Defining 
both
width and height results in exact resizing and the aspect ratio is not 
maintained.

How can this be solved?


\useMPlibrary[dum]

\showframe

\starttext

\setuplayout[middle]

\defineexternalfigure[quarter][factor=max]

\vbox{\dorecurse{4}{\hbox{\hsize.25\textwidth\vsize.25\textheight\dorecurse{4}{\externalfigure[dummy][quarter]

\page

\setuppapersize[A4,landscape] \setuplayout[middle]

\vbox{\dorecurse{4}{\hbox{\hsize.25\textwidth\vsize.25\textheight\dorecurse{4}{\externalfigure[dummy][quarter]

\stoptext

-
  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] external figure sizing

2015-05-09 Thread Csikos Bela
Hello list members:

I would like to make a photo montage (4x3 images on one page) using
\placefigure, \externalfigure and combinations. The images should be scaled to 
the
same size, eg to .25\textwith and .3\textheight so that the  aspect ratios of 
the images
are kept and the appropriate value is used for width or height. That is the 
smaller value
from .25\textwith and .3\textheight is used for the image size.

Using only \useexternalfigure[Fig1][1.jpg][width=.25\textwidth] may not give 
the correct
result if the image requires size adjustment by height and vice versa. Defining 
both
width and height results in exact resizing and the aspect ratio is not 
maintained.

How can this be solved?

Thanks,

bcsikos

___
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] Prefix for figure number lost in unnumbered subsection

2015-05-08 Thread Mojca Miklavec
Hi,

Consider the following example where I wanted to remove subsubsection
numbers (as one ends with way too many numbers otherwise). The figure
numbering is screwed up, I get:
- Figure 1.1
- Figure 2
- Figure 1.3

\setuphead
[subsubsection]
[number=no]
\starttext
\chapter{Chapter A}
\section{Section B}
\subsection{Subsection C}
\placefigure[force]{correct prefix}{test}
\subsubsection{Subsubsection D}
\placefigure[force]{no prefix number}{test}
\subsection{Subsection E}
\placefigure[force]{correct prefix}{test}
\stoptext

How to fix that? (I know that I can used something else than
subsubsection, but it would be nice to get a proper fix.)

Thank you,
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
___

[NTG-context] caption alignment with floats in the margin

2015-04-27 Thread Brian R. Landy
Hi, I am trying to place some floats in the margin and noticed that the caption 
gets centered instead of following my specification to flushleft.  If the float 
is in the main body it is ok.  .  I have a small example below.  I tested with 
2015.04.18 14:41.  Is there a way to fix the alignment?

Thanks,
Brian

\setuppapersize[letter,portrait][letter,portrait]
\setupcaption[figure][location=top,align={flushleft}]
\showframe
\starttext
\setuplayout[backspace=2.75in,leftmargin=2.25in,rightmargin=0.5in,cutspace=0.5in,location=middle,width=middle,margindistance=0.00in]
\placefigure[inleft,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}}
\placefigure[here,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}}
\placefigure[inright,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}}
\stoptext

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

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

Re: [NTG-context] Problem with margin figures and whitespace in text

2015-04-26 Thread Rik Kabel

On 2015-04-26 14:01, Hans Hagen wrote:

On 4/26/2015 3:32 AM, Rik Kabel wrote:

I have two problems with figures placed into the left or right margin.
When the figure is in a group, extra whitespace is inserted between the
paragraphs that precede and follow the placefigure command. This happens
for figures placed by startplacefigure/stopplacefigure and tradiitonal
placefigure commands, and paragraphs placed by
startparagraph/stopparagraph or marked by par or newlines.

When the figure is not in a group, whitespace called for by
\setupwhitespace is lost, except when the paragraphs are marked by
traditional means. That is, whitespace is lost when
startparagraph/stopparagraph is used.

Interestingly, when that is changed to bpar/epar, the problem for
ungrouped figures disappears, but as I understand it, bpar/epar is not a
real substitute for startparagraph/stopparagraph.

There is probably a simple explanation, but it eludes me. I prefer to be
able to use startparagraph/stopparagraph, and it is sometimes desirable
to place a figure into a group in order to prevent unique settings from
leaking out.


you can test with this in cont-new.mkiv

\unprotect

\def\page_sides_inject_dummy_lines
  {\begingroup
   \scratchcounter\pageshrink
   \divide\scratchcounter \baselineskip
   \advance\scratchcounter \plusone
   \parskip\zeropoint
   \dorecurse\scratchcounter{\hbox to \hsize{}}%
   \kern-\scratchcounter\baselineskip
   \penalty\zerocount
   \endgroup}

\def\page_sides_prepare_space
  {\par
  %\whitespace
   \begingroup
   \forgetall
   \reseteverypar
   \verticalstrut
   \vskip-\struttotal
   \endgroup}

\protect

Thank you, Hans. That works well, both on the example and on a more 
complex real document.


--
Rik
___
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] Problem with margin figures and whitespace in text

2015-04-26 Thread Hans Hagen

On 4/26/2015 3:32 AM, Rik Kabel wrote:

I have two problems with figures placed into the left or right margin.
When the figure is in a group, extra whitespace is inserted between the
paragraphs that precede and follow the placefigure command. This happens
for figures placed by startplacefigure/stopplacefigure and tradiitonal
placefigure commands, and paragraphs placed by
startparagraph/stopparagraph or marked by par or newlines.

When the figure is not in a group, whitespace called for by
\setupwhitespace is lost, except when the paragraphs are marked by
traditional means. That is, whitespace is lost when
startparagraph/stopparagraph is used.

Interestingly, when that is changed to bpar/epar, the problem for
ungrouped figures disappears, but as I understand it, bpar/epar is not a
real substitute for startparagraph/stopparagraph.

There is probably a simple explanation, but it eludes me. I prefer to be
able to use startparagraph/stopparagraph, and it is sometimes desirable
to place a figure into a group in order to prevent unique settings from
leaking out.


you can test with this in cont-new.mkiv

\unprotect

\def\page_sides_inject_dummy_lines
  {\begingroup
   \scratchcounter\pageshrink
   \divide\scratchcounter \baselineskip
   \advance\scratchcounter \plusone
   \parskip\zeropoint
   \dorecurse\scratchcounter{\hbox to \hsize{}}%
   \kern-\scratchcounter\baselineskip
   \penalty\zerocount
   \endgroup}

\def\page_sides_prepare_space
  {\par
  %\whitespace
   \begingroup
   \forgetall
   \reseteverypar
   \verticalstrut
   \vskip-\struttotal
   \endgroup}

\protect



The following should demonstrate the problem. Turning on grid setting
makes it worse. I get the same result with current betas and older versions.

\useMPlibrary   [dum]
%\showgrid
\setuplayout[%grid=yes,
  backspace=151pt,leftmargin=117pt]
\setupwhitespace[big]
\define\Paragraph{\startparagraph\input khatt-en\stopparagraph}
\starttext
{
   \subject{Start/stop paragraphs and figures}
   \subsubject{Group, extra whitespace}
   \Paragraph
   \Paragraph
   \begingroup
 \startplacefigure[location={leftmargin,none}]
   \externalfigure[A]
 \stopplacefigure
   \endgroup
   \Paragraph
   \Paragraph
   \subsubject{No group, no whitespace}
   \Paragraph
   \Paragraph
   \startplacefigure[location={leftmargin,none}]
 \externalfigure[A]
   \stopplacefigure
   \Paragraph
   \Paragraph
   \Paragraph
}
   \page
{
   \subject{Start/stop paragraphs, traditional figures}
   \subsubject{Group, extra whitespace}
   \Paragraph
   \Paragraph
   {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
   \Paragraph
   \Paragraph
   \subsubject{No group, no whitespace}
   \Paragraph
   \Paragraph
   \placefigure[leftmargin,none]{}{\externalfigure[A]}
   \Paragraph
   \Paragraph
   \Paragraph
}
   \page
{
   \subject{Traditional paragraphs, start/stop figures}
   \subsubject{Group, extra whitespace}
   \input khatt-en\par
   \input khatt-en\par
   \begingroup% or \bgroup or {
 \startplacefigure[location={leftmargin,none}]
   \externalfigure[A]
 \stopplacefigure
   \endgroup% or \egroup or }
   \input khatt-en\par
   \input khatt-en\par
   \subsubject{Okay}
   \input khatt-en\par
   \input khatt-en\par
   \startplacefigure[location={leftmargin,none}]
 \externalfigure[A]
   \stopplacefigure
   \input khatt-en\par
   \input khatt-en\par
   \input khatt-en\par
}
   \page
{
   \subject{Traditional paragraphs, traditional figures}
   \subsubject{Group, extra whitespace}
   \input khatt-en\par
   \input khatt-en\par
   {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
   \input khatt-en\par
   \input khatt-en\par
   \subsubject{Okay}
   \input khatt-en\par
   \input khatt-en\par
   \placefigure[leftmargin,none]{}{\externalfigure[A]}
   \input khatt-en\par
   \input khatt-en\par
   \input khatt-en\par
}
\stoptext

--
Rik


___
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

[NTG-context] Problem with margin figures and whitespace in text

2015-04-25 Thread Rik Kabel
I have two problems with figures placed into the left or right margin. 
When the figure is in a group, extra whitespace is inserted between the 
paragraphs that precede and follow the placefigure command. This happens 
for figures placed by startplacefigure/stopplacefigure and tradiitonal 
placefigure commands, and paragraphs placed by 
startparagraph/stopparagraph or marked by par or newlines.


When the figure is not in a group, whitespace called for by 
\setupwhitespace is lost, except when the paragraphs are marked by 
traditional means. That is, whitespace is lost when 
startparagraph/stopparagraph is used.


Interestingly, when that is changed to bpar/epar, the problem for 
ungrouped figures disappears, but as I understand it, bpar/epar is not a 
real substitute for startparagraph/stopparagraph.


There is probably a simple explanation, but it eludes me. I prefer to be 
able to use startparagraph/stopparagraph, and it is sometimes desirable 
to place a figure into a group in order to prevent unique settings from 
leaking out.


The following should demonstrate the problem. Turning on grid setting 
makes it worse. I get the same result with current betas and older versions.


   \useMPlibrary   [dum]
   %\showgrid
   \setuplayout[%grid=yes,
 backspace=151pt,leftmargin=117pt]
   \setupwhitespace[big]
   \define\Paragraph{\startparagraph\input khatt-en\stopparagraph}
   \starttext
   {
  \subject{Start/stop paragraphs and figures}
  \subsubject{Group, extra whitespace}
  \Paragraph
  \Paragraph
  \begingroup
\startplacefigure[location={leftmargin,none}]
  \externalfigure[A]
\stopplacefigure
  \endgroup
  \Paragraph
  \Paragraph
  \subsubject{No group, no whitespace}
  \Paragraph
  \Paragraph
  \startplacefigure[location={leftmargin,none}]
\externalfigure[A]
  \stopplacefigure
  \Paragraph
  \Paragraph
  \Paragraph
   }
  \page
   {
  \subject{Start/stop paragraphs, traditional figures}
  \subsubject{Group, extra whitespace}
  \Paragraph
  \Paragraph
  {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
  \Paragraph
  \Paragraph
  \subsubject{No group, no whitespace}
  \Paragraph
  \Paragraph
  \placefigure[leftmargin,none]{}{\externalfigure[A]}
  \Paragraph
  \Paragraph
  \Paragraph
   }
  \page
   {
  \subject{Traditional paragraphs, start/stop figures}
  \subsubject{Group, extra whitespace}
  \input khatt-en\par
  \input khatt-en\par
  \begingroup% or \bgroup or {
\startplacefigure[location={leftmargin,none}]
  \externalfigure[A]
\stopplacefigure
  \endgroup% or \egroup or }
  \input khatt-en\par
  \input khatt-en\par
  \subsubject{Okay}
  \input khatt-en\par
  \input khatt-en\par
  \startplacefigure[location={leftmargin,none}]
\externalfigure[A]
  \stopplacefigure
  \input khatt-en\par
  \input khatt-en\par
  \input khatt-en\par
   }
  \page
   {
  \subject{Traditional paragraphs, traditional figures}
  \subsubject{Group, extra whitespace}
  \input khatt-en\par
  \input khatt-en\par
  {\placefigure[leftmargin,none]{}{\externalfigure[A]}}
  \input khatt-en\par
  \input khatt-en\par
  \subsubject{Okay}
  \input khatt-en\par
  \input khatt-en\par
  \placefigure[leftmargin,none]{}{\externalfigure[A]}
  \input khatt-en\par
  \input khatt-en\par
  \input khatt-en\par
   }
   \stoptext

--
Rik
___
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] how to set figure label ?

2015-04-16 Thread Alan BRASLAU
On Thu, 16 Apr 2015 17:27:17 +0200
Harald Koenig  wrote:

> how can I set a "label" for a figure without 
> 
> \placefigure[][fig:...]{} 
> 
> for some "figures" I use strange macros -- and at those places I get
> errors when calling \placefigure BUT I'd like to check the page
> numbers of those places using
> 
>   \doifreferencefoundelse{fig:bild\the\bildnr}%
> 
> and right now I get 
> 
>   references  > unknown reference '[][fig:bild5]'
> 
> for those pictures...

I much prefer the syntax

\startplacefigure [reference=fig:,location={here,force},title={}]
   \externalfigure[]...
\stopplacefigure

Depending on the "strange macros" that you want to use,
this should generally work. I find that this gives one many more
options.

Alan
___
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] how to set figure label ?

2015-04-16 Thread Harald Koenig
Hi,

how can I set a "label" for a figure without 

\placefigure[][fig:...]{} 

for some "figures" I use strange macros -- and at those places I get errors 
when calling \placefigure
BUT I'd like to check the page numbers of those places using

  \doifreferencefoundelse{fig:bild\the\bildnr}%

and right now I get 

  references  > unknown reference '[][fig:bild5]'

for those pictures...


thanks -- and greetings from the DANTE meeting in Stralsund, Germany

Harald

PS: Hans -- we miss you so much!!!
-- 
"I hope to die  ___   _
before I *have* to use Microsoft Word.",   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.<_/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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 in latest beta: behavior of \text in StepCharts

2015-04-16 Thread Alan BRASLAU
On Thu, 16 Apr 2015 09:04:46 +0200
Otared Kavian  wrote:

> It seems that with the latest beta there is a bug in the way how the
> command \text is handled in step charts (plesae see the attached
> PDF). This bug is absent from mkii, and absent from previous versions
> of mkiv (up to a weak ago, I believe).
> 
> This is a minimal example which shows that the font used in each cell
> of \text changes randomly (there are four instances of \text, and
> each time a different font is used…):
> 
>  begin random-text-size.tex
> \usemodule[steps]
> 
> \starttext
> \input knuth.tex
> 
> \placefigure[none][-]{}{
> \startSTEPtable 
>     \cell {$(f\circ u)(x_{*} + o(1)) = $} \text{definition of
> $f\circ u$} \cell {$f\left(u\left(x_{*} + o(1)\right)\right) = $}
> \text {$u$ is continuous} \cell {$f\left(u(x_{*}) + o(1)\right) = $}
> \text {$f$ is continuous} \cell {$f\left(u(x_{*})\right) + o(1) =$}
> \text {definition of $f\circ u$} \cell {$(f\circ u)(x_{*}) + o(1)$.} 
> \stopSTEPtable}
> 
> \stoptext
>  begin random-text-size.tex

This bug arises from low-level changes in the handling text from
MetaPost. I have reported this to Hans (in the context of graphs),
although I have not understood how to fix it.

The result is kind of fun: like something that many people produced at
the time of the introduction of the Apple MacIntosh!

Alan
___
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] Bug in latest beta: behavior of \text in StepCharts

2015-04-16 Thread Otared Kavian
Hi Hans,

It seems that with the latest beta there is a bug in the way how the command 
\text is handled in step charts (plesae see the attached PDF).
This bug is absent from mkii, and absent from previous versions of mkiv (up to 
a weak ago, I believe).

This is a minimal example which shows that the font used in each cell of \text 
changes randomly (there are four instances of \text, and each time a different 
font is used…):

 begin random-text-size.tex
\usemodule[steps]

\starttext
\input knuth.tex

\placefigure[none][-]{}{
\startSTEPtable 
\cell {$(f\circ u)(x_{*} + o(1)) = $} \text{definition of $f\circ u$}
\cell {$f\left(u\left(x_{*} + o(1)\right)\right) = $} \text {$u$ is 
continuous} 
\cell {$f\left(u(x_{*}) + o(1)\right) = $} \text {$f$ is continuous} 
\cell {$f\left(u(x_{*})\right) + o(1) =$} \text {definition of $f\circ 
u$} 
\cell {$(f\circ u)(x_{*}) + o(1)$.} 
\stopSTEPtable}

\stoptext
 begin random-text-size.tex


scaling-stepcharts.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] caption setup

2015-04-09 Thread Wolfgang Schuster

> Am 09.04.2015 um 13:14 schrieb Csikos Bela :
> 
> Wolfgang Schuster írta:
>> 
>>> Am 09.04.2015 um 00:13 schrieb Csikos Bela:
>>> 
>>> Hello:
>>> 
>>> I have to setup caption formatting for Hungarian.
>>> In Hungarian I have to write "#. figure." instead of "Figure #:"
>>> The exact word for "figure" is "ábra", so what I want exactly is:
>>> "# ábra.", eg "1. ábra".
>>> How can I do it? (If I set the document language to Hungarian, the
>>> word "ábra" is shown correctly but the order is not correct; I get ,. 
>>> ábra:#.)
>> 
>> Until the labels for hungarian are fixed you can use the \setuplabeltext 
>> command
>> to set the right labels.
>> 
>>> Another question: for caption text I want it to be justified and the last 
>>> line of the caption
>>> centered. How can I do that?
>> 
>> \useMPlibrary[dum]
>> 
>> \mainlanguage[hu]
>> 
>> \setupcaption[figure][align=last,numberstopper=.]
>> 
>> \setuplabeltext[hu][figure={, ábra}]
>> 
>> \starttext
>> 
>> \startplacefigure[title=\input{ward}]
>>  \externalfigure[dummy]
>> \stopplacefigure
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Wolfgang, Otared:
> 
> Thank you both for your suggestions. Unfortunately the caption modification 
> works only partially. I could not make both the caption labels and the 
> references look correct.
> 
> When I use Wolfgang's example, I get the following: attachment file 
> caption-example-2.pdf.
> 
> I also tried different settings for caption label, here is the code:
> 
> 
> 
> \starttext
> 
> \setupcaption[figure][numberstopper={. ábra.}]
> \setuplabeltext[figure={}]
> 
> Code:
> 
> \verbatim{\setupcaption[figure][numberstopper={. ábra.}]} \par
> \verbatim{\setuplabeltext[figure={}]}
> 
> Result:
> 
> Reference to figure 1 (\in{figure}[figure-1])
> 
> \placefigure[][figure-1]{This is the caption}{\framed{Some figure}}
> 
> \hairline
> 
> \setupcaption[figure][suffix={. ábra},numberstopper={.}]
> \setuplabeltext[figure={}]
> 
> Code:
> 
> \verbatim{\setupcaption[figure][suffix={. ábra},numberstopper={.}]} \par
> \verbatim{\setuplabeltext[figure={}]}
> 
> Result:
> 
> Reference to figure 2 (\in{figure}[figure-2])
> 
> \placefigure[][figure-2]{This is the caption}{\framed{Another figure}}
> 
> \hairline
> 
> The caption should be: ``1. ábra. This is the caption''
> 
> The reference should be: ``(1. ábra)'' -- NO period after ``ábra'', without 
> the word ``figure''.
> 
> \stoptext
> 
> 
> 
> I attach the generated pdf output: caption-example.pdf
> 
> Unfortunately none of the above code variants gives the correct result.
> Despite of the bad "wording" I don't understand why numberstopper (.)
> doesn't appear after suffix (. ábra) in figure 2.
> 
> Any way to fix these?

Method 1 (set the left and right texts for the reference with the \in command):

 begin example
\useMPlibrary[dum]

\mainlanguage[hu]

\setuplabeltext [hu] [figure={, ábra.}]

\setupcaption[figure][numberstopper=.]

\definereferenceformat[infigure][label=figurereference]

\starttext

\startplacefigure[reference=fig:dummy,title=Dummy figure]
\externalfigure[dummy]
\stopplacefigure

See figure~1 (\in{}{ ábra}[fig:dummy]).

\stoptext
 end example


Method 2 (create your own reference command which uses a label without the 
period at the end):

 begin example
\useMPlibrary[dum]

\mainlanguage[hu]

\setuplabeltext [hu]  [figure={, ábra.}]
\setuplabeltext [hu] [figurereference={, ábra}]

\setupcaption[figure][numberstopper=.]

\definereferenceformat[infigure][label=figurereference]

\starttext

\startplacefigure[reference=fig:dummy,title=Dummy figure]
\externalfigure[dummy]
\stopplacefigure

See figure~1 (\infigure[fig:dummy]).

\stoptext
 end example


BTW: The plain TeX method for quotation marks (``…’’) doesn’t work with MkIV, 
use correct quotation marks (“…”) or the \quotation command (\quotation{…}).

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] caption setup

2015-04-09 Thread Wolfgang Schuster

> Am 09.04.2015 um 13:14 schrieb Csikos Bela :
> 
> Wolfgang Schuster írta:
>> 
>>> Am 09.04.2015 um 00:13 schrieb Csikos Bela:
>>> 
>>> Hello:
>>> 
>>> I have to setup caption formatting for Hungarian.
>>> In Hungarian I have to write "#. figure." instead of "Figure #:"
>>> The exact word for "figure" is "ábra", so what I want exactly is:
>>> "# ábra.", eg "1. ábra".
>>> How can I do it? (If I set the document language to Hungarian, the
>>> word "ábra" is shown correctly but the order is not correct; I get ,. 
>>> ábra:#.)
>> 
>> Until the labels for hungarian are fixed you can use the \setuplabeltext 
>> command
>> to set the right labels.
>> 
>>> Another question: for caption text I want it to be justified and the last 
>>> line of the caption
>>> centered. How can I do that?
>> 
>> \useMPlibrary[dum]
>> 
>> \mainlanguage[hu]
>> 
>> \setupcaption[figure][align=last,numberstopper=.]
>> 
>> \setuplabeltext[hu][figure={, ábra}]
>> 
>> \starttext
>> 
>> \startplacefigure[title=\input{ward}]
>>  \externalfigure[dummy]
>> \stopplacefigure
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Wolfgang, Otared:
> 
> Thank you both for your suggestions. Unfortunately the caption modification 
> works only partially. I could not make both the caption labels and the 
> references look correct.
> 
> When I use Wolfgang's example, I get the following: attachment file 
> caption-example-2.pdf.
> 
> I also tried different settings for caption label, here is the code:
> 
> 
> 
> \starttext
> 
> \setupcaption[figure][numberstopper={. ábra.}]
> \setuplabeltext[figure={}]
> 
> Code:
> 
> \verbatim{\setupcaption[figure][numberstopper={. ábra.}]} \par
> \verbatim{\setuplabeltext[figure={}]}
> 
> Result:
> 
> Reference to figure 1 (\in{figure}[figure-1])
> 
> \placefigure[][figure-1]{This is the caption}{\framed{Some figure}}
> 
> \hairline
> 
> \setupcaption[figure][suffix={. ábra},numberstopper={.}]
> \setuplabeltext[figure={}]
> 
> Code:
> 
> \verbatim{\setupcaption[figure][suffix={. ábra},numberstopper={.}]} \par
> \verbatim{\setuplabeltext[figure={}]}
> 
> Result:
> 
> Reference to figure 2 (\in{figure}[figure-2])
> 
> \placefigure[][figure-2]{This is the caption}{\framed{Another figure}}
> 
> \hairline
> 
> The caption should be: ``1. ábra. This is the caption''
> 
> The reference should be: ``(1. ábra)'' -- NO period after ``ábra'', without 
> the word ``figure''.
> 
> \stoptext
> 
> 
> 
> I attach the generated pdf output: caption-example.pdf
> 
> Unfortunately none of the above code variants gives the correct result.
> Despite of the bad "wording" I don't understand why numberstopper (.)
> doesn't appear after suffix (. ábra) in figure 2.
> 
> Any way to fix these?

The \setupcaption command needs a numbercommand key which can be used to set

   \setupcaption[numbercommand=\groupedcommand{}{…}]

> The alignment=last option works. (This option is not mentioned among the 
> options at the contextgarden wiki site, 
> http://wiki.contextgarden.net/Command/setupcaptions.)

Take a look at the \setupalign page: 
http://wiki.contextgarden.net/Command/setupalign 
<http://wiki.contextgarden.net/Command/setupalign>

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] caption setup

2015-04-09 Thread Csikos Bela
Wolfgang Schuster írta:
>
>> Am 09.04.2015 um 00:13 schrieb Csikos Bela:
>> 
>> Hello:
>> 
>> I have to setup caption formatting for Hungarian.
>> In Hungarian I have to write "#. figure." instead of "Figure #:"
>> The exact word for "figure" is "ábra", so what I want exactly is:
>> "# ábra.", eg "1. ábra".
>> How can I do it? (If I set the document language to Hungarian, the
>> word "ábra" is shown correctly but the order is not correct; I get ,. 
>> ábra:#.)
>
>Until the labels for hungarian are fixed you can use the \setuplabeltext 
>command
>to set the right labels.
>
>> Another question: for caption text I want it to be justified and the last 
>> line of the caption
>> centered. How can I do that?
>
>\useMPlibrary[dum]
>
>\mainlanguage[hu]
>
>\setupcaption[figure][align=last,numberstopper=.]
>
>\setuplabeltext[hu][figure={, ábra}]
>
>\starttext
>
>\startplacefigure[title=\input{ward}]
>   \externalfigure[dummy]
>\stopplacefigure
>
>\stoptext
>
>Wolfgang

Wolfgang, Otared:

Thank you both for your suggestions. Unfortunately the caption modification 
works only partially. I could not make both the caption labels and the 
references look correct.

When I use Wolfgang's example, I get the following: attachment file 
caption-example-2.pdf.

I also tried different settings for caption label, here is the code:



\starttext

\setupcaption[figure][numberstopper={. ábra.}]
\setuplabeltext[figure={}]

Code:

\verbatim{\setupcaption[figure][numberstopper={. ábra.}]} \par
\verbatim{\setuplabeltext[figure={}]}

Result:

Reference to figure 1 (\in{figure}[figure-1])

\placefigure[][figure-1]{This is the caption}{\framed{Some figure}}

\hairline

\setupcaption[figure][suffix={. ábra},numberstopper={.}]
\setuplabeltext[figure={}]

Code:

\verbatim{\setupcaption[figure][suffix={. ábra},numberstopper={.}]} \par
\verbatim{\setuplabeltext[figure={}]}

Result:

Reference to figure 2 (\in{figure}[figure-2])

\placefigure[][figure-2]{This is the caption}{\framed{Another figure}}

\hairline

The caption should be: ``1. ábra. This is the caption''

The reference should be: ``(1. ábra)'' -- NO period after ``ábra'', without the 
word ``figure''.

\stoptext



I attach the generated pdf output: caption-example.pdf

Unfortunately none of the above code variants gives the correct result.
Despite of the bad "wording" I don't understand why numberstopper (.)
doesn't appear after suffix (. ábra) in figure 2.

Any way to fix these?

The alignment=last option works. (This option is not mentioned among the 
options at the contextgarden wiki site, 
http://wiki.contextgarden.net/Command/setupcaptions.)

Thanks,

bcsikos


caption-example-2.pdf
Description: Adobe PDF document


caption-example.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] Adjusting vertical location of a margin figure

2015-03-24 Thread Wolfgang Schuster

> Am 24.03.2015 um 11:30 schrieb Mari Voipio :
> 
> Dear all,
> 
> in the user manuals I'm working with we'd like to put a graphic in the
> margin when the text includes a warning or other important
> information. I have found multiple ways of putting a graphic in the
> margin (see below), but none of them works perfectly. In some the
> graphic is placed to the baseline of the first row of the paragraph,
> in others it is placed lower down and in short paragraphs ends up by
> the next paragraph. What I want is a symbol in the margin aligned to
> the top of the paragraph. Is this possible?
> The graphic is always in the beginning of the paragraph, it doesn't
> appear in the middle.
> 
> This is what I have this far:
> 
> 
> \setupwhitespace[medium]
> 
> 
> \starttext
> 
> \inmargin{\externalfigure[warning]}
> \input tufte
> 
> \inmargin{\externalfigure[warning]}
> Really short paragraph.
> 
> 
> \inleft{
>\placefigure[none][]{}
>{\externalfigure[warning]}
>}

Don’t do this.

> \input tufte
> 
> 
> \placefigure[leftmargin,none]{}{\externalfigure[warning]}
> \input tufte
> 
> \placefigure
>[inleft,none]
>{}
>{\externalfigure[warning]}
> \input tufte
> 
> \placefigure
>[inleft,none]
>{}
>{\externalfigure[warning]}
> Really short paragraph.
> 
> \stoptext
> 
> Of course I have the option of making the symbols textheight, in which
> case \inmargin (aligning to baseline) would work. However, I'd rather
> keep them bigger if that is possible.


You can use the \tbox command for the alignment of the graphic.

\setuplayout[backspace=4cm,width=14cm]

\starttext

\inmargin{\tbox{\externalfigure[warning][width=\leftmarginwidth]}}
\input tufte

\stoptext

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

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

[NTG-context] Adjusting vertical location of a margin figure

2015-03-24 Thread Mari Voipio
Dear all,

in the user manuals I'm working with we'd like to put a graphic in the
margin when the text includes a warning or other important
information. I have found multiple ways of putting a graphic in the
margin (see below), but none of them works perfectly. In some the
graphic is placed to the baseline of the first row of the paragraph,
in others it is placed lower down and in short paragraphs ends up by
the next paragraph. What I want is a symbol in the margin aligned to
the top of the paragraph. Is this possible?
The graphic is always in the beginning of the paragraph, it doesn't
appear in the middle.

This is what I have this far:


\setupwhitespace[medium]


\starttext

\inmargin{\externalfigure[warning]}
\input tufte

\inmargin{\externalfigure[warning]}
Really short paragraph.


\inleft{
    \placefigure[none][]{}
{\externalfigure[warning]}
}
\input tufte


\placefigure[leftmargin,none]{}{\externalfigure[warning]}
\input tufte

\placefigure
[inleft,none]
{}
{\externalfigure[warning]}
\input tufte

\placefigure
[inleft,none]
{}
{\externalfigure[warning]}
Really short paragraph.

\stoptext

Of course I have the option of making the symbols textheight, in which
case \inmargin (aligning to baseline) would work. However, I'd rather
keep them bigger if that is possible.


Thanks,

Mari


warning.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] [MetaFun] Decorating running text

2015-03-18 Thread Norbert Melzer
Hi there!

I have some text (a single word) which I want to decorate using MP.

In this special case, I want to put a little crown above the "g" in the
word "Shogun". Also the crown and text should get scaled accordingly to the
surrounding text.

```tex
\define\Shogun{\startMPcode draw textext("Shogun") \stopMPcode}

\starttext
  The word \Shogun\ shall be decorated with the crown shown in
fig~\in[fig:crown]:

  \placefigure[here][fig:crown]{The crown that shall decorate the \quote{g}
in \quotation{Shogun}}{
  \startMPcode
fill
(-20,-17.5)--(20,-17.5)--(30,12.5)--(10,-2.5)--(0,17.5)--(-10,-2.5)--(-30,12.5)--cycle
  withcolor yellow ;
  \stopMPcode }
\stoptext
```

I wanted to try to draw the text using MPs draw, but then the baselines
doesn't match as you can see in the example. Also I don't know how I could
ensure that the text and the crown would crow accordingly to the
surrounding text.
___
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] Styling captions inside \startcombination ... \stopcombination

2015-03-16 Thread Mojca Miklavec
On Sat, Mar 14, 2015 at 1:10 PM, Hans Hagen  wrote:
> On 3/14/2015 10:50 AM, Mojca Miklavec wrote:
>>
>> Hello,
>>
>> I'm using the following code to make the figure captions smaller:
>>  \setupcaptions[style={\switchtobodyfont[8pt]}]
>>
>> Now I'm looking for the magic keywoard to also decrease the size of
>> captions inside combinations, as in the following case for example
>> (otherwise the "subcaptions" are too big in comparison):
>>
>> \setupcaptions[style={\switchtobodyfont[8pt]}]
>> \setupexternalfigures[location={default}]
>> \starttext
>>\placefigure{Cows in \ConTeXt}
>>  {\startcombination[2*1]
>>{\mirror{\externalfigure[cow][width=4cm]}}{First cow}
>>{\externalfigure[cow][width=4cm]}{Second cow}
>>\stopcombination}
>> \stoptext
>
>
> the obvious:
>
> \setupcombinations[style={\switchtobodyfont[8pt]}]

I'm sorry and thank you. Blush. I feel ashamed that I actually looked
into the source code and found the following inside pack-com.mkiv:

\setupcombination
  [\c!width=\v!fit,
   \c!height=\v!fit,
   \c!distance=\emwidth,
   \c!location=\v!bottom, % can be something {top,left}
   \c!before=\blank,
   \c!after=,
   \c!inbetween={\blank[\v!medium]},
  %\c!style=,
  %\c!color=,
   \c!nx=2, % new
   \c!ny=1, % new
   \c!align=\v!middle]

However I failed to notice the commented-out command "style=". Luckily
I can blame the syntax highlighting that makes the comments more
hidden than the rest of the code ;)

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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-16 Thread Hans Hagen

On 3/15/2015 8:13 PM, Harald Koenig wrote:

On Mar 15, Wolfgang Schuster wrote:




Am 15.03.2015 um 16:40 schrieb Harald Koenig 
:

Hi,

right now I use \currentreferencerealpage to detect if I'm on an even or odd 
page
(because my picture placement rules depend on it) like this:

\newcount\bildpage
\bildpage=1
% ...
\def\bild#1...{%
 {\global\bildpage=\realpageno}%
 \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
 % ...
 \if o\eo odd...\else even...\fi
\message{>> bildpage=\the\bildpage \space eo=\eo \space 
currentreferencerealpage=\currentreferencerealpage \space << }%
}

but now I notice that for some pages/pictures the value of 
\currentreferencerealpage
is not correct (only for the first picture on a new page?):-(


To test whether you’re on a left or right page you can use the \signalrightpage 
and \doifrightpageelse commands


this doesn't seem to work well -- at least not within \placefigure

I've tried this replacement in my \bild macro which should be equivalent (or 
better?)

%   \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
%   \ifodd\bildpage \def\lr{r}\else \def\lr{l}\fi
 \dontleavehmode\signalrightpage
 \doifrightpageelse{\def\eo{o}}{\def\eo{e}}%
 \doifrightpageelse{\def\lr{r}}{\def\lr{r}}%

(with and without \dontleavehmode\signalrightpage)
and now I get more wrong picture placements for the first picture on some 
pages...


you need to make sure that the signal travels with the stuff you're 
checking


btw, if you use side floats, the inner/outer variants do this auto 
left/right stuff


-
  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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-16 Thread Harald Koenig
On Mar 15, Wolfgang Schuster wrote:

> 
> > Am 15.03.2015 um 16:40 schrieb Harald Koenig 
> > :
> > 
> > Hi,
> > 
> > right now I use \currentreferencerealpage to detect if I'm on an even or 
> > odd page
> > (because my picture placement rules depend on it) like this:
> > 
> > \newcount\bildpage
> > \bildpage=1
> > % ...
> > \def\bild#1...{%
> > {\global\bildpage=\realpageno}%
> > \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
> > % ...
> > \if o\eo odd...\else even...\fi
> >\message{>> bildpage=\the\bildpage \space eo=\eo \space 
> > currentreferencerealpage=\currentreferencerealpage \space << }%
> > }
> > 
> > but now I notice that for some pages/pictures the value of 
> > \currentreferencerealpage
> > is not correct (only for the first picture on a new page?):-(
> 
> To test whether you’re on a left or right page you can use the 
> \signalrightpage and \doifrightpageelse commands

this doesn't seem to work well -- at least not within \placefigure

I've tried this replacement in my \bild macro which should be equivalent (or 
better?)

%   \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
%   \ifodd\bildpage \def\lr{r}\else \def\lr{l}\fi
\dontleavehmode\signalrightpage
\doifrightpageelse{\def\eo{o}}{\def\eo{e}}%
\doifrightpageelse{\def\lr{r}}{\def\lr{r}}%

(with and without \dontleavehmode\signalrightpage)
and now I get more wrong picture placements for the first picture on some 
pages...


I vaguely remember that 

 {\global\bildpage=\currentreferencerealpage}%
 {\global\bildpage=\realpageno}%

was a hack from Hans to work arround "issues" to get the real page number 
within those floats ?!


Harald
-- 
"I hope to die  ___   _
before I *have* to use Microsoft Word.",   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.<_/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] Styling captions inside \startcombination ... \stopcombination

2015-03-14 Thread Hans Hagen

On 3/14/2015 10:50 AM, Mojca Miklavec wrote:

Hello,

I'm using the following code to make the figure captions smaller:
 \setupcaptions[style={\switchtobodyfont[8pt]}]

Now I'm looking for the magic keywoard to also decrease the size of
captions inside combinations, as in the following case for example
(otherwise the "subcaptions" are too big in comparison):

\setupcaptions[style={\switchtobodyfont[8pt]}]
\setupexternalfigures[location={default}]
\starttext
   \placefigure{Cows in \ConTeXt}
 {\startcombination[2*1]
   {\mirror{\externalfigure[cow][width=4cm]}}{First cow}
   {\externalfigure[cow][width=4cm]}{Second cow}
   \stopcombination}
\stoptext


the obvious:

\setupcombinations[style={\switchtobodyfont[8pt]}]


-
  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] Styling captions inside \startcombination ... \stopcombination

2015-03-14 Thread Mojca Miklavec
Hello,

I'm using the following code to make the figure captions smaller:
\setupcaptions[style={\switchtobodyfont[8pt]}]

Now I'm looking for the magic keywoard to also decrease the size of
captions inside combinations, as in the following case for example
(otherwise the "subcaptions" are too big in comparison):

\setupcaptions[style={\switchtobodyfont[8pt]}]
\setupexternalfigures[location={default}]
\starttext
  \placefigure{Cows in \ConTeXt}
{\startcombination[2*1]
  {\mirror{\externalfigure[cow][width=4cm]}}{First cow}
  {\externalfigure[cow][width=4cm]}{Second cow}
  \stopcombination}
\stoptext

Thank you,
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
___

<    1   2   3   4   5   6   7   8   9   10   >