MKIV caption separator, revisited
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=-] \setupexternalfigures[location=default] \starttext \chapter{Chaptername} \section{Sectionname} \placefigure[here][fig:1]{Caption}{\externalfigure[cow.pdf]} \in{See Figure}{.}[fig:1] \stoptext -- Rik Kabel
Am 22.04.2014 um 02:57 schrieb Rik Kabel
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
On 2014-04-22 02:25, Wolfgang Schuster wrote:
Am 22.04.2014 um 02:57 schrieb Rik Kabel
mailto:context@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
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
Meer, Hans van der mailto:H.vanderMeer@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
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
Meer, Hans van der mailto:H.vanderMeer@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
Wolfgang Schuster mailto:schuster.wolfgang@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
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
participants (3)
-
Meer, Hans van der
-
Rik Kabel
-
Wolfgang Schuster