Dear all, A few days ago (10 April 2013, Vol.106, Issue 25) I posted a question about giving related but not necessarily adjacent floats the same number, as for example Fig. 2a and Fig. 2b. In the meantime I found a, not very elegant, solution that only partly satisfies me. Here is a working example: (I trust the cow and the mill can be found). %--------------------------------------------------- \useexternalfigure[SmallCow][cow.pdf][height=2cm] \useexternalfigure[MediumCow][cow.pdf][height=3cm] \useexternalfigure[Mill][mill.png][height=3cm] \definelist[figure] \setuplist[figure][prefix=yes,label=yes,alternative=c] \starttext This file is for testing the possibility of giving two related musical examples (in old and modern notation respectively) the same figure number with a. and b. as suffixes to the number proper. \placefigure[here][SmallCow1]{A small cow.} {\externalfigure[SmallCow]} A cow again, in two sizes. \in{Figure}[SmallCow2]a shows the same cow as \in{Figure}[SmallCow1]. \placefigure[here][SmallCow2]{{\bf a}. Another small cow.} {\externalfigure[SmallCow]} And here a larger cow (\in{Figure}[MediumCow1]b). \setnumber[figure][1] \placefigure[here][MediumCow1]{{\bf b}. A larger cow.} {\externalfigure[MediumCow]} And here comes a mill. \placefigure[here][Mill1]{A mill.} {\externalfigure[Mill]} \page {\bf List of Figures} \placelist[figure] \completecontent \stoptext %---------------------------------------------------- This way "a" and "b" become part of the caption text, resulting in: Figure 2 a A small ….. etc., and: Figure 2 b A larger …etc. Likewise in the List of Figures. This is not what I would like. Is there a possibility, when not using Combinations, to get: Figure 2a A small ….. etc? Wherever possible I use Combinations but in some cases examples to be combined are very different in size and shape and/or too large to fit on one page together, so that one of them gets cut off. Is there a possibility, when using a combination of figures, to split it, in other words, to separate the figures spatially, to allow them to appear on consecutive pages, and maybe even allowing some text in between? Thanks in advance. Best regards, Robert Blackstone
This is probably not exactly what you want, however, one can use list= in \startplacefigure\stopplacefigure to differentiate between the figure caption and its listing in the list of figures. \startplacefigure [title={Dutch scenery. \startitemize [n] \startitem A cow. \stopitem \startitem A mill. \stopitem \stopitemize}, list=Figure title, reference=fig:scenery] \startcombination [2] {\externalfigure [cow] [width=.5\textwidth]} {a} {\externalfigure [mill] [width=.45\textwidth} {b} \stopcombination \stopplacefigure A cow is shown in \in{figure} [fig:scenery]a. The above example raises the following (low priority) feature suggestion: How about some way of automatically numbering/labeling combinations just like item lists? Sort-of a hybrid between combination and itemize. Say, \startcombination [r*c] [item=a] \startitem \externalfigure [cow] \stopitem \startitem \externalfigure [mill] \stopitem \stopcombination Hmm. A challenge for Hans (as if he is not busy enough). (However, I am sure that Wolfgang can suggest an obvious solution that is already available, that I overlook... :) Alan
On 2013–04–13 Alan BRASLAU wrote:
A cow is shown in \in{figure} [fig:scenery]a.
A cow is shown in \in{figure}{a}[fig:scenery]
The above example raises the following (low priority) feature suggestion: How about some way of automatically numbering/labeling combinations just like item lists? Sort-of a hybrid between combination and itemize.
I think this could be a useful feature.
Say, \startcombination [r*c] [item=a]
It's not that simple. You need other itemgroup settings as well, otherwise you don't know the lefttext, righttext, stopper, etc. options which are required for consistency, the sole purpose of this feature. Marco
On 4/13/2013 1:13 PM, Alan BRASLAU wrote:
(However, I am sure that Wolfgang can suggest an obvious solution that is already available, that I overlook... :)
\useMPlibrary[dum] \starttext \definelabel[test][text=,numberconversion=character,stopper=!] \resetcounter[test] \startcombination[2*2] {first} {\test} {first} {\test} \stopcombination \startcombination[2*2] {first} {\test} {first} {\test} \stopcombination \resetcounter[test] \startcombination[2*2] {first} {\test} {first} {\test} \stopcombination \resetcounter[test] \startcombination[2*2] {first} {\test} {first} {\test} \stopcombination \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 -----------------------------------------------------------------
Hans, you forgot to define a \testitem...
\starttext
\definelabel[test][text=,numberconversion=character,stopper=!]
\define[1]\testitem{{#1} {\test}}
\resetcounter[test]
\startcombination[2*2]
\testitem{first}
\testitem{second}
\testitem{third}
\testitem{fourth}
\stopcombination
\stoptext
Now, adding
\setupcombinations [before={\resetcounter[test]}]
would be incorrect as the counter would get reset for each row...
Alan
On Sun, 14 Apr 2013 01:04:33 +0200
Hans Hagen
On 4/13/2013 1:13 PM, Alan BRASLAU wrote:
(However, I am sure that Wolfgang can suggest an obvious solution that is already available, that I overlook... :)
\useMPlibrary[dum]
\starttext
\definelabel[test][text=,numberconversion=character,stopper=!]
\resetcounter[test]
\startcombination[2*2] {first} {\test} {first} {\test} \stopcombination
\startcombination[2*2] {first} {\test} {first} {\test} \stopcombination
\resetcounter[test]
\startcombination[2*2] {first} {\test} {first} {\test} \stopcombination
\resetcounter[test]
\startcombination[2*2] {first} {\test} {first} {\test} \stopcombination
\stoptext
On 4/14/2013 8:30 AM, Alan BRASLAU wrote:
Hans, you forgot to define a \testitem...
\starttext
\definelabel[test][text=,numberconversion=character,stopper=!]
\define[1]\testitem{{#1} {\test}}
\resetcounter[test]
\startcombination[2*2] \testitem{first} \testitem{second} \testitem{third} \testitem{fourth} \stopcombination
\stoptext
Now, adding \setupcombinations [before={\resetcounter[test]}] would be incorrect as the counter would get reset for each row...
sure, but then it's nice to have it as option of the combination command anyway, there's also (we've always needed such things in projects): \starttext \startplacefigure[location={here,none}] \startfloatcombination[2*2] \placefigure{alpha}{\externalfigure[cow.pdf][width=1cm]} \placefigure{beta} {\externalfigure[cow.pdf][width=2cm]} \placefigure{gamma}{\externalfigure[cow.pdf][width=3cm]} \placefigure{delta}{\externalfigure[cow.pdf][width=4cm]} \stopfloatcombination \stopplacefigure \stoptext as that started out as experiment and was used in specific styles it was never documented (example from source) (mayb i'll add \startplacefigurecombination some day) 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 -----------------------------------------------------------------
On Sun, 14 Apr 2013 10:55:41 +0200
Hans Hagen
On 4/14/2013 8:30 AM, Alan BRASLAU wrote:
Hans, you forgot to define a \testitem...
\starttext
\definelabel[test][text=,numberconversion=character,stopper=!]
\define[1]\testitem{{#1} {\test}}
\resetcounter[test]
\startcombination[2*2] \testitem{first} \testitem{second} \testitem{third} \testitem{fourth} \stopcombination
\stoptext
Now, adding \setupcombinations [before={\resetcounter[test]}] would be incorrect as the counter would get reset for each row...
sure, but then it's nice to have it as option of the combination command
anyway, there's also (we've always needed such things in projects):
\starttext
\startplacefigure[location={here,none}] \startfloatcombination[2*2] \placefigure{alpha}{\externalfigure[cow.pdf][width=1cm]} \placefigure{beta} {\externalfigure[cow.pdf][width=2cm]} \placefigure{gamma}{\externalfigure[cow.pdf][width=3cm]} \placefigure{delta}{\externalfigure[cow.pdf][width=4cm]} \stopfloatcombination \stopplacefigure
\stoptext
as that started out as experiment and was used in specific styles it was never documented (example from source)
(mayb i'll add \startplacefigurecombination some day)
Hans
Ah, more undocumented features... :) \definefloat [figureitem] [figureitems] [figure] \setupcaption [figureitem] [numberconversion=character] \startplacefigure [title=Cows] \startfloatcombination[2*2] \startplacefigureitem [title=alpha] \externalfigure [cow] [width=1cm] \stopplacefigureitem \startplacefigureitem [title=beta] \externalfigure [cow] [width=2cm] \stopplacefigureitem \startplacefigureitem [title=gamma] \externalfigure [cow] [width=3cm] \stopplacefigureitem \startplacefigureitem [title=delta] \externalfigure [cow] [width=4cm] \stopplacefigureitem \stopfloatcombination \stopplacefigure Two problems, though: 1. I tried "label=" in \setupcaption to suppress "Figure ". This does not work, and looking at the source I do not see how to do this... 2. Missing is some way to reset the figureitem counter automatically with each \startfloatcombination. It looks as if it could be a nice feature to add new keywords like "before=" and "after=". Maybe "beforeall=" and "afterall=", "beforefirst=" and "afterlast=", ... I suppose that the above brings little advantage over the \definelabel solution previously suggested. Ala -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.braslau@cea.fr
On Sun, 14 Apr 2013 13:54:48 +0200
Marco Patzer
On 2013–04–14 Alan BRASLAU wrote:
Two problems, though: 1. I tried "label=" in \setupcaption to suppress "Figure ". This does not work, and looking at the source I do not see how to do this...
\setuplabeltext [figureitem=]
Of course, thank you! However, there is another problem with this second solution as it shares the same counter with figure, rather than its own. This can be corrected by *not* inheriting from [figure], as in \definefloat [figureitem] [figureitems] Still, there needs to be some mechanism to automatically reset the counter, for example via a "way=" keyword,... Hans will surely be dreaming up a combinationitem scheme... Alan
On 4/13/2013 12:33 PM, Robert Blackstone wrote:
Dear all, A few days ago (10 April 2013, Vol.106, Issue 25) I posted a question about giving related but not necessarily adjacent floats the same number, as for example Fig. 2a and Fig. 2b. In the meantime I found a, not very elegant, solution that only partly satisfies me.
I cooked up something experimental ... after several variants i ended up with a solution that is only available in the keyword variant: \useMPlibrary[dum] \starttext First line. \startplacefigure[location=here,reference=first,title=first] \externalfigure[dummy][height=2cm] \stopplacefigure Second line. \startplacefigure[location=here,reference=second,title=second,group=alpha,groupsuffix=.a] \externalfigure[dummy][height=2cm] \stopplacefigure Third line. \startplacefigure[location=here,reference=third,title=third] \externalfigure[dummy][height=2cm] \stopplacefigure Fourth line. \startplacefigure[location=here,reference=fourth,title=fourth,group=alpha,groupsuffix=.b] \externalfigure[dummy][height=2cm] \stopplacefigure Fifth line. \startplacefigure[location=here,reference=fifth,title=fifth,group=alpha,groupsuffix=.c] \externalfigure[dummy][height=2cm] \stopplacefigure Last line: \in[first] / \in[second] / \in[third] / \in[fourth] / \in[fifth]. \page \placelist[figure] \stoptext (beware: it's groupsuffix, and not suffix as that will add another one not tracked in the lists) 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 -----------------------------------------------------------------
participants (4)
-
Alan BRASLAU
-
Hans Hagen
-
Marco Patzer
-
Robert Blackstone