Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

This question is about creating a style for things like figure/table captions, or perhaps special boxes labeled with titles like "Note:", "Proof:", etc. The idea is that when I create a new cell in such a style, or change the syle of an existing cell, the label (in a specific font and style) would be prepended to whatever is in that cell. Of course, the most obvious application would be captions, that one might want to automaticall start with something like "Figure n:", where n would be an automatically incremented counter associated with the style in question.

I have seen the answer to a similar questionthe answer to a similar question here, and it very much sounds like what I want is not possible, in general, unless I use work-arounds like cell dingbats or cellframe labels, each of which come with their own limitations, see the question I linked to.

So, yes, this question is closely related to this onethis one, but it's a little broader (I think), and I'm really asking for a direct answer: Can the above be done with a Stylesheet entry, or is this not possible? I would have thought that this is a fairly common request, but I really did not see much on this question anywhere on the web at all.

This question is about creating a style for things like figure/table captions, or perhaps special boxes labeled with titles like "Note:", "Proof:", etc. The idea is that when I create a new cell in such a style, or change the syle of an existing cell, the label (in a specific font and style) would be prepended to whatever is in that cell. Of course, the most obvious application would be captions, that one might want to automaticall start with something like "Figure n:", where n would be an automatically incremented counter associated with the style in question.

I have seen the answer to a similar question here, and it very much sounds like what I want is not possible, in general, unless I use work-arounds like cell dingbats or cellframe labels, each of which come with their own limitations, see the question I linked to.

So, yes, this question is closely related to this one, but it's a little broader (I think), and I'm really asking for a direct answer: Can the above be done with a Stylesheet entry, or is this not possible? I would have thought that this is a fairly common request, but I really did not see much on this question anywhere on the web at all.

This question is about creating a style for things like figure/table captions, or perhaps special boxes labeled with titles like "Note:", "Proof:", etc. The idea is that when I create a new cell in such a style, or change the syle of an existing cell, the label (in a specific font and style) would be prepended to whatever is in that cell. Of course, the most obvious application would be captions, that one might want to automaticall start with something like "Figure n:", where n would be an automatically incremented counter associated with the style in question.

I have seen the answer to a similar question here, and it very much sounds like what I want is not possible, in general, unless I use work-arounds like cell dingbats or cellframe labels, each of which come with their own limitations, see the question I linked to.

So, yes, this question is closely related to this one, but it's a little broader (I think), and I'm really asking for a direct answer: Can the above be done with a Stylesheet entry, or is this not possible? I would have thought that this is a fairly common request, but I really did not see much on this question anywhere on the web at all.

edited tags
Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Source Link
Pirx
  • 4.2k
  • 13
  • 38

Styles that prepend text to cell contents

This question is about creating a style for things like figure/table captions, or perhaps special boxes labeled with titles like "Note:", "Proof:", etc. The idea is that when I create a new cell in such a style, or change the syle of an existing cell, the label (in a specific font and style) would be prepended to whatever is in that cell. Of course, the most obvious application would be captions, that one might want to automaticall start with something like "Figure n:", where n would be an automatically incremented counter associated with the style in question.

I have seen the answer to a similar question here, and it very much sounds like what I want is not possible, in general, unless I use work-arounds like cell dingbats or cellframe labels, each of which come with their own limitations, see the question I linked to.

So, yes, this question is closely related to this one, but it's a little broader (I think), and I'm really asking for a direct answer: Can the above be done with a Stylesheet entry, or is this not possible? I would have thought that this is a fairly common request, but I really did not see much on this question anywhere on the web at all.