[NTG-context] Width of captions and notes in outer margin not correct on even pages

2024-01-09 Thread Milan cel Mare via ntg-context

Hi,

I have observed that the widths of captions and also notes on even pages
is not as I would expect them to be.

Reading through the documentation I figured out that the width for
captions has to be set manually when they are placed in the outer
margin. I did so by setting it to width=\outermarginwidth.

But it seems that for captions the width is derived from the inner
margin width on even pages.

The width of notes in the outer margin placed with \inouter is also off
on even pages. They are too narrow and do not "fill" the available space
(things seems to work for notes in inner margins though).

Here is an example:

\setuppapersize[A4]
\setuplayout[backspace=40mm, width=100mm, leftmargindistance=5mm,
leftmargin=30mm, rightmargindistance=5mm, rightmargin=50mm, topspace=10mm]
\setuppagenumbering[alternative=doublesided]
\setupcaptions[location={outermargin, low}, width=\outermarginwidth,
headcolor=red, color=green, style={\tfx\setupinterlinespace}, align=width]
\setupexternalfigures[location=default]
\setupmargindata[style={\tfx}, stack=yes]
\setupmargindata[inouter][color=orange]
\setupmargindata[ininner][color=blue]

\showframe

\starttext
\section{Margin Tests}
\input knuth
Some more stuff\inouter{Some multi-line text to be placed in the outer
margin to check whether it is positioned correctly.} to
read\inouter{Another multi-line text to be placed in the outer margin to
check whether it is positioned correctly.}.

\startplacefigure[title={A lengthy caption perfectly suited to perform
some tests, which cause lines to wrap.}]
{\externalfigure[cow][maxwidth=80mm]}
\stopplacefigure

More stuff\ininner{A1, A2, A3, A4 are well-known paper formats used in
Europe and in some other places.}.

\input zapf
Some more stuff\inouter{Some multi-line text to be placed in the outer
margin to check whether it is positioned correctly.} to read.

\startplacefigure[title=A SVG test with a long caption to cause line wraps.]
{\externalfigure[cow][maxwidth=70mm]}
\stopplacefigure

More stuff\ininner{A1, A2, A3, A4 are well-known paper formats used in
Europe and in some other places.} to read.

\input knuth

\stoptext


As a workaround the width for captions can be set to
width=\rightmarginwidth, but how can I solve the issue with the notes?

I am running ConteXt 2023.09.26 18:19 on Windows 10.

Thanks and best regards

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: floatcombinations seem to not work correctly after lmtx update

2023-08-01 Thread Hans Hagen

On 8/1/2023 7:34 PM, Gerion Entrup wrote:

Am Montag, 19. Juni 2023, 13:53:02 CEST schrieb Gerion Entrup via ntg-context:

In this minimal example everything works. However, in my real document
the subfigures have enormous space between them so just two pictures are
visible (see the attached png).


I finally found the cause. I had these lines in my header:
```
\setupcaptions[minwidth=0.95\textwidth,
way=bychapter,
prefixsegments=chapter]
```
In the new context, this seem to apply to all captions, while in the old
context, it seems to apply only to those captions that are not specified
otherwise.


gnerally a command like this applies to apply instances, contrary to
 \setupcaptions[instance][...]

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Re: floatcombinations seem to not work correctly after lmtx update

2023-08-01 Thread Gerion Entrup
Am Montag, 19. Juni 2023, 13:53:02 CEST schrieb Gerion Entrup via ntg-context:
> In this minimal example everything works. However, in my real document
> the subfigures have enormous space between them so just two pictures are
> visible (see the attached png).

I finally found the cause. I had these lines in my header:
```
\setupcaptions[minwidth=0.95\textwidth,
   way=bychapter,
   prefixsegments=chapter]
```
In the new context, this seem to apply to all captions, while in the old
context, it seems to apply only to those captions that are not specified
otherwise.

Best
Gerion


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
I'm not quite I understand:
Are you saying I should leave the caption in "global scope"?

Regarding the second version: Shouldn't that be:
\startlocalfootnotes
\footnotetext[asdf]{asdf} % this
%\footnotetext[asdf]{\footnote{asdf}} % instead of this
\startplacetable[title={A breakfast table.\note[asdf]}]
 \placelegend
 {\starttable[|l|r|]
 \HL
 \VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
 \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
\VL\LR
 \HL
 \stoptable}
 {\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 14:13
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] local footnotes and captions
> 
> On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > another experiment with footnotes in captions, this time local footnotes :
> >
> > %%%
> >
> > \setupcaptions[location=top]
> >
> > \starttext
> >
> >      \startlocalfootnotes
> >
> >      \placetable
> >
> >      % The caption
> >
> >      {A breakfast table.\footnote{asdf}}
> >
> >      % the table
> >
> >      \placelegend
> >
> >      {\starttable[|l|r|]
> >
> >      \HL
> >
> >      \VL Spam \footnote {lovely} \VL Bacon \footnote
> > {wonderful} \VL\FR
> >
> >      \VL Eggs \footnote {wonderful} \VL Spam \footnote
> > {lovely} \VL\LR
> >
> >      \HL
> >
> >      \stoptable}
> >
> >      % the footnotes
> >
> >      {\placelocalfootnotes}
> >
> > \stoplocalfootnotes
> >
> > \stoptext
> >
> > %%%
> >
> > Two observations :
> >
> > 1. the footnote numbering is a bit odd, shouldn’t the footnote in the
> > caption be numbered with 1?
> >
> > 2. The footnote in the caption is not included in the local footnotes.
> > Why is that?
> \starttext
> 
> \startplacetable[title={A breakfast table.\footnote{asdf}}]
>  \startlocalfootnotes
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
>  \stoplocalfootnotes
> \stopplacetable
> 
> \startlocalfootnotes
> \footnotetext[asdf]{\footnote{asdf}}
> \startplacetable[title={A breakfast table.\note[asdf]}]
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
> \stopplacetable
> \stoplocalfootnotes
> 
> \stoptext
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> __
> _
> If your question is of interest to others as well, please add an entry to the
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-
> context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> __
> _
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Hans Hagen via ntg-context

On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:

Hi,

another experiment with footnotes in captions, this time local footnotes :

%%%

\setupcaptions[location=top]

\starttext

     \startlocalfootnotes

     \placetable

     % The caption

     {A breakfast table.\footnote{asdf}}

     % the table

     \placelegend

     {\starttable[|l|r|]

     \HL

     \VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} 
\VL\FR


     \VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} 
\VL\LR


     \HL

     \stoptable}

     % the footnotes

     {\placelocalfootnotes}

\stoplocalfootnotes

\stoptext

%%%

Two observations :

1. the footnote numbering is a bit odd, shouldn’t the footnote in the 
caption be numbered with 1?


2. The footnote in the caption is not included in the local footnotes. 
Why is that?

\starttext

\startplacetable[title={A breakfast table.\footnote{asdf}}]
\startlocalfootnotes
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes
\stopplacetable

\startlocalfootnotes
\footnotetext[asdf]{\footnote{asdf}}
\startplacetable[title={A breakfast table.\note[asdf]}]
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

\stoptext


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
Hi,
another experiment with footnotes in captions, this time local footnotes :

%%%
\setupcaptions[location=top]
\starttext
\startlocalfootnotes
\placetable
% The caption
{A breakfast table.\footnote{asdf}}
% the table
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} \VL\LR
\HL
\stoptable}
% the footnotes
{\placelocalfootnotes}
\stoplocalfootnotes
\stoptext
%%%

Two observations :
1. the footnote numbering is a bit odd, shouldn't the footnote in the caption 
be numbered with 1?
2. The footnote in the caption is not included in the local footnotes. Why is 
that?

Denis

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Centering figures that extend into the margin

2022-04-20 Thread Willi Egger via ntg-context
Hi Yann,

I have not a solution for you  but I would like to point you to the “details” 
manual, where many of special placements of floats are discussed.

Kind regards

Willi

> On 20 Apr 2022, at 11:39, yann--- via ntg-context  wrote:
> 
> Hi,
> 
> I've been playing around with 'marginnote' layout similar to tufte's books.  
> The
> main thing that I can't figure out is how to centre figures that extend into 
> the
> margin.  These should take over the whole page, but the content of the figure
> should be centred, which is normally the case in normal figures.
> 
> Below is my try of defining a marginnote that does this, by calculating the
> textarea size and setting the width to that.  However, I can't seem to then
> figure out how to center the externalfigure inside of the figure.
> 
> Thanks in advance!
> Yann
> 
> \useMPlibrary[dum]
> 
> \setuplayout[
> edgedistance=1cm,
> backspace=2cm,
> rightmargin=4.5cm,
> leftmargin=0cm,
> topspace=1cm,
> header=1cm,
> footer=1cm,
> headerdistance=0.5cm,
> width=fit,
> height=fit,
> ]
> 
> \newdimen\LeftMarginSize
> \LeftMarginSize=\dimexpr \backspace + \rightmarginwidth + 
> \rightmargindistance \relax
> \newdimen\TextAreaSize
> \TextAreaSize=\dimexpr \textwidth + \rightmarginwidth + \rightmargindistance 
> \relax
> \definefloat[marginfigure][marginfigures][figure]
> \setupfloat[marginfigure][location=inner,default=top,width=\TextAreaSize]
> \setupcaptions[marginfigure][
> leftmargin=\dimexpr \LeftMarginSize / 2 \relax,
> location=bottom,
> width=\textwidth,
> ]
> \setuplabeltext[marginfigure=Figure~]
> \showframe
> 
> \starttext
> 
> \startplacemarginfigure
> \externalfigure[][width=13cm]
> \stopplacemarginfigure
> 
> \stoptext
> 
> -- 
> Yann Herklotz
> https://yannherklotz.com
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Centering figures that extend into the margin

2022-04-20 Thread yann--- via ntg-context
Hi,

I've been playing around with 'marginnote' layout similar to tufte's books.  The
main thing that I can't figure out is how to centre figures that extend into the
margin.  These should take over the whole page, but the content of the figure
should be centred, which is normally the case in normal figures.

Below is my try of defining a marginnote that does this, by calculating the
textarea size and setting the width to that.  However, I can't seem to then
figure out how to center the externalfigure inside of the figure.

Thanks in advance!
Yann

\useMPlibrary[dum]

\setuplayout[
  edgedistance=1cm,
  backspace=2cm,
  rightmargin=4.5cm,
  leftmargin=0cm,
  topspace=1cm,
  header=1cm,
  footer=1cm,
  headerdistance=0.5cm,
  width=fit,
  height=fit,
]

\newdimen\LeftMarginSize
\LeftMarginSize=\dimexpr \backspace + \rightmarginwidth + \rightmargindistance 
\relax
\newdimen\TextAreaSize
\TextAreaSize=\dimexpr \textwidth + \rightmarginwidth + \rightmargindistance 
\relax
\definefloat[marginfigure][marginfigures][figure]
\setupfloat[marginfigure][location=inner,default=top,width=\TextAreaSize]
\setupcaptions[marginfigure][
  leftmargin=\dimexpr \LeftMarginSize / 2 \relax,
  location=bottom,
  width=\textwidth,
]
\setuplabeltext[marginfigure=Figure~]
\showframe

\starttext

\startplacemarginfigure
\externalfigure[][width=13cm]
\stopplacemarginfigure

\stoptext

-- 
Yann Herklotz
https://yannherklotz.com
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Table disappears in floatcombination

2021-03-28 Thread Christoph Reller
On Mon, Jan 4, 2021 at 7:59 PM Christoph Reller 
wrote:

> On Sat, Dec 26, 2020 at 3:01 PM Hans Hagen  wrote:
>
>> On 12/26/2020 2:56 PM, Christoph Reller wrote:
>> >
>> > On Sat, Dec 26, 2020 at 10:54 AM Hans Hagen > > <mailto:j.ha...@xs4all.nl>> wrote:
>> >
>> > On 12/25/2020 9:47 PM, Christoph Reller wrote:
>> >  > Hi,
>> >  >
>> >  > Consider the following MWE:
>> >  >
>> >  > \definefloat[combination][figure]
>> >  > \setupcaptions[
>> >  >number=no, %<- comment and table appears
>> >  >align=flushright]
>> >  > \starttext
>> >  > \startplacecombination[title=Combination]
>> >  >\startfloatcombination
>> >  >  \startplacetable%[title=Table] %<- uncomment and table
>> appears
>> >  >\bTABLE \bTR \bTD Cell \eTD \eTR \eTABLE
>> >  >  \stopplacetable
>> >  >\stopfloatcombination
>> >  > \stopplacecombination
>> >  > \stoptext
>> >  >
>> >  > In the latest LMTX version of ConTeXt, the table is not shown.
>> > (In MKIV
>> >  > it is present.) Either commenting line 3 or activating the table
>> > title
>> >  > in line 8 makes the table appear.
>> >
>> > what version of mkiv did you test?
>> >
>> >
>> > Okay, the MKIV version is a little bit dated: 2018.05.19_21.46.
>> > Still: How can I get floats without captions within a
>> > floatcombination environment?
>> I (or Wolfgang) needs to look into it, maybe something got lost.
>>
>
> I hope that you find the time to solve this issue. Disappearing tables are
> not so nice :(
> Your work is much appreciated!
>

Just a reminder that this issue still persists in the latest version of
ConTeXt LMTX. A fix would be highly appreciated.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Table disappears in floatcombination

2020-12-26 Thread Christoph Reller
On Sat, Dec 26, 2020 at 10:54 AM Hans Hagen  wrote:

> On 12/25/2020 9:47 PM, Christoph Reller wrote:
> > Hi,
> >
> > Consider the following MWE:
> >
> > \definefloat[combination][figure]
> > \setupcaptions[
> >number=no, %<- comment and table appears
> >align=flushright]
> > \starttext
> > \startplacecombination[title=Combination]
> >\startfloatcombination
> >  \startplacetable%[title=Table] %<- uncomment and table appears
> >\bTABLE \bTR \bTD Cell \eTD \eTR \eTABLE
> >  \stopplacetable
> >\stopfloatcombination
> > \stopplacecombination
> > \stoptext
> >
> > In the latest LMTX version of ConTeXt, the table is not shown. (In MKIV
> > it is present.) Either commenting line 3 or activating the table title
> > in line 8 makes the table appear.
>
> what version of mkiv did you test?
>

Okay, the MKIV version is a little bit dated: 2018.05.19_21.46.
Still: How can I get floats without captions within a
floatcombination environment?
Christoph
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Table disappears in floatcombination

2020-12-26 Thread Hans Hagen

On 12/25/2020 9:47 PM, Christoph Reller wrote:

Hi,

Consider the following MWE:

\definefloat[combination][figure]
\setupcaptions[
   number=no, %<- comment and table appears
   align=flushright]
\starttext
\startplacecombination[title=Combination]
   \startfloatcombination
     \startplacetable%[title=Table] %<- uncomment and table appears
       \bTABLE \bTR \bTD Cell \eTD \eTR \eTABLE
     \stopplacetable
   \stopfloatcombination
\stopplacecombination
\stoptext

In the latest LMTX version of ConTeXt, the table is not shown. (In MKIV 
it is present.) Either commenting line 3 or activating the table title 
in line 8 makes the table appear.


what version of mkiv did you test?

Also, once the captions appear, they don't align on the right side. When 
changing the caption alignment to "align=flushleft", they align 
perfectly on the left side.


Am I doing something wrong?

Cheers,

Christoph

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Table disappears in floatcombination

2020-12-25 Thread Christoph Reller
Hi,

Consider the following MWE:

\definefloat[combination][figure]
\setupcaptions[
  number=no, %<- comment and table appears
  align=flushright]
\starttext
\startplacecombination[title=Combination]
  \startfloatcombination
\startplacetable%[title=Table] %<- uncomment and table appears
  \bTABLE \bTR \bTD Cell \eTD \eTR \eTABLE
\stopplacetable
  \stopfloatcombination
\stopplacecombination
\stoptext

In the latest LMTX version of ConTeXt, the table is not shown. (In MKIV it
is present.) Either commenting line 3 or activating the table title in line
8 makes the table appear.

Also, once the captions appear, they don't align on the right side. When
changing the caption alignment to "align=flushleft", they align perfectly
on the left side.

Am I doing something wrong?

Cheers,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Subfigures, referencing and resetting counter

2020-11-18 Thread Marco Patzer
Hi!

I struggle with referencing subfigures. Combinations can't be
referenced to my knowledge, that's why I went with another float for
the inner subfigure. Example:


\useMPlibrary[dum]

\definefloat
  [subfigure]
  [subfigures]
  [figure]

\setupcaptions
  [subfigure]
  [numberconversion=characters,
   numberstopper=)]

\setuplabeltext
  [subfigure=]

\definecounter
  [subfigure]
  [way=bytext]

\starttext

\startplacefigure [title=First, reference=first]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [reference=fig:firstsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

\startplacefigure [title=Second, reference=second]
  \startfloatcombination [nx=2, ny=1]
\startplacesubfigure
  \externalfigure
\stopplacesubfigure
\startplacesubfigure [title=beta, reference=fig:secondsub]
  \externalfigure
\stopplacesubfigure
  \stopfloatcombination
\stopplacefigure

See \in{figure}[first],
\in{figure}[fig:firstsub] and
\in{figure}[fig:secondsub].

\stoptext


How to reset the counter for the subfigure to start anew for each
new figure?

The second issue is the referencing of subfigures. The MWE shows
“figure b)” and “figure d)” rather than “figure 1b)” and “figure
2b)”. How to include the outer float counter in the reference?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Sylvain Hubert
Hi Andrés,

You could probably put the notes inside a \start...\stopxtablefoot

Sylvain

On Tue, 10 Nov 2020 at 21:49, Andres Conrado Montoya <
andresconr...@gmail.com> wrote:

> MWE (sorry for the long table, I hadn't anything else at hand):
>
> 
> \definehighlight[emph][style={\em}]
> \definehighlight[strong][style={\bf}]
>
> \setupfloat[table][default={here}]
>
> \definereferenceformat[figura][text={Figura~}]
> \definereferenceformat[tabla][text={Tabla~}]
>
> \setupcaptions[style={\sans\small},
>   width=max,
>   prefix=no,
>   align={flushleft,nothyphenated},
>   way=bytext]
> \setupcaption[table][location=top]
>
> \setupthinrules[width=15em] % width of horizontal rules
>
> \setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans]
> \setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold]
> \setupxtable[body][bottomframe=on]
> \setupxtable[foot][bottomframe=on]
>
> \define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop}
>
> \define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop}
>
> \starttext
> \reference[tbl:t03]{}%
> \startplacetable[title={Composición química y valor energético de recursos
> forrajeros de corte en el área de influencia del Subproyecto Carne Bovina
> (trópico de altura).}]
> \startxtable[option=tight,bodyfont=7pt]
> \startxtablehead[head]
> \startxrow
> \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
> \stopxcell
> \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
> de corte} \stopxcell
> \startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)}
> \stopxcell
> \startxcell[align=middle,width=.05\textwidth] \strong{MS
> (\letterpercent{})} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
>  (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
> (\letterpercent{} MS)} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx
> (Mcal/kg MS)}} \stopxcell
> \stopxrow
> \stopxtablehead
> \startxtablebody[body]
> \startxrow
> \startxcell[align=right,ny=2] 1800-1860 \stopxcell
> \startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x
> \emph{P. thyphoides}) \stopxcell
> \startxcell[align=middle] 90 \stopxcell
> \startxcell[align=middle] 29,0 \stopxcell
> \startxcell[align=middle] 10,6 \stopxcell
> \startxcell[align=middle] 64,1 \stopxcell
> \startxcell[align=middle] 30,8 \stopxcell
> \startxcell[align=middle] 1,92 \stopxcell
> \startxcell[align=middle] 1,08 \stopxcell
> \startxcell[align=middle] 0,52 \stopxcell
> \startxcell[align=middle] 1,19 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 210 \stopxcell
> \startxcell[align=middle] 27,8 \stopxcell
> \startxcell[align=middle] 6,2 \stopxcell
> \startxcell[align=middle] 69,1 \stopxcell
> \startxcell[align=middle] 33,6 \stopxcell
> \startxcell[align=middle] 1,78 \stopxcell
> \startxcell[align=middle] 0,94 \stopxcell
> \startxcell[align=middle] 0,40 \stopxcell
> \startxcell[align=middle] 1,09 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=right,ny=3] 1800-2186 \stopxcell
> \startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P.
> purpureum} x \emph{P. typhoides}) \stopxcell
> \startxcell[align=middle] 91 \stopxcell
> \startxcell[align=middle] 22,3 \stopxcell
> \startxcell[align=middle] 8,7 \stopxcell
> \startxcell[align=middle] 65,4 \stopxcell
> \startxcell[align=middle] 32,1 \stopxcell
> \startxcell[align=middle] 1,86 \stopxcell
> \startxcell[align=middle] 1,02 \stopxcell
> \startxcell[align=middle] 0,46 \stopxcell
> \startxcell[align=middle] 1,14 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 150 \stopxcell
> \startxcell[align=middle] 23,6 \stopxcell
> \startxcell[align=middle] 7,2 \stopxcell
> \startxcell[align=middle] 66,9 \stopxcell
> \startxcell[align=middle] 32,8 \stopxcell
> \startxcell[align=middle] 1,81 \stopxcell
> \startxcell[align=middle] 0,98 \stopxcell
> \startxcell[align=middle] 0,42 \stopxcell
> \startxcell[align=middle] 1,11 \stopxcell
> \stopxrow
> \startxrow
> \startxcell[align=middle] 182 \stopxcell
> \startxcell[align=middle] 27,0 \stop

[NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?

2020-11-10 Thread Andres Conrado Montoya
MWE (sorry for the long table, I hadn't anything else at hand):


\definehighlight[emph][style={\em}]
\definehighlight[strong][style={\bf}]

\setupfloat[table][default={here}]

\definereferenceformat[figura][text={Figura~}]
\definereferenceformat[tabla][text={Tabla~}]

\setupcaptions[style={\sans\small},
  width=max,
  prefix=no,
  align={flushleft,nothyphenated},
  way=bytext]
\setupcaption[table][location=top]

\setupthinrules[width=15em] % width of horizontal rules

\setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans]
\setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold]
\setupxtable[body][bottomframe=on]
\setupxtable[foot][bottomframe=on]

\define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop}
\define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop}

\starttext
\reference[tbl:t03]{}%
\startplacetable[title={Composición química y valor energético de recursos
forrajeros de corte en el área de influencia del Subproyecto Carne Bovina
(trópico de altura).}]
\startxtable[option=tight,bodyfont=7pt]
\startxtablehead[head]
\startxrow
\startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
\stopxcell
\startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
de corte} \stopxcell
\startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)}
\stopxcell
\startxcell[align=middle,width=.05\textwidth] \strong{MS
(\letterpercent{})} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
 (\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx
(Mcal/kg MS)}} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[align=right,ny=2] 1800-1860 \stopxcell
\startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x
\emph{P. thyphoides}) \stopxcell
\startxcell[align=middle] 90 \stopxcell
\startxcell[align=middle] 29,0 \stopxcell
\startxcell[align=middle] 10,6 \stopxcell
\startxcell[align=middle] 64,1 \stopxcell
\startxcell[align=middle] 30,8 \stopxcell
\startxcell[align=middle] 1,92 \stopxcell
\startxcell[align=middle] 1,08 \stopxcell
\startxcell[align=middle] 0,52 \stopxcell
\startxcell[align=middle] 1,19 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 210 \stopxcell
\startxcell[align=middle] 27,8 \stopxcell
\startxcell[align=middle] 6,2 \stopxcell
\startxcell[align=middle] 69,1 \stopxcell
\startxcell[align=middle] 33,6 \stopxcell
\startxcell[align=middle] 1,78 \stopxcell
\startxcell[align=middle] 0,94 \stopxcell
\startxcell[align=middle] 0,40 \stopxcell
\startxcell[align=middle] 1,09 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,ny=3] 1800-2186 \stopxcell
\startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P.
purpureum} x \emph{P. typhoides}) \stopxcell
\startxcell[align=middle] 91 \stopxcell
\startxcell[align=middle] 22,3 \stopxcell
\startxcell[align=middle] 8,7 \stopxcell
\startxcell[align=middle] 65,4 \stopxcell
\startxcell[align=middle] 32,1 \stopxcell
\startxcell[align=middle] 1,86 \stopxcell
\startxcell[align=middle] 1,02 \stopxcell
\startxcell[align=middle] 0,46 \stopxcell
\startxcell[align=middle] 1,14 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 150 \stopxcell
\startxcell[align=middle] 23,6 \stopxcell
\startxcell[align=middle] 7,2 \stopxcell
\startxcell[align=middle] 66,9 \stopxcell
\startxcell[align=middle] 32,8 \stopxcell
\startxcell[align=middle] 1,81 \stopxcell
\startxcell[align=middle] 0,98 \stopxcell
\startxcell[align=middle] 0,42 \stopxcell
\startxcell[align=middle] 1,11 \stopxcell
\stopxrow
\startxrow
\startxcell[align=middle] 182 \stopxcell
\startxcell[align=middle] 27,0 \stopxcell
\startxcell[align=middle] 6,7 \stopxcell
\startxcell[align=middle] 68,8 \stopxcell
\startxcell[align=middle] 35,6 \stopxcell
\startxcell[align=middle] 1,77 \stopxcell
\startxcell[align=middle] 0,93 \stopxcell
\startxcell[align=middle] 0,38 \stopxcell
\startxcell[align=middle] 1,08 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right,ny=3] 1800-1850 \stopxcell
\startxcell[align=right,ny=3] \strong{King Grass morado} \crlf
(\emph{Pennisetum purpureum}) \stopxcell
\startxcell[align=middle] 98 \stopxcell
\startxcell[align=middle] 20,8 \stopxcell
\startxcell[align=middle] 13,1 \stopxcell
\startxcell[align=middle] 62,3 \stopxcell
\startxcell[align=middle] 30,8 \stopxcell
\startxcell[align=middle] 1,99 \stopxcell
\startxcell[align=middle

Re: [NTG-context] footnotes in captions in floatcombinations

2020-10-11 Thread Henning Hraban Ramm
Hi, I still would be happy about answers to the following questions:

> Am 02.10.2020 um 12:13 schrieb Henning Hraban Ramm :
> 
> - Would it be possible to do the footnote numbering after the float 
> placement, so that a footnote in a float caption keeps the reading order of 
> numbers and gets its place on the right page?
> 
> – As a workaround, how can I use \placefigure in the middle of a paragraph 
> without breaking it?


And I isolated another problem, or even two:


\usemodule[visual]
\definecolor[fakerulecolor][c=.2,m=.1,k=.2]
\useMPlibrary[dum]
\automigrateinserts % nop in LMTX
\showframe
\setupcaptions[
  headstyle={\ss\bfx},
  align={flushleft,high},
  prefixsegments=none,
  location={bottom,low},
  hang=yes,
]
\setupfootnotes[
  width=\textwidth,
]

\starttext

\startplacefigure[location=page,title={\fakewords{5}{7}\footnote{\fakewords{20}{30}}}]%
 rId128
\externalfigure[dummy][width=\textwidth,height=.66\textheight]
\stopplacefigure

\fakewords{5}{10}

\stoptext


In this example, the footnote is broken to the next page, even if there’s 
plenty of space.
How can I avoid that?
If I put it in a \vbox, the footnote number is too low.

Additionally and strangely, the float page is doubled. I experienced that 
sometimes with last pages of documents. That must be a bug.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] footnotes in captions in floatcombinations

2020-09-20 Thread Henning Hraban Ramm


> Am 20.09.2020 um 13:59 schrieb Henning Hraban Ramm :
>>>> In MkIV I get images and footnotes, but the width of the footnotes is 
>>>> always that of the image.
>>>> 
>>>> In LMTX I don’t get anything.
>>> Current state (v. 2020.09.18 20:32):
>>> Some progress: Footnotes are still as wide as the image they belong to (in 
>>> both versions), but in LMTX some footnotes are missing.
>> mwe missing
> 
> Regarding the width it’s still the same MWE (slightly adapted), apparently 
> not related to floatcombinations but a general problem of footnotes in 
> captions; couldn’t reproduce “some missing” in an MWE yet.

I found another problem with captions in floatcombinations: They are always 
bottom-aligned to each other, so that the distance between image and caption 
differs. This is the same in current LMTX and MkIV.

Hraban


\usemodule[visual]
\definecolor[fakerulecolor][c=.2,m=.1,k=.2]
\useMPlibrary[dum]
\automigrateinserts % nop in LMTX
\showframe
\setupcaptions[
  headstyle={\ss\bfx},
  align={flushleft,high},
  hang=yes,
]

\starttext

\fakewords{10}{30}

% Footnotes, but no combination
%\startplacefigure[location=none]
%\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}\footnote[f:1]{\fakewords{10}{30}}}]
\externalfigure[001][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}\footnote[f:2]{\fakewords{10}{30}}}]
\externalfigure[002][width=.62\textwidth]
\stopplacefigure
%\stopfloatcombination
%\stopplacefigure

\fakewords{20}{30}

% both
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}\footnote[f:3]{\fakewords{10}{30}}}]
\externalfigure[003][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}\footnote[f:4]{\fakewords{10}{30}}}]
\externalfigure[004][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\fakewords{10}{30}

% combination without footnotes
\startplacefigure[location=none]
\startfloatcombination[2*1]
\startplacefigure[title={\fakewords{5}{10}}]
\externalfigure[005][width=.34\textwidth]
\stopplacefigure
\startplacefigure[title={\fakewords{5}{10}}]
\externalfigure[006][width=.62\textwidth]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

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


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Otared Kavian
Hi,

If there are a few special numberings of floats, and one wants floats numbered 
1.6a and 1.6b, the following seems to work:

Best regards: Otared

%%% begin ownnumber-in-floats.tex
\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title={A section}] 
\start
\setupcaptions[numberstopper={a}]
\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure
\stop
\stopsection

\setcounter[figure][5]

\startsection[ownnumber=11,title={Another section}] % ownnumber doesn’t work
\start
\setupcaptions[numberstopper={b}]
\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure
\stop

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\stopsection

\stoptext
%%% end ownnumber-in-floats.tex

> On 24 Aug 2020, at 19:37, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
>> :
>> 
>> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
>>>> Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
>>>> 
>>>> I think there was a question on this very recently but I don;t think it 
>>>> got an answer and I can't find it to reply to, so apologies for the extra 
>>>> noise. I have a large text with floats numbered sequentially by chapter 
>>>> and then figure/table number, but at the last minute I've had a request 
>>>> for two figures in a particular chapter to become 27.1a and 27.1b instead 
>>>> of 27.1 and 27.2. It's not a combination - they are separate figures on 
>>>> different pages.
>>>> 
>>>> I've experimented with the options I can see, but it's not obvious if 
>>>> there is a facility to override the numbering of two figures in a stream 
>>>> of normally numbered figures like this. I was thinking of the equivalent 
>>>> of the old \sym{symbol} command that used to work as a way to override a 
>>>> single item in an otherwise sequential list.
>>>> 
>>>> I guess there's a brute force method of setting up a new type of figure 
>>>> with the label "Figure 27.1" and having them numbered as lowercase alpha, 
>>>> but if there's an easier way that would be great.
>>> I’m also interested in overriding automatical numbering, e.g. of chapters 
>>> or itemization items.
>>> E.g. in my songbook, I’d like to have the verses numbered but interrupted 
>>> by a chorus numbered as "C" (i.e. "R" in German).
>>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>>> numbering like 1, 2, 3, 3a, 4, 7...
>>> Something like
>>> \startitem[number={R}]
>>> or
>>> \startsection[number={3a}]
>>> would be nice.
>>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>>> otherwise continue counting from the previous calculated number. Would that 
>>> be possible?
>> 
>> 
>> You can set your own section numbers but the counter isn't stopped.
> 
> Thank you! I overlooked "ownnumber". It works for sections, but not for items 
> or floats.
> 
> \setnumber[section][10] doesn’t work, \setcounter the same (according to the 
> source they’re synonymous) – does section use a different counter name or is 
> it no counter at all?
> 
> \setnumber[figure][10] works (but only with integers, not some alphanumerical 
> stuff, sorry Duncan).
> 
> Hraban
> 
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \startsection[title=One]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \startsection[title=Two]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[figure][5] % next figure is no.6
> 
> \startsection[ownnumber=10,title=???] % ownnumber doesn’t work
> \startplacefigure[title=Test,ownnumber=10]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[section][5] % doesn’t work
> 
> \startsection[title=Three]
> \startitemize[n]
>  \item one
>  \item two
>  \item three
>  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
> \stopitemize
> \stopsection
> 
> \stoptext
> 
> ___
> If your question is of interest to others as well, ple

Re: [NTG-context] Same counter for figures as theorems

2020-08-18 Thread Tim Steenvoorden
Hi Taco,

Thanks! This works for me.

It indeed seems at least inconsistent. Also, using
\definecounter[enumeration][object]
instead of
\setupenumeration[enumeration][counter=object]
Numbers figures correctly but forgets the object counter in enumerations, it 
numbers 1.1., 1.1., 1.1., ...

Hans: is this indeed the intended way it should work?

Cheers,
Tim


T.J. Steenvoorden, MSc

PhD Candidate | Radboud University Nijmegen
Faculty of Science | Department of Software Science
Mercator 1 Building | Room 01.08
Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands
+31 24 365 22 91 | t...@cs.ru.nl
On 14 Aug 2020, 23:12 +0200, Taco Hoekwater , wrote:
> Hi Tim,
>
> I misunderstood your goal, sorry. Proposed setup below.
>
>
> But first, what I think is a bug in ConTeXt:
>
> Neither
> \setupcaptions
> [counter=object]
> nor
> \setupcaption
> [figure]
> [counter=object]
>
> work. the caption always falls back to the ‘current float counter’; figure or 
> table or …
>
> For the singular explicit \setupcaption[figure], I think this is a bug.
>
>
> The solution I found is to blatantly redefine the ‘figure’ counter, that 
> works!
>
>
> Second, it seems that \setupenumerations does not modify the counter of an 
> explicit defined enumeration, so you need to use the explicit 
> \setupenumeration[enumeration] form. This may be intentional, I do not know 
> for sure.
>
>
>
> Here is what I believe is the required code for your desired effect 
> (re-indented for Hans' style):
>
> \setupcaptions
> [way=bysection,
> prefixsegments=chapter:section]
>
> \setupenumerations
> [prefix=yes,
> prefixsegments=chapter:section]
>
> \defineenumeration
> [enumeration]
> [text=Enumeration]
>
> \definecounter
> [object]
> [way=bysection]
>
> \setupenumeration
> [enumeration]
> [counter=object]
>
> \definecounter
> [figure]
> [object]
>
> Best wishes,
> Taco
>
>
> > On 14 Aug 2020, at 09:49, Tim Steenvoorden  
> > wrote:
> >
> > Hi Taco,
> >
> > Thanks for your example and the pointer to make a MWE.
> >
> > Sadly, it doesn’t work for me. It numbers the first enumeration 1.1.1 and 
> > the first figure _also_ 1.1.1, which I’d like to be 1.1.2.
> >
> > This time, you’ll find the code and the output pdf in the attachment!
> >
> > Cheers,
> > Tim
> >
> >
> > P.S. I’m on Context MacTeX/TeXLive 2020:
> >
> > mtx-context | ConTeXt Process Management 1.03
> > mtx-context |
> > mtx-context | main context file: 
> > /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkiv
> > mtx-context | current version: 2020.03.10 14:44
> > mtx-context | main context file: 
> > /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkxl
> > mtx-context | current version: 2020.03.10 14:44
> > On 13 Aug 2020, 13:12 +0200, Taco Hoekwater , wrote:
> > >
> > >
> > > > On 13 Aug 2020, at 10:06, Tim Steenvoorden  
> > > > wrote:
> > > >
> > > > Hi all,
> > > >
> > > > Anybody some pointers?
> > >
> > > Next time, prepare a minimal (non)working example. Because the attachment 
> > > works for me.
> > >
> > > Best wishes,
> > > Taco
> > >
> > >
> > >
> > >
> > >
> > > ___
> > > If your question is of interest to others as well, please add an entry to 
> > > the Wiki!
> > >
> > > maillist : ntg-context@ntg.nl / 
> > > http://www.ntg.nl/mailman/listinfo/ntg-context
> > > webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> > > archive : https://bitbucket.org/phg/context-mirror/commits/
> > > wiki : http://contextgarden.net
> > > ___
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > ___
>
> Taco Hoekwater
> Elvenkind BV
>
>
>
>
> _

Re: [NTG-context] Same counter for figures as theorems

2020-08-14 Thread Taco Hoekwater
Hi Tim,

I misunderstood your goal, sorry. Proposed setup below.


But first, what I think is a bug in ConTeXt:

Neither
  \setupcaptions
[counter=object]
nor
  \setupcaption
[figure]
[counter=object]

work. the caption always falls back to the ‘current float counter’; figure or 
table or …

For the singular explicit \setupcaption[figure], I think this is a bug.


The solution I found is to blatantly redefine the ‘figure’ counter, that works!


Second, it seems that \setupenumerations does not modify the counter of an 
explicit defined enumeration, so you need to use the explicit 
\setupenumeration[enumeration] form. This may be intentional, I do not know for 
sure.



Here is what I believe is the required code for your desired effect 
(re-indented for Hans' style):

\setupcaptions
  [way=bysection,
   prefixsegments=chapter:section]

\setupenumerations
  [prefix=yes,
   prefixsegments=chapter:section]

\defineenumeration
  [enumeration]
  [text=Enumeration]

\definecounter
  [object]
  [way=bysection]

\setupenumeration
  [enumeration]
  [counter=object]

\definecounter
  [figure]
  [object]

Best wishes,
Taco


> On 14 Aug 2020, at 09:49, Tim Steenvoorden  wrote:
> 
> Hi Taco,
> 
> Thanks for your example and the pointer to make a MWE.
> 
> Sadly, it doesn’t work for me. It numbers the first enumeration 1.1.1 and the 
> first figure _also_ 1.1.1, which I’d like to be 1.1.2.
> 
> This time, you’ll find the code and the output pdf in the attachment!
> 
> Cheers,
> Tim
> 
> 
> P.S. I’m on Context MacTeX/TeXLive 2020:
> 
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | main context file: 
> /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.03.10 14:44
> mtx-context | main context file: 
> /usr/local/texlive/2020basic/texmf-dist/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.03.10 14:44
> On 13 Aug 2020, 13:12 +0200, Taco Hoekwater , wrote:
>> 
>> 
>>> On 13 Aug 2020, at 10:06, Tim Steenvoorden  
>>> wrote:
>>> 
>>> Hi all,
>>> 
>>> Anybody some pointers?
>> 
>> Next time, prepare a minimal (non)working example. Because the attachment 
>> works for me.
>> 
>> Best wishes,
>> Taco
>> 
>> 
>> 
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Same counter for figures as theorems

2020-08-13 Thread Tim Steenvoorden
Hi all,

Anybody some pointers?

Cheers,
Tim
On 11 Aug 2020, 11:41 +0200, Tim Steenvoorden , 
wrote:
> Hi all,
>
> I’ve a text where chapters are numbered 1, 2, 3, … and sections 1.1, 1.2, 
> 1.3, …
> Now I’d like all elements (figures, tables, examples, definitions, theorems, 
> …) to be numbered consecutively prefixed by the chapter and section number, 
> so 1.1.1, 1.1.2, 1.2.1, ...
>
> I’ve managed to change figure/table captions to do this by:
>
> \setupcaptions[
>   way=bysection,
>   prefixsegments=chapter:section,
> ]
>
> And I’ve setup my enumerations by:
>
> \setupenumerations[
>   way=bysection,
>   prefix=yes,
>   prefixsegments=chapter:section,
> ]
>
> But how do I use the same counter for figures, tables, and all enumerations?
> Trying to share a counter with:
>
> \definecounter[object][
>   way=bysection,
>   prefix=yes,
>   prefixsegments=chapter:section,
> ]
> \setupenumerations[
>   counter=object,
> ]
> \setupcaptions[
>   counter=object,
> ]
>
> Results in enumerations numbered 1, 2, 3, ... instead of 1.1.1, 1.1.2, 1.1.3, 
> … And figures and tables are still numbered in the default way.
>
> Cheers,
> Tim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Same counter for figures as theorems

2020-08-11 Thread Tim Steenvoorden
Hi all,

I’ve a text where chapters are numbered 1, 2, 3, … and sections 1.1, 1.2, 1.3, …
Now I’d like all elements (figures, tables, examples, definitions, theorems, …) 
to be numbered consecutively prefixed by the chapter and section number, so 
1.1.1, 1.1.2, 1.2.1, ...

I’ve managed to change figure/table captions to do this by:

\setupcaptions[
  way=bysection,
  prefixsegments=chapter:section,
]

And I’ve setup my enumerations by:

\setupenumerations[
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]

But how do I use the same counter for figures, tables, and all enumerations?
Trying to share a counter with:

\definecounter[object][
  way=bysection,
  prefix=yes,
  prefixsegments=chapter:section,
]
\setupenumerations[
  counter=object,
]
\setupcaptions[
  counter=object,
]

Results in enumerations numbered 1, 2, 3, ... instead of 1.1.1, 1.1.2, 1.1.3, … 
And figures and tables are still numbered in the default way.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Wolfgang Schuster

Otared Kavian schrieb am 01.06.2020 um 14:30:

Hi all,

Is it possible to write the individual captions for each element of a 
combination of floats above it, while the caption for the figure appears below?

\startplacefigure[title={A combination of three figures}] % this title appears 
below the figure
\startcombination[3*1]
{\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
image-1
{\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
image-2
{\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
image-3
\stopcombination}{}
\stopplacefigure

I tried to define a new float, say myfigure, which has captions below and then 
I tried

\setupcaptions[location=top]

and

\setupcombinations[location=top]

but this does not work…


The label position in combinations is fixed and the easiest way to 
create your own combination is to use a table.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Otared Kavian
Hi Tomás,

Thank you for your help. That works for the simple combination I sent to the 
list, but it does not work for another case in my document where I have several 
combinations, as in the following:

\startplacefigure[location=none]
\startcombination[1*2]
{\startcombination[2*1]

{\framed[width=6cm]{a}}{\externalfigure[image-1.pdf][width=6cm]} %{a} 
{\startcombination[1*2]

{\framed[width=10cm]{b}}{\externalfigure[image-2.pdf][width=10cm]} %{b}

{\framed[width=10cm]{c}}{\externalfigure[-image-3.pdf][width=10cm]} %{c}
\stopcombination}{}
\stopcombination}{}
{\startcombination[1*2]

{\framed[width=20cm]{d}}{\externalfigure[image-4.pdf][width=20cm]} %{d}
{\startcombination[2*1]

{\framed[width=7cm]{e}}{\externalfigure[image-5.pdf][width=7cm]} %{e}

{\framed[width=8cm]{f}}{\externalfigure[image-6.pdf][width=8cm]} %{f}
\stopcombination}{}
\stopcombination}{}
\stopcombination
\stopplacefigure

Here the first group containing image-1 and image-2, image-3 is misplaced.

Maybe there is a right setup for this, even if I don't have a caption below the 
whole figure (in the above figure I can avoid a caption).

Thanks again: Otared

> On 1 Jun 2020, at 14:51, Tomas Hala  wrote:
> 
> Hi Otared,
> 
> maybe there is a better, more system solution, but the following works:
> 
> \setupcaptions[figure][location=bottom]
> \startplacefigure[title={A combination of three figures}] % this title 
> appears below the figure
>  \startcombination[3*1]
>{\framed[width=4cm]{a}}{\externalfigure[image-1.pdf][width=4cm]} % a 
> appears above image-1
>{\framed[width=4cm]{b}}{\externalfigure[image-2.pdf][width=4cm]} % b 
> appears above image-2
>{\framed[width=4cm]{c}}{\externalfigure[image-3.pdf][width=4cm]} % c 
> appears above image-3
>  \stopcombination}{}
> \stopplacefigure
> 
> Best wishes,
> 
> Tomáš
> 
> Mon, Jun 01, 2020 ve 02:30:49PM +0200 Otared Kavian napsal(a):
> # Hi all,
> # 
> # Is it possible to write the individual captions for each element of a 
> combination of floats above it, while the caption for the figure appears 
> below?
> # 
> # \startplacefigure[title={A combination of three figures}] % this title 
> appears below the figure
> # \startcombination[3*1]
> # {\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
> image-1
> # {\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
> image-2
> # {\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
> image-3
> # \stopcombination}{}
> # \stopplacefigure
> # 
> # I tried to define a new float, say myfigure, which has captions below and 
> then I tried 
> # 
> # \setupcaptions[location=top] 
> # 
> # and 
> # 
> # \setupcombinations[location=top]
> # 
> # but this does not work…
> # 
> # Thanks for any help: Otared
> # 
> ___
> # If your question is of interest to others as well, please add an entry to 
> the Wiki!
> # 
> # maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> # webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> # archive  : https://bitbucket.org/phg/context-mirror/commits/
> # wiki : http://contextgarden.net
> # 
> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Tomas Hala
Hi Otared,

maybe there is a better, more system solution, but the following works:

\setupcaptions[figure][location=bottom]
\startplacefigure[title={A combination of three figures}] % this title appears 
below the figure
  \startcombination[3*1]
{\framed[width=4cm]{a}}{\externalfigure[image-1.pdf][width=4cm]} % a 
appears above image-1
{\framed[width=4cm]{b}}{\externalfigure[image-2.pdf][width=4cm]} % b 
appears above image-2
{\framed[width=4cm]{c}}{\externalfigure[image-3.pdf][width=4cm]} % c 
appears above image-3
  \stopcombination}{}
\stopplacefigure

Best wishes,

Tomáš

Mon, Jun 01, 2020 ve 02:30:49PM +0200 Otared Kavian napsal(a):
# Hi all,
# 
# Is it possible to write the individual captions for each element of a 
combination of floats above it, while the caption for the figure appears below?
# 
# \startplacefigure[title={A combination of three figures}] % this title 
appears below the figure
#   \startcombination[3*1]
#   {\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
image-1
#   {\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
image-2
#   {\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
image-3
#   \stopcombination}{}
# \stopplacefigure
# 
# I tried to define a new float, say myfigure, which has captions below and 
then I tried 
# 
# \setupcaptions[location=top] 
# 
# and 
# 
# \setupcombinations[location=top]
# 
# but this does not work…
# 
# Thanks for any help: Otared
# 
___
# If your question is of interest to others as well, please add an entry to the 
Wiki!
# 
# maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
# webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
# archive  : https://bitbucket.org/phg/context-mirror/commits/
# wiki : http://contextgarden.net
# 
___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Otared Kavian
Hi all,

Is it possible to write the individual captions for each element of a 
combination of floats above it, while the caption for the figure appears below?

\startplacefigure[title={A combination of three figures}] % this title appears 
below the figure
\startcombination[3*1]
{\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
image-1
{\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
image-2
{\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
image-3
\stopcombination}{}
\stopplacefigure

I tried to define a new float, say myfigure, which has captions below and then 
I tried 

\setupcaptions[location=top] 

and 

\setupcombinations[location=top]

but this does not work…

Thanks for any help: Otared
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] splitted xtable with repeating headers and placetable

2020-04-04 Thread Geert Dobbels
Wolfgang,

Below is what I think is the bare minimum to explain this question
(sorry for not doing it right from the beginning...)

As I said, with the code as it is below, the header is not repeated
after the first page, but the table is in the right place.

Replacing "split=yes" by "split=repeat" makes the header repeat
correctly but puts the beginning of the table on the next page, leaving
the first page nearly completely blank.

In both cases, the "header=repeat" setting has no influence at all on
the behaviour and can be omitted without changing the results.

As I read in some other posts, sometimes putting the table in a float
can help, so I tried this (by removing the 3 "%" in the code below), but
there seems to be a conflict with the figure in the page header, and it
stops with an error message.

However, replacing the figure in the page header by a normal text
suddenly solves the problem: putting "split" in the setupfloat and
"header=repeat" in the setupxtable gives me a table with repeated
headers that starts exactly where I want it to start. Apparently in this
case, the "headers=repeat" is necessary. Unfortunately, I need a company
logo up in the page header, which is what causes the error for which I
have no explanation.

btw: I am using context standalone version: 2020.01.30 14:13

=

\setuppapersize[A4, landscape]

\setuplayout[location=middle, width=27.5cm, height=18cm,
backspace=1cm,header=4cm]

\setupcaptions[location=none]

\setupbackgrounds[header][text][background={Logos}, state=repeat]

\defineoverlay

[Logos][{

\framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none]{

\framed[width=0.280\textwidth,height=3cm,align=right,]

{\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} }

\framed[width=0.430\textwidth,height=3cm,align=middle] {sometext in the
middle}

\framed[width=0.270\textwidth, height=3cm, align=middle]{sometext on the
right}

}

}]

%\setupfloat[table][default={force,split}]

\setupxtable[ option=stretch,split=repeat,header=repeat,align=middle]

\setupxtable[head][background=color,backgroundcolor=gray,foregroundcolor=red]

\starttext

Some lines of text. This text must come just before the table, but only
on the first page of the table

\def\onerow{

\startxrow

\startxcell first \stopxcell

\startxcell second \stopxcell

\startxcell third \stopxcell

\startxcell fourth \stopxcell

\startxcell fifth \stopxcell

\startxcell sixth \stopxcell

\stopxrow}

%\startplacetable

\startxtable

\startxtablehead[head]

\onerow

\stopxtablehead

\startxtablebody

\dorecurse{40}{\onerow}

\stopxtablebody

\stopxtable

%\stopplacetable

\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] splitted xtable with repeating headers and placetable

2020-04-04 Thread Geert Dobbels
Hello,

Code below shows some behaviour I cannot explain (csv file attached):

- If I run the code below as is, I get what I want, except that the
header line of the table does not repeat at the top of each page.
- Changing "split=yes" to "split=repeat" in the setupxtable gives me
repeating headers, but the table starts at the second page, leaving the
first page with only the text line and all the rest as blank spaces.
- Placing the table in a float by activating the 3 commented lines gives
me an error ("extra } or forgotten endgroup") pointing to the external
figure in my page header overlay.  Replacing the \placefigure. in
the page header by ordinary text makes the error go away, but is no
solution, since I need the company logo picture there, and even then
with no error, the headers do not repeat.
- With the table in a float, I manage to get repeating headers when I
change to "split=yes" and "headers=repeat" in the \setupxtable, but I
still get the abovementioned error as soon as I want to put my figure
back in the page header..

Any suggestions ?

Geert




\usemodule[handlecsv]

\opencsvfile{systaprov2.csv}

\setuppapersize[A4, landscape]

\setuplayout[location=middle, width=27.5cm, height=18cm,
backspace=1cm,header=4cm]

\setuppagenumbering[state=stop]

\setupcaptions[location=none]

\setupbackgrounds[header][text][background={Logos}, state=repeat]

\setupnumbering [location=]

\setupframed[offset=none]

\defineoverlay

[Logos][{

\framed[width=\textwidth,

height=3cm,

align=right,

strut=no,

offset=none,

frame=on,

frameoffset=0.1cm,

corner=round,

radius=0.15cm,

framecolor=darkgray,

background=color,

backgroundcolor=gray,

framecorner=round,

frameradius=0.15cm,

rulethickness=0.05cm]{

\framed[width=0.280\textwidth,

height=3cm,

align=right,

frame=off]

{\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} }

\framed[width=0.430\textwidth,

height=3cm,

align=middle,

frame=off]

{\crlf\tfa \crlf \bf Technical Report}

\framed[width=0.370\textwidth,

height=3cm,

align=middle,

frame=off]

{\tfx \crlf Annex T.2.3. \crlf \tfx Date of issue: \crlf \currentdate
\crlf page \pagenumber of \lastpage}

}

}]

%\setupfloat[table][default={force,split}]

\setupxtable[offset=0cm,

frame=off,

bottomframe=on,

framecolor=gray,

option=stretch,

split=yes,

header=repeat,

align=middle]

\setupxtable[head][background=color,

backgroundcolor=gray,

topframe=on,

bottomframe=on,

framecolor=black,

foregroundcolor=blue]

\setupxtable[left][align=right]

\starttext

Some lines of text. This text must come just before the table, but only
on the first page of the table

\startbuffer[loop]

\startxrow

\startxcell[left] \cA \stopxcell

\startxcell[left] \cB \stopxcell

\startxcell[left] \cC \stopxcell

\startxcell[left] \cD \stopxcell

\startxcell \cE \stopxcell

\startxcell[left] \cF \stopxcell

\startxcell \cG \stopxcell

\startxcell \cH \stopxcell

\doifdefined{cI}{\startxcell \cI \stopxcell}

\doifdefined{cJ}{\startxcell \cJ \stopxcell}

\doifdefined{cK}{\startxcell [left] \cK \stopxcell}

\stopxrow

\stopbuffer

%\startplacetable[]

\startxtable

\startxtablehead[head]

\doloopif{\lineno}{<}{2}{\getbuffer[loop]}

\stopxtablehead

\startxtablebody

\doloopif{\lineno}{>}{1}{\getbuffer[loop]}

\stopxtablebody

\stopxtable

%\stopplacetable

\stoptext

Nº;Subject;Dirno;Tano; Date;Corr;VAVE; Stage; Remark
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-65-89-45; -; 2018/1832; all; N/A;
ab;asdfa a fasddf  qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b
sg;afae a t hyj wy  thjqh jqtj  ;7GSD;25-

Re: [NTG-context] *** Spam *** Figure captions: "Fig." instead "Figure"

2018-07-13 Thread Procházka Lukáš Ing .

Hello,

thank you - I supposed another \setup for changing the text...

Bets regards,

Lukas


On Fri, 13 Jul 2018 10:44:56 +0200, Lutz Haseloff 
 wrote:


Hi Lukas,

I use
\setuplabeltext[de][figure=Bild ]

You should use
\setuplabeltext[en][figure=Fig. ]

Greetings Lutz

Am 13. Juli 2018 10:30:22 MESZ schrieb "Procházka Lukáš Ing." :

Hello,

what is the way to change caption text for figures to be "Fig." instead
of "Figure"?

\setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.",
but is there a similar key for the text?

(\setupcations[prefix=] allows only "yes" or "no" -
http://wiki.contextgarden.net/Command/setupcaptions )

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] *** Spam *** Figure captions: "Fig." instead "Figure"

2018-07-13 Thread Lutz Haseloff
Hi Lukas,

I use
\setuplabeltext[de][figure=Bild ]

You should use
\setuplabeltext[en][figure=Fig. ]

Greetings Lutz

Am 13. Juli 2018 10:30:22 MESZ schrieb "Procházka Lukáš Ing." :
>Hello,
>
>what is the way to change caption text for figures to be "Fig." instead
>of "Figure"?
>
>\setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.",
>but is there a similar key for the text?
>
>(\setupcations[prefix=] allows only "yes" or "no" -
>http://wiki.contextgarden.net/Command/setupcaptions )
>
>Best regards,
>
>Lukas
>
>
>-- 
>Ing. Lukáš Procházka | mailto:l...@pontex.cz
>Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz |
>IDDS:nrpt3sn
>Bezová 1658
>147 14 Praha 4
>
>Mob.: +420 702 033 396
>
>___
>If your question is of interest to others as well, please add an entry
>to the Wiki!
>
>maillist : ntg-context@ntg.nl /
>http://www.ntg.nl/mailman/listinfo/ntg-context
>webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>archive  : https://bitbucket.org/phg/context-mirror/commits/
>wiki : http://contextgarden.net
>___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Figure captions: "Fig." instead "Figure"

2018-07-13 Thread Procházka Lukáš Ing .

Hello,

what is the way to change caption text for figures to be "Fig." instead of 
"Figure"?

\setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.", but is 
there a similar key for the text?

(\setupcations[prefix=] allows only "yes" or "no" - 
http://wiki.contextgarden.net/Command/setupcaptions )

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] numberstopper in \setupcaptions

2018-04-19 Thread Alan Braslau
Hello list members,

I am not sure how to achieve the following functionality:

Using \startplacefigure, I would like to place a number stopper *only*
when the caption text is non-empty, i.e.

Figure 1

Figure 2: A cow


This would be achieved through
\setupcaption [figure]
using numberstopper= I believe (with perhaps a filter), but I am not
sure of exactly how to do this, especially how to do this most
elegantly.

Thank you

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

[NTG-context] tex error Argument of \titlecmd has an extra }

2018-03-06 Thread ????????
h ; v := \overlayheight ;
hdelta := .15u ; vdelta := .03v ;
drawoptions (withpen pensquare scaled 2pt) ;
randomseed := day + time*epsilon ;
show time * epsilon ;
for i :=1 upto 128 :
ccc := (uniformdeviate (1), uniformdeviate (1), uniformdeviate (1)) ;
p := (uniformdeviate (u), uniformdeviate (v)) ;
h0 := (xpart (p) - uniformdeviate (hdelta) , ypart (p)) ;
h1 := (xpart (p) + uniformdeviate (hdelta) , ypart (p)) ;
v0 := (xpart (p), ypart (p) - uniformdeviate (vdelta)) ;
v1 := (xpart (p), ypart (p) + uniformdeviate (vdelta)) ;
draw h0 -- h1 withcolor transparent(1,.4,ccc) ;
draw v0 -- v1 withcolor transparent(1,.4,ccc) ;
endfor ;
\stopuseMPgraphic

\startsetups BG
\defineoverlay[bg][\useMPgraphic{crux}]
\setupbackgrounds[page][background=bg]
\stopsetups
\definestartstop[BG][commands=\setups{BG}]

% misc
\setupheadtext[en][pubs=]
\setupheadtext[en][content=]
\setupheadtext[en][index=]
\setuplabeltext[en][figure=??\;]
\setuplabeltext[en][table=??\;]
\setupcaptions[style=\tfx,headstyle=\normal]

% 
\setupmathematics[autopunctuation=no]

%  ascii 
\asciimode

\stopenvironment



the project-openstack-source-analysis.tex file content is below:

\environment env-plain
\starttext

\startBG
\setuplayout[normal]
\startstandardmakeup
\midaligned{\CruxFramed{\ssd OpenStack}}
\vfil
\stopstandardmakeup
\stopBG

\startfrontmatter
  \setuplayout[reset]
\setuppagenumbering[conversion=romannumerals]
\setuppagenumber[number=1]
\completecontent
%\completelistoffigures
%\completelistoftables
\stopfrontmatter

\startbodymatter
\setuppagenumbering[conversion=numbers]
\setuppagenumber[number=1]
\setups{Text}
\component component-01-openstack-outline
\component component-02-openstack-nova
  
\page
\setups{Empty}
\stopbodymatter

\startappendices
\setups{Appendices}
\title{}
\placepublications
\title{}
\placeindex
\page
\setups{Empty}
\stopappendices

\startbackmatter
\stopbackmatter

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug? numberstopper in references

2018-01-16 Thread Otared Kavian
Oh I sent my previous message too quickly… 
I was just using the \at command for referring to captions, while you want to 
use the \in command: maybe this is the problem.

> On 16 Jan 2018, at 22:25, bbvo...@home.nl wrote:
> 
> Dear list,
> 
> When I use the numberstopper option in setupcaptions it appears
> unexpectedly in the references. The wiki states otherwise.
> Wiki and a working example are listed below.
> 
> Kind regards,
> 
> Bernard
> 
> 
> wiki: http://wiki.contextgarden.net/Command/setupcaptions:
> 
> numberstopper MKIV only. The numberstopper text follows the number 
> and,
> if present, the suffix, and precedes the caption text. It does not
> appear in references.
> 
> 
> Working example:
> 
> \setupcaptions[table][numberstopper={:}]
> 
> \starttext
> 
> \placetable[here][tab:ships]{Ships that moored at Hasselt.}{
> \starttable[|c|c|]
> \HL
> \NC \bf Year \NC \bf Number of ships \NC\SR
> \HL
> \NC 1645 \NC 450 \NC\FR
> \NC 1671 \NC 480 \NC\MR
> \NC 1676 \NC 500 \NC\MR
> \NC 1695 \NC 930 \NC\LR
> \HL
> \stoptable
> }
> ...
> 
> See \in{Table}[tab:ships] on \at{page}[tab:ships]
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug? numberstopper in references

2018-01-16 Thread Otared Kavian
Hi Bernard,

Transposing your table to an example given by Wolfgang Schuster some time ago I 
obtain the correct behavior, but I don’t know where the problem in your example 
comes from…

Please see whether the following gives what you want and comapre with the PDF I 
get here with ConTeXt  version 2018.01.14 15:55.

Best regards: OK

 begin caption-numberstopper-0.tex
\setupexternalfigure[location=default]

\setupcaptions[numberstopper={:}]
\starttext

Take a look at \at{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
 \externalfigure[cow]
\stopplacefigure

\placefigure[here][photo]{This is a cow}{\externalfigure[cow][width=2in]}

Take a look at \at{table}[tab:1] below.

\placetable[here][tab:1]{This is a table}{
\starttable[|c|c|]
\HL
\NC \bf Year \NC \bf Number of ships \NC\SR
\HL
\NC 1645 \NC 450 \NC\FR
\NC 1671 \NC 480 \NC\MR
\NC 1676 \NC 500 \NC\MR
\NC 1695 \NC 930 \NC\LR
\HL
\stoptable}

\stoptext
 end caption-numberstopper-0.tex



caption-numberstopper-0.pdf
Description: Adobe PDF document


> On 16 Jan 2018, at 22:25, bbvo...@home.nl wrote:
> 
> Dear list,
> 
> When I use the numberstopper option in setupcaptions it appears
> unexpectedly in the references. The wiki states otherwise.
> Wiki and a working example are listed below.
> 
> Kind regards,
> 
> Bernard
> 
> 
> wiki: http://wiki.contextgarden.net/Command/setupcaptions:
> 
> numberstopper MKIV only. The numberstopper text follows the number 
> and,
> if present, the suffix, and precedes the caption text. It does not
> appear in references.
> 
> 
> Working example:
> 
> \setupcaptions[table][numberstopper={:}]
> 
> \starttext
> 
> \placetable[here][tab:ships]{Ships that moored at Hasselt.}{
> \starttable[|c|c|]
> \HL
> \NC \bf Year \NC \bf Number of ships \NC\SR
> \HL
> \NC 1645 \NC 450 \NC\FR
> \NC 1671 \NC 480 \NC\MR
> \NC 1676 \NC 500 \NC\MR
> \NC 1695 \NC 930 \NC\LR
> \HL
> \stoptable
> }
> ...
> 
> See \in{Table}[tab:ships] on \at{page}[tab:ships]
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Bug? numberstopper in references

2018-01-16 Thread bbvogel
Dear list,

When I use the numberstopper option in setupcaptions it appears
unexpectedly in the references. The wiki states otherwise.
Wiki and a working example are listed below.

Kind regards,

Bernard


wiki: http://wiki.contextgarden.net/Command/setupcaptions:

numberstopper   MKIV only. The numberstopper text follows the number and,
if present, the suffix, and precedes the caption text. It does not
appear in references.


Working example:

\setupcaptions[table][numberstopper={:}]

\starttext

\placetable[here][tab:ships]{Ships that moored at Hasselt.}{
\starttable[|c|c|]
\HL
\NC \bf Year \NC \bf Number of ships \NC\SR
\HL
\NC 1645 \NC 450 \NC\FR
\NC 1671 \NC 480 \NC\MR
\NC 1676 \NC 500 \NC\MR
\NC 1695 \NC 930 \NC\LR
\HL
\stoptable
}
...

See \in{Table}[tab:ships] on \at{page}[tab:ships]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Caption location in floatcombination

2017-10-23 Thread Christoph Reller
On Tue, Oct 17, 2017 at 11:00 AM Christoph Reller <
christoph.rel...@gmail.com> wrote:

> On Mon, Sep 18, 2017 at 7:19 AM Christoph Reller <
> christoph.rel...@gmail.com> wrote:
>
>> On Sun, Sep 17, 2017 at 6:03 PM Hans Hagen <pra...@wxs.nl> wrote:
>>
>>> On 9/13/2017 8:30 AM, Christoph Reller wrote:
>>> > It seems to me that the location given to \setupcaptions is not honored
>>> > correctly in floatcombinations anymore. Consider the following MWE:
>>> >
>>> > \setupcaptions[location=top, number=no]
>>> > \starttext
>>> > \placetable[][]{One}{
>>> >\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>>> > \placefloat[][]{}{
>>> >\startfloatcombination
>>> >  \placetable[][]{Two}{
>>> >\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>> >\stopfloatcombination}
>>> > \stoptext
>>> >
>>> > In earlier versions of ConTeXt, both captions "One" and "Two" of both
>>> > tables are rendered above the respective table. In the currently latest
>>> > version, the caption "Two" is rendered below the table. Is this a bug
>>> or
>>> > do I have to setup caption location separately for floatcombinations?
>>> >
>>> > Any feedback is welcome.\setupcaptions[location=top,number=no]
>>>
>>> \starttext
>>>
>>> \placetable{TABLE}{\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>>>
>>> \placefloat{FLOAT}{%
>>>\startfloatcombination
>>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>>\stopfloatcombination}
>>> \stoptext
>>
>>
>> Thank you for your input, Hans!
>>
>> I see that the captions "TABLE" and "FLOAT" are placed on top while the
>> captions "Two" and "Two" are placed on the bottom. Is there a way to setup
>> the locations of the captions of floats within a floatcombination? In this
>> particular example, the goal is, that the captions "Two" and "Two" are
>> placed on top of the respective tables.
>>
>
>  Does anybody know a way to control the caption location in
> floatcombinations? Any hint would be greatly appreciated.
>
>
Dear List,

I have noticed that in normal combinations \setupcaption[location=...] is
not honored either. MWE:

\setupcaptions[location=top, number=no]
\starttext
\placefigure{Two Tables}{
  \startcombination
{\bTABLE\bTR\bTD First\eTD\eTR\eTABLE}{First}
{\bTABLE\bTR\bTD Second\eTD\eTR\eTABLE}{Second}
  \stopcombination}
\stoptext

The caption "Two Tables" is located above the combination. The captions
"First" and "Second" are, however, located below. How can I setup captions
such that "First" and "Second" are located also above? If this is not
supported then I would be glad to know.

By the way, I have noticed that \setupcaptions is missing from
i-context.pdf. Is this omission on purpose?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Caption location in floatcombination

2017-10-17 Thread Christoph Reller
On Mon, Sep 18, 2017 at 7:19 AM Christoph Reller <christoph.rel...@gmail.com>
wrote:

> On Sun, Sep 17, 2017 at 6:03 PM Hans Hagen <pra...@wxs.nl> wrote:
>
>> On 9/13/2017 8:30 AM, Christoph Reller wrote:
>> > It seems to me that the location given to \setupcaptions is not honored
>> > correctly in floatcombinations anymore. Consider the following MWE:
>> >
>> > \setupcaptions[location=top, number=no]
>> > \starttext
>> > \placetable[][]{One}{
>> >\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>> > \placefloat[][]{}{
>> >\startfloatcombination
>> >  \placetable[][]{Two}{
>> >\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>> >\stopfloatcombination}
>> > \stoptext
>> >
>> > In earlier versions of ConTeXt, both captions "One" and "Two" of both
>> > tables are rendered above the respective table. In the currently latest
>> > version, the caption "Two" is rendered below the table. Is this a bug or
>> > do I have to setup caption location separately for floatcombinations?
>> >
>> > Any feedback is welcome.\setupcaptions[location=top,number=no]
>>
>> \starttext
>>
>> \placetable{TABLE}{\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>>
>> \placefloat{FLOAT}{%
>>\startfloatcombination
>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>\stopfloatcombination}
>> \stoptext
>
>
> Thank you for your input, Hans!
>
> I see that the captions "TABLE" and "FLOAT" are placed on top while the
> captions "Two" and "Two" are placed on the bottom. Is there a way to setup
> the locations of the captions of floats within a floatcombination? In this
> particular example, the goal is, that the captions "Two" and "Two" are
> placed on top of the respective tables.
>

 Does anybody know a way to control the caption location in
floatcombinations? Any hint would be greatly appreciated.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Caption location in floatcombination

2017-09-17 Thread Christoph Reller
On Sun, Sep 17, 2017 at 6:03 PM Hans Hagen <pra...@wxs.nl> wrote:

> On 9/13/2017 8:30 AM, Christoph Reller wrote:
> > Hi,
> >
> > It seems to me that the location given to \setupcaptions is not honored
> > correctly in floatcombinations anymore. Consider the following MWE:
> >
> > \setupcaptions[location=top, number=no]
> > \starttext
> > \placetable[][]{One}{
> >\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
> > \placefloat[][]{}{
> >\startfloatcombination
> >  \placetable[][]{Two}{
> >\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
> >\stopfloatcombination}
> > \stoptext
> >
> > In earlier versions of ConTeXt, both captions "One" and "Two" of both
> > tables are rendered above the respective table. In the currently latest
> > version, the caption "Two" is rendered below the table. Is this a bug or
> > do I have to setup caption location separately for floatcombinations?
> >
> > Any feedback is welcome.\setupcaptions[location=top,number=no]
>
> \starttext
>
> \placetable{TABLE}{\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>
> \placefloat{FLOAT}{%
>\startfloatcombination
>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>\stopfloatcombination
> }
> \stoptext


Thank you for your input, Hans!

I see that the captions "TABLE" and "FLOAT" are placed on top while the
captions "Two" and "Two" are placed on the bottom. Is there a way to setup
the locations of the captions of floats within a floatcombination? In this
particular example, the goal is, that the captions "Two" and "Two" are
placed on top of the respective tables.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Caption location in floatcombination

2017-09-13 Thread Christoph Reller
Hi,

It seems to me that the location given to \setupcaptions is not honored
correctly in floatcombinations anymore. Consider the following MWE:

\setupcaptions[location=top, number=no]
\starttext
\placetable[][]{One}{
  \bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
\placefloat[][]{}{
  \startfloatcombination
\placetable[][]{Two}{
  \bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
  \stopfloatcombination}
\stoptext

In earlier versions of ConTeXt, both captions "One" and "Two" of both
tables are rendered above the respective table. In the currently latest
version, the caption "Two" is rendered below the table. Is this a bug or do
I have to setup caption location separately for floatcombinations?

Any feedback is welcome.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-31 Thread Gerion Entrup
Am Montag, 31. Juli 2017, 08:01:49 CEST schrieb Jan Willem Flamma:
> Dear Gerion,
> 
> Add 
> 
> \setuphead[subsubsection]
> [incrementnumber=no]
This works :). Thank you very much!


Gerion

> > On 30 Jul 2017, at 22:51, Gerion Entrup <gerion.entrup-c...@flump.de> wrote:
> > 
> > Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
> >> On 07/29/2017 04:45 AM, Gerion Entrup wrote:
> >>> Was not that simple, but I found the problem, that causes it:
> >>> subsubsections without numbers.
> >>> [...]
> >>> Is there a way to fix this?
> >> 
> >> I would say this may be a bug.
> > Does someone know a way to workaround?
> > 
> > This only way I see is to simply simulate a subsubsection (with some blanks
> > and a big font).
> > 
> > Gerion
> > 
> > 
> >> I don’t know how it is implemented, but prefixsegments (or prefixes) for
> >> captions only work when number is enabled.
> >> 
> >> This makes sense if the section is part of the prefixsegments, but not
> >> if it isn’t.
> >> 
> >> Another sample that shows the problem:
> >> 
> >>\mainlanguage[de]
> >>\setupexternalfigures[location=default]
> >>\setuphead[subsection][number=no]
> >>\setupcaptions[prefixsegments=chapter]
> >>\setuphead[subsubsection][number=yes]
> >> 
> >>\starttext
> >> 
> >>\chapter[title=Kapitel]
> >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> >> 
> >>\section[title=Abschnitt]
> >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> >> 
> >>\subsection[title=Hier gibt’s ein Problem]
> >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> >> 
> >>\subsection[title=Und hier gibt’s ein Problem auch]
> >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> >> 
> >>\subsubsection[title=Aber hier gibt’s kein Problem]
> >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> >>\stoptext
> >> 
> >> If this isn’t a bug, the code to avoid the problem is too tricky for me
> >> (and simply far beyond my knowledge).
> >> 
> >> Excuse my ignorance,
> >> 
> >> Pablo
> >> 
> > 
> > 
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-31 Thread Jan Willem Flamma
Dear Gerion,

Add 

\setuphead[subsubsection]
[incrementnumber=no]

Regards,
Jan Willem Flamma


> On 30 Jul 2017, at 22:51, Gerion Entrup <gerion.entrup-c...@flump.de> wrote:
> 
> Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
>> On 07/29/2017 04:45 AM, Gerion Entrup wrote:
>>> Was not that simple, but I found the problem, that causes it:
>>> subsubsections without numbers.
>>> [...]
>>> Is there a way to fix this?
>> 
>> I would say this may be a bug.
> Does someone know a way to workaround?
> 
> This only way I see is to simply simulate a subsubsection (with some blanks
> and a big font).
> 
> Gerion
> 
> 
>> I don’t know how it is implemented, but prefixsegments (or prefixes) for
>> captions only work when number is enabled.
>> 
>> This makes sense if the section is part of the prefixsegments, but not
>> if it isn’t.
>> 
>> Another sample that shows the problem:
>> 
>>\mainlanguage[de]
>>\setupexternalfigures[location=default]
>>\setuphead[subsection][number=no]
>>\setupcaptions[prefixsegments=chapter]
>>\setuphead[subsubsection][number=yes]
>> 
>>\starttext
>> 
>>\chapter[title=Kapitel]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\section[title=Abschnitt]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsection[title=Hier gibt’s ein Problem]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsection[title=Und hier gibt’s ein Problem auch]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>> 
>>\subsubsection[title=Aber hier gibt’s kein Problem]
>>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
>>\stoptext
>> 
>> If this isn’t a bug, the code to avoid the problem is too tricky for me
>> (and simply far beyond my knowledge).
>> 
>> Excuse my ignorance,
>> 
>> Pablo
>> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-30 Thread Gerion Entrup
Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
> On 07/29/2017 04:45 AM, Gerion Entrup wrote:
> > Was not that simple, but I found the problem, that causes it:
> > subsubsections without numbers.
> > [...]
> > Is there a way to fix this?
> 
> I would say this may be a bug.
Does someone know a way to workaround?

This only way I see is to simply simulate a subsubsection (with some blanks
and a big font).

Gerion


> I don’t know how it is implemented, but prefixsegments (or prefixes) for
> captions only work when number is enabled.
> 
> This makes sense if the section is part of the prefixsegments, but not
> if it isn’t.
> 
> Another sample that shows the problem:
> 
> \mainlanguage[de]
> \setupexternalfigures[location=default]
> \setuphead[subsection][number=no]
> \setupcaptions[prefixsegments=chapter]
> \setuphead[subsubsection][number=yes]
> 
> \starttext
> 
> \chapter[title=Kapitel]
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> 
> \section[title=Abschnitt]
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> 
> \subsection[title=Hier gibt’s ein Problem]
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> 
> \subsection[title=Und hier gibt’s ein Problem auch]
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> 
> \subsubsection[title=Aber hier gibt’s kein Problem]
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
> \stoptext
> 
> If this isn’t a bug, the code to avoid the problem is too tricky for me
> (and simply far beyond my knowledge).
> 
> Excuse my ignorance,
> 
> Pablo
> 


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-29 Thread Pablo Rodriguez
On 07/29/2017 04:45 AM, Gerion Entrup wrote:
> Was not that simple, but I found the problem, that causes it:
> subsubsections without numbers.
> [...]
> Is there a way to fix this?

I would say this may be a bug.

I don’t know how it is implemented, but prefixsegments (or prefixes) for
captions only work when number is enabled.

This makes sense if the section is part of the prefixsegments, but not
if it isn’t.

Another sample that shows the problem:

\mainlanguage[de]
\setupexternalfigures[location=default]
\setuphead[subsection][number=no]
\setupcaptions[prefixsegments=chapter]
\setuphead[subsubsection][number=yes]

\starttext

\chapter[title=Kapitel]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}

\section[title=Abschnitt]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}

\subsection[title=Hier gibt’s ein Problem]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}

\subsection[title=Und hier gibt’s ein Problem auch]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}

\subsubsection[title=Aber hier gibt’s kein Problem]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\stoptext

If this isn’t a bug, the code to avoid the problem is too tricky for me
(and simply far beyond my knowledge).

Excuse my ignorance,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Couple of questions

2017-07-28 Thread Gerion Entrup
Am Freitag, 28. Juli 2017, 17:05:59 CEST schrieb Pablo Rodriguez:
> On 07/28/2017 02:22 AM, Gerion Entrup wrote:
> > 2. Own title format
> > I've set an own title format for chapters, like described in the wiki. 
> > Unfortunately this applies to the table of contents and bibliography as 
> > well.
> > Below a minimal example, that reproduces it:
> > ```
> > \setupinteraction[state=start]
> > 
> > \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on]
> > {\vbox{\headtext{chapter} #1\blank#2}}}
> > 
> > \setuphead[chapter][command=\MyChapter, style={\switchtobodyfont[24pt,ss]}, 
> > header=empty, page=mychapterpagebreak]
> > \setupheadtext[chapter=Chapter, content=Table of Contents]
> > 
> > \starttext
> > \completecontent
> > \page[yes]
> > 
> > \startchapter[title=foo]
> > 
> > \stoptext
> > ```
> > How can I prevent the printing of "Chapter" in the table of contents and
> > bibliography?
> 
> Hi Gerion,
> 
> play with the sample, in order to see what fits you best:
> 
> \setupinteraction[state=start]
> 
> \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on]
> {\vbox{\headtext{chapter} #1\blank[small]#2}}}
> 
> \setuphead[chapter][command=\MyChapter,
> style={\switchtobodyfont[24pt,ss]}, header=empty, page=mychapterpagebreak]
> 
> \startsectionblockenvironment[bodypart]
> \setupheadtext[chapter=Chapter]
> \stopsectionblockenvironment
> 
> \startsectionblockenvironment[appendix]
> \setupheadtext[chapter=Appendix]
> \stopsectionblockenvironment
> 
> \starttext
> \startfrontmatter
> \chapter{Table of Contents}\placecontent
> \stopfrontmatter
> 
> \startbodymatter
> \startchapter[title=foo]
> \stopbodymatter
> 
> \startappendices
> \chapter{Bibliography}
> \stopappendices
> 
> \startbackmatter
> \chapter{Bibliography}
> \stopbackmatter
> 
> \stoptext
Thank you, that works for me.


> > 5. Numbering of floats
> > I want a numbering for my figures in this format:
> > way=bychapter, prefixsegments=chapter
> > 
> > I guess, this is the default, but I've explicitly set it.
> > In some captions the prefix is ignored. For example there are 5 figures in 
> > chapter 2, then the captions of the figures (the text is in German) are:
> > Abbildung 2.1   foo
> > Abbildung 2.2   bar
> > Abbildung 3foobar
> > Abbildung 4otherfoo
> > Abbildung 5lastfoo
> > 
> > Is there anything, I can do, to prevent this?
> 
> I cannot reproduce the problem you mention:
> 
> \mainlanguage[de]
> \starttext
> \dorecurse{5}{\chapter{Kapitel}
> \placefigure{Eine Kuh}{\externalfigure[cow.pdf]}}
> \chapter{Kapitel}
> \dorecurse{5}{\placefigure{Eine andere Kuh}
> {\externalfigure[cow.pdf]}}
> \dorecurse{5}{\chapter{Kapitel}
> \placefigure{Noch eine andere Kuh}{\externalfigure[cow.pdf]}}
> \stoptext
> 
> In general, please provide minimal samples of code that show your problem.
Was not that simple, but I found the problem, that causes it:
subsubsections without numbers.

Here is a minimal example:
```
\mainlanguage[de]
\setuphead[subsubsection][number=off]
\setupcaptions[way=bychapter,
   prefixsegments=chapter]

\starttext

\startchapter[title=Kapitel]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf]}

\startsection[title=Abschnitt]
\startsubsection[title=Unterabschnitt]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf]}

\startsubsubsection[title=Und hier gibts ein Problem]
\placefigure{Eine Kuh}{\externalfigure[cow.pdf]}
\stopsubsubsection

\startsubsubsection[title=Und hier gibts ein Problem]
\stopsubsubsection

\stopsubsection
\stopsection
\stopchapter

\stoptext
```
Is there a way to fix this?

Gerion


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] figure numbering S3, S4, S6, ...

2017-07-13 Thread Henri Menke
On Thu, 2017-07-13 at 09:54 +0200, Thomas Möbius wrote:
> Dear list,
> 
> I am compiling some figures as supplementary material and would like to 
> have figure captions follow the convention:
> 
> Figure S3
> Figure S4
> Figure S5
> ...
> 
> and I need that the numbering starts with S3 instead of S1.
> 
> How can I achieve this?

\setuppapersize[A6]
\setupexternalfigures[location=default]

\setupfloatcaption
  [figure]
  [way=bytext,numberstarter={S}]

\setcounter[figure][2]

\starttext

\startplacefigure[title={Cow}]
  \externalfigure[cow][width=2cm]
\stopplacefigure


\startplacefigure[title={Another Cow}]
  \externalfigure[cow][width=2cm]
\stopplacefigure

\stoptext

> 
> Minimal example:
> 
> \setuppapersize[A6]
> \setupexternalfigures[location=default]
> 
> \setupcaptions[way=bytext]
> 
> \placefigure
>  {Cow}
>  {\externalfigure[cow][width=2cm]}
> 
> \placefigure
>  {Another Cow}
>  {\externalfigure[cow][width=2cm]}
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] figure numbering S3, S4, S6, ...

2017-07-13 Thread Thomas Möbius

Dear list,

I am compiling some figures as supplementary material and would like to 
have figure captions follow the convention:


Figure S3
Figure S4
Figure S5
...

and I need that the numbering starts with S3 instead of S1.

How can I achieve this?

Minimal example:

\setuppapersize[A6]
\setupexternalfigures[location=default]

\setupcaptions[way=bytext]

\placefigure
{Cow}
{\externalfigure[cow][width=2cm]}

\placefigure
{Another Cow}
{\externalfigure[cow][width=2cm]}
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Alter text to "Figure"

2017-02-28 Thread Henri Menke
On 02/27/2017 10:45 PM, Procházka Lukáš Ing. wrote:
> Hello,
> 
> how to alter auto-text to figures placed by 
> "\placefloat[]{Caption}{\externalfigure[]}" to be:
> 
> "Figure 1.  Caption"
> 
> instead of
> 
> "Figure 1  Caption",
> 
> IOW, how to add "." after the figure "auto-text"?

\setupcaptions
  [figure]
  [
numberstopper={.},
  ]

\starttext

\startplacefigure
  [
title={Caption},
  ]
  \externalfigure[cow]
\stopplacefigure

\stoptext

> 
> Best regards,
> 
> Lukas
> 
> 

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] floatcombination alignment has changed?

2017-01-04 Thread Christoph Reller
Hi,

I have come up with a simpler MWE which shows the problem more explicitly:

\setupcaptions[number=no]

\starttext

\startplacefigure[location=right]
  \startfloatcombination
\placefigure{A Cow}{\externalfigure[cow.pdf]}
\placefigure{Another Cow}{\externalfigure[cow.pdf]}
  \stopfloatcombination
\stopplacefigure
\input ward

\startplacefigure[location=right,title=A Single Cow]
  \externalfigure[cow.pdf]
\stopplacefigure
\input ward

\stoptext

In the latest version of ConTeXt, the floatcombination is shoved to
the left and overlaps the text which is also shoved to the left and
narrowed down to a minimum. The single figure, on the other hand, is
shoved correctly to the right and the text is at the left.

In earlier versions of ConTeXt, the floatcombination is correctly
shoved to the right. The reason for this change could be line 490 of
pack-com.mkiv (in the definition of \pack_combinations_start_float).
If I delete \dontleavehmode from this line then the correct layout is
restored.

Since I don't want to maintain my own version of ConTeXt, I very much
would appreciate If anyone could tell me how to get the correct layout
back, or fix this issue in ConTeXt.

Your effort is genuinely appreciated!

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] grid snapping problem

2016-12-07 Thread Csikos Bela
Henri Menke írta:
>The following should do the trick.

Thank you very much. Your code indeed fixes the snap to grid problem but it also
pushes the second subsection after the float and leaves a big empty space in the
lower part of the first page, which is not desirable. The text should fill the 
whole first
page. Is it possible?

>However, you have to keep \setnostrut and \setstrut around the figure because 
>the
>before and after keys for captions are not (yet) implemented.

It's fine, not a problem.

I guess I can use simply \subsection command instead of \startsubsection and
\stopsubsection comands, because I find the command pairs counterproductive
in case of long text parts (part, section, subsection etc.).

Thank you again,

bcsikos



>\setuplayout[grid=yes]
>\showgrid
>
>\starttexdefinition caption:text #1
>  \setuplocalinterlinespace[line=2.2ex] #1
>\stoptexdefinition
>
>\setupcaptions
>  [
>width=fit,
>align=last,
>headstyle={\ss\bfx},
>style={\ss\tfx},
>before={\setnostrut},
>textcommand=\getvalue{caption:text},
>  ]
>
>\starttext
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>  \input dawkins
>
>  \setnostrut
>  \startplacefigure
>[title={\input zapf }]
>\framed[width=0.6\textwidth,height=10ex]{figure}
>  \stopplacefigure
>  \setstrut
>
>\stopsubsection
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>\stopsubsection
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>  \input dawkins
>\stopsubsection
>
>\stoptext
>
>On 12/06/2016 07:06 PM, Csikos Bela wrote:
>>> I would like to use grid snapping in my document: main text lines
>>> should be aligned to grid lines but figure caption text should not.
>>>
>>> I have this code:
>>>
>>> \setuplayout[grid=yes]
>>> \showgrid
>>>
>>> \setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>>>
>>> \starttext
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \input dawkins
>>>
>>> %startlinecorrection
>>> \startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>>> \placefigure[][]{\input zapf 
>>> }{\framed[width=0.6\textwidth,height=10ex]{figure}}
>>> \stopbaselinecorrection
>>> %stoplinecorrection
>>>
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \input dawkins
>>> \stoptext
>>>
>>> You can see that the caption is typeset as I wanted: smaller line height
>>> and it is not aligned to grid lines. But the main text after the figure is 
>>> not
>>> aligned to the grid on the same page. How can I correct this?
>>> On the next page the main text is snapped to the grid again.
>> 
>> Since I haven't got any answer to my question I think the code above contains
>> some obvious error, but I don't know what. What do I do wrong? Or is it just
>> not possible to achieve what I want? 
>> 
>> Thank you,
>> 
>> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] grid snapping problem

2016-12-06 Thread Henri Menke
The following should do the trick.  However, you have to keep \setnostrut and 
\setstrut around the figure because the before and after keys for captions are 
not (yet) implemented.

\setuplayout[grid=yes]
\showgrid

\starttexdefinition caption:text #1
  \setuplocalinterlinespace[line=2.2ex] #1
\stoptexdefinition

\setupcaptions
  [
width=fit,
align=last,
headstyle={\ss\bfx},
style={\ss\tfx},
before={\setnostrut},
textcommand=\getvalue{caption:text},
  ]

\starttext

\startsubsection[title={Subsection title}]
  \input dawkins
  \input dawkins

  \setnostrut
  \startplacefigure
[title={\input zapf }]
\framed[width=0.6\textwidth,height=10ex]{figure}
  \stopplacefigure
  \setstrut

\stopsubsection

\startsubsection[title={Subsection title}]
  \input dawkins
\stopsubsection

\startsubsection[title={Subsection title}]
  \input dawkins
  \input dawkins
\stopsubsection

\stoptext

On 12/06/2016 07:06 PM, Csikos Bela wrote:
>> I would like to use grid snapping in my document: main text lines
>> should be aligned to grid lines but figure caption text should not.
>>
>> I have this code:
>>
>> \setuplayout[grid=yes]
>> \showgrid
>>
>> \setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>>
>> \starttext
>> \subsection{Subsection title}
>> \input dawkins
>> \input dawkins
>>
>> %startlinecorrection
>> \startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>> \placefigure[][]{\input zapf 
>> }{\framed[width=0.6\textwidth,height=10ex]{figure}}
>> \stopbaselinecorrection
>> %stoplinecorrection
>>
>> \subsection{Subsection title}
>> \input dawkins
>> \subsection{Subsection title}
>> \input dawkins
>> \input dawkins
>> \stoptext
>>
>> You can see that the caption is typeset as I wanted: smaller line height
>> and it is not aligned to grid lines. But the main text after the figure is 
>> not
>> aligned to the grid on the same page. How can I correct this?
>> On the next page the main text is snapped to the grid again.
> 
> Since I haven't got any answer to my question I think the code above contains
> some obvious error, but I don't know what. What do I do wrong? Or is it just
> not possible to achieve what I want? 
> 
> Thank you,
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> 

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] grid snapping problem

2016-12-06 Thread Csikos Bela
>I would like to use grid snapping in my document: main text lines
>should be aligned to grid lines but figure caption text should not.
>
>I have this code:
>
>\setuplayout[grid=yes]
>\showgrid
>
>\setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>
>\starttext
>\subsection{Subsection title}
>\input dawkins
>\input dawkins
>
>%startlinecorrection
>\startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>\placefigure[][]{\input zapf 
>}{\framed[width=0.6\textwidth,height=10ex]{figure}}
>\stopbaselinecorrection
>%stoplinecorrection
>
>\subsection{Subsection title}
>\input dawkins
>\subsection{Subsection title}
>\input dawkins
>\input dawkins
>\stoptext
>
>You can see that the caption is typeset as I wanted: smaller line height
>and it is not aligned to grid lines. But the main text after the figure is not
>aligned to the grid on the same page. How can I correct this?
>On the next page the main text is snapped to the grid again.

Since I haven't got any answer to my question I think the code above contains
some obvious error, but I don't know what. What do I do wrong? Or is it just
not possible to achieve what I want? 

Thank you,

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

[NTG-context] grid snapping problem

2016-12-02 Thread Csikos Bela
Dear context users:

I would like to use grid snapping in my document: main text lines
should be aligned to grid lines but figure caption text should not.

I have this code:

\setuplayout[grid=yes]
\showgrid

\setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]

\starttext
\subsection{Subsection title}
\input dawkins
\input dawkins

%startlinecorrection
\startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
\placefigure[][]{\input zapf }{\framed[width=0.6\textwidth,height=10ex]{figure}}
\stopbaselinecorrection
%stoplinecorrection

\subsection{Subsection title}
\input dawkins
\subsection{Subsection title}
\input dawkins
\input dawkins
\stoptext

You can see that the caption is typeset as I wanted: smaller line height
and it is not aligned to grid lines. But the main text after the figure is not
aligned to the grid on the same page. How can I correct this?
On the next page the main text is snapped to the grid again.

Thank you in advance,

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

[NTG-context] gridline question

2016-11-24 Thread Csikos Bela
Dear list members:

I use \setuplayout[grid=yes] option in my document to snap lines to gridlines.
But I don't want figure text to be snapped to grids. Figure text is typeset in
smaller fonts and the lineskip becomes too big. How can I turn snap 
to grid off for a block of text or for figures or figure legends?

Here is an example:

\setuplayout[grid=yes]
%\showgrid
\setupcaptions[location=bottom,width=fit,align=last,headstyle={\tfxx},style={\tfxx}]
\starttext
\input ward
\input tufte
\placefigure{An example figure. \input ward }{\framed[width=0.5\textwidth]{A 
figure}}
\input zapf
\stoptext

Thank you in advance,

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

Re: [NTG-context] MKIV caption separator, revisited

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




On 10 Oct 2016, at 10:40, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:

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

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

\starttext

\section{This is a section}

\setupcaptions[prefixsegments=section,prefixconnector=-]

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

\stoptext

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

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

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

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

Re: [NTG-context] MKIV caption separator, revisited

2016-10-10 Thread Wolfgang Schuster

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


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

Here is a working example for the use of the prefixconnector key.

\starttext

\section{This is a section}

\setupcaptions[prefixsegments=section,prefixconnector=-]

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

\stoptext

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

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

Re: [NTG-context] MKIV caption separator, revisited

2016-10-10 Thread Wolfgang Schuster

Meer, Hans van der <mailto:h.vanderm...@uva.nl>
10. Oktober 2016 um 09:41
Here is the example. \setupcaptions has no effect, however 
\setupfloatcaption does (assuming of course I didn't make a silly 
mistake ;-). Thus it is no problem to get the effect desired, but 
possibly \setupcaptions should be deprecated, or perhaps reimplemented 
to calling \setupfloatcaption. I could have missed the change, but I 
guess a lot of other people might have missed it too. In that case we 
could spare them the trouble of finding out what happened.
prefixconnector is the separator between the section number (=prefix) 
and the float number (=figure number), the symbol at the end of the 
float number is called numberstopper. In your example you don’t have a 
section which can act as prefix number no did you change which prefixes 
should be shown (by default only chapters are used as prefix).


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


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

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

Hans van der Meer

\starttext

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

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

\stoptext

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

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

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

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



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

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

Re: [NTG-context] MKIV caption separator, revisited

2016-10-09 Thread Wolfgang Schuster

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

Do you have a example?

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

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

Re: [NTG-context] MKIV caption separator, revisited

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

Hans van der Meer

On 22 Apr 2014, at 08:25, Wolfgang Schuster 
<schuster.wolfg...@gmail.com<mailto:schuster.wolfg...@gmail.com>> wrote:


Am 22.04.2014 um 02:57 schrieb Rik Kabel 
<cont...@rik.users.panix.com<mailto:cont...@rik.users.panix.com>>:

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

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

Wolfgang

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

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

Re: [NTG-context] Caption placement in margin

2016-08-31 Thread Henri Menke
Dear Mikael,

thanks for your reply!  Indeed, one has to add this second specifier, but only 
middle produces a sensible result.  Both top and bottom override the 
outermargin, so there is probably something wrong.

Regarding \setupfloatcaption and \setupcation, there is no difference.  In 
base/mkiv/strc-flt.mkvi you can find the following definitions:

\let\setupcaption \setupfloatcaption
\let\setupcaptions\setupfloatcaption

Cheers, Henri

On 08/31/2016 09:59 AM, Mikael P. Sundqvist wrote:
> On Tue, Aug 30, 2016 at 9:25 PM, Henri Menke <henrime...@gmail.com> wrote:
>> Dear list,
>>
>> I was trying to place float captions in the margin, which according to 
>> setup-en.pdf should work with location=outermargin, but it doesn't.  The MWE 
>> below reproduces this on TL 2016 and on http://live.contextgarden.net/.  
>> Please fix.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \setupfloatcaption
>>   [figure]
>>   [location=outermargin]
>>
>> \starttext
>>
>> \placefigure
>>   [top]
>>   {The famous dutch cow!}
>>   {\externalfigure[cow]}
>>
>> \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
>> ___
> 
> 
> I have never noticed the setup \setupfloatcaption before, but I think
> you have to add a top/middle/bottom or so to the outermargin, like
> 
> 
> 
> \setupfloatcaption[figure][location={outermargin,middle}]
> \starttext
> 
> \placefigure
>   [top]
>   {The famous dutch cow!}
>   {\externalfigure[cow]}
> \stoptext
> 
> 
> Another option might be to use \setupcaption (somebody could perhaps
> tell the difference between \setupfloatcaption and \setupcaption?)
> 
> \setupcaption[figure][
> location={outermargin,middle},
> align=flushleft,
> width=\marginwidth,
> ]
> 
> \starttext
> \showframe%just to show where it ends up
> 
> \placefigure
>   [top]
>   {The famous dutch cow!}
>   {\externalfigure[cow]}
> 
> \stoptext
> 
> /Mikael
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://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] ntg-context Digest, Vol 142, Issue 52

2016-04-19 Thread Brian Ballsun-Stanton
I'm dealing with a 500 page book (if you give me your github username, I'll
happily add you to the repo) and many of these problems emerge only at
scale. (when I render individual chapters, there are no issues, but when
rendering the whole book, the tables just have all sorts of formatting
issues.)

Here's a working example

% engine=luajittex
\startenvironment env_trap
\enableregime[utf-8]
\setupcolors[state=start]
\setupreferencing[autofile=yes]
\setupinteraction[state=start, color=blue, contrastcolor=blue, style={\tf}]
\usemodule[simplefonts]

\usemodule[database]
% Enable hyperlinks

\setuppapersize [A4][A4]
\definepapersize[standing][A4][A4]
\definepapersize[lying][A4,landscape][A4]
\setuplayout[width=middle,  backspace=.75in, cutspace=.75in,
 height=middle, topspace=.5in, bottomspace=.5in]

\setupbodyfont[11pt]

\setupwhitespace[none]

\setupcaption[table][location=top]
\setupcaptions[style={\tfx}, width=.9\textwidth,align=middle]

   \unprotect
   \appendtoks
 \setupbackgrounds[\v!page][\c!background=\makeupparameter\c!background]
   \to \t_page_makeup_every_setup
   \protect


\defineseparatedlist[CSV]
  [separator={,},
   quotechar={"},
   left=\bTD,right=\eTD,
   first=\bTR,last=\eTR,
   before=\bTABLE,after=\eTABLE]


\setupTABLE[c][each][align=flushleft,style={\tfx},width=fit]
\setupTABLE[r][1][background=color,backgroundcolor=gray,style={\tf}]
\setupTABLE[align=middle]
\setuppagenumbering[alternative=doublesided]

\stopenvironment

\starttext

\placetable[here][tab01]{Kazanlak site numbers, aggregate area and average
area
through through time}{
\setupTABLE[c][each][align=middle,style={\tfx},alignmentcharacter={.},aligncharacter=yes]
\chardef\characteralignmentmode=2
\startCSV
Period,NL,Chl,EBA,LBA,EIA,LIA,RM,LA,BYZ,MA,OTT
Aggregate Area (ha),1.5,2.9,5.0,6.7,21.5,43.3,54.9,31.2,24.4,30.7,94.9
Site Count,3,6,10,7,23,38,23,19,15,21,15
Avg Area (ha),0.5,0.5,0.5,1.0,0.9,1.1,2.4,1.6,1.6,1.5,6.3
\stopCSV
}

\stoptext

And I wasn't able to cause it to fail via a trivial 'making it a component'
and calling it from a project.



> --
>
> Message: 5
> Date: Mon, 18 Apr 2016 22:11:28 +0200
> From: Hans Hagen <pra...@wxs.nl>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Table index is nil
> Message-ID: <57153f70.6050...@wxs.nl>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 4/18/2016 3:59 AM, Brian Ballsun-Stanton wrote:
> > I'm getting (suddenly) an error:
> > ...ext/tex/texmf-context/tex/context/base/mkiv/font-hsh.lua:124: table
> > index is nil
> >
> >
> > And I have a bunch of tables:
> >
> >
> > \placetable[here][tab01]{Kazanlak site numbers, aggregate area and
> > average area
> > through through time}{
> >
> \setupTABLE[c][each][align=middle,style={\tfx},alignmentcharacter={.},aligncharacter=yes]
> > \chardef\characteralignmentmode=2
> > \startCSV
> > Period,NL,Chl,EBA,LBA,EIA,LIA,RM,LA,BYZ,MA,OTT
> > Aggregate Area (ha),1.5,2.9,5.0,6.7,21.5,43.3,54.9,31.2,24.4,30.7,94.9
> > Site Count,3,6,10,7,23,38,23,19,15,21,15
> > Avg Area (ha),0.5,0.5,0.5,1.0,0.9,1.1,2.4,1.6,1.6,1.5,6.3
> > \stopCSV
> > }
> >
> > The odd thing is that no other chapters of the book (all of which use
> > the same environment, and many use the same table)
> >
> > When I comment out the series of tables, the errors go away.
> > I've just rerun first-setup.sh just out of paranoia. mtx-context |
> > current version: 2016.04.17 11:56
>
> i really need a small *working* example for this
>
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 <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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 <bat...@gmail.com>
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 <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
>>
>> ___
>>
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] Unexpected float numbering in unnumbered subsubsection

2015-12-15 Thread Sytse Knypstra

Dear list members,

I experienced even more issues with specifying 'number=no' in \setuphead 
(for any level).
This seems not only to affect the numbering of figures and tables, but 
also the numbering of enumerations (it ignores the options 
'way=bychapter, prefix=chapter') and the section numbering ('1.0', 
'2.0', etc) in \setupheadertexts 
[\somenamedheadnumber{section}{current}][...etc].


Sytse Knypstra

On 15-12-15 09:45, Jan Willem Flamma <jwfregis...@icloud.com> wrote:

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]

... etc

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] footnotes in floating tables

2015-07-19 Thread Henry House
I am using the following to style floating tables and am having some
difficulties with footnotes in the tables.

\enableregime[utf]
\setupbodyfont[modern]
\setupbodyfont[11pt]

\setupfloats[location=middle,spacebefore=0ex,spaceafter=8ex]

\setupcaptions[location=top,inbetween={\blank[0cm]},spaceafter=2ex,spacebefore=1ex,headstyle=\sc]
\setupTABLE[frame=off,offset=0ex]
\setupTABLE[c][distance=0.6em]
\def\tableheadrulethickness{1.0pt}

\defineframed[footnoteframed]\setupframed[footnoteframed][width=\hsize,frame=off,align=right,top=\hbox\bgroup,bottom=\egroup]
% Use the set of symbols that has become customary in many publications for 
footnote marks, whose
% origin seems to be lost in the misty dawn of history:
\defineconversion[tablefootnoteconversion][*,†,‡,§,\textbar\textbar,¶]

\starttext
%%% Begin title page.
\startalignment[center]
{\ssb Title}
\stopalignment
%%% End title page.

Hello.

{
\placetable[top,page][table]{
Caption 1.
}{
\bTABLE%
\bTR{}\bTD{}X \eTD\bTD{}Y\eTD\eTR%
\bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR%
\eTABLE%
}
}

{
\setupfootnotes[conversion=tablefootnoteconversion] % MkII
% 
\setupnotation[footnote][numberconversion=tablefootnoteconversion] % MkIV
\startlocalfootnotes

\setupTABLE[r][1][bottomframe=on,align=low,rulethickness=\tableheadrulethickness]
\setupTABLE[r][each][align={flushleft,verytolerant,hyphenated}] % 
Hyphenate words in table body
\setupTABLE[r][1][align={flushleft,low,verytolerant,nothyphenated}] % 
but not in header row.
\placetable[top,page][table]{
Table 2 caption.\footnote{Footnote in caption. Footnote in caption.
Footnote in caption. Footnote in caption. Footnote in caption. 
Footnote in caption.
}\footnote{Second footnote in caption.}
\placelocalfootnotes
}{
\placelegend{
\bTABLE%
\bTR{}\bTD{}A\note[Footnote_mark_1] 
\eTD\bTD{}B\note[Footnote_mark_2]\eTD\eTR%
\bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR%
\eTABLE%
\footnotetext[Footnote_mark_1]{Footnote to column A. Footnote 
to column A. Footnote to column A. Footnote to column 
A.}\footnotetext[Footnote_mark_2]{Footnote to column B.}
}{
\footnoteframed{\placelocalfootnotes}
\stoplocalfootnotes
}
}
}

\stoptext

MkII --- this comes close to what I want.

- Captions are centered above the TABLE, more or less, and long captions
  are constrained to a width having reasonable relationship to the width
  of the TABLE.
- Footnotes in the caption appear in a block of reasonable width at the
  bottom of the caption above the TABLE.
- Footnotes in the TABLE appear in a block below the TABLE whose left
  margin matches the TABLE's left margin.
- Symbols are being used for footnote marks.

Problems:

- I'd like the very short caption of the first table to be centered above
  the TABLE, but what I actually get seems to be paragraph with an
  invisible right margin that is centered over the TABLE, but at the text
  does not reach the paragraph's right margin, it looks misaligned. The
  same misaligment occurs in the second table's caption, though it is
  not so objectionable there as the footnotes' texts fill the width.
- The block of footnote texts of the TABLE is not wrapped at a reasonable
  width --- they seem to be left-aligned, but their right margin runs off
  the page.
- I'd like one numbering scheme for the for the whole table (caption and
  TABLE), such that the caption's notes are numbered *, † and the TABLE's
  notes are ‡, §. What I actually get is *, † for both, i.e., the
  numbering resets between caption and TABLE.
- I'd like commas separating multiple footnote marks next to each other,
  as in the caption in the example.
- Minor: I'd like to suppress the table from being placed on the the first
  page of the document as it floats above the title block, confusingly. A
  minor problem as realstically a table is unlikely to be placed this early
  in a real document.

MkIV (with change from \setupfootnotes to \setupnotation[footnote] as
noted) --- there are several new problems.

- The caption's footnotes are not printed, though their marks are.
- The TABLE's footnote marks are not printed (unknown references), but the
  notes themselves are (though wrongly).
- The texts of all the footnotes in the TABLE are run together into a
  single line that doesn't break at all.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http

Re: [NTG-context] Bleeding pictures as floats?

2015-05-05 Thread Henning Hraban Ramm
Am 2015-05-05 um 02:59 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 \def\bleed{3mm}
 \def\maxWidth{\dimexpr(\paperwidth+\bleed)}
 
 Use \definemeasure and \measure to set your own dimensions.
 It is also bad style to redefine the \bleed command.

Ok, forgot about that.

 Can you make a working minimal example.


\definepapersize[a6][width=105mm,height=148mm]
\definepapersize[a6o][width=115mm,height=158mm]
\setuppapersize[a6][a6o]
\setuplayout[
location=middle,marking=on,
grid=yes,
backspace=12.5mm, width=80mm,
topspace=12.5mm,
header=0mm,footer=10mm,
]

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

\setupexternalfigures[
maxwidth=\measure{maxWidth},
maxheight=\measure{maxHeight}
]
\setupcaptions[style=\ss\tfx,align=flushleft,number=no,width=\textwidth]

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

\def\topfig#1#2{%
\placebleedfigure[top]{#1}{%
\offset[topoffset=-\measure{topOffset}]%
{\externalfigure[#2][width=\measure{maxWidth}]}%
}%
}

\starttext

\chapter{Test}

\topfig{Caption}{koe}
\input tufte

\topfig{Caption}{koe}

\input knuth
\topfig{Caption}{koe}

\showlayout

\stoptext


So, one of my mistakes was, I had set 
\setupexternalfigures[maxwidth=\paperwidth], that overrides all other float 
definitions.

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


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] A couple of setupcaptions questions revisited

2015-04-11 Thread Rik Kabel

Bumping another old unsolved mystery.

On 2014-04-22 22:40, Rik Kabel wrote:
 On 2011-08-05, Wolfgang wrote with regard to section numbering not
 appearing in float captions when numbering is off for the section but
 called for by the chapter
 (http://www.mail-archive.com/ntg-context%40ntg.nl/msg57811.html):

 For the moment replace “number=no” with “incrementnumber=no”.


 and later that day
 (http://www.mail-archive.com/ntg-context%40ntg.nl/msg57814.html):

 There is a bug but it takes time to find it, unless it is found and
 fixed use incrementnumber.

 BTW: A *minimal* example your problem is **this**:

 \setupformulas[way=bysection,prefixsegments=chapter]
 %\setuphead[subsection][number=no]
 \setuphead[subsection][incrementnumber=no] \starttext
 \chapter{Chapter 1} \chapter{Chapter 2} \section{Section}
 \subsection{Subsection} \placeformula \startformula a^2+b^2=c^2
 \stopformula \stoptext

 This bug appears to still be with us. Has a solution since been
 proffered? If not, is a resolution in sight?

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

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

2015-04-09 Thread Wolfgang Schuster

 Am 09.04.2015 um 13:14 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 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] Styling captions inside \startcombination ... \stopcombination

2015-03-16 Thread Mojca Miklavec
On Sat, Mar 14, 2015 at 1:10 PM, Hans Hagen pra...@wxs.nl 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
___

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

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
___

Re: [NTG-context] \setupcaptions question

2015-03-10 Thread Wolfgang Schuster

 Am 13.02.2015 um 08:53 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 On Fri, 13 Feb 2015 04:54:58 +0100, Wolfgang Schuster 
 schuster.wolfg...@gmail.com wrote:
 
 No, you’re right. I used the wrong command (\at is used to show the page 
 where to float was placed)
 
 understood.
 
 and so far there is only a workaround for this problem. What you can do
 
 OK, does this require some sort of formal bug report or can the issue be
 now considered to be on the to do list?
 
 is to use the “suffix” key to set
 a stopper for the caption which will only appear in the caption itself.
 \setupexternalfigure[location=default]
 \setupcaption[figure][suffix=:]
 \starttext
 Take a look at \in{picture}[fig:cow] below.
 \startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
 \stopplacefigure
 \stoptext
 This solution is far from perfect because normally the suffix key is used 
 for the internal counter
 of split floats, e.g. when a numbered table is split over several tables and 
 you get numbers label
 „Table 3.a” etc.
 
 I see. I think workaround will suffice for the present document, thank you. I 
 will
 do that (and hope for a timely fix so that I can revert to numberstopper 
 soon…)


The new beta let you change the stopper symbol which is shown in the reference,
to disable the stopper you have to use “numberstopper={\symbol[none]}”.

\setupexternalfigure[location=default]

\setupcaption[figure][numberstopper=:]
\setupreferencestructureprefix[figure][default][numberstopper={\symbol[none]}]

\starttext

Take a look at \in{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
\stopplacefigure

\stoptext

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

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

[NTG-context] \setupcaptions question

2015-02-13 Thread joerg van den hoff


I want to use `numberstopper' for figure caption customization like so:

\setupcaptions[numberstopper={:}]

this works fine for the caption itself (i.e. I get, e.g. Figure 1:  
caption text) _but_

references to the figure via a defined label such as [fig:example]
in the body text do include the numberstopper, too, which is highly
undesirable in my view, since, e.g.,

... see Figure 1: for an example. ...

should rather read

... see Figure 1 for an example. ...

i.e. the numberstopper should be omitted (at least optionally) when  
referencing.


question: how can this be achieved?


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \setupcaptions question

2015-02-12 Thread Otared Kavian
Hi Wolfgang, and Joerg,

Actually with your code and using numberstopper instead of stopper your example 
works fine here, too.
So the right command is
\setupcaption[figure][numberstopper={:}]
and not what I wrote before (which works in mkii, though…).
Actually the command used by Joerg, that is
\setupcaptions[numberstopper={:}]
works also.

Best regards: OK

 On 12 Feb 2015, at 22:31, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 12.02.2015 um 17:37 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 
 I want to use `numberstopper' for figure caption customization like so:
 
 \setupcaptions[numberstopper={:}]
 
 this works fine for the caption itself (i.e. I get, e.g. Figure 1:
 caption text) _but_
 references to the figure via a defined label such as [fig:example]
 in the body text do include the numberstopper, too, which is highly
 undesirable in my view, since, e.g.,
 
 ... see Figure 1: for an example. ...
 
 should rather read
 
 ... see Figure 1 for an example. ...
 
 i.e. the numberstopper should be omitted (at least optionally) when
 referencing.
 
 question: how can this be achieved?
 
 
 Can you make a example because I can’t reproduce the problem you describe.
 
 \setupexternalfigure[location=default]
 
 \setupcaption[figure][numberstopper=:]
 
 \starttext
 
 Take a look at \at{picture}[fig:cow] below.
 
 \startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
 \stopplacefigure
 
 \stoptext
 
 Wolfgang
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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

Re: [NTG-context] \setupcaptions question

2015-02-12 Thread Otared Kavian
Hi Joerg,

I think you are right when refering to a figure, the number stopper should not 
appear in the text.
It seems to me that using something like

\setupcaption[figure][stopper={.}]

used to work in mkii and mkiv, but while it works in mkii, I just tried it with 
mkiv and found that it does not work as expected anymore.
So it is a bug introduced recently.
Probably Hans should be informed about it.

Best regards: OK

 On 12 Feb 2015, at 17:37, j. van den hoff veedeeh...@googlemail.com wrote:
 
 
 I want to use `numberstopper' for figure caption customization like so:
 
 \setupcaptions[numberstopper={:}]
 
 this works fine for the caption itself (i.e. I get, e.g. Figure 1:
 caption text) _but_
 references to the figure via a defined label such as [fig:example]
 in the body text do include the numberstopper, too, which is highly
 undesirable in my view, since, e.g.,
 
 ... see Figure 1: for an example. ...
 
 should rather read
 
 ... see Figure 1 for an example. ...
 
 i.e. the numberstopper should be omitted (at least optionally) when
 referencing.
 
 question: how can this be achieved?
 
 
 thx/j
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \setupcaptions question

2015-02-12 Thread Wolfgang Schuster

 Am 12.02.2015 um 17:37 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 
 I want to use `numberstopper' for figure caption customization like so:
 
 \setupcaptions[numberstopper={:}]
 
 this works fine for the caption itself (i.e. I get, e.g. Figure 1:
 caption text) _but_
 references to the figure via a defined label such as [fig:example]
 in the body text do include the numberstopper, too, which is highly
 undesirable in my view, since, e.g.,
 
 ... see Figure 1: for an example. ...
 
 should rather read
 
 ... see Figure 1 for an example. ...
 
 i.e. the numberstopper should be omitted (at least optionally) when
 referencing.
 
 question: how can this be achieved?


Can you make a example because I can’t reproduce the problem you describe.

\setupexternalfigure[location=default]

\setupcaption[figure][numberstopper=:]

\starttext

Take a look at \at{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
\stopplacefigure

\stoptext

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

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

Re: [NTG-context] \setupcaptions question

2015-02-12 Thread j. van den hoff

On Thu, 12 Feb 2015 22:18:51 +0100, Otared Kavian ota...@gmail.com wrote:


Hi Joerg,


hi otared,



I think you are right when refering to a figure, the number stopper  
should not appear in the text.

It seems to me that using something like

\setupcaption[figure][stopper={.}]

used to work in mkii and mkiv, but while it works in mkii, I just tried  
it with mkiv and found that it does not work as expected anymore.


thanks for confirming this (I also did not know that it used to work in  
mkii).



So it is a bug introduced recently.
Probably Hans should be informed about it.


the canonical 'communication channel' being which? this list? bug tracker?

best regards,

joerg



Best regards: OK

On 12 Feb 2015, at 17:37, j. van den hoff veedeeh...@googlemail.com  
wrote:



I want to use `numberstopper' for figure caption customization like so:

\setupcaptions[numberstopper={:}]

this works fine for the caption itself (i.e. I get, e.g. Figure 1:
caption text) _but_
references to the figure via a defined label such as [fig:example]
in the body text do include the numberstopper, too, which is highly
undesirable in my view, since, e.g.,

... see Figure 1: for an example. ...

should rather read

... see Figure 1 for an example. ...

i.e. the numberstopper should be omitted (at least optionally) when
referencing.

question: how can this be achieved?


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


maillist : ntg-context@ntg.nl /  
http://www.ntg.nl/mailman/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
___



--
Using Opera's revolutionary email client: http://www.opera.com/mail/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \setupcaptions question

2015-02-12 Thread j. van den hoff

On Thu, 12 Feb 2015 22:56:11 +0100, Otared Kavian ota...@gmail.com wrote:


Hi Wolfgang, and Joerg,

Actually with your code and using numberstopper instead of stopper your  
example works fine here, too.

So the right command is
\setupcaption[figure][numberstopper={:}]
and not what I wrote before (which works in mkii, though…).
Actually the command used by Joerg, that is
\setupcaptions[numberstopper={:}]
works also.

Best regards: OK

On 12 Feb 2015, at 22:31, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:



Am 12.02.2015 um 17:37 schrieb j. van den hoff  
veedeeh...@googlemail.com:



I want to use `numberstopper' for figure caption customization like so:

\setupcaptions[numberstopper={:}]

this works fine for the caption itself (i.e. I get, e.g. Figure 1:
caption text) _but_
references to the figure via a defined label such as [fig:example]
in the body text do include the numberstopper, too, which is highly
undesirable in my view, since, e.g.,

... see Figure 1: for an example. ...

should rather read

... see Figure 1 for an example. ...

i.e. the numberstopper should be omitted (at least optionally) when
referencing.

question: how can this be achieved?



Can you make a example because I can’t reproduce the problem you  
describe.


I have done that right now (problem definitely there) but then looked at  
the difference between my syntax

and yours. I used something like

\setupexternalfigures [directory={.}]
\setupcaption[width=.95\textwidth, location=bottom, numberstopper={:}]

\starttext
An illustration of this process is given in Fig.~\in[fig:convosim].

\stoptext

changing the referencing to

An illustration of this process is given in Fig.~\at[fig:convosim].

i.e. replacing `\in' by `\at' resolves the issue. I'm rather new to  
context and was under the impression that `\in' is the

context equivalent of latex's \ref and was not aware of \at at all.
but this seems only partly true. can you give me a pointer where best to  
look up the

differences between `\in' and `\at'?

so it seems I need to use \at for referencing figures, at least when  
numberstopper is not empty? ok, so be it 


and thanks a lot for responding and straightening this out.

best,

joerg




\setupexternalfigure[location=default]

\setupcaption[figure][numberstopper=:]

\starttext

Take a look at \at{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
 \externalfigure[cow]
\stopplacefigure

\stoptext

Wolfgang


--
Using Opera's revolutionary email client: http://www.opera.com/mail/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \setupcaptions question

2015-02-12 Thread Wolfgang Schuster

 Am 12.02.2015 um 23:14 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 On 12 Feb 2015, at 22:31, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 12.02.2015 um 17:37 schrieb j. van den hoff veedeeh...@googlemail.com:
 
 
 I want to use `numberstopper' for figure caption customization like so:
 
 \setupcaptions[numberstopper={:}]
 
 this works fine for the caption itself (i.e. I get, e.g. Figure 1:
 caption text) _but_
 references to the figure via a defined label such as [fig:example]
 in the body text do include the numberstopper, too, which is highly
 undesirable in my view, since, e.g.,
 
 ... see Figure 1: for an example. ...
 
 should rather read
 
 ... see Figure 1 for an example. ...
 
 i.e. the numberstopper should be omitted (at least optionally) when
 referencing.
 
 question: how can this be achieved?
 
 
 Can you make a example because I can’t reproduce the problem you describe.
 
 I have done that right now (problem definitely there) but then looked at the 
 difference between my syntax
 and yours. I used something like
 
 \setupexternalfigures [directory={.}]
 \setupcaption[width=.95\textwidth, location=bottom, numberstopper={:}]
 
 \starttext
 An illustration of this process is given in Fig.~\in[fig:convosim].
 
 \stoptext
 
 changing the referencing to
 
 An illustration of this process is given in Fig.~\at[fig:convosim].
 
 i.e. replacing `\in' by `\at' resolves the issue. I'm rather new to context 
 and was under the impression that `\in' is the
 context equivalent of latex's \ref and was not aware of \at at all.
 but this seems only partly true. can you give me a pointer where best to look 
 up the
 differences between `\in' and `\at'?
 
 so it seems I need to use \at for referencing figures, at least when 
 numberstopper is not empty? ok, so be it 

No, you’re right. I used the wrong command (\at is used to show the page where 
to float was placed)
and so far there is only a workaround for this problem. What you can do is to 
use the “suffix” key to set
a stopper for the caption which will only appear in the caption itself.


\setupexternalfigure[location=default]

\setupcaption[figure][suffix=:]

\starttext

Take a look at \in{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
\stopplacefigure

\stoptext


This solution is far from perfect because normally the suffix key is used for 
the internal counter
of split floats, e.g. when a numbered table is split over several tables and 
you get numbers label
„Table 3.a” etc.

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] \setupcaptions question

2015-02-12 Thread j. van den hoff
On Fri, 13 Feb 2015 04:54:58 +0100, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:


No, you’re right. I used the wrong command (\at is used to show the page  
where to float was placed)


understood.


and so far there is only a workaround for this problem. What you can do


OK, does this require some sort of formal bug report or can the issue be
now considered to be on the to do list?


is to use the “suffix” key to set
a stopper for the caption which will only appear in the caption itself.
\setupexternalfigure[location=default]
\setupcaption[figure][suffix=:]
\starttext
Take a look at \in{picture}[fig:cow] below.
\startplacefigure[reference=fig:cow,title=A dutch cow]
  \externalfigure[cow]
\stopplacefigure
\stoptext
This solution is far from perfect because normally the suffix key is  
used for the internal counter
of split floats, e.g. when a numbered table is split over several tables  
and you get numbers label

„Table 3.a” etc.


I see. I think workaround will suffice for the present document, thank  
you. I will
do that (and hope for a timely fix so that I can revert to numberstopper  
soon...)


regards,
joerg


Wolfgang



--
Using Opera's revolutionary email client: http://www.opera.com/mail/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \setupcaptions question

2015-02-12 Thread j. van den hoff


I want to use `numberstopper' for figure caption customization like so:

\setupcaptions[numberstopper={:}]

this works fine for the caption itself (i.e. I get, e.g. Figure 1:
caption text) _but_
references to the figure via a defined label such as [fig:example]
in the body text do include the numberstopper, too, which is highly
undesirable in my view, since, e.g.,

... see Figure 1: for an example. ...

should rather read

... see Figure 1 for an example. ...

i.e. the numberstopper should be omitted (at least optionally) when
referencing.

question: how can this be achieved?


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] figure caption question

2015-01-12 Thread j. van den hoff

hi,

I have some problems with adjusting figure captions. what I want:

1. constant caption width across all figures, possibly identical to text  
width


2. trailing the auto-incrementing figure number with a fixed character,  
e.g. a `:', while still being able to cross-reference
to the figure without the `:' occuring as part of the reference (i.e. it  
should read Figure 1: caption_goes_here and the
cross-reference then should read see Figure 1 rather than see Figure  
1:.


Using something like

\setupcaptions[width=0.9\textwidth, numberstopper={:}]

sort of works except that cross references than include the  
numberstopper `:' in the reference (see Figure 1:) which is really  
awkward. so how
can this be solved (adjust the numberstopper in the caption without  
affecting how the figure label/number appears in cross-references)?


regarding the caption width it seems that of the predefined keywords (fit,  
broad, max) only the first one is understood correctly (presuming
it means fit to figure width -- I did not find an explanation anywhere).  
`width=max' does not maximize the width (rather it is smaller than
with `width=fit' in some of my figures) and `width=broad' throws an error  
(! Missing number, treated as zero etc.). what am I missing regarding  
these keywords?


thx/j


--
Using Opera's revolutionary email client: http://www.opera.com/mail/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] Maximum width of a caption

2015-01-05 Thread Hans Hagen

On 1/5/2015 11:22 AM, Mojca Miklavec wrote:

On Sun, Jan 4, 2015 at 12:30 PM, Hans Hagen wrote:

On 1/3/2015 11:11 AM, Mojca Miklavec wrote:


Hi,

Is there any way to set the maximum width of a caption? I would like
to make sure that no figure caption exceeds, say, 75% of text width.

Here's an example of bad behaviour in the second figure:

\starttext

\reservefigure
[width=5cm,height=2cm,frame=on][force]
{Some very small figure with not too much text: OK}

\input tufte

This can hardly be distinguished from the main text:

\reservefigure
[width=\textwidth,height=.2\textwidth,frame=on][force]
{\input tufte}

\input tufte

Desired behaviour:

\placefigure[force]{\input tufte}
{\hbox to
.75\textwidth{\hss\framed[width=\textwidth,height=.2\textwidth]{}\hss}}

\input tufte

\stoptext

I've seen an option maxwidth, but only in connection to
\externalfigure[...][maxwidth=...].

I can cheat as on the third figure above, but that seems like an ugly
approach to me.



can you test this a bit:

\unprotect

\setupcaptions
   [\c!maxwidth=.75\hsize]


Thank you very much. The patch that you sent me for strc-flt.mkvi
seems to work as expected on a long document with many figures.

The only exception are one-liners. The following creates a caption
that extends to almost the whole text width:

 \placefigure
   % Why are there two spaces between dummy and text?
   {Some \dorecurse{7}{dummy } text}
   {\externalfigure[dummy][width=\textwidth,height=.2\textwidth]}

As soon as slightly more text is added, it shrinks to the desired text width.


oneliners have a separate branch



(But then again I'm not sure if that is a bug or a feature ;)

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] Maximum width of a caption

2015-01-05 Thread Mojca Miklavec
On Sun, Jan 4, 2015 at 12:30 PM, Hans Hagen wrote:
 On 1/3/2015 11:11 AM, Mojca Miklavec wrote:

 Hi,

 Is there any way to set the maximum width of a caption? I would like
 to make sure that no figure caption exceeds, say, 75% of text width.

 Here's an example of bad behaviour in the second figure:

 \starttext

 \reservefigure
 [width=5cm,height=2cm,frame=on][force]
 {Some very small figure with not too much text: OK}

 \input tufte

 This can hardly be distinguished from the main text:

 \reservefigure
 [width=\textwidth,height=.2\textwidth,frame=on][force]
 {\input tufte}

 \input tufte

 Desired behaviour:

 \placefigure[force]{\input tufte}
 {\hbox to
 .75\textwidth{\hss\framed[width=\textwidth,height=.2\textwidth]{}\hss}}

 \input tufte

 \stoptext

 I've seen an option maxwidth, but only in connection to
 \externalfigure[...][maxwidth=...].

 I can cheat as on the third figure above, but that seems like an ugly
 approach to me.


 can you test this a bit:

 \unprotect

 \setupcaptions
   [\c!maxwidth=.75\hsize]

Thank you very much. The patch that you sent me for strc-flt.mkvi
seems to work as expected on a long document with many figures.

The only exception are one-liners. The following creates a caption
that extends to almost the whole text width:

\placefigure
  % Why are there two spaces between dummy and text?
  {Some \dorecurse{7}{dummy } text}
  {\externalfigure[dummy][width=\textwidth,height=.2\textwidth]}

As soon as slightly more text is added, it shrinks to the desired text width.

(But then again I'm not sure if that is a bug or a feature ;)

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] Maximum width of a caption

2015-01-04 Thread Hans Hagen

On 1/3/2015 11:11 AM, Mojca Miklavec wrote:

Hi,

Is there any way to set the maximum width of a caption? I would like
to make sure that no figure caption exceeds, say, 75% of text width.

Here's an example of bad behaviour in the second figure:

\starttext

\reservefigure
[width=5cm,height=2cm,frame=on][force]
{Some very small figure with not too much text: OK}

\input tufte

This can hardly be distinguished from the main text:

\reservefigure
[width=\textwidth,height=.2\textwidth,frame=on][force]
{\input tufte}

\input tufte

Desired behaviour:

\placefigure[force]{\input tufte}
{\hbox to 
.75\textwidth{\hss\framed[width=\textwidth,height=.2\textwidth]{}\hss}}

\input tufte

\stoptext

I've seen an option maxwidth, but only in connection to
\externalfigure[...][maxwidth=...].

I can cheat as on the third figure above, but that seems like an ugly
approach to me.


can you test this a bit:

\unprotect

\setupcaptions
  [\c!maxwidth=.75\hsize]

\def\strc_floats_prepare_stack_caption_auto
  {\ifx\p_strc_floats_caption_align\empty \else

\doifnotinset\v!middle\p_strc_floats_caption_align{\let\captionovershoot\!!zeropoint}%
   \fi
   \edef\captionhsize{\the\wd\b_strc_floats_content}%
\scratchwidth\floatcaptionparameter\c!maxwidth\relax
   \ifdim\captionhsize.75\hsize
 % float is wider than \hsize
 \setbox\b_strc_floats_caption\vbox
   {\settrialtypesetting
\strc_floats_caption_set_align
\hsize\scratchwidth
\notesenabledfalse
\strc_floats_make_complete_caption}%
 \ifdim\ht\scratchbox\lineheight % more lines
   \setbox\b_strc_floats_caption\vbox
 {\strc_floats_caption_set_align
  \hsize\dimexpr\captionhsize-\captionovershoot\relax
  \ifdim\hsize\captionminwidth\relax
\hsize\scratchwidth
  \fi
  \strc_floats_make_complete_caption}%
 \else
   \setbox\b_strc_floats_caption\vbox
 {\strc_floats_caption_set_align
\hsize\scratchwidth
  \strc_floats_make_complete_caption}%
 \fi
   \else
 % float is smaller of equal to \hsize
 \ifdim\captionhsize\captionminwidth\relax
   \scratchdimen\captionminwidth % float smaller than min width
   \edef\captionhsize{\the\scratchdimen}%
 \fi
 \setbox\scratchbox\vbox % test with overshoot
   {\settrialtypesetting

\scratchdimen\dimexpr\captionhsize+\captionovershoot+3\emwidth\relax % 
3em is an average word length

\ifdim\scratchdimen\hsize
  \hsize\scratchdimen
\fi
\notesenabledfalse
\strc_floats_make_complete_caption}%
 \ifdim\ht\scratchbox\lineheight
   % at least an average word longer than a line
   \setbox\b_strc_floats_caption\vbox
 {\strc_floats_caption_set_align
  \scratchdimen\dimexpr\captionhsize+\captionovershoot\relax
  \ifdim\scratchdimen\hsize
\hsize\scratchdimen
  \fi
  \strc_floats_make_complete_caption}%
 \else\ifx\p_strc_floats_caption_align\empty
   \setbox\b_strc_floats_caption\vbox
 {\strc_floats_caption_set_align
  \hsize\captionhsize
  \raggedcenter % overloads
  \strc_floats_make_complete_caption}%
 \else
   \setbox\b_strc_floats_caption\vbox
 {\strc_floats_caption_set_align
  \hsize\captionhsize
  \strc_floats_make_complete_caption}%
 \fi\fi
   \fi}

\protect


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

2014-12-05 Thread Fabrice Couvreur
Hi,
In the following code, I would like columns that contain the figures have a
white background.
Best regards,
Fabrice

\definecolor[mycolor][c=0.1, m=0.00, y=0.00, k=0.00]
\setupcaptions[number=no]
\starttext
\startframedtext[
width=\textwidth,
frame=on,
location=middle,
background=color,
backgroundcolor=mycolor]
\leftaligned{\color[red]{PROPRIÉTÉ}}
\blank[big]
Deux plans ${\cal P}_1$ et ${\cal P}_2$ de l'espace sont soit sécants, soit
parallèles.
\blank[big]
\bTABLE[align={middle,lohi}]
\setupTABLE[column][first][width=0.3\textwidth]
\setupTABLE[column][two][width=0.7\textwidth]
\setupTABLE[row][first][background=color,backgroundcolor=mycolor]
\bTR
\bTD
${\cal P}_1$ et ${\cal P}_2$ sont {\bf sécants}.
\eTD
\bTD[nc=2]
${\cal P_1}$ et ${\cal P_2}$ sont {\bf parallèles}.
\eTD
\eTR
\bTR
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
sécants} suivant une droite $d$.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
strictement parallèles}.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\bTD
\dontleavehmode\placefigure[] {${\cal P}_1$ et ${\cal P}_2$ sont {\bf
confondus}.} {\externalfigure[cow.pdf][width=4cm]}
\eTD
\eTR
\eTABLE
\stopframedtext
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Alignment, indenting and font inside floats

2014-07-28 Thread Rik Kabel

On 2014-07-28 15:29, Joshua Krämer wrote:

Dear list,

I want to setup all my floats' contents to be middle-aligned, not
indented and typeset in a distinct font.  How can I do this?  The
attached example does not work.

Thank you and kind regards,
Joshua Krämer


\setupindenting [yes, \the\baselineskip]
\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
\setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
indenting=no]

\starttext
\input knuth

\startplacefigure
Word
\stopplacefigure

\stoptext




   \setupexternalfigures[location={local,default}]
   \setupindenting[yes, \the\baselineskip]
   %\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
   %\setupfloats [align=middle,
   style={\switchtobodyfont[figurefamily]}, indenting=no]
   \setupcaptions [style=ss]
   \setupframed[style=it]

   \starttext
   \input knuth

   \startplacefigure[title={Not a figure}]
   Word
   \stopplacefigure

   \startplacetable[title={A table}]
   \starttable[||]
   \NC Table\NC\NR
   \stoptable
   \stopplacetable

   \startplacefigure[title={A bovine figure}]
   \externalfigure[cow][width=5cm]
   \stopplacefigure

   \startplaceintermezzo[title={An intermezzo}]
   \startframedtext
   \input ward
   \stopframedtext
   \stopplaceintermezzo

   \stoptext

Captions are styled separately from the floats, hence \setupcaptions.

Word is not a figure. \startplacefigure does not make what follows a 
figure. When a real figure is set with \startplacefigure, it is centered 
by default.


You may be able to get away with style=ss instead of a new font 
definition if the sans is linked to the main serif font.


The contents of a float are styled according to the type of float.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 make floats extend into the outer margin

2014-07-27 Thread Joshua Krämer
On 2014-07-25, 16:18, Hans Hagen wrote:

 \showframe
 
 \starttext
 
 \startplacefigure
  \framed[width=.8\textwidth,framecolor=red]{one}
 \stopplacefigure
 
 \definefloat[widefigure][figure][figure]
 \setupfloat   [widefigure][location=flushleft]
 \setupcaptions[widefigure][width=\textwidth,align=middle]
 
 \startplacewidefigure
  \framed[width=1.2\textwidth,framecolor=blue]{two}
 \stopplacewidefigure
 
 \stoptext

Thanks, but this doesn't seem to be a solution to my problem, because
the figures extend into the right margin always, and I want them to
extend into the outer margin (i. e. left margin on left pages, right
margin on right pages).

I'm now using the following semi-automatic solution, but there is one
problem left:  The alignment is not applied to tikz pictures.  Does
somebody have an idea how to resolve this?

Thank you and kind regards,
Joshua


\setuppagenumbering[alternative=doublesided]

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

\definemeasure[Widetext][\textwidth+\rightmargindistance+\rightmarginwidth]

\define\WideFloatCommand
  {\dowithnextbox
 {\signalrightpage
  \ifdim\nextboxwd\textwidth  

\doifrightpageelse{\leftaligned{\flushnextbox}}{\rightaligned{\flushnextbox}}%
  \else
\midaligned{\flushnextbox}%
  \fi}
 \hbox}

\definefloat [widefigure] [figure] [figure]
\setupfloat [widefigure] [command=\WideFloatCommand]

\usemodule[tikz]

\showframe

\starttext

x

\page

\startplacewidefigure
\framed[width=\measure{Widetext}]{One}
\stopplacewidefigure

\startplacewidefigure
\framed[width=3cm]{Two}
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=\measure{Widetext}] {Three};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=3cm] {Four};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\rightaligned{%
\starttikzpicture
\node [draw, minimum width=\measure{Widetext}] {Five};
\stoptikzpicture}
\stopplacewidefigure

\startplacewidefigure
\midaligned{%
\starttikzpicture
\node [draw, minimum width=3cm] {Six};
\stoptikzpicture}
\stopplacewidefigure

\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] How to make floats extend into the outer margin

2014-07-27 Thread Wolfgang Schuster

Am 27.07.2014 um 16:54 schrieb Joshua Krämer joshua.krae...@gmail.com:

 On 2014-07-25, 16:18, Hans Hagen wrote:
 
 \showframe
 
 \starttext
 
 \startplacefigure
 \framed[width=.8\textwidth,framecolor=red]{one}
 \stopplacefigure
 
 \definefloat[widefigure][figure][figure]
 \setupfloat   [widefigure][location=flushleft]
 \setupcaptions[widefigure][width=\textwidth,align=middle]
 
 \startplacewidefigure
 \framed[width=1.2\textwidth,framecolor=blue]{two}
 \stopplacewidefigure
 
 \stoptext
 
 Thanks, but this doesn't seem to be a solution to my problem, because
 the figures extend into the right margin always, and I want them to
 extend into the outer margin (i. e. left margin on left pages, right
 margin on right pages).

\setupfloat[widefigure][location=inner]

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] How to make floats extend into the outer margin

2014-07-25 Thread Hans Hagen

On 7/25/2014 4:06 PM, Rik Kabel wrote:

On 2014-07-25 07:10, Hans Hagen wrote:

Am 24.07.2014 um 10:36 schrieb Wolfgang Schuster

schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com:



\starttext

\startplacefigure
\framed[width=.8\textwidth,framecolor=red]{one}
\stopplacefigure

\setupfloat[figure][location=flushleft]

\startplacefigure
\framed[width=1.2\textwidth,framecolor=blue]{two}
\stopplacefigure

\stoptext


You can use the command key for \setupfloat to apply a macro to the
finished content of the float.

The purpose of this macro is to save the content and compare the width
to the width of the text are,
when the figure is wider then the available space use the \leftaligned
or \rightaligned commands
to let the content protrude to the outer margins.


\setuppagenumbering[alternative=doublesided]

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

\definemeasure[Widefigure][\textwidth+\rightmargindistance+\rightmarginwidth]


\setupfloat[figure][command=\FigureCommand]

\define\FigureCommand
 {\dowithnextbox
{\signalrightpage
 \ifdim\nextboxwd\textwidth
\doifrightpageelse{\leftaligned{\flushnextbox}}{\rightaligned{\flushnextbox}}%

 \else
   \midaligned{\flushnextbox}%
 \fi}
\hbox}

\showframe

\starttext

\startplacefigure
\framed[width=.8\textwidth,framecolor=red]{Left margin}
\stopplacefigure

\page

\startplacefigure
\framed[width=\measure{Widefigure},framecolor=red]{Left margin}
\stopplacefigure

\input knuth

\page

\startplacefigure
\framed[width=\measure{Widefigure},framecolor=red]{Right margin}
\stopplacefigure

\stoptext

Wolfgang
___


With Wolfgang's solution, the captions remain centered on the page. With
Hans's solution, the captions move with the center of the frame. I
expect that, if captions are used and there are other figures that are
not placed with this mechanism, Wolfgang's solution will result in a
better looking page.


maybe some day i come up with a cleaner caption handler ...

\showframe

\starttext

\startplacefigure
\framed[width=.8\textwidth,framecolor=red]{one}
\stopplacefigure

\definefloat[widefigure][figure][figure]
\setupfloat   [widefigure][location=flushleft]
\setupcaptions[widefigure][width=\textwidth,align=middle]

\startplacewidefigure
\framed[width=1.2\textwidth,framecolor=blue]{two}
\stopplacewidefigure

\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] \headstylecolor in \setupcaptions ?

2014-07-12 Thread Xan
Hi,

how to set the color of head in setupcaptions? Something like:
\setupcaptions[headstyle={\ss},headstylecolor=red]

thanks
Xan

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] \headstylecolor in \setupcaptions ?

2014-07-12 Thread Xan
I found myself: headcolor=red

On Sat, 12 Jul 2014 18:31:55 +0200
Xan dxpubl...@telefonica.net ha escrit:

 Hi,
 
 how to set the color of head in setupcaptions? Something like:
 \setupcaptions[headstyle={\ss},headstylecolor=red]
 
 thanks
 Xan
 
 PS: Please CCme
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] MKIV caption separator, revisited

2014-04-22 Thread Wolfgang Schuster

Am 22.04.2014 um 02:57 schrieb Rik Kabel cont...@rik.users.panix.com:

 Has any progress been made in the past few years implementing modifiable 
 separators for captions under MKIV? This was raised as an issue by (at least) 
 Mojca Miklavec in December 2010 
 (http://www.mail-archive.com/ntg-context%40ntg.nl/msg51542.html) and by Andy 
 Thomas 18 months later 
 (http://www.mail-archive.com/ntg-context%40ntg.nl/msg63937.html). (Their 
 issues with stopper have been resolved. In MKIV it is numberstopper.)
 
 Here is an MWE demonstrating the problem. It compiles cleanly, but the 
 separator remains the default period. With MKII, it generates a figure with a 
 hyphen and not a period.
 \setupcaptions[separator=-]

\setupcaptions[prefixconnector=-]

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

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

Re: [NTG-context] MKIV caption separator, revisited

2014-04-22 Thread Rik Kabel

On 2014-04-22 02:25, Wolfgang Schuster wrote:


Am 22.04.2014 um 02:57 schrieb Rik Kabel cont...@rik.users.panix.com 
mailto:cont...@rik.users.panix.com:


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


Here is an MWE demonstrating the problem. It compiles cleanly, but 
the separator remains the default period. With MKII, it generates a 
figure with a hyphen and not a period.


\setupcaptions[separator=-]


\setupcaptions[prefixconnector=-]

Wolfgang



As always, thank you.

I have updated the wiki page for setupcaptions. The updated includes a 
reworded description of the suffix key and new descriptions for the 
stopper/numberstopper and separator/prefixconnector keys.


(There are many other keys that are not documented, and a few at least 
that differ between MKII and MKIV, but I do not have the time at the 
moment to test all of them.)


--
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] A couple of setupcaptions questions revisited

2014-04-22 Thread Rik Kabel
On 2011-08-05, Wolfgang wrote with regard to section numbering not 
appearing in float captions when numbering is off for the section but 
called for by the chapter 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg57811.html):


   For the moment replace number=no with incrementnumber=no.


and later that day 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg57814.html):


   There is a bug but it takes time to find it, unless it is found and
   fixed use incrementnumber.

   BTW: A *minimal* example your problem is **this**:

   \setupformulas[way=bysection,prefixsegments=chapter]
   %\setuphead[subsection][number=no]
   \setuphead[subsection][incrementnumber=no] \starttext
   \chapter{Chapter 1} \chapter{Chapter 2} \section{Section}
   \subsection{Subsection} \placeformula \startformula a^2+b^2=c^2
   \stopformula \stoptext

This bug appears to still be with us. Has a solution since been 
proffered? If not, is a resolution in sight?


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

  1   2   3   4   >