3

There is mismatch in the braces when used as subscript or superscript

\textit{ $ R(p_(a ),p_(b ) )=e^{(|(-\gamma {\lVert p_(a) - p_(b) \rVert})^2| )}$}
2
  • 2
    Perhaps you should add an image of this, plus it is always a good idea here to provide a full minimal example not just a sniplet, then others do not have to guess what preamble you're using. Additionally, why the \textit what is that for here? Note the {} aroung the \lVert/rVert has no purpose
    – daleif
    Commented Oct 3, 2018 at 5:57
  • You seem to have written parentheses () rather than braces {}. Since a parenthesis is a single token, only the left parenthesis is going to be subscripted.
    – Davislor
    Commented Oct 3, 2018 at 9:23

1 Answer 1

13

There are quite a few issues with your code:

  • The \textit wrapper seems wholly unnecessary

  • You seem to be under the impression that the ( and ) symbols perform grouping in TeX. That's not the case. I believe you should write p_a and p_b instead of p_(a) and p_(b). If you must encase a and b in parentheses, you should write p_{(a)} and p_{(b)} to indicate to TeX that not just the opening parenthesis needs to be typeset in the subscript position.

  • The outer pair of | symbols would appear to be redundant. The expression they encase is squared; hence, taking the absolute value is not needed, is it?

  • The matching pair of curly braces around \lVert ... \rVert does not appear to serve a discernible purpose.

  • To make the exponential term more readable, consider writing it as \exp\{ ... \} instead of as e^{...}. If you don't like the look of curly braces, consider using square brackets.

In short, this how I'd write the full expression:

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \lVert and \rVert macros
\begin{document}
$ R(p_a,p_b) = \exp\{ (-\gamma \lVert p_a - p_b \rVert)^2 \}$
\end{document}

You must log in to answer this question.

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