×
Pro použití ShareLaTeXu v Angličtina klikněte zde

[edit] ShareLaTeX guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files

Some mathematical elements change their style depending on the context, whether they are part of the text or in a equation-type environment. This article explains how to manually adjust the display style.

[edit] Introduction

Let's see an example

Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge.
 
\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \]

MathsDisplayStyleEx1.png

Superscripts, subscripts and fractions are formatted differently.

  Open an example in ShareLaTeX

[edit] Setting mathematical styles

The maths styles can be set explicitly. For instance, if you want an in-line mathematical element to display as a equation-like element put \displaystyle before that element. There are some more maths style-related commands that change the size of the text.

In-line maths elements can be set with a different style: \(f(x) = \displaystyle \frac{1}{1+x}\). The same is true the other way around:
 
\begin{eqnarray*}
\begin{eqnarray*}
f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x}
\end{eqnarray*}
\end{eqnarray*}

MathsDisplayStyleEx2.png

  Open an example in ShareLaTeX

[edit] Further reading

For more information see