Skip to main content
deleted 44 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I currently use LaTeX/MathJax only in context of SE posts. I have in mind mostly uniform text formatting and MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably a different case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_K_{\rm x} K_\mathrm x K\$\$K
\$\$K_K_{\rm xy} K_\mathrm xy K\$\$ wrongK wrong
\$\$K_K_{\rm xy} K_{\mathrm xy} K\$\$K wrong
\$\$K_K_{\rm xy} K_\mathrm {xy} K\$\$K
\$\$K_\rmK_\rm {xy} K_\mathrm {xy} K\$\$ wrongK wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I currently use LaTeX/MathJax only in context of SE posts. I have in mind mostly uniform text formatting and MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably a different case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I currently use LaTeX/MathJax only in context of SE posts. I have in mind mostly uniform text formatting and MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably a different case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

K_{\rm x} K_\mathrm x K
K_{\rm xy} K_\mathrm xy K wrong
K_{\rm xy} K_{\mathrm xy} K wrong
K_{\rm xy} K_\mathrm {xy} K
K_\rm {xy} K_\mathrm {xy} K wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

added 25 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I havecurrently use LaTeX/MathJax only in mind context of SE posts,. I have in mind mostly with uniform text formatting, in scope of and MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably adifferenta different case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I have in mind context of SE posts, mostly with uniform text formatting, in scope of MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably adifferent case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I currently use LaTeX/MathJax only in context of SE posts. I have in mind mostly uniform text formatting and MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably a different case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

Added regex note
Source Link
Poutnik
  • 42.7k
  • 7
  • 11

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I have in mind context of SE posts, mostly with uniform text formatting, in scope of MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably adifferent case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I have in mind context of SE posts, mostly with uniform text formatting, in scope of MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably adifferent case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

I do not understand well, why is so much preferred \mathrm to \rm for index formatting ?

(by occurrence and by user script formatting support.)

Note that I have in mind context of SE posts, mostly with uniform text formatting, in scope of MathJax mathematical formulas. Advanced LaTeX documents with document text formatting are probably adifferent case.

If my understanding is correct, their effect is the same, but they differ in their default scope and delimiting syntax.

The \rm must be explicitly delimited, with \rm being inside delimiters.

\mathrm by default applies to a single character only, with \mathrm outside of delimiters {}.

This theoretically gives an advantage to \mathrm for single letter indexing.

But even in this case, the \rm way to create the source formatting code seems to me as more compact and in case of complex formula more easily to track mentally.

For 2+ symbol indexes, this mentioned advantage of \mathrm disappears, as {} delimiting is needed in both cases.

I ask, because if others apply intensive \mathrm formatting of complex formulas with many indexes, it may convert a relatively compact expression into a "huge formatted beast", difficult to be read and work with at the source code level even for its author.

Later editing of such a formula may be a nightmare.

One solution for me is to create 2(or 4) regex replace expressions to toggle \mathrm (or \rm) index "romanizing" to get the formula readable again for editing/reusing, and then toggle it back.

Some code examples are intentionally wrong for illustrative purposes:

\$\$K_{\rm x} K_\mathrm x K\$\$
\$\$K_{\rm xy} K_\mathrm xy K\$\$ wrong
\$\$K_{\rm xy} K_{\mathrm xy} K\$\$ wrong
\$\$K_{\rm xy} K_\mathrm {xy} K\$\$
\$\$K_\rm {xy} K_\mathrm {xy} K\$\$ wrong

$$K_{\rm x} K_\mathrm x K$$ $$K_{\rm xy} K_\mathrm xy K$$ $$K_{\rm xy} K_{\mathrm xy} K$$ $$K_{\rm xy} K_\mathrm {xy} K$$ $$K_\rm {xy} K_\mathrm {xy} K$$

added 8 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 74 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 138 characters in body; added 21 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 2 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
deleted 18 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 17 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 52 characters in body; edited body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
edited title; added 115 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
deleted 17 characters in body; added 74 characters in body; added 70 characters in body; added 4 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 37 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
added 144 characters in body
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading
Source Link
Poutnik
  • 42.7k
  • 7
  • 11
Loading