Re: [NTG-context] Captions with background

2019-08-04 Thread Henning Hraban Ramm
Am 2019-08-04 um 10:33 schrieb Hans Hagen :
> 
> 

Thank you! That is much cleaner than my try, of course. I’ll try to transfer 
that into my environment.



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
If your question is of interest to others as well, please add an 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] Captions with background

2019-08-04 Thread Hans Hagen

On 8/3/2019 5:22 PM, Henning Hraban Ramm wrote:

Hi,

in my books I typeset captions onto full page images, therefore I need a 
background; in the attached example it’s just a white box, usually I use a 
MetaPost shadow (some of you helped me with that a few years ago, current code 
see https://wiki.contextgarden.net/Drop_shadows).

Now, the background should just enclose the text, not more. Since I don’t know 
how long the caption will be (I use the whole setup in a macro), I need a \vbox 
within \setlayer, but that always uses the full \textwidth, regardless of width 
settings of \framed.

If the caption is short, the box should be minimal. Is this possible?


Even better would be a textbackground just behind the text lines.

Unfortunately my MP foo is not up to the task, the rectangular shadow was hard 
enough, but I’d try.
There’s an example in details.pdf, but I don’t understand how I could 
manipulate the path around the text (not: paragraph).


The example shows another problem: If you run it with --mode=arrange, the bleed 
is cut off.
Is this a matter of settings or a bug?


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




--

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

\setuppapersize[A6][A6,oversized]

\setuplayout
   [location=middle,
marking=on,
grid=yes]

\setuppagenumbering
  [alternative=doublesided]

\starttext

\definelayer
  [page]
  [width=\paperwidth,
   height=\paperheight]

\definelayer
  [footer]
  [width=\textwidth,
   height=\footerheight]

\setupbackgrounds
  [page]
  [background=page,
   state=start]

\setupbackgrounds
  [footer][text]
  [background=footer,
   state=start]

\setupfooter[strut=no]

\useMPlibrary[dum]

\showframe[frame=on]

\dorecurse{10} {

test

\page[left]

\setlayer
  [page]
  [x=-2mm,
   y=-2mm,
   preset=lefttop]
  {\externalfigure
 [bogus]
 [width=\dimexpr\paperwidth+2mm,
  height=\dimexpr\paperheight+4mm]
 [frame=on]}

\setlayerframed
  [footer]
  [preset=leftbottom]
  [frame=off,
   align=normal,
   background=color,
   backgroundcolor=white]
  {\fakewords{#1}{#1}}

\page[empty]

test

}

\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] Captions with background

2019-08-03 Thread Henning Hraban Ramm
Hi,

in my books I typeset captions onto full page images, therefore I need a 
background; in the attached example it’s just a white box, usually I use a 
MetaPost shadow (some of you helped me with that a few years ago, current code 
see https://wiki.contextgarden.net/Drop_shadows).

Now, the background should just enclose the text, not more. Since I don’t know 
how long the caption will be (I use the whole setup in a macro), I need a \vbox 
within \setlayer, but that always uses the full \textwidth, regardless of width 
settings of \framed.

If the caption is short, the box should be minimal. Is this possible?


Even better would be a textbackground just behind the text lines.

Unfortunately my MP foo is not up to the task, the rectangular shadow was hard 
enough, but I’d try.
There’s an example in details.pdf, but I don’t understand how I could 
manipulate the path around the text (not: paragraph).


The example shows another problem: If you run it with --mode=arrange, the bleed 
is cut off.
Is this a matter of settings or a bug?


Greetlings, Hraban


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

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


Re: [NTG-context] Captions numbering

2016-09-04 Thread Jose Luis Arellano
2016-09-04 6:42 GMT-03:00 Wolfgang Schuster :
> Use "incrementnumber=list" to get TOC entries for your unnumbered sections.
>
> Wolfgang

Hello Wolfgang.

In fact, with the option "incrementnumber=list" you can to show
unnumbered section in TOC but unfortunately this causes the captions
numbering problem.
In the following example you can check that when one use a
figure/table in a unnumbered section, captions will shown as Table 1,
and not as Table 1.1.

\setuphead[chapter, section, subsection]
\setuphead[subsubsection][number=no,incrementnumber=list]
\starttext
\starttitle[title={Contents}]
\stoptitle
\placelist[chapter,section,subsubsection]
\starttitle[title={Figures}]
\stoptitle
\placelist[figure]
\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
\stopsection
\stopchapter
\stoptext

Thanks.
___
If your question is of interest to others as well, please add an 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] Captions numbering

2016-09-04 Thread Wolfgang Schuster

Jose Luis Arellano 
3. September 2016 um 04:35
Thanks for the answer Jan, but unfortunately this doesn't solve my
problem because the option "incrementnumber=no" causes that the
unnumbered section are not show in TOC.

Use "incrementnumber=list" to get TOC entries for your unnumbered sections.

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] Captions numbering

2016-09-02 Thread Jose Luis Arellano
Thanks for the answer Jan, but unfortunately this doesn't solve my
problem because the option "incrementnumber=no" causes that the
unnumbered section are not show in TOC.
Hopefully someone has a clue about this.

Thanks guys.

2016-09-01 17:14 GMT-03:00 Jan Willem Flamma :
>
> Hi Jose Luis,
>
> I eventually solved this by setting up the subsubsection as follows:
>
> \setuphead[subsubsection]
> [incrementnumber=no]
>
> This links to a set of test files on the pragma website and maybe of use to 
> you: http://context.aanhet.net/download-1.htm
>
> Kind regards,
> Jan Willem
___
If your question is of interest to others as well, please add an 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] Captions numbering

2016-09-01 Thread Jan Willem Flamma
Hi Jose Luis,

I eventually solved this by setting up the subsubsection as follows:

\setuphead[subsubsection]
[incrementnumber=no]

This links to a set of test files on the pragma website and maybe of use to 
you: http://context.aanhet.net/download-1.htm

Kind regards,
Jan Willem


> On 31 aug. 2016, at 14:04, Jose Luis Arellano  wrote:
> 
> Dear list,
> I experience exactly same issue explained here 
> , but 
> apparently the link provided for Hans doesn't exist.
> I will appreciate any help.
> Thanks.
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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

[NTG-context] Captions numbering

2016-08-31 Thread Jose Luis Arellano
Dear list,
I experience exactly same issue explained here
, but
apparently the link provided for Hans doesn't exist.
I will appreciate any help.
Thanks.
___
If your question is of interest to others as well, please add an 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] captions in float combinations

2013-09-09 Thread Aditya Mahajan

On Mon, 9 Sep 2013, Robert Blackstone wrote:


Wouldn't it  be worthwhile to add it to the wiki?


Definitely. The best place is http://wiki.contextgarden.net/Combinations 
and the documentation of \startcombination and 
\startplacecombinationfloat.


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

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


Re: [NTG-context] captions in float combinations

2013-09-09 Thread Robert Blackstone

Hi Marco, hi Aditya,

Thank you very much for the solutions you have proposed for my problem, that of 
making a side by side combination of two figures of unequal height with both 
the figures and their (sub)-captions located at the top.

In order not to make this mail too long I simply refer to the ntg-context 
Digest numbers and message number containing the proposed solutions: 
Marco's in ntg-context Digest, Vol 111, Issue 23, Message 1, and in ntg-context 
Digest, Vol 111, Issue 24, message 5, Aditya's in ntg-context Digest, Vol 111, 
Issue 24, message 4

These solutions give me all the possibilities I need. 
When I just want both figures in the combination to be located at the top 
without subcaptions I will probably use Marco's second proposal, which is both 
simpler and far more elegant than the hack I found myself.

If I want them at the top with subcaptions I will use Aditya's method, which, 
by the way, is nearly identical with Marco's first solution, but for two 
arguments for \externalfigure, the fllename of the figure and [location=top].

This fully solved my problem. Thank you both.
Wouldn't it  be worthwhile to add it to the wiki?

Best regards,
Robert


___
If your question is of interest to others as well, please add an 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] captions in float combinations

2013-09-08 Thread Robert Blackstone
Dear list,
In two-column combinations  of figures, the subcaptions for the individual 
figures are always placed at the bottom, below the figures, regardless of the 
position of the main figure caption.
In my project I have all figure captions located above the figure. How can I 
move also these subcaptions to the top, to a position just below the main 
caption? 
Thanks in advance for any advice.

Best regards, 
Robert Blackstone

___
If your question is of interest to others as well, please add an 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] captions in float combinations

2013-09-08 Thread Marco Patzer
On 2013–09–08 Robert Blackstone wrote:

 In my project I have all figure captions located above the figure.
 How can I move also these subcaptions to the top, to a position
 just below the main caption?

As far as I can see, this is not supported by the combination
mechanism because the captions in combinations are not implemented
using the float captions mechanism.

What you can do instead, is using a float caption and a float
combination, which will respect the global caption setups.

\useMPlibrary [dum]

\definefloat
  [combinationfloat]
  [combinationfloats]
  [figure]

\setupcaption
  [combinationfloat]
  [number=no]

\setupcaptions
  %% [location=bottom]
  [location=top]

\starttext
  \startplacefigure [title=Foobar]
\startfloatcombination [2*2]
  \startplacecombinationfloat [title=alpha] \externalfigure 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=beta]  \externalfigure 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=gamma] \externalfigure 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=delta] \externalfigure 
\stopplacecombinationfloat
\stopfloatcombination
  \stopplacefigure
\stoptext

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] captions in float combinations

2013-09-08 Thread Robert Blackstone

On 8 sep. 2013, at 17:01,  Marco Patzer li...@homerow.info wrote:

 
 On 2013?09?08 Robert Blackstone wrote:
 
 In my project I have all figure captions located above the figure.
 How can I move also these subcaptions to the top, to a position
 just below the main caption?
 
 As far as I can see, this is not supported by the combination
 mechanism because the captions in combinations are not implemented
 using the float captions mechanism.
 
 What you can do instead, is using a float caption and a float
 combination, which will respect the global caption setups.
 
 \useMPlibrary [dum]
 
 \definefloat
  [combinationfloat]
  [combinationfloats]
  [figure]
 
 \setupcaption
  [combinationfloat]
  [number=no]
 
 \setupcaptions
  %% [location=bottom]
  [location=top]
 
 \starttext
  \startplacefigure [title=Foobar]
\startfloatcombination [2*2]
  \startplacecombinationfloat [title=alpha] \externalfigure 
 \stopplacecombinationfloat
  \startplacecombinationfloat [title=beta]  \externalfigure 
 \stopplacecombinationfloat
  \startplacecombinationfloat [title=gamma] \externalfigure 
 \stopplacecombinationfloat
  \startplacecombinationfloat [title=delta] \externalfigure 
 \stopplacecombinationfloat
\stopfloatcombination
  \stopplacefigure
 \stoptext
 
 Marco

Hi Marco,

Thanks for your solution. It took me a while to harmonize your new float with 
my other floats in my document setups. These are all placed on the left side of 
the page and that caused yor float to move almost off the page.
So I added:

\setupfloat[combinationfloat][location=middle,spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]

and now it works beautifully.

There is, however, another complication which makes that unfortunately I cannot 
use your solution out of the box in all situations.
The paired figures in my particular project are often of different size, in 
particular of different height, (but small enough to be placed side by side).
The author wants not only the figure captions at the top, but also the figures 
themselves.
I did not mention this complication because, a) I had found a hack to place 
both figures at the top, and b) I had not expected that the solution for the 
problem I posted would be a new type of float instead of a new type of 
combination.

So now the captions are at the top but the figures are not. (Law of 
Conservation of Misery)

I will use your solution when the figures are of the same height and can be 
placed at the bottom

You're far more experienced and ingenious in these matters than I am, so 
perhaps you have a solution for this additional problem, positioning figures of 
different sizes at the top too. (I should mention, however, that I have a 
fall-back solution, which consists of adding another line to the caption with 
info about the two figures in the combination)

Thank you very much  anyway.

Best regards,

Robert

___
If your question is of interest to others as well, please add an 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] captions in float combinations

2013-09-08 Thread Aditya Mahajan

On Sun, 8 Sep 2013, Robert Blackstone wrote:



On 8 sep. 2013, at 17:01,  Marco Patzer li...@homerow.info wrote:



On 2013?09?08 Robert Blackstone wrote:


In my project I have all figure captions located above the figure.
How can I move also these subcaptions to the top, to a position
just below the main caption?


As far as I can see, this is not supported by the combination
mechanism because the captions in combinations are not implemented
using the float captions mechanism.

What you can do instead, is using a float caption and a float
combination, which will respect the global caption setups.

\useMPlibrary [dum]

\definefloat
 [combinationfloat]
 [combinationfloats]
 [figure]

\setupcaption
 [combinationfloat]
 [number=no]

\setupcaptions
 %% [location=bottom]
 [location=top]

\starttext
 \startplacefigure [title=Foobar]
   \startfloatcombination [2*2]
 \startplacecombinationfloat [title=alpha] \externalfigure 
\stopplacecombinationfloat
 \startplacecombinationfloat [title=beta]  \externalfigure 
\stopplacecombinationfloat
 \startplacecombinationfloat [title=gamma] \externalfigure 
\stopplacecombinationfloat
 \startplacecombinationfloat [title=delta] \externalfigure 
\stopplacecombinationfloat
   \stopfloatcombination
 \stopplacefigure
\stoptext

Marco


Hi Marco,

Thanks for your solution. It took me a while to harmonize your new float with 
my other floats in my document setups. These are all placed on the left side of 
the page and that caused yor float to move almost off the page.
So I added:

\setupfloat[combinationfloat][location=middle,spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]

and now it works beautifully.

There is, however, another complication which makes that unfortunately I cannot use your 
solution out of the box in all situations.
The paired figures in my particular project are often of different size, in 
particular of different height, (but small enough to be placed side by side).
The author wants not only the figure captions at the top, but also the figures 
themselves.
I did not mention this complication because, a) I had found a hack to place 
both figures at the top, and b) I had not expected that the solution for the 
problem I posted would be a new type of float instead of a new type of 
combination.

So now the captions are at the top but the figures are not. (Law of 
Conservation of Misery)


You can try playing around with the location parameter of \externalfigure. 
For example:


\useMPlibrary [dum]

\definefloat
  [combinationfloat]
  [combinationfloats]
  [figure]

\setupcaption
  [combinationfloat]
  [number=no]

\setupcaptions
  %% [location=bottom]
  [location=top]

\starttext
  filler text \input ward
  \startplacefigure [title=Foobar]
\startfloatcombination [4*1]
  \startplacecombinationfloat [title=alpha] 
\externalfigure[dummy][width=1cm, height=2cm, location=top] 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=beta]  
\externalfigure[dummy][width=1cm, height=3cm, location=top] 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=gamma] 
\externalfigure[dummy][width=1cm, height=4cm, location=top] 
\stopplacecombinationfloat
  \startplacecombinationfloat [title=delta] 
\externalfigure[dummy][width=1cm, height=5cm, location=top] 
\stopplacecombinationfloat
\stopfloatcombination
  \stopplacefigure

  More text \input knuth
\stoptext


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

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


Re: [NTG-context] captions in float combinations

2013-09-08 Thread Marco Patzer
On 2013–09–08 Robert Blackstone wrote:

 The paired figures in my particular project are often of different
 size, in particular of different height, (but small enough to be
 placed side by side). The author wants not only the figure
 captions at the top, but also the figures themselves.

You can try:

  \setupcombinations
[location=top]

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an 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] captions for figures - none - no longer working

2011-12-06 Thread Ian Lawrence
Morning all,

It seems the parameter {none} is no longer effective in \placefigure:

From the wiki: You get no caption with none.

On at least: ConTeXt  ver: 2011.11.29 23:11 MKIV  fmt: 2011.12.1, this appears 
**not** to be the case...

Anyone else - or is there some change not yet documented on the wiki. My markup 
worked on previous versions of the beta.
___

Minimal example

% make with context /Users/Ian/SPT_PDF_context/tryouts/test_simplest.tex

\starttext

Hello world
\placefigure[place]{none}{\externalfigure[myone]}
\stoptext

Thanks

Ian___
If your question is of interest to others as well, please add an 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] captions for figures - none - no longer working

2011-12-06 Thread Hans Hagen

On 6-12-2011 11:43, Ian Lawrence wrote:

Morning all,

It seems the parameter {none} is no longer effective in \placefigure:

 From the wiki: You get no caption with none.

On at least: ConTeXt  ver: 2011.11.29 23:11 MKIV  fmt: 2011.12.1, this appears 
**not** to be the case...

Anyone else - or is there some change not yet documented on the wiki. My markup 
worked on previous versions of the beta.
___

Minimal example

% make with context /Users/Ian/SPT_PDF_context/tryouts/test_simplest.tex

\starttext

Hello world
\placefigure[place]{none}{\externalfigure[myone]}
\stoptext


the {none} has been on the obsolete agenda for a while .. just use:

\placefigure[...,none]{}{}

Hans


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

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


[NTG-context] captions trouble

2011-11-26 Thread Meer, H. van der
Something seems amiss in the code below. The idea is having in general figures 
with numbered labels, but now and then a figure without. First I thought to use 
[location=none] on the placement, but then the numbering is not interrupted: 
label-1 (label-2 invisible), label-3. That is disturbing to the reader who will 
think a figure is missing. The numbering and the label are suppressed by 
\setupcations[number=no] and reinstated with \setupcaptions[number=yes]. But 
this kills the space between the label and the caption. I enclose a minimal 
example that shows the effect. Could this be a bug?

\setuppapersize[A6][A6]
\starttext
\placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
\setupcaptions[number=no]
\placefigure{}{\externalfigure[arrows.pdf]}
\setupcaptions[number=yes]
\placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
\stoptext

Hans van der Meer






labelspace.pdf
Description: labelspace.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] captions trouble

2011-11-26 Thread Jaroslav Hajtmar

Hello Hans,

My tip is use \setupcaptions[number=yes, suffix=\hskip5mm]

I do not know whether it is a clean solution, but visually it looks OK.
Probably will need to determine the exact size of  \hskip parameter.

Jaroslav



\setuppapersize[A6][A6]
\starttext
\placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
\setupcaptions[number=no]
\placefigure{}{\externalfigure[arrows.pdf]}
\setupcaptions[number=yes, suffix=\hskip5mm]
\placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
\stoptext

Dne 26.11.2011 12:29, Meer, H. van der napsal(a):

\setuppapersize[A6][A6]
\starttext
\placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
\setupcaptions[number=no]
\placefigure{}{\externalfigure[arrows.pdf]}
\setupcaptions[number=yes]
\placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
\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] captions trouble

2011-11-26 Thread Meer, H. van der
My mistake. I remembered [number=no/yes] but it turns out there is also 
[number=none]. Which does the trick. And the [distance=(dimension)] sets the 
distande between label and caption.

Hans van der Meer

On 26 nov. 2011, at 12:50, Jaroslav Hajtmar wrote:

 Hello Hans,
 
 My tip is use \setupcaptions[number=yes, suffix=\hskip5mm]
 
 I do not know whether it is a clean solution, but visually it looks OK.
 Probably will need to determine the exact size of  \hskip parameter.
 
 Jaroslav
 
 \setuppapersize[A6][A6]
 \starttext
 \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=no]
 \placefigure{}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=yes, suffix=\hskip5mm]
 \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
 \stoptext
 
 Dne 26.11.2011 12:29, Meer, H. van der napsal(a):
 \setuppapersize[A6][A6]
 \starttext
 \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=no]
 \placefigure{}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=yes]
 \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
 \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] captions trouble

2011-11-26 Thread Wolfgang Schuster

Am 26.11.2011 um 12:29 schrieb Meer, H. van der:

 Something seems amiss in the code below. The idea is having in general 
 figures with numbered labels, but now and then a figure without. First I 
 thought to use [location=none] on the placement, but then the numbering is 
 not interrupted: label-1 (label-2 invisible), label-3. That is disturbing to 
 the reader who will think a figure is missing. The numbering and the label 
 are suppressed by \setupcations[number=no] and reinstated with 
 \setupcaptions[number=yes]. But this kills the space between the label and 
 the caption. I enclose a minimal example that shows the effect. Could this be 
 a bug?
 
 \setuppapersize[A6][A6]
 \starttext
 \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=no]
 \placefigure{}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=yes]
 \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
 \stoptext

There is no need for \setupcaptions because you can say 
\placefigure[none]{…}{…} and \placefigure[nonumber]{…}{…} but the missing space 
after the label is wrong.

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] captions trouble

2011-11-26 Thread Wolfgang Schuster

Am 26.11.2011 um 15:17 schrieb Wolfgang Schuster:

 
 Am 26.11.2011 um 12:29 schrieb Meer, H. van der:
 
 Something seems amiss in the code below. The idea is having in general 
 figures with numbered labels, but now and then a figure without. First I 
 thought to use [location=none] on the placement, but then the numbering is 
 not interrupted: label-1 (label-2 invisible), label-3. That is disturbing to 
 the reader who will think a figure is missing. The numbering and the label 
 are suppressed by \setupcations[number=no] and reinstated with 
 \setupcaptions[number=yes]. But this kills the space between the label and 
 the caption. I enclose a minimal example that shows the effect. Could this 
 be a bug?
 
 \setuppapersize[A6][A6]
 \starttext
 \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=no]
 \placefigure{}{\externalfigure[arrows.pdf]}
 \setupcaptions[number=yes]
 \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]}
 \stoptext
 
 There is no need for \setupcaptions because you can say 
 \placefigure[none]{…}{…} and \placefigure[nonumber]{…}{…} but the missing 
 space after the label is wrong.

I send a fix for the missing space to the dev list.

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

2011-09-22 Thread Felix Ingram
(apologies if you see this twice - posted from wrong account earlier)

I'm defining a new float that I'd like to caption with its own label.
Something like:

\definefloat[picture][pictures]

I'd then like the caption to read:

Picture 1 - my caption text
Picture 2 - etc

At the moment I've used \setupcaption[picture][way=bytext] to sort out
the numbering but I cannot figure out how to do the label.

Any ideas?

(Apologies for lack of minimal - afk atm)

Felix


Felix
___
If your question is of interest to others as well, please add an 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] Captions

2011-09-22 Thread Hongwen Qiu

On 09/23/2011 06:10 AM, Felix Ingram wrote:

I'm defining a new float that I'd like to caption with its own label.
Something like:

\definefloat[picture][pictures]

I'd then like the caption to read:

Picture 1 - my caption text
Picture 2 - etc

At the moment I've used \setupcaption[picture][way=bytext] to sort out
the numbering but I cannot figure out how to do the label.

\setupcaption[picture][way=bytext,label=Picture] does the trick
___
If your question is of interest to others as well, please add an 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] Captions command (special alignment)

2011-09-18 Thread Wolfgang Schuster

Am 17.09.2011 um 21:12 schrieb Honza Hejzl:

 Hello,
 why that simple thing doesn't work? Does anybody know?
 
 \def\mycap#1#2{\hbox{\hbox{#1}\vtop{#2\par}}}
 \setupcaptions[command=\mycap]
 
 Simply I need this:
 
 Fig. 1 The fig is great...
 ...like any other fig.
 
 I have tried to set this up via table but still can't proceed.

This doesn’t work because the command-key expects a command with one
argument which contains the caption number *and* text.

To write your own caption layout ask Hans to rewrite the code
for the \placefloatcaption (…number and …text) commands for MkIV.

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] Captions command (special alignment)

2011-09-17 Thread Honza Hejzl
Hello,
why that simple thing doesn't work? Does anybody know?

\def\mycap#1#2{\hbox{\hbox{#1}\vtop{#2\par}}}

\setupcaptions[command=\mycap]


Simply I need this:


Fig. 1 The fig is great...

...like any other fig.


I have tried to set this up via table but still can't proceed.


Thanks, Honza Hejzl
___
If your question is of interest to others as well, please add an 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] Captions' alignment

2011-09-06 Thread Honza Hejzl
Hello,
I am re-posting my question because the last one was not clear and properly
written.

I am trying to set captions like paragraphs where the label is indented
negatively, like in case of itemize lists. I was successful with the shape
(\hbox{\vtop ...}}) but don't think my solution is useful. I am not able to
set this via \setupcaptions and styles.

I need something like:

Fig. 1 This figures how to...
 ... solve the problem.

This shape is very common in books and is common in cases of long paragraphs
in captions.

My test source:

\mainlanguage[cz]
\setuplayout[grid=yes]
\showgrid[yes]
\setuppagenumbering[location=footer]
\setupexternalfigures[]

\def\myblank{\blank[5pt]}

\definefont[headcap][SerifBold at 7pt]
\definefont[bodycap][SerifItalic at 7pt]
\definefloat[pic][pics]
\setupfloat[pic][location=right]
\setupfloats[spacebefore=none,frame=on,spaceafter=none,rightmargindistance=0pt,margin=5pt]
\setupcaptions[location=bottom,style={\bodycap\setupinterlinespace[small]}%
I don't want smaller captions' text on grid.
,headstyle={\headcap\setupinterlinespace[small]},distance=3pt,inbetween=\myblank]
\setuplabeltext[cz][figure=Obr.: ]

\starttext

\placefigure[right]{To je právě to, co člověka bude zas a znovu
mrzet.}{\externalfigure[jahve][width=6cm]} A jde, jak nejlépe umí; náhle
slyší za sebou kroky. Člověk s~vyhrnutým límcem jde za ním. Zdá se, že běží.
A Prokop se v~nesnesitelné hrůze dal na útěk.Ale zrovna na krok před chodcem
se mu udělá v~hlavě tma a celý svět se s~ním pojednou zatočí; náhle vidí
zblízka, zblizoučka pár pronikavých očí, jak se do něho vpíchly, naráží na
něčí rameno, vypraví ze sebe cosi jako promiňte a vzdaluje se s~křečovitou
důstojností. Po několika krocích se zastaví a ohlédne; ten člověk stojí a
dívá se upřeně za ním. Prokop se sebere a odchází trochu rychleji; ale nedá
mu to, musí se znovu ohlédnout; a vida, ten člověk ještě pořád stojí a dívá
se za ním, dokonce samou pozorností vysunul z~límce hlavu jako želva. Ať
kouká, myslí si Prokop znepokojen, teď už se ani neohlédnu. A jde, jak
nejlépe umí; náhle slyší za sebou kroky. Člověk s~vyhrnutým límcem jde za
ním. Zdá se, že běží.

\stoptext

Thanks, Honza Hejzl
___
If your question is of interest to others as well, please add an 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] Captions, negative indenting and \par

2011-09-05 Thread Honza Hejzl
Hello,
I am trying to set captions like paragraphs where the label is indented
negatively, like in case of itemize lists. I was successful but now I cant
set the text like a paragraph, it means I need hyphenation. In some cases
(different font) the picture is moved too much and is over the lines (hope
this I can solve with light experimenting with the pic's width).

here is the best result:
http://dl.dropbox.com/u/4393365/obrazky_pok.pdf

here the code:
http://dl.dropbox.com/u/4393365/obrazky_pok.tex

and here the other example with the pic under the lines:
http://dl.dropbox.com/u/4393365/obrazky2.pdf

Help appreciated.

Jan Hejzl
___
If your question is of interest to others as well, please add an 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] Captions in Combinations

2006-09-17 Thread Hans Hagen
Pepe Barbe wrote:
 On 9/12/06, Hans Hagen [EMAIL PROTECTED] wrote:
   
 Pepe Barbe wrote:
 
 Hoping that the captions in the figures and in the combinations would
 have the same size, but they don't. Any ideas why this might be?

   
 can you make a minimal sample file
 

 Sorry about the delay. Here you go:

 \setupcaptions[ headstyle=\ss\bf,style=\tfx ]
 \setupcombinations[ style=\tfx\em ]

 \starttext

 \placefigure [center] {Combination Caption}
   
{
   \startcombination [2*1]
   {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
 1}}{Text: Test. Math: $Test$}
   {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
 2}}{Text: Test. Math: $Test$}
   \stopcombination
   
}
 \stoptext

 Thanks,
 Pepe
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   


-- 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-17 Thread nico
On Sun, 17 Sep 2006 14:35:36 -0500, Pepe Barbe [EMAIL PROTECTED] wrote:

 Did you find a solution for my problem? Because I couldn't find your
 answer in the email.

Look more carefully the mail, I guess that the problem was missing braces:

\placefigure [center] {Combination Caption}
{
  \startcombination [2*1]
  {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
  1}}{Text: Test. Math: $Test$}
  {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
  2}}{Text: Test. Math: $Test$}
  \stopcombination
}

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-17 Thread Pepe Barbe
On 9/17/06, nico [EMAIL PROTECTED] wrote:
 Look more carefully the mail, I guess that the problem was missing braces:

 \placefigure [center] {Combination Caption}
 {
   \startcombination [2*1]
   {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
   1}}{Text: Test. Math: $Test$}
   {\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
   2}}{Text: Test. Math: $Test$}
   \stopcombination
 }

Thanks for the response, but that didn't make any difference.

Pepe
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-16 Thread Pepe Barbe
On 9/12/06, Hans Hagen [EMAIL PROTECTED] wrote:
 Pepe Barbe wrote:
  Hoping that the captions in the figures and in the combinations would
  have the same size, but they don't. Any ideas why this might be?
 
 can you make a minimal sample file

Sorry about the delay. Here you go:

\setupcaptions[ headstyle=\ss\bf,style=\tfx ]
\setupcombinations[ style=\tfx\em ]

\starttext

\placefigure [center] {Combination Caption}
\startcombination [2*1]
{\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
1}}{Text: Test. Math: $Test$}
{\framed[height=.45\textwidth,width=.45\textwidth]{My Graphic
2}}{Text: Test. Math: $Test$}
\stopcombination

\stoptext

Thanks,
Pepe
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Captions in Combinations

2006-09-12 Thread Pepe Barbe
Hello,

In my layout settings I have the following:

\setupcaptions[ headstyle=\ss\bf,style=\tfx ]

\setupcombinations[ style={\tfx\em} ]

Hoping that the captions in the figures and in the combinations would
have the same size, but they don't. Any ideas why this might be?

Thanks,
Pepe
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-12 Thread Pepe Barbe
On 9/12/06, Pepe Barbe [EMAIL PROTECTED] wrote:
 In my layout settings I have the following:

 \setupcaptions[ headstyle=\ss\bf,style=\tfx ]

 \setupcombinations[ style={\tfx\em} ]

 Hoping that the captions in the figures and in the combinations would
 have the same size, but they don't. Any ideas why this might be?

This is very weird but I noticed the problem might be because I am
using inline Math in the captions. The caption of the entire
combination has mixed test and math and the size of the math is larger
than the text. Any ideas why this happens?

Pepe
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Captions in Combinations

2006-09-12 Thread Hans Hagen
Pepe Barbe wrote:
 Hello,

 In my layout settings I have the following:

 \setupcaptions[ headstyle=\ss\bf,style=\tfx ]

 \setupcombinations[ style={\tfx\em} ]

 Hoping that the captions in the figures and in the combinations would
 have the same size, but they don't. Any ideas why this might be?

 T
can you make a minimal sample file 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Captions in the margin

2006-08-15 Thread Alex Lubberts
Hello,

After reading the details.pdf manual I succeeded in placing figures right
where I want them :)
However... I would like the caption to be placed in the margin (lining
either with the top or the bottom of the figure). I didn't find a way to
do this. Does anybody know how to achieve this?

Thanks,
Alex Lubberts

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context