How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica?

How do I get the equivalent of the $\LaTeX$ \tag{} in Mathematica?

$a+b=x \tag{1}$

I'm not necessarily asking how to use the $\LaTeX$ `\tag{}` itself in Mathematica, I'm just looking for some feature that will allow me to mark an equation like that.

-

`CellLabel` gets close but as `Right` is not a valid setting for `CellLabelPositioning` it cannot, AFAIK, be made to look as you show. – Mr.Wizard♦ Jan 6 at 7:31
There's also the Automatic Numbering. – Gustavo Bandeira Jan 6 at 7:34

2 Answers

I do not think what you are asking for is possible. But you can do what you want by numbering an equation in Mathematica like this

do not know if this will meet your needs.

Using Mathematica like Latex is not really practical or useful. I found it is better to just use Latex for typesetting, and use Mathematica for doing the computation and analysis.

-

Yes. But I wasn't expecting to use $\LaTeX$ to do that. I was expecting for any alternative that would lead me to do that. Thanks for the answer. – Gustavo Bandeira Jan 6 at 7:40

As others have pointed out, automatic numbering is nicely taken care of through the built-in `DisplayFormulaNumbered` style. Custom numbering (both a separate counter and counting sequence) can be introduced into stylesheets, for example, I have made a `Theorem` style before.

However, for a one off equation numbers / labels, like the $\LaTeX$ `\tag` option, you just want to manually set the `CellFrameLabels` option. This can be done using the option inspector or by using `CellPrint` or Show Expression. For example

````CellPrint[Cell[BoxData[
   FormBox[RowBox[{"a", "+", "b", "=", "c"}], TraditionalForm]], 
  "DisplayFormula", CellFrameLabels -> {{None, "(1a)"}, {None, None}}]]
````

produces

selecting the cell and looking at the option inspector shows you how you could edit this option with a GUI:

However, referring to that equation using the standard CellTags and Automatic Numbering / CounterBox combination seems to be a bit tricky... There might be a nice way of doing it, but nothing immediately comes to mind.

-
lang-mma
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 6, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9342105984687805, "perplexity_flag": "middle"}