2
$\begingroup$

Suppose I write a post that contains equations that I like to refer back to later, like this:

$$3^2 + 4^2 = 5^2 \qquad (*)$$ $$3^3 + 4^3 + 5^3 = 6^3 \qquad (**)$$ $$3^4 + 4^4 + 5^4 + 6^4 = 7^4 \qquad (***)$$

In spite of the well known truth of ( * ) and the lesser known but equally valid truth of ( ** ) we have that equation ( *** ) is patently false.

You may note that I put some extra spaces between the stars and the brackets, because otherwise the sentence becomes garbled by Markup:

In spite of the well known truth of () and the lesser known but equally valid truth of () we have that equation () is patently false.

(If you click the edit button you will see that the above weird looking sentence is typed just as you would naively do on a type writer)

My question is twofold:

  1. How can I get ( * ) without the extra spaces?
  2. In real life I found that sometimes everything works out just fine without me doing anything special, see e.g. my latest post here. (Update: and the bracket-star-bracket just two lines down in this very question(?!?)) But then at some other places in the same post I had the same problem as above and needed the extra spaces. So my second question is: how is this possible? What is going on here? What determines if I can type (*) or not? It seems arbitrary but it can't be, right?
$\endgroup$
5
  • 1
    $\begingroup$ Pehaps. What is the \tag command? $\endgroup$
    – Vincent
    Apr 19 at 8:28
  • $\begingroup$ Ehm, I was replying to a now deleted comment. My guess is that \tag works something like \label and \ref in latex and would help me avoid this problem altogether? This would indeed be of interest to me even if I am still interested in the answer to the question as asked $\endgroup$
    – Vincent
    Apr 19 at 8:30
  • 3
    $\begingroup$ As an extra note, $*$ is a binary operator. When you put three of them in a row, MathJax adjusts the spacing, which (to my eye) looks pretty bad. If you surround each symbol with braces, it should look better: ${*}{*}{*}$ renders as ${*}{*}{*}$ (as compared to $***$ which gives $***$). ${\ast}{\ast}{\ast}$ (${\ast}{\ast}{\ast}$) might be a better alternative. $\endgroup$
    – Xander Henderson Mod
    Apr 19 at 13:23
  • 2
    $\begingroup$ Note the difference in the size and position of the star in $(*)$ and ( * ). I think you do not really want one in the equation and the other in text. $\endgroup$
    – GEdgar
    Apr 19 at 13:43
  • $\begingroup$ Similarly with numbered equations... Equation $(1)$ probably should not be referred to as (1), but rather as $(1)$. That is: not (1) but rather $(1)$. $\endgroup$
    – GEdgar
    Apr 20 at 12:20

1 Answer 1

9
$\begingroup$

Q1. With \tags and \labels:

 $$3^2 + 4^2 = 5^2  \tag{$*$}\label{1}$$
 $$3^3 + 4^3 + 5^3 = 6^3 \tag{$**$}\label{2}$$
 $$3^4 + 4^4 + 5^4 + 6^4 = 7^4 \tag{$***$}\label{3}$$ 
 
 In spite of the well known truth of \eqref{1} and the lesser known but equally valid
 truth of \eqref{2} we have that equation \eqref{3} is patently false.

$$3^2 + 4^2 = 5^2 \tag{$*$}\label{1}$$ $$3^3 + 4^3 + 5^3 = 6^3 \tag{$**$}\label{2}$$ $$3^4 + 4^4 + 5^4 + 6^4 = 7^4 \tag{$***$}\label{3}$$

In spite of the well known truth of \eqref{1} and the lesser known but equally valid truth of \eqref{2} we have that equation \eqref{3} is patently false.

Q2: The reason is that * is used to render Markdown. Specifically, it makes text italic, bold or italic and bold (*italic*, **bold** or ***italic and bold***) If you want to use *, you can type \*, or (to make it fit with what you are referring to) $*$.

$\endgroup$
4
  • $\begingroup$ Thanks, this is very useful! Still one part of Q2 is open: why does the issue with italic and bold sometimes suddenly NOT play up? Do you happen to know that, too? $\endgroup$
    – Vincent
    Apr 19 at 8:40
  • 1
    $\begingroup$ @Vincent If you don't give a pair of *s, then it just renders as normal. Only when you tell it where to start and stop will it change the output $\endgroup$ Apr 19 at 8:41
  • 1
    $\begingroup$ Great! So the one that cause no problems are the one that are the last in the post, or maybe even already the last in its paragraph? Well I can figure that out easy enough by experimenting. Thanks for clearing this up! $\endgroup$
    – Vincent
    Apr 19 at 8:43
  • $\begingroup$ Yes. It seems that a pair of *s broken by text and newlines don't count. Glad to help! :) $\endgroup$ Apr 19 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .