# Bracket in math and text

When I write the pair (x,y) with Latex, which way is correct: ($x,y$) or $(x,y)$? Thanks in advance.

The purpose of LaTeX is to make a distinction between the content (here the writing of a pair) and the rendering (the font size, the shape (bold, italic, etc.), the indentation, etc.). You code the content, and you let the rendering be processed according to predefined typographic rules (or you can tell LaTeX which 'rule' to follow).

Parentheses are part of the notation of the pair, just like you would sometimes put an arrow above a vector. So your mathematical expression is (x,y) and not simply x,y.

Thus, when you write your inline expression, you want all your mathematical expression be written in math mode. So you should write $(x,y)$.
This makes your source-code coherent with its content (when others will have a look at it). Moreover, this will make the rendering of the pair to be coherent if you use both inline and centered math expressions. (In most cases, you won't see any differences, but the spacing might not be exactly the same. It is even more obvious when you do not use the same font for text and for math-modes, as shown in following MWE.) \documentclass[twocolumn]{scrartcl}
\usepackage[math]{anttor}
\usepackage{lmodern}
\begin{document}
\begin{description}
\item[Right:]
My pair is $(x,y)$.
(The code is \texttt{\$(x,y)\$}.)
In centered math-mode, it looks like this:
$(x,y)$
\item[Wrong:]
My pair is ($x,y$).
(The code is \texttt{(\$x,y\$)}.)
You can notice that parentheses are not matching the ones of centered expression.
$(x,y)$
\end{description}
\end{document}

• Honestly, I don't see much difference between the wrong and right pair. One is more rounded, but would that disturb a reader? – Quora Feans Jun 13 '16 at 14:24
• @QuoraFeans: There could be 3 indirect answers: 1/the difference is more noticeable with \usepackage[math]{anttor}\usepackage{lmodern} and/or curly brackets; 2/from a content (and thus typographical) point-of-view, it is more correct; 3/about matters of taste, there is no arguing. Fortunately, you're free to do what you prefer (even using MS Word (-;)! [I've edited the example thanks to your comment] – ebosi Jun 13 '16 at 14:50
• If you were to set up all your math to be typeset in a different colour than the body text (rare but not unheard of), the difference would be rather glaring. Also, if your pair looked like (f(x),f(y)) and you type that as ($f(x),f(y)$), the different styling of the parentheses would be much more noticeable. – Harald Hanche-Olsen Aug 16 '18 at 16:19