TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this line here

$\overline{X}$ = $\sum_{i = 1}^{n}$ $\frac{x_i}{n}$

that gives me


How should I modify my code to display the equal sign between i and 1?

\documentclass[paper=letterpaper, fontsize=11pt]{scrartcl}



\section{Question \no 1 :}

\subsection{Représentation par histogramme et diagramme de Tukey}

\subsubsection{Représentation par histogramme}

\subsubsection{Représentation par diagramme de Tukey}



\subsection{Analyse des données des notes}

$\overline{X}$ = $\sum_{i = 1}^{n}$ $\frac{x_i}{n}$

share|improve this question
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. The code you presented has couple issues, it would be better to write it as $\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$ (i.e., don't enter and leave math-mode with $ between parts of the expression). – yo' Aug 12 '14 at 16:18
I did try $\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$ However, neither equal signs would be displayed in this case... – Risa Aug 12 '14 at 16:27
Loading lmodern and fourier makes no sense. Either you want fourier or lmodern, not both. The \everymath{\displaystyle} bit has nothing to do with the issue, but is definitely not recommended. – egreg Aug 12 '14 at 16:52


The use of fourier and lmodern is what causing the equal symbol to "disappear". Look at this question. If you try to load lmodern before fourier, then all your equations will be typesetted on Utopia-based fonts.

Using the code you gave in a MWE:

$\overline{X}$ = $\sum_{i = 1}^{n}$ $\frac{x_i}{n}$

yields the following output:


As noted by tohecz, you shouldn't leave math-mode when writing a mathematical expression, specially if you're not adding text, which the equal sign isn't. So the code should be written as he stated. Here's a MWE:

$\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$

which yields the following output:


Notice that the spacing between the sum and the fraction is decreased, as it should be in one whole mathematical expression.

By looking at the end result you provided, you must be some other package or document class, because the result is not inline math-mode, which is odd given the code (notice the limits of the sum). If what you want is an equation exactly like that then you should declare an equation using, \[ and \]. A MWE with its corresponding output:

The arithmetic mean of the sample is:
\[\displaystyle \overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}\]

enter image description here

Notice that this will result in a centered equation (display math). If you still want an equation with this display style but using it as inline math (which I don't recommend), then you should precede the inline equation with \displaystyle, as follows:

The equation $\displaystyle \overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$ is now displayed alongside some text.

enter image description here

share|improve this answer

The problem with your code are the packages fourier and lmodern. You have lo load lmodern before fourier. And of course, type your equation like this $\overline{X} = \sum_{i = 1}^{n}\frac{x_i}{n}$

share|improve this answer
Only one among lmodern and fourier should be loaded, not both. – egreg Aug 12 '14 at 16:52

This code gives what you want

\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}

enter image description here

If you have to use math mode, then this works, but it displays differently at least with my compiler

$\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$

enter image description here

share|improve this answer
The reason the last output is displayed differently from the first is because the first example is typeset in \displaystyle while the latter is typeset as \textstyle. See this answer for more information. – hooy Aug 12 '14 at 21:12
Also, your answer does not solve the problem; the = in the \sum limit is not displayed unless changes are made to the preamble (see other answers), which is not the case with your proposed solution. – hooy Aug 12 '14 at 21:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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