3

I'm trying to write a piece of code in LaTeX which includes a crossed set of arrows (the \nearrow and \searrow). Here is my code

\documentclass{article}
\begindocument
$$\dfrac{5}{12}\makebox[0pt][l]{$\,\,\nearrow$}\searrow \dfrac{20}{9}.$$
\end{document}

The code is doing what I want it to do but I am noticing errors, namely

unclosed $$ found at $ unclosed open group { found at $ unexpected $ after open group { unexpected $ after $$ unexpected $ after $$

I can't seem to understand how to resolve this and get the symbol I'm looking for. After some research I learnt about a \toea command but I can't seem to implement this. Any help would be great!

1 Answers1

4

Assuming these composite arrows will never show up in first- or second-level subscripts or superscripts (or, more generally, while TeX is in \scriptstyle or \scriptscriptstyle math mode), the following solution, which creates a macro called \crossedarrows with the help of the low-level \ooalign command, may be of interest to you.

enter image description here

Note that the definition of \crossedarrows assumes that the new symbol is to be used as a relational operator (hence the \mathrel directive). If, instead, the symbol should be used as a binary operator, you should change \mathrel to \mathbin.

\documentclass{article}
\newcommand\crossedarrows{\mathrel%  % or '\mathbin' ?
    {\ooalign{$\nearrow$\cr$\searrow$}}}

\begin{document} $\displaystyle \frac{5}{12} \crossedarrows \frac{20}{9} $ \end{document}

Mico
  • 506,678