Is there a shortcut to inserting a CounterBox
as you type in text mode? I haven't yet made extensive use of them but I can foresee them in my near future and the current method of inserting them is a little bit of a pain. Here is the current method:
Start by opening a new notebook. Create a text cell with the following content:
The current counter of title is: XXX.
Select the XXX and go to Insert > Automatic Numbering...
. This will give you some options. For Counter leave it as it is (Title). And select "This counter object".
After clicking OK now the XXX will be replaced by 0 since the current count for title cells is 0. If you now create a Title cell above the one you just created then that 0 will become a 1.
I don't mind using the little GUI asking me what counter to insert. What I do not like is having to go to Insert > Automatic Numbering...
all the time. I would actually prefer if possible to do some sort of input autoreplacement but this clearly would not work since we need to define what gets replaced. I thought about maybe using input alias but this again requires me to define the inputs. What I want to be able to do is something like this...
The current counter of title is [AliasDelimiter]ref[Title][AliasDelimiter]
and get
The current counter of title is 0
I'm trying to emulate $\LaTeX$ here using ref. I don't know if I have explored this question enough but so far I'm running out of ideas to make the process of entering counterboxes as painless as possible. The last idea I had was to create a palette with
an input box in which you entered the tag or counter but then I realized that even if this is possible (I highly doubt it is) it would then just be the same as the Insert > Automatic Numbering...
gui. So the question again:
Is there a some sort of shortcut to inserting a CounterBox
?
"cb" -> CounterBox["Text"]
to InputAliases you can add a Text counter-box withESC
cb
ESC
-- I don't understand whatref
does. $\endgroup$CounterBox
but the input for this alias would be something else. Yeah, sorry for the nonsense here. I was just trying to throw some ideas. $\endgroup$ref
be used? $\endgroup$cellTag
). To refer to that label in the text you would simply write \ ref{NameofTag} . In mathematica, I was wondering if we could achieve something similar. Unfortunately, I just realized that theInsert > Automatic Numbering...
is actually a function that modifies the whole cell so that it can insert the CounterBox, so creating an alias to just insert this is well.. I don't know anymore. If it helps a little here is some latex reference. $\endgroup$