Phillip Helbig (undress to reply)

2020-05-30 20:58:21 UTC

What do you expect the following to produce?

\documentclass{article}

\begin{document}

$|R|a(t)$

|R|a(t)

\end{document}

Answer is down below; think about it first.

First, I see

|R|a(t)

but in math italic, which is what I expect. Then I see

---R---a(t)

where "---" appears to be what LaTeX normally creates out of "---", i.e.

an em-dash.

The typo was forgetting the dollar signs and easily corrected. However,

I didn't expect the output. What is the explanation for it?

\documentclass{article}

\begin{document}

$|R|a(t)$

|R|a(t)

\end{document}

Answer is down below; think about it first.

First, I see

|R|a(t)

but in math italic, which is what I expect. Then I see

---R---a(t)

where "---" appears to be what LaTeX normally creates out of "---", i.e.

an em-dash.

The typo was forgetting the dollar signs and easily corrected. However,

I didn't expect the output. What is the explanation for it?