1

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

2
  • 6
    \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
  • 1
    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
1

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}

enter image description here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.