# About greater sign and sigma

What I want to write is

 if N+1 > N we do sigma (all the N) / the length of the array


For the greater sign I use

 If N+1 \textgreater N


But it's shown like this

 if N+1 >N


No space between the greater sign and N

And about sigma, I do \sum N / Length of the array

but doesn't seem right, the output is right but I get missing sign error

• \textgreater is for text. You should write $N+1>N$ do $\sigma N / \text{Length of the array}$. Or if it is the sum, do $\sum_N^{\text{Length of the array}}$, yes the last one wont be pretty. :) – zeroth Jul 16 '14 at 8:10
• For \text{} (suggested by zeroth), you will need to add \usepackage{amsmath} or \usepackage{amstext} to the preamble of the document. – mvkorpel Jul 16 '14 at 8:47

I do not really understand what you want to type. In my MWE I just show some possibilities and hope that one of them fits your needs.

The problem with the missing space you describe occurs due to missing braces behind the command (\textgreater{}). You may read some LaTeX documentations like this (2 MB) in order to understand, why this is happening.

% arara: pdflatex

\RequirePackage{fix-cm} % fixes font size substitutions caused by xfrac
\documentclass{article}
\usepackage{mathtools}
\usepackage{xfrac}

\begin{document}
If $N+1 > N$ we do:

$\sum_N^\text{Length of the array}$
or:
$\sum\frac{N}{\text{Length of the array}}$
or in text maybe $\sum\sfrac{N}{\text{Length of the array}}$

If we want to use \verb+\textgreater+ we have to write it like $N+1$ \textgreater{} $N$
\end{document}


• yes it's $\sum\sfrac{N}{\text{Length of the array}}$ thank you – Lynob Jul 16 '14 at 22:33