<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>https://mse.ined.fr/LaTeX/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nicolas+Brouard</id>
		<title>LaTeX - Contributions de l’utilisateur [fr]</title>
		<link rel="self" type="application/atom+xml" href="https://mse.ined.fr/LaTeX/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nicolas+Brouard"/>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/wiki/Sp%C3%A9cial:Contributions/Nicolas_Brouard"/>
		<updated>2026-04-18T02:14:19Z</updated>
		<subtitle>Contributions de l’utilisateur</subtitle>
		<generator>MediaWiki 1.24.0</generator>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Mathematics&amp;diff=499</id>
		<title>LaTeX/Mathematics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Mathematics&amp;diff=499"/>
				<updated>2019-10-26T16:51:33Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Braces spanning multiple lines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the greatest motivating forces for Donald Knuth when he began developing the original TeX system was to create something that allowed simple construction of mathematical formulas, whilst looking professional when printed. The fact that he succeeded was most probably why TeX (and later on, LaTeX) became so popular within the scientific community. Typesetting mathematics is one of LaTeX's greatest strengths. It is also a large topic due to the existence of so much mathematical notation.&lt;br /&gt;
&lt;br /&gt;
If your document requires only a few simple mathematical formulas, plain LaTeX has most of the tools that you will need. If you are writing a scientific document that contains numerous complicated formulas, the {{LaTeX/Package|amsmath}} package&amp;lt;ref&amp;gt;http://www.ams.org/publications/authors/tex/amslatex&amp;lt;/ref&amp;gt; introduces several new commands that are more powerful and flexible than the ones provided by LaTeX. The {{LaTeX/Package|mathtools}} package fixes some {{LaTeX/Package|amsmath}} quirks and adds some useful settings, symbols, and environments to amsmath&amp;lt;ref&amp;gt;http://www.tex.ac.uk/ctan/macros/latex/contrib/mh/mathtools.pdf&amp;lt;/ref&amp;gt;.  To use either package, include:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{amsmath}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{mathtools}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
in the preamble of the document.&lt;br /&gt;
&lt;br /&gt;
== Mathematics environments ==&lt;br /&gt;
&lt;br /&gt;
LaTeX needs to know beforehand that the subsequent text does in fact contain mathematical elements. This is because LaTeX typesets maths notation differently than normal text. Therefore, special environments have been declared for this purpose. They can be distinguished into two categories depending on how they are presented:&lt;br /&gt;
&lt;br /&gt;
* ''text'' - text formulas are displayed in-line, that is, within the body of text where it is declared. e.g., I can say that ''a'' + ''a'' = 2''a'' within this sentence.&lt;br /&gt;
* ''displayed'' - displayed formulas are separate from the main text.&lt;br /&gt;
&lt;br /&gt;
As maths require special environments, there are naturally the appropriate environment names you can use in the standard way. Unlike most other environments, however, there are some handy shorthands to declaring your formulas. The following table summarizes them:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Environment&lt;br /&gt;
! LaTeX shorthand&lt;br /&gt;
! TeX shorthand&lt;br /&gt;
|-&lt;br /&gt;
| Text&lt;br /&gt;
| {{LaTeX/LaTeX|code=\begin{math}...\end{math} }}&lt;br /&gt;
| {{LaTeX/LaTeX|code=\(...\) }}&lt;br /&gt;
| {{LaTeX/LaTeX|code=$...$}}&lt;br /&gt;
|-&lt;br /&gt;
| Displayed&lt;br /&gt;
| {{LaTeX/LaTeX|code=\begin{displaymath}...\end{displaymath} }} or &lt;br /&gt;
{{LaTeX/LaTeX|code=\begin{equation*}...\end{equation*} }}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| {{LaTeX/LaTeX|code=\[...\]}}&lt;br /&gt;
| {{LaTeX/LaTeX|code=$$...$$}}&lt;br /&gt;
|}&lt;br /&gt;
'''Note:''' Using the {{LaTeX/LaTeX|code=$$...$$}} should be avoided, as it may cause problems, particularly with the AMS-LaTeX macros. Furthermore, should a problem occur, the error messages may not be helpful.&lt;br /&gt;
&lt;br /&gt;
Additionally, there is a second possible environment for the ''displayed'' type of formulas: {{LaTeX/Environment|equation}}. The difference between this and {{LaTeX/Environment|displaymath}} is that {{LaTeX/Environment|equation}} also adds sequential equation numbers by the side.&lt;br /&gt;
&lt;br /&gt;
If you are typing text normally, you are said to be in ''text mode'', while you are typing within one of those mathematical environments, you are said to be in ''math mode'', that has some differences compared to the ''text mode'':&lt;br /&gt;
# Most spaces and line breaks do not have any significance, as all spaces are either derived logically from the mathematical expressions, or have to be specified with special commands such as {{LaTeX/LaTeX|code=\quad}}&lt;br /&gt;
# Empty lines are not allowed. Only one paragraph per formula.&lt;br /&gt;
# Each letter is considered to be the name of a variable and will be typeset as such. If you want to typeset normal text within a formula (normal upright font and normal spacing) then you have to enter the text using [[#Adding text to equations|dedicated commands.]]&lt;br /&gt;
&lt;br /&gt;
=== Inserting &amp;quot;Displayed&amp;quot; maths inside blocks of text === &lt;br /&gt;
In order for some operators, such as {{LaTeX/LaTeX|code=\lim}} or {{LaTeX/LaTeX|code=\sum}} to be displayed correctly inside some math environments (read {{LaTeX/LaTeX|code=$......$}}), it might be convenient to write the {{LaTeX/LaTeX|code=\displaystyle}} class inside the environment. Doing so might cause the line to be taller, but will cause exponents and indices to be displayed correctly for some math operators&lt;br /&gt;
&lt;br /&gt;
== Symbols ==&lt;br /&gt;
&lt;br /&gt;
Mathematics has lots and lots of symbols! If there is one aspect of maths that is difficult in LaTeX it is trying to remember how to produce them. There are of course a set of symbols that can be accessed directly from the keyboard:&lt;br /&gt;
 + - = ! / ( ) [ ] &amp;lt; &amp;gt; | ' :&lt;br /&gt;
&lt;br /&gt;
Beyond those listed above, distinct commands must be issued in order to display the desired symbols. And there are ''a lot!'' of Greek letters, set and relations symbols, arrows, binary operators, etc. For example: &lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \forall x \in X, \quad \exists y \leq \epsilon&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\forall x \in X, \quad \exists y \leq \epsilon&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Fortunately, there's a tool that can greatly simplify the search for the command for a specific symbol. Look for Detexify in the [[#External links|external links]] section below.&lt;br /&gt;
&lt;br /&gt;
==Greek letters==&lt;br /&gt;
&lt;br /&gt;
Greek letters are commonly used in mathematics, and they are very easy to type in ''math mode''. You just have to type the name of the letter after a backslash: if the first letter is lowercase, you will get a lowercase Greek letter, if the first letter is uppercase (and only the first letter), then you will get an uppercase letter. Note that some uppercase Greek letters look like Latin ones, so they are not provided by LaTeX (e.g. uppercase ''Alpha'' and ''Beta'' are just &amp;quot;A&amp;quot; and &amp;quot;B&amp;quot; respectively).&lt;br /&gt;
Lowercase epsilon, theta, phi, pi, rho, and sigma are provided in two different versions.  The alternate, or ''var''iant, version is created by adding &amp;quot;var&amp;quot; before the name of the letter:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
  \alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, &lt;br /&gt;
  \pi, \Pi, \phi, \varphi, \Phi&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \Phi&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Scroll down to [[#List_of_Mathematical_Symbols]] for a complete list of Greek symbols.&lt;br /&gt;
&lt;br /&gt;
== Operators ==&lt;br /&gt;
An operator is a function that is written as a word: e.g. trigonometric functions (sin, cos, tan), logarithms and exponentials (log, exp). LaTeX has many of these defined as commands:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \cos (2\theta) = \cos^2 \theta - \sin^2 \theta&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\cos (2\theta) = \cos^2 \theta - \sin^2 \theta \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For certain operators such as [[w:Limit (mathematics)|limits]], the subscript is placed underneath the operator:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \lim_{x \to \infty} \exp(-x) = 0&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\lim_{x \to \infty} \exp(-x) = 0&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
For the [[w:Modular arithmetic|modular operator]] there are two commands: {{LaTeX/LaTeX|code=\bmod}} and {{LaTeX/LaTeX|code=\pmod}}:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 a \bmod b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 a \, \bmod \, b&lt;br /&gt;
\,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 x \equiv a \pmod b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 x \equiv a \pmod b&lt;br /&gt;
\,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To use operators which are not pre-defined, such as [[w:argmax|argmax]], see [[../Advanced Mathematics#Custom operators|custom operators]]&lt;br /&gt;
&lt;br /&gt;
== Powers and indices ==&lt;br /&gt;
Powers and indices are equivalent to superscripts and subscripts in normal text mode. The caret (&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;) character is used to raise something, and the underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;) is for lowering. If more than one expression is raised or lowered, they should be grouped using curly braces (&amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 k_{n+1} = n^2 + k_n^2 - k_{n-1}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
k_{n+1} = n^2 + k_n^2 - k_{n-1}&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
An underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;) can be used with a vertical bar (&amp;lt;math&amp;gt;|&amp;lt;/math&amp;gt;) to denote evaluation using subscript notation in mathematics:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 f(n) = n^5 + 4n^2 + 2 {{!}}_{n=17}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 f(n) = n^5 + 4n^2 + 2 |_{n=17}&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Fractions and Binomials ==&lt;br /&gt;
A fraction is created using the {{LaTeX/LaTeX|code=\frac{numerator}{denominator}&amp;lt;!----&amp;gt;}} command. (for those who need their memories refreshed, that's the ''top'' and ''bottom'' respectively!). Likewise, the [[w:Binomial coefficient|binomial coefficient]] (aka the Choose function) may be written using the {{LaTeX/LaTeX|code=\binom}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = \binom{n}{k}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{n!}{k!(n-k)!} = \binom{n}{k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the {{LaTeX/LaTeX|code=\choose}} command without the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = {n \choose k}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = {n \choose k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You can embed fractions within fractions:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{\frac{1}{x}+\frac{1}{y}&amp;lt;!----&amp;gt;}{y-z}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{\frac{1}{x}+\frac{1}{y}}{y-z}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that when appearing inside another fraction, or in inline text &amp;lt;math&amp;gt;\tfrac{a}{b}&amp;lt;/math&amp;gt;, a fraction is noticeably smaller than in displayed mathematics. The {{LaTeX/LaTeX|code=\tfrac}} and {{LaTeX/LaTeX|code=\dfrac}} commands&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; force the use of the respective styles, {{LaTeX/LaTeX|code=\textstyle}} and {{LaTeX/LaTeX|code=\displaystyle}}. Similarly, the {{LaTeX/LaTeX|code=\tbinom}} and {{LaTeX/LaTeX|code=\dbinom}} commands typeset the binomial coefficient.&lt;br /&gt;
&lt;br /&gt;
Another way to write fractions is to use the {{LaTeX/LaTeX|code=\over}} command without the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 {n! \over k!(n-k)!} = {n \choose k}&lt;br /&gt;
\]&lt;br /&gt;
| render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 {n! \over k!(n-k)!} = {n \choose k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For relatively simple fractions, it may be more aesthetically pleasing to use [[#Powers and indices|powers and indices]]:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 ^3/_7&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
^3/_7&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you use them throughout the document, usage of {{LaTeX/Package|xfrac}} package is recommended.&lt;br /&gt;
This package provides {{LaTeX/LaTeX|code=\sfrac}} command to create slanted fractions. Usage:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
Take \sfrac{1}{2} cup of sugar, \dots&lt;br /&gt;
 \[&lt;br /&gt;
  3\times\sfrac{1}{2}=1\sfrac{1}{2}&lt;br /&gt;
 \]&lt;br /&gt;
&lt;br /&gt;
Take ${}^1/_2$ cup of sugar, \dots&lt;br /&gt;
 \[&lt;br /&gt;
  3\times{}^1/_2=1{}^1/_2&lt;br /&gt;
 \]&lt;br /&gt;
|render=[[Image:LaTeX-xfrac-example.png|400px]]}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the {{LaTeX/Package|nicefrac}} package provides the {{LaTeX/LaTeX|code=\nicefrac}} command, whose usage is similar to {{LaTeX/LaTeX|code=\sfrac}}.&lt;br /&gt;
&lt;br /&gt;
=== Continued fractions ===&lt;br /&gt;
Continued fractions should be written using {{LaTeX/LaTeX|code=\cfrac}} command&amp;lt;ref name=amsmath/&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{equation}&lt;br /&gt;
  x = a_0 + \cfrac{1}{a_1 &lt;br /&gt;
          + \cfrac{1}{a_2 &lt;br /&gt;
          + \cfrac{1}{a_3 + a_4}&amp;lt;!----&amp;gt;}&amp;lt;!----&amp;gt;}&lt;br /&gt;
\end{equation}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;   x = a_0 + \cfrac{1}{a_1 &lt;br /&gt;
           + \cfrac{1}{a_2 &lt;br /&gt;
           + \cfrac{1}{a_3 + a_4}}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Roots ==&lt;br /&gt;
The {{LaTeX/LaTeX|code=\sqrt}} command creates a square root surrounding an expression. It accepts an optional argument specified in square brackets (&amp;lt;code&amp;gt;[&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;]&amp;lt;/code&amp;gt;) to change magnitude:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
\sqrt{\frac{a}{b}&amp;lt;!----&amp;gt;}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sqrt{\frac{a}{b}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
\sqrt[n]{1+x+x^2+x^3+\ldots}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sqrt[n]{1+x+x^2+x^3+\ldots}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some people prefer writing the square root &amp;quot;closing&amp;quot; it over its content. This method arguably makes it more clear just what is in the scope of the root sign. This habit is not normally used while writing with the computer, but if you still want to change the output of the square root, LaTeX gives you this possibility. Just add the following code in the preamble of your document:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
% New definition of square root:&lt;br /&gt;
% it renames \sqrt as \oldsqrt&lt;br /&gt;
\let\oldsqrt\sqrt&lt;br /&gt;
% it defines the new \sqrt in terms of the old one&lt;br /&gt;
\def\sqrt{\mathpalette\DHLhksqrt}&lt;br /&gt;
\def\DHLhksqrt#1#2{%&lt;br /&gt;
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0&lt;br /&gt;
\advance\dimen0-0.2\ht0&lt;br /&gt;
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%&lt;br /&gt;
{\box0\lower0.4pt\box2}&amp;lt;!----&amp;gt;}&lt;br /&gt;
|render=[[Image:Latex_new_squareroot.png|thumb|right|250px|The new style is on left, the old one on right]]&lt;br /&gt;
}}&lt;br /&gt;
This TeX code first renames the {{LaTeX/LaTeX|code=\sqrt}} command as {{LaTeX/LaTeX|code=\oldsqrt}}, then redefines {{LaTeX/LaTeX|code=\sqrt}} in terms of the old one, adding something more. The new square root can be seen in the picture on the right, compared to the old one. Unfortunately this code won't work if you want to use multiple roots: if you try to write &amp;lt;math&amp;gt;\sqrt[b]{a}&amp;lt;/math&amp;gt; as {{LaTeX/LaTeX|code=\sqrt[b]{a}&amp;lt;!----&amp;gt;}} after you used the code above, you'll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.&lt;br /&gt;
&lt;br /&gt;
== Sums and integrals ==&lt;br /&gt;
The {{LaTeX/LaTeX|code=\sum}} and {{LaTeX/LaTeX|code=\int}} commands insert the sum and integral symbols respectively, with limits specified using the caret (&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;) and underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;).  The typical notation for sums is:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \sum_{i=1}^{10} t_i &lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{i=1}^{10} t_i &lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
The limits for the integrals follow the same notation.  It's also important to represent the integration variables with an upright d, which in math mode is obtained through the \mathrm{} command, and with a small space separating it from the integrand, which is attained with the \, command.&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \int_0^\infty e^{-x}\,\mathrm{d}x&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\int_0^\infty e^{-x}\,\mathrm{d}x&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There are many other &amp;quot;big&amp;quot; commands which operate in a similar manner:&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;code&amp;gt;\sum&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\sum \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\prod&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\prod&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\coprod&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\coprod&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigoplus&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigoplus&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigotimes&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigotimes&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigodot&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigodot&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigcup&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigcup&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigcap&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigcap&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\biguplus&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\biguplus&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigsqcup&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigsqcup&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigvee&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigvee&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigwedge&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigwedge&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\int&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\int&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\oint&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\oint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\iint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iint&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\iiint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iiint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\iiiint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iiiint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\idotsint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\int \! \cdots \! \int&amp;lt;/math&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more integral symbols, including those not included by default in the Computer Modern font, try the {{LaTeX/Package|esint}} package.&lt;br /&gt;
&lt;br /&gt;
The {{LaTeX/LaTeX|code=\substack}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; allows the use of {{LaTeX/LaTeX|code=\\}} to write the limits over multiple lines:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \sum_{\substack{&lt;br /&gt;
   0&amp;lt;i&amp;lt;m \\&lt;br /&gt;
   0&amp;lt;j&amp;lt;n&lt;br /&gt;
  }&amp;lt;!----&amp;gt;} &lt;br /&gt;
 P(i,j)&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{\overset{\scriptstyle 0&amp;lt;i&amp;lt;m} {\scriptstyle 0&amp;lt;j&amp;lt;n}} P(i,j)&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want the limits of an integral to be specified above and below the symbol (like the sum), use the {{LaTeX/LaTeX|code=\limits}} command:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \int\limits_a^b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\int\limits_a^b&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
However if you want this to apply to ALL integrals, it is preferable to specify the {{LaTeX/Parameter|intlimits}} option when loading the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\usepackage[intlimits]{amsmath}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Subscripts and superscripts in other contexts as well as other parameters to {{LaTeX/Package|amsmath}} package related to them are described in [[LaTeX/Advanced_Mathematics#Advanced_formatting|Advanced Mathematics]] chapter.&lt;br /&gt;
&lt;br /&gt;
For bigger integrals, you may use personal declarations, or the {{LaTeX/Package|bigints}} package &amp;lt;ref name=LM&amp;gt; http://hdl.handle.net/2268/6219&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Brackets, braces and delimiters ==&lt;br /&gt;
&amp;lt;small&amp;gt;''How to use braces in multi line equations is described in the [[LaTeX/Advanced_Mathematics#Braces_spanning_multiple_lines|Advanced Mathematics]] chapter.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use of delimiters such as brackets soon becomes important when dealing with anything but the most trivial equations. Without them, formulas can become ambiguous. Also, special types of mathematical structures, such as matrices, typically rely on delimiters to enclose them.&lt;br /&gt;
&lt;br /&gt;
There are a variety of delimiters available for use in LaTeX:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 () \, [] \, \{\} \, {{!}}{{!}} \, \{{!}}\{{!}} \, &lt;br /&gt;
 \langle\rangle \, \lfloor\rfloor \, \lceil\rceil&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
() \, [] \, \{\} \, || \, \|\| \, \langle\rangle \, \lfloor\rfloor \, \lceil\rceil&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Automatic sizing ===&lt;br /&gt;
Very often mathematical features will differ in size, in which case the delimiters surrounding the expression should vary accordingly. This can be done automatically using the {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands. Any of the previous delimiters may be used in combination with these:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \left(\frac{x^2}{y^3}\right)&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\left(\frac{x^2}{y^3}\right)&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
If a delimiter on only one side of an expression is required, then an invisible delimiter on the other side may be denoted using a period (&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Manual sizing ===&lt;br /&gt;
In certain cases, the sizing produced by the {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands may not be desirable, or you may simply want finer control over the delimiter sizes. In this case, the {{LaTeX/LaTeX|code=\big}}, {{LaTeX/LaTeX|code=\Big}}, {{LaTeX/LaTeX|code=\bigg}} and {{LaTeX/LaTeX|code=\Bigg}} modifier commands may be used:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 ( \big( \Big( \bigg( \Bigg( &lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
( \big( \Big( \bigg( \Bigg( &lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Matrices and arrays ==&lt;br /&gt;
A basic matrix may be created using the {{LaTeX/Environment|matrix}} environment&amp;lt;ref name=&amp;quot;amsmath&amp;quot;&amp;gt;requires the {{LaTeX/Package|amsmath}} package&amp;lt;/ref&amp;gt;: in common with other table-like structures, entries are specified by row, with columns separated using an ampersand ({{LaTeX/LaTeX|code=&amp;amp;}}) and a new rows separated with a double backslash ({{LaTeX/LaTeX|code=\\}})&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  a &amp;amp; b &amp;amp; c \\&lt;br /&gt;
  d &amp;amp; e &amp;amp; f \\&lt;br /&gt;
  g &amp;amp; h &amp;amp; i&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{matrix}&lt;br /&gt;
a &amp;amp; b &amp;amp; c \\&lt;br /&gt;
d &amp;amp; e &amp;amp; f \\&lt;br /&gt;
g &amp;amp; h &amp;amp; i&lt;br /&gt;
\end{matrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To specify alignment of columns in the table, use starred version&amp;lt;ref name=&amp;quot;mathtools&amp;quot;&amp;gt;requires the {{LaTeX/Package|mathtools}} package&amp;lt;/ref&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
 =&lt;br /&gt;
 \begin{matrix*}[r]&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix*}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
 =&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; \,\;\;3 \\&lt;br /&gt;
  \,\;\;2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The alignment by default is {{LaTeX/Parameter|c}} but it can be any column type valid in {{LaTeX/Environment|array}} environment.&lt;br /&gt;
&lt;br /&gt;
However matrices are usually enclosed in delimiters of some kind, and while it is possible to use the [[#Automatic sizing|&amp;lt;tt&amp;gt;\left&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\right&amp;lt;/tt&amp;gt; commands]], there are various other predefined environments which automatically include delimiters:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment name&lt;br /&gt;
! Surrounding delimiter&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|pmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;( \, ) &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|pmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;( \, ) &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|bmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;[ \, ] &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|bmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;[ \, ] &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Bmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\{ \, \} &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Bmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\{ \, \} &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|vmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;| \, | &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|vmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;| \, | &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Vmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\| \, \| &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Vmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\| \, \| &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of colums in optional parameter&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When writing down arbitrary sized matrices, it is common to use horizontal, vertical and diagonal triplets of dots (known as [[w:ellipsis|ellipses]]) to fill in certain columns and rows. These can be specified using the {{LaTeX/LaTeX|code=\cdots}}, {{LaTeX/LaTeX|code=\vdots}} and {{LaTeX/LaTeX|code=\ddots}} respectively:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 A_{m,n} = &lt;br /&gt;
 \begin{pmatrix}&lt;br /&gt;
  a_{1,1} &amp;amp; a_{1,2} &amp;amp; \cdots &amp;amp; a_{1,n} \\&lt;br /&gt;
  a_{2,1} &amp;amp; a_{2,2} &amp;amp; \cdots &amp;amp; a_{2,n} \\&lt;br /&gt;
  \vdots  &amp;amp; \vdots  &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
  a_{m,1} &amp;amp; a_{m,2} &amp;amp; \cdots &amp;amp; a_{m,n} &lt;br /&gt;
 \end{pmatrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
A_{m,n} = &lt;br /&gt;
\begin{pmatrix}&lt;br /&gt;
a_{1,1} &amp;amp; a_{1,2} &amp;amp; \cdots &amp;amp; a_{1,n} \\&lt;br /&gt;
a_{2,1} &amp;amp; a_{2,2} &amp;amp; \cdots &amp;amp; a_{2,n} \\&lt;br /&gt;
\vdots  &amp;amp; \vdots  &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
a_{m,1} &amp;amp; a_{m,2} &amp;amp; \cdots &amp;amp; a_{m,n} &lt;br /&gt;
\end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
In some cases you may want to have finer control of the alignment within each column, or want to insert lines between columns or rows. This can be achieved using the {{LaTeX/Environment|array}} environment, which is essentially a math-mode version of the [[../Tables#The tabular environment|&amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment]], which requires that the columns be pre-specified:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{array}{c{{!}}c}&lt;br /&gt;
  1 &amp;amp; 2 \\ &lt;br /&gt;
  \hline&lt;br /&gt;
  3 &amp;amp; 4&lt;br /&gt;
 \end{array}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{c|c}&lt;br /&gt;
1 &amp;amp; 2 \\ &lt;br /&gt;
\hline&lt;br /&gt;
3 &amp;amp; 4&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You may see that the AMS matrix class of environments doesn't leave enough space when used together with fractions resulting in output similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0\\&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6}\\&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To counteract this problem, add additional leading space with the optional parameter to the {{LaTeX/LaTeX|code=\\}} command:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0           \\[0.3em]&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6} \\[0.3em]&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0           \\[0.3em]&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6} \\[0.3em]&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you need &amp;quot;border&amp;quot; or &amp;quot;indexes&amp;quot; on your matrix, plain TeX provides the macro {{LaTeX/LaTeX|code=\bordermatrix}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
M = \bordermatrix{~ &amp;amp; x &amp;amp; y \cr&lt;br /&gt;
                  A &amp;amp; 1 &amp;amp; 0 \cr&lt;br /&gt;
                  B &amp;amp; 0 &amp;amp; 1 \cr}&lt;br /&gt;
\]&lt;br /&gt;
|render=[[Image:bordermatrix.png|150px]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Matrices in running text ===&lt;br /&gt;
To insert a small matrix, and not increase leading in the line containing it, use {{LaTeX/Environment|smallmatrix}} environment:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
A matrix in text must be set smaller&lt;br /&gt;
$\bigl(\begin{smallmatrix}&lt;br /&gt;
a&amp;amp;b\\ c&amp;amp;d&lt;br /&gt;
\end{smallmatrix} \bigr)$&lt;br /&gt;
to not increase leading in a portion of text.&lt;br /&gt;
|render=[[Image:LaTeX-smallmatrix.png|370px]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Adding text to equations ==&lt;br /&gt;
&lt;br /&gt;
The math environment differs from the text environment in the representation of text.  Here is an example of trying to represent text within the math environment:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 apples \times 100 apples = lots of apples^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 50 apples \times 100 apples = lots of apples^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There are two noticeable problems: there are no spaces between words or numbers, and the letters are italicized and more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it treats it as a mathematical expression: spaces are ignored (LaTeX spaces mathematics according to its own rules), and each character is a separate element (so are not positioned as closely as normal text).&lt;br /&gt;
&lt;br /&gt;
There are a number of ways that text can be added properly. The typical way is to wrap the text with the {{LaTeX/LaTeX|code=\text{...}&amp;lt;!----&amp;gt;}} command &amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; (a similar command is {{LaTeX/LaTeX|code=\mbox{...}&amp;lt;!----&amp;gt;}}, though this causes problems with subscripts, and has a less descriptive name). Let's see what happens when the above equation code is adapted:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \text{apples} \times 100 \text{apples} &lt;br /&gt;
 = \text{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \text{apples} \times 100 \text{apples} = \text{lots of apples}^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The text looks better. However, there are no gaps between the numbers and the words. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, but for the sake of simplicity you may literally add the space character in the affected {{LaTeX/LaTeX|code=\text}}(s) itself (just before the text.)&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \text{ apples} \times 100 \text{ apples}&lt;br /&gt;
 = \text{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \text{ apples} \times 100 \text{ apples} = \text{lots of apples}^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Formatted text ===&lt;br /&gt;
Using the {{LaTeX/LaTeX|code=\text}} is fine and gets the basic result. Yet, there is an alternative that offers a little more flexibility. You may recall the introduction of [[LaTeX/Formatting#Font Styles and size|font formatting commands]], such as {{LaTeX/LaTeX|code=\textrm}}, {{LaTeX/LaTeX|code=\textit}}, {{LaTeX/LaTeX|code=\textbf}}, etc. These commands format the argument accordingly, e.g., {{LaTeX/LaTeX|code=\textbf{bold text}&amp;lt;!----&amp;gt;}} gives '''bold text'''. These commands are equally valid within a maths environment to include text. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with {{LaTeX/LaTeX|code=\text}}.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \textrm{ apples} \times 100&lt;br /&gt;
 \textbf{ apples} = \textit{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \;\textrm{ apples} \times 100 \;\textbf{ apples} = \textit{lots}\;of\;apples^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Formatting mathematics symbols ==&lt;br /&gt;
So we can format text, what about formatting mathematics? There are a set of formatting commands very similar to the font formatting ones just used, except they are aimed specifically for text in maths mode (requires {{LaTeX/Package|amsfonts}})&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! LaTeX command&lt;br /&gt;
! Sample&lt;br /&gt;
! Description&lt;br /&gt;
! Common use&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathnormal{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;ABCDEF abcdef 123456\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| the default math font&lt;br /&gt;
| most mathematical notation&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathrm{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| this is the default or normal font, unitalicised&lt;br /&gt;
| units of measurement, one word functions&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathit{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathit{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| italicised font&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathbf{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathbf{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| bold font&lt;br /&gt;
| vectors&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathsf{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathsf{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:sans-serif|Sans-serif]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathtt{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;font style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ABCDEFabcdef123456&amp;lt;/font&amp;gt;&lt;br /&gt;
| [[w:Monospace font|Monospace (fixed-width) font]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathcal{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathcal{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| Calligraphy (uppercase only)&lt;br /&gt;
| often used for sheaves/schemes and categories, used to denote [[w:en:Cryptography|cryptological]] concepts like an ''alphabet of deinition'' (&amp;lt;math&amp;gt;\mathcal{A}&amp;lt;/math&amp;gt;), ''message space'' (&amp;lt;math&amp;gt;\mathcal{M}&amp;lt;/math&amp;gt;), ''ciphertext space'' (&amp;lt;math&amp;gt;\mathcal{C}&amp;lt;/math&amp;gt;) and ''[[w:key space|key space]]'' (&amp;lt;math&amp;gt;\mathcal{K}&amp;lt;/math&amp;gt;); [[w:Kleene's O|Kleene's &amp;lt;math&amp;gt;\mathcal{O}&amp;lt;/math&amp;gt;]]; [[w:Description logic#Naming Convention|naming convention in description logic]]&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathfrak{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref name=&amp;quot;amsfonts&amp;quot;&amp;gt;requires &amp;lt;tt&amp;gt;amsfonts&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;amssymb&amp;lt;/tt&amp;gt; packages&amp;lt;/ref&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathfrak{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:Fraktur (script)|Fraktur]]&lt;br /&gt;
| Almost canonical font for Lie algebras, with superscript used to denote [[w:List of New Testament papyri|New Testament papyri]], [[w:Ideal (ring theory)|ideals]] in ring theory&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathbb{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref name=&amp;quot;amsfonts&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathbb{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:Blackboard bold|Blackboard bold]]&lt;br /&gt;
| Used to denote special sets (e.g. real numbers)&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathscr{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref&amp;gt;require &amp;lt;tt&amp;gt;mathrsfs&amp;lt;/tt&amp;gt; package&amp;lt;/ref&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| [[w:Script (typefaces)|Script]]&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
The maths formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and the rest of the maths syntax is ignored. &lt;br /&gt;
&lt;br /&gt;
To bold lowercase Greek or other symbols use the {{LaTeX/LaTeX|code=\boldsymbol}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;; this will only work if there exists a bold version of the symbol in the current font. As a last resort there is the {{LaTeX/LaTeX|code=\pmb}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; (poor mans bold): this prints multiple versions of the character slightly offset against each other&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \boldsymbol{\beta} = (\beta_1,\beta_2,\ldots,\beta_n)&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \boldsymbol{\beta} = (\beta_1,\beta_2,\ldots,\beta_n)&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
To change the size of the fonts in math mode, see [[../Advanced Mathematics#Changing font size|Changing font size]].&lt;br /&gt;
&lt;br /&gt;
=== Accents ===&lt;br /&gt;
So what to do when you run out of symbols and fonts? Well the next step is to use accents:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;code&amp;gt;a'&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a'\,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a'''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a'''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a''''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a''''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\hat{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\hat{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\bar{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bar{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\overline{aaa}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\overline{aaa} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\check{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\check{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\tilde{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\tilde{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\grave{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\grave{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\acute{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\acute{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\breve{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\breve{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\vec{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\vec{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\dot{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\dot{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\ddot{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\ddot{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\dddot{a}&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\ddddot{a}&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\not{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\not{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\mathring{a}&amp;lt;/code&amp;gt; ||&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\widehat{AAA}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\widehat{AAA} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\widetilde{AAA}&amp;lt;/code&amp;gt; ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Plus and minus signs==&lt;br /&gt;
&lt;br /&gt;
Latex deals with the + and − signs in two possible ways. The most common is as a binary operator. When two maths elements appear either side of the sign, it is assumed to be a binary operator, and as such, allocates some space either side of the sign. The alternative way is a sign designation. This is when you state whether a mathematical quantity is either positive or negative. This is common for the latter, as in maths, such elements are assumed to be positive unless a − is prefixed to it. In this instance, you want the sign to appear close to the appropriate element to show their association. If you put a + or a − with nothing before it but you want it to be handled like a binary operator you can add an ''invisible'' character before the operator using {{LaTeX/LaTeX|code={}&amp;lt;!----&amp;gt;}}. This can be useful if you are writing multiple-line formulas, and a new line could start with a = or a +, for example, then you can fix some strange alignments adding the invisible character where necessary.&lt;br /&gt;
&lt;br /&gt;
== Controlling horizontal spacing ==&lt;br /&gt;
&lt;br /&gt;
LaTeX is obviously pretty good at typesetting maths—it was one of the chief aims of the core Tex system that LaTeX extends. However, it can't always be relied upon to accurately interpret formulas in the way you did. It has to make certain assumptions when there are ambiguous expressions. The result tends to be slightly incorrect horizontal spacing. In these events, the output is still satisfactory, yet, any perfectionists will no doubt wish to ''fine-tune'' their formulas to ensure spacing is correct. These are generally very subtle adjustments.&lt;br /&gt;
&lt;br /&gt;
There are other occasions where LaTeX has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  f(n) = \left\{ &lt;br /&gt;
  \begin{array}{l l}&lt;br /&gt;
    n/2 &amp;amp; \quad \text{if $n$ is even}\\&lt;br /&gt;
    -(n+1)/2 &amp;amp; \quad \text{if $n$ is odd}\\&lt;br /&gt;
  \end{array} \right.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
f(n) =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
n/2 &amp;amp; \quad \text{if } n \text{ is even} \\&lt;br /&gt;
-(n+1)/2 &amp;amp; \quad \text{if } n \text{ is odd}\\ &lt;br /&gt;
\end{cases} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This code produces errors with Miktex 2.9 and does not yield the results seen on the right.&lt;br /&gt;
Use \textrm instead of just \text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Note that this particular example can be expressed in more elegant code by the {{LaTeX/Environment|cases}} construct provided by the {{LaTeX/Package|amsmath}} package described in [[LaTeX/Advanced_Mathematics#The_cases_environment|Advanced Mathematics]] chapter.)&lt;br /&gt;
&lt;br /&gt;
LaTeX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are {{LaTeX/LaTeX|code=\quad}} and {{LaTeX/LaTeX|code=\qquad}}&lt;br /&gt;
&lt;br /&gt;
A {{LaTeX/LaTeX|code=\quad}} is a space equal to the current font size. So, if you are using an 11pt font, then the space provided by {{LaTeX/LaTeX|code=\quad}} will also be 11pt (horizontally, of course.) The {{LaTeX/LaTeX|code=\qquad}} gives twice that amount. As you can see from the code from the above example, {{LaTeX/LaTeX|code=\quad}}s were used to add some separation between the maths and the text.&lt;br /&gt;
&lt;br /&gt;
OK, so back to the fine tuning as mentioned at the beginning of the document. A good example would be displaying the simple equation for the indefinite integral of ''y'' with respect to ''x'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\, \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you were to try this, you may write:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
However, this doesn't give the correct result. LaTeX doesn't respect the white-space left in the code to signify that the ''y'' and the d''x'' are independent entities. Instead, it lumps them altogether. A {{LaTeX/LaTeX|code=\quad}} would clearly be overkill is this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\,}}&lt;br /&gt;
| small space&lt;br /&gt;
| 3/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\:}}&lt;br /&gt;
| medium space&lt;br /&gt;
| 4/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\;}}&lt;br /&gt;
| large space&lt;br /&gt;
| 5/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\!}}&lt;br /&gt;
| negative space&lt;br /&gt;
| -3/18 of a quad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NB you can use more than one command in a sequence to achieve a greater space if necessary.&lt;br /&gt;
&lt;br /&gt;
So, to rectify the current problem:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\, \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\, \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\: \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\;\;\!\! \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\; \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\; \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have ''some'' use! Take the following example:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  \left(&lt;br /&gt;
    \begin{array}{c}&lt;br /&gt;
      n \\&lt;br /&gt;
      r&lt;br /&gt;
    \end{array}&lt;br /&gt;
  \right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\left(&lt;br /&gt;
   \begin{matrix}&lt;br /&gt;
     n \\&lt;br /&gt;
     r&lt;br /&gt;
   \end{matrix}&lt;br /&gt;
   \right) = \frac{n!}{r!(n-r)!}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The matrix-like expression for representing binomial coefficients is too padded. There is too much space between the brackets and the actual contents within. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  \left(\!&lt;br /&gt;
    \begin{array}{c}&lt;br /&gt;
      n \\&lt;br /&gt;
      r&lt;br /&gt;
    \end{array}&lt;br /&gt;
  \!\right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\left(\!&lt;br /&gt;
   \begin{matrix}&lt;br /&gt;
     n \\&lt;br /&gt;
     r&lt;br /&gt;
   \end{matrix}&lt;br /&gt;
   \!\right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In any case, adding some spaces manually should be avoided whenever possible: it makes the source code more complex and it's against the basic principles of a What You See is What You Mean approach. The best thing to do is to define some commands using all the spaces you want and then, when you use your command, you don't have to add any other space. Later, if you change your mind about the length of the horizontal space, you can easily change it modifying only the command you defined before. Let us use an example: you want the ''d'' of a ''dx'' in an integral to be in roman font and a small space away from the rest. If you want to type an integral like {{LaTeX/LaTeX|code=\int x \; \mathrm{d} x}}, you can define a command like this:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\newcommand{\dd}{\; \mathrm{d}&amp;lt;!----&amp;gt;}&lt;br /&gt;
}}&lt;br /&gt;
in the preamble of your document. We have chosen {{LaTeX/LaTeX|code=\dd}} just because it reminds the &amp;quot;d&amp;quot; it replaces and it is fast to type. Doing so, the code for your integral becomes {{LaTeX/LaTeX|code=\int x \dd x}}. Now, whenever you write an integral, you just have to use the {{LaTeX/LaTeX|code=\dd}} instead of the &amp;quot;d&amp;quot;, and all your integrals will have the same style. If you change your mind, you just have to change the definition in the preamble, and all your integrals will be changed accordingly.&lt;br /&gt;
&lt;br /&gt;
==Advanced Mathematics: AMS Math package==&lt;br /&gt;
&lt;br /&gt;
The AMS ([[Wikipedia:American Mathematical Society|American Mathematical Society]]) mathematics package is a powerful package that creates a higher layer of abstraction over mathematical LaTeX language; if you use it it will make your life easier. Some commands {{LaTeX/Package|amsmath}} introduces will make other plain LaTeX commands obsolete: in order to keep consistency in the final output you'd better use {{LaTeX/Package|amsmath}} commands whenever possible. If you do so, you will get an elegant output without worrying about alignment and other details, keeping your source code readable. If you want to use it, you have to add this in the preamble:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\usepackage{amsmath}&lt;br /&gt;
}}&lt;br /&gt;
 &lt;br /&gt;
===Introducing text and dots in formulas===&lt;br /&gt;
{{LaTeX/Package|amsmath}} defines also the {{LaTeX/LaTeX|code=\dots}} command, that is a generalization of the existing {{LaTeX/LaTeX|code=\ldots}}. You can use {{LaTeX/LaTeX|code=\dots}} in both text and math mode and LaTeX will replace it with three dots &amp;quot;…&amp;quot; but it will decide according to the context whether to put it on the bottom (like {{LaTeX/LaTeX|code=\ldots}}) or centered (like {{LaTeX/LaTeX|code=\cdots}}).&lt;br /&gt;
&lt;br /&gt;
===Dots===&lt;br /&gt;
&lt;br /&gt;
LaTeX gives you several commands to insert dots in your formulas. This can be particularly useful if you have to type big matrices omitting elements. First of all, here are the main dots-related commands LaTeX provides:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code !! Output !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\dots}} || &amp;lt;math&amp;gt;\dots&amp;lt;/math&amp;gt; || generic dots, to be used in text (outside formulas as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\ldots}}|| &amp;lt;math&amp;gt;\ldots&amp;lt;/math&amp;gt; || the output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\cdots}} || &amp;lt;math&amp;gt;\cdots&amp;lt;/math&amp;gt; || These dots are centered relative to the height of a letter. There is also the binary multiplication operator, &amp;lt;tt&amp;gt;\cdot&amp;lt;/tt&amp;gt;, mentioned below.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\vdots}} || &amp;lt;math&amp;gt;\vdots&amp;lt;/math&amp;gt; || vertical dots&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\ddots}} || &amp;lt;math&amp;gt;\ddots&amp;lt;/math&amp;gt; || diagonal dots&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\iddots}} ||  || inverse diagonal dots (requires the mathdots package)&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\hdotsfor{n}&amp;lt;!----&amp;gt;}} || &amp;lt;math&amp;gt;\ldots \ldots&amp;lt;/math&amp;gt;|| to be used in matrices, it creates a row of dots spanning ''n'' columns. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Instead of using {{LaTeX/LaTeX|code=\ldots}} and {{LaTeX/LaTeX|code=\cdots}}, you should use the semantically oriented commands. It makes it possible to adapt your document to different conventions on the fly, in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. The default treatment for the various kinds follows American Mathematical Society conventions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code !! Output !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1,A_2,\dotsc,}} || [[File:LaTeX Dotsc.png]] || for &amp;quot;dots with commas&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1+\dotsb+A_N}} || [[File:LaTeX Dotsb.png]] || for &amp;quot;dots with binary operators/relations&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1 \dotsm A_N}} || [[File:LaTeX Dotsm.png]] || for &amp;quot;multiplication dots&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\int_a^b \dotsi}} || [[File:LaTeX Dotsi.png]] || for &amp;quot;dots with integrals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1\dotso A_N}} || [[File:LaTeX Dotso.png]] || for &amp;quot;other dots&amp;quot; (none of the above)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==List of Mathematical Symbols==&lt;br /&gt;
All the pre-defined mathematical symbols from the \TeX\ package are listed below. More symbols are available from extra packages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|+Relation Symbols&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\leq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\leq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\geq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\geq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\equiv\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\equiv&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\models&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\models&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\prec&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\succ&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\succ&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sim&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sim&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\perp&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\preceq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\succeq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\succeq&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\simeq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\simeq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\mid&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\mid&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\ll&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ll&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\gg&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\gg&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\asymp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\asymp&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\parallel&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\parallel&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\subset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\subset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\supset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\supset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\approx&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\approx&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\bowtie&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\bowtie&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\subseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\supseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\supseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cong&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cong&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsubset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsubset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsupset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsupset&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neq\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\neq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\smile&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\smile&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsubseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsubseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsupseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsupseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\doteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\doteq&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\frown&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\frown&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\in&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\in&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\ni&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ni&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\propto&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\propto&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;=\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;=&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\vdash&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\vdash&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\dashv&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\dashv&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;&amp;lt;&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Greek Letters&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Alpha\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Alpha&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\alpha&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Beta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Beta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\beta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Gamma&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\gamma&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Delta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Delta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\delta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Epsilon\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\epsilon\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varepsilon&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Epsilon&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\epsilon&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varepsilon&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Zeta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\zeta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Zeta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\zeta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Eta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\eta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Eta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\eta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Theta\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\theta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vartheta&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Theta&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\theta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\vartheta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Iota\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\iota\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Iota&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\iota&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Kappa\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\kappa\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Kappa&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\kappa&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Lambda\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\lambda\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Lambda&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\lambda&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Mu\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mu\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Mu&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\mu&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Nu\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\nu\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Nu&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\nu&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Xi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\xi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Xi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\xi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Pi\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\pi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varpi&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Pi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\pi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varpi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Rho\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\rho\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varrho&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Rho&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\rho&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varrho&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Sigma\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\sigma\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varsigma&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Sigma&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\sigma&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varsigma&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Tau\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\tau\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Tau&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\tau&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Upsilon\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\upsilon\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Upsilon&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\upsilon&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Phi\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\varphi&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Phi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\phi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varphi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Chi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Chi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\chi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Psi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\psi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Psi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\psi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Omega\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\omega\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Omega&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\omega&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+Binary Operations&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\pm\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\pm&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cap\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cap&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\diamond&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\diamond&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\oplus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\oplus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mp&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\mp&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigtriangleup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigtriangleup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\ominus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ominus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\times\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\times&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\uplus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\uplus&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigtriangledown&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigtriangledown&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\otimes&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\otimes&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\div&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\div&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\sqcap&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\sqcap&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\triangleleft&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\triangleleft&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\oslash&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\oslash&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ast&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ast&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\sqcup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\sqcup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\triangleright&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\triangleright&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\odot&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\odot&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\star&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\star&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\vee&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\vee&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigcirc&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigcirc&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\circ&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\circ&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\wedge&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\wedge&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\dagger\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\dagger&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bullet&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bullet&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\setminus\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\setminus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ddagger\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ddagger&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cdot&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\wr&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\wr&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\amalg&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\amalg&amp;lt;/tt&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+Set and/or Logic Notation&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\exists\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\exists&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\forall\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\forall&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neg\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\neg&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\in\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\notin\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\in&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\notin&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ni\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ni&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\land\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\land&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\lor\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\lor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rightarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rightarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\implies\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\implies&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\iff\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\iff&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\top\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\top&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\bot\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\emptyset\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varnothing\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\emptyset&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varnothing&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Delimiters&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\uparrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\uparrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Uparrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\Uparrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\downarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\downarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Downarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\Downarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\{\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\{&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\}\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\}&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\lceil\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\lceil&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rceil\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rceil&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\langle\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\langle&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rangle\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rangle&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;/\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\backslash\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\backslash&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;|\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\|\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|+Other symbols&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\partial&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\partial&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\infty&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\infty&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\nabla&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\nabla&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\hbar&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\hbar&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Box&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Box&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\aleph&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\aleph&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ell&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\imath&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\imath&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\jmath&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\jmath&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Re&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Re&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Im&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Im&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\wp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\wp&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Trigonometric Functions&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sin&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sin&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cos&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cos&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\tan&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\tan&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cot&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\arcsin&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arcsin&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arccos&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arccos&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arctan&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arctan&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arccot&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arccot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sinh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sinh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cosh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cosh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\tanh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\tanh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\coth&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\coth&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sec&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sec&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\csc&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\csc&amp;lt;/tt&amp;gt;|| || || ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Sections remaining: Table 3 onwards from symbols.pdf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
As you begin to see, typesetting math can be tricky at times. However, because Latex provides so much control, you can get professional quality mathematics typesetting with relatively little effort (once you've had a bit of practice, of course!). It would be possible to keep going and going with math topics because it seems potentially limitless. However, with this tutorial, you should be able to get along sufficiently.&lt;br /&gt;
&lt;br /&gt;
{{TODO|&lt;br /&gt;
* introduce symbols from [http://www.andy-roberts.net/misc/latex/tutorial9/symbols.pdf]&lt;br /&gt;
* add symbols from [http://www.ctan.org/tex-archive/macros/latex/contrib/wasysym/wasysym.pdf]&lt;br /&gt;
* consider adding symbols from [http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf] -- the list of nearly all symbols available for LaTeX&lt;br /&gt;
* Consider, instead of using the symbols from the above mentioned, using what has already been introduced in [http://en.wikipedia.org/wiki/Math_markup] instead of retyping the tables&lt;br /&gt;
* How to box an equation within an align environment&lt;br /&gt;
* Color in equations&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Braces spanning multiple lines ===&lt;br /&gt;
If you want a brace to continue across a new line, do the following:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
 f(x) &amp;amp;= \pi \left\{ x^4 + 7x^3 + 2x^2 \right.\nonumber\\&lt;br /&gt;
 &amp;amp;\qquad \left. {} + 10x + 12 \right\}&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
f(x) &amp;amp;= \pi \left\{ x^4 + 7x^3 + 2x^2 \right.\\&lt;br /&gt;
&amp;amp;\qquad \left. {} + 10x + 12 \right\}  \qquad \qquad (4)&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In this construction, the sizes of the left and right braces are not automatically equal, in spite of the use of {{LaTeX/LaTeX|code=\left\{}} and {{LaTeX/LaTeX|code=\right\}&amp;lt;!--&lt;br /&gt;
--&amp;gt;}}. This is because each line is typeset as a completely separate equation &amp;amp;mdash;notice the use of {{LaTeX/LaTeX|code=\right.}} and {{LaTeX/LaTeX|code=\left.}} so there are no unpaired {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands within a line (these aren't needed if the formula is on one line). You can control the size of the braces manually with the {{LaTeX/LaTeX|code=\big}}, {{LaTeX/LaTeX|code=\Big}}, {{LaTeX/LaTeX|code=\bigg}}, and {{LaTeX/LaTeX|code=\Bigg}} commands.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
\nabla ( n e^x E_n(n,x))&amp;amp;= \Bigg\{n e^x \Bigg(x^{n-1} \log (x) \Gamma (1-n,x) \nonumber \\ &amp;amp;\qquad - {} x^{n-1}&lt;br /&gt;
\bigg(G_{2,3}^{3,0}\left(x\left!&lt;br /&gt;
\begin{array}{c}&lt;br /&gt;
 1,1 \\&lt;br /&gt;
 0,0,1-n \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\right.\right)\nonumber\\ &amp;amp;\qquad  {}+\log (x) \Gamma (1-n,x)\bigg)\Bigg)+  e^x E_n(x)\nonumber \\ &amp;amp;\qquad , {} n e^x E_n(x)-n e^x E_{n-1}(x)\Bigg\}&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \nabla ( n e^x E_n(n,x))&amp;amp;=&lt;br /&gt;
        \Bigg\{n e^x \Bigg(x^{n-1} \log (x) \Gamma (1-n,x) \nonumber \\ &amp;amp;\qquad - {} x^{n-1}&lt;br /&gt;
   \bigg(G_{2,3}^{3,0}\left(x\left|&lt;br /&gt;
\begin{array}{c}&lt;br /&gt;
 1,1 \\&lt;br /&gt;
 0,0,1-n \\&lt;br /&gt;
\end{array}&lt;br /&gt;
  \right.\right)\nonumber\\ &amp;amp;\qquad  {}+\log (x) \Gamma (1-n,x)\bigg)\Bigg)+  e^x E_n(x)\nonumber \\ &amp;amp;\qquad , {} n e^x E_n(x)-n e^x&lt;br /&gt;
   E_{n-1}(x)\Bigg\}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the height of the taller equation can be replicated in the other using the {{LaTeX/LaTeX|code=\vphantom}} command:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
 A &amp;amp;=     \left(\int_t XXX       \right.\nonumber\\&lt;br /&gt;
   &amp;amp;\qquad \left.\vphantom{\int_t} YYY \dots \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
 A &amp;amp;=     \left(\int_t XXX\right.\\&lt;br /&gt;
   &amp;amp;\qquad YYY \dots \biggr)\qquad\qquad \mathrm{(5)}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* [[meta:Help:Displaying a formula]]: Wikimedia uses a subset of LaTeX commands.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols LaTeX maths symbols]&lt;br /&gt;
* [http://detexify.kirelabs.org detexify]: applet for looking up LaTeX symbols by handwriting them&lt;br /&gt;
* [ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf &amp;lt;tt&amp;gt;amsmath&amp;lt;/tt&amp;gt; documentation]&lt;br /&gt;
* [http://www.thestudentroom.co.uk/wiki/LaTeX LaTeX - The Student Room]&lt;br /&gt;
* [http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf The Comprehensive LaTeX Symbol List]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|Advanced Mathematics}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
[[pl:LaTeX/Matematyka]]&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Mathematics&amp;diff=498</id>
		<title>LaTeX/Mathematics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Mathematics&amp;diff=498"/>
				<updated>2019-10-26T16:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the greatest motivating forces for Donald Knuth when he began developing the original TeX system was to create something that allowed simple construction of mathematical formulas, whilst looking professional when printed. The fact that he succeeded was most probably why TeX (and later on, LaTeX) became so popular within the scientific community. Typesetting mathematics is one of LaTeX's greatest strengths. It is also a large topic due to the existence of so much mathematical notation.&lt;br /&gt;
&lt;br /&gt;
If your document requires only a few simple mathematical formulas, plain LaTeX has most of the tools that you will need. If you are writing a scientific document that contains numerous complicated formulas, the {{LaTeX/Package|amsmath}} package&amp;lt;ref&amp;gt;http://www.ams.org/publications/authors/tex/amslatex&amp;lt;/ref&amp;gt; introduces several new commands that are more powerful and flexible than the ones provided by LaTeX. The {{LaTeX/Package|mathtools}} package fixes some {{LaTeX/Package|amsmath}} quirks and adds some useful settings, symbols, and environments to amsmath&amp;lt;ref&amp;gt;http://www.tex.ac.uk/ctan/macros/latex/contrib/mh/mathtools.pdf&amp;lt;/ref&amp;gt;.  To use either package, include:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{amsmath}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{mathtools}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
in the preamble of the document.&lt;br /&gt;
&lt;br /&gt;
== Mathematics environments ==&lt;br /&gt;
&lt;br /&gt;
LaTeX needs to know beforehand that the subsequent text does in fact contain mathematical elements. This is because LaTeX typesets maths notation differently than normal text. Therefore, special environments have been declared for this purpose. They can be distinguished into two categories depending on how they are presented:&lt;br /&gt;
&lt;br /&gt;
* ''text'' - text formulas are displayed in-line, that is, within the body of text where it is declared. e.g., I can say that ''a'' + ''a'' = 2''a'' within this sentence.&lt;br /&gt;
* ''displayed'' - displayed formulas are separate from the main text.&lt;br /&gt;
&lt;br /&gt;
As maths require special environments, there are naturally the appropriate environment names you can use in the standard way. Unlike most other environments, however, there are some handy shorthands to declaring your formulas. The following table summarizes them:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Environment&lt;br /&gt;
! LaTeX shorthand&lt;br /&gt;
! TeX shorthand&lt;br /&gt;
|-&lt;br /&gt;
| Text&lt;br /&gt;
| {{LaTeX/LaTeX|code=\begin{math}...\end{math} }}&lt;br /&gt;
| {{LaTeX/LaTeX|code=\(...\) }}&lt;br /&gt;
| {{LaTeX/LaTeX|code=$...$}}&lt;br /&gt;
|-&lt;br /&gt;
| Displayed&lt;br /&gt;
| {{LaTeX/LaTeX|code=\begin{displaymath}...\end{displaymath} }} or &lt;br /&gt;
{{LaTeX/LaTeX|code=\begin{equation*}...\end{equation*} }}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| {{LaTeX/LaTeX|code=\[...\]}}&lt;br /&gt;
| {{LaTeX/LaTeX|code=$$...$$}}&lt;br /&gt;
|}&lt;br /&gt;
'''Note:''' Using the {{LaTeX/LaTeX|code=$$...$$}} should be avoided, as it may cause problems, particularly with the AMS-LaTeX macros. Furthermore, should a problem occur, the error messages may not be helpful.&lt;br /&gt;
&lt;br /&gt;
Additionally, there is a second possible environment for the ''displayed'' type of formulas: {{LaTeX/Environment|equation}}. The difference between this and {{LaTeX/Environment|displaymath}} is that {{LaTeX/Environment|equation}} also adds sequential equation numbers by the side.&lt;br /&gt;
&lt;br /&gt;
If you are typing text normally, you are said to be in ''text mode'', while you are typing within one of those mathematical environments, you are said to be in ''math mode'', that has some differences compared to the ''text mode'':&lt;br /&gt;
# Most spaces and line breaks do not have any significance, as all spaces are either derived logically from the mathematical expressions, or have to be specified with special commands such as {{LaTeX/LaTeX|code=\quad}}&lt;br /&gt;
# Empty lines are not allowed. Only one paragraph per formula.&lt;br /&gt;
# Each letter is considered to be the name of a variable and will be typeset as such. If you want to typeset normal text within a formula (normal upright font and normal spacing) then you have to enter the text using [[#Adding text to equations|dedicated commands.]]&lt;br /&gt;
&lt;br /&gt;
=== Inserting &amp;quot;Displayed&amp;quot; maths inside blocks of text === &lt;br /&gt;
In order for some operators, such as {{LaTeX/LaTeX|code=\lim}} or {{LaTeX/LaTeX|code=\sum}} to be displayed correctly inside some math environments (read {{LaTeX/LaTeX|code=$......$}}), it might be convenient to write the {{LaTeX/LaTeX|code=\displaystyle}} class inside the environment. Doing so might cause the line to be taller, but will cause exponents and indices to be displayed correctly for some math operators&lt;br /&gt;
&lt;br /&gt;
== Symbols ==&lt;br /&gt;
&lt;br /&gt;
Mathematics has lots and lots of symbols! If there is one aspect of maths that is difficult in LaTeX it is trying to remember how to produce them. There are of course a set of symbols that can be accessed directly from the keyboard:&lt;br /&gt;
 + - = ! / ( ) [ ] &amp;lt; &amp;gt; | ' :&lt;br /&gt;
&lt;br /&gt;
Beyond those listed above, distinct commands must be issued in order to display the desired symbols. And there are ''a lot!'' of Greek letters, set and relations symbols, arrows, binary operators, etc. For example: &lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \forall x \in X, \quad \exists y \leq \epsilon&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\forall x \in X, \quad \exists y \leq \epsilon&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Fortunately, there's a tool that can greatly simplify the search for the command for a specific symbol. Look for Detexify in the [[#External links|external links]] section below.&lt;br /&gt;
&lt;br /&gt;
==Greek letters==&lt;br /&gt;
&lt;br /&gt;
Greek letters are commonly used in mathematics, and they are very easy to type in ''math mode''. You just have to type the name of the letter after a backslash: if the first letter is lowercase, you will get a lowercase Greek letter, if the first letter is uppercase (and only the first letter), then you will get an uppercase letter. Note that some uppercase Greek letters look like Latin ones, so they are not provided by LaTeX (e.g. uppercase ''Alpha'' and ''Beta'' are just &amp;quot;A&amp;quot; and &amp;quot;B&amp;quot; respectively).&lt;br /&gt;
Lowercase epsilon, theta, phi, pi, rho, and sigma are provided in two different versions.  The alternate, or ''var''iant, version is created by adding &amp;quot;var&amp;quot; before the name of the letter:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
  \alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, &lt;br /&gt;
  \pi, \Pi, \phi, \varphi, \Phi&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \Phi&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Scroll down to [[#List_of_Mathematical_Symbols]] for a complete list of Greek symbols.&lt;br /&gt;
&lt;br /&gt;
== Operators ==&lt;br /&gt;
An operator is a function that is written as a word: e.g. trigonometric functions (sin, cos, tan), logarithms and exponentials (log, exp). LaTeX has many of these defined as commands:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \cos (2\theta) = \cos^2 \theta - \sin^2 \theta&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\cos (2\theta) = \cos^2 \theta - \sin^2 \theta \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For certain operators such as [[w:Limit (mathematics)|limits]], the subscript is placed underneath the operator:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 \lim_{x \to \infty} \exp(-x) = 0&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;\lim_{x \to \infty} \exp(-x) = 0&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
For the [[w:Modular arithmetic|modular operator]] there are two commands: {{LaTeX/LaTeX|code=\bmod}} and {{LaTeX/LaTeX|code=\pmod}}:&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 a \bmod b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 a \, \bmod \, b&lt;br /&gt;
\,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 x \equiv a \pmod b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 x \equiv a \pmod b&lt;br /&gt;
\,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To use operators which are not pre-defined, such as [[w:argmax|argmax]], see [[../Advanced Mathematics#Custom operators|custom operators]]&lt;br /&gt;
&lt;br /&gt;
== Powers and indices ==&lt;br /&gt;
Powers and indices are equivalent to superscripts and subscripts in normal text mode. The caret (&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;) character is used to raise something, and the underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;) is for lowering. If more than one expression is raised or lowered, they should be grouped using curly braces (&amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 k_{n+1} = n^2 + k_n^2 - k_{n-1}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
k_{n+1} = n^2 + k_n^2 - k_{n-1}&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
An underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;) can be used with a vertical bar (&amp;lt;math&amp;gt;|&amp;lt;/math&amp;gt;) to denote evaluation using subscript notation in mathematics:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=\[&lt;br /&gt;
 f(n) = n^5 + 4n^2 + 2 {{!}}_{n=17}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 f(n) = n^5 + 4n^2 + 2 |_{n=17}&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Fractions and Binomials ==&lt;br /&gt;
A fraction is created using the {{LaTeX/LaTeX|code=\frac{numerator}{denominator}&amp;lt;!----&amp;gt;}} command. (for those who need their memories refreshed, that's the ''top'' and ''bottom'' respectively!). Likewise, the [[w:Binomial coefficient|binomial coefficient]] (aka the Choose function) may be written using the {{LaTeX/LaTeX|code=\binom}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = \binom{n}{k}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{n!}{k!(n-k)!} = \binom{n}{k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is also possible to use the {{LaTeX/LaTeX|code=\choose}} command without the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = {n \choose k}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \frac{n!}{k!(n-k)!} = {n \choose k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You can embed fractions within fractions:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \frac{\frac{1}{x}+\frac{1}{y}&amp;lt;!----&amp;gt;}{y-z}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{\frac{1}{x}+\frac{1}{y}}{y-z}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that when appearing inside another fraction, or in inline text &amp;lt;math&amp;gt;\tfrac{a}{b}&amp;lt;/math&amp;gt;, a fraction is noticeably smaller than in displayed mathematics. The {{LaTeX/LaTeX|code=\tfrac}} and {{LaTeX/LaTeX|code=\dfrac}} commands&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; force the use of the respective styles, {{LaTeX/LaTeX|code=\textstyle}} and {{LaTeX/LaTeX|code=\displaystyle}}. Similarly, the {{LaTeX/LaTeX|code=\tbinom}} and {{LaTeX/LaTeX|code=\dbinom}} commands typeset the binomial coefficient.&lt;br /&gt;
&lt;br /&gt;
Another way to write fractions is to use the {{LaTeX/LaTeX|code=\over}} command without the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 {n! \over k!(n-k)!} = {n \choose k}&lt;br /&gt;
\]&lt;br /&gt;
| render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 {n! \over k!(n-k)!} = {n \choose k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For relatively simple fractions, it may be more aesthetically pleasing to use [[#Powers and indices|powers and indices]]:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 ^3/_7&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
^3/_7&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you use them throughout the document, usage of {{LaTeX/Package|xfrac}} package is recommended.&lt;br /&gt;
This package provides {{LaTeX/LaTeX|code=\sfrac}} command to create slanted fractions. Usage:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
Take \sfrac{1}{2} cup of sugar, \dots&lt;br /&gt;
 \[&lt;br /&gt;
  3\times\sfrac{1}{2}=1\sfrac{1}{2}&lt;br /&gt;
 \]&lt;br /&gt;
&lt;br /&gt;
Take ${}^1/_2$ cup of sugar, \dots&lt;br /&gt;
 \[&lt;br /&gt;
  3\times{}^1/_2=1{}^1/_2&lt;br /&gt;
 \]&lt;br /&gt;
|render=[[Image:LaTeX-xfrac-example.png|400px]]}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the {{LaTeX/Package|nicefrac}} package provides the {{LaTeX/LaTeX|code=\nicefrac}} command, whose usage is similar to {{LaTeX/LaTeX|code=\sfrac}}.&lt;br /&gt;
&lt;br /&gt;
=== Continued fractions ===&lt;br /&gt;
Continued fractions should be written using {{LaTeX/LaTeX|code=\cfrac}} command&amp;lt;ref name=amsmath/&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{equation}&lt;br /&gt;
  x = a_0 + \cfrac{1}{a_1 &lt;br /&gt;
          + \cfrac{1}{a_2 &lt;br /&gt;
          + \cfrac{1}{a_3 + a_4}&amp;lt;!----&amp;gt;}&amp;lt;!----&amp;gt;}&lt;br /&gt;
\end{equation}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;   x = a_0 + \cfrac{1}{a_1 &lt;br /&gt;
           + \cfrac{1}{a_2 &lt;br /&gt;
           + \cfrac{1}{a_3 + a_4}}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Roots ==&lt;br /&gt;
The {{LaTeX/LaTeX|code=\sqrt}} command creates a square root surrounding an expression. It accepts an optional argument specified in square brackets (&amp;lt;code&amp;gt;[&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;]&amp;lt;/code&amp;gt;) to change magnitude:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
\sqrt{\frac{a}{b}&amp;lt;!----&amp;gt;}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\sqrt{\frac{a}{b}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
\sqrt[n]{1+x+x^2+x^3+\ldots}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sqrt[n]{1+x+x^2+x^3+\ldots}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some people prefer writing the square root &amp;quot;closing&amp;quot; it over its content. This method arguably makes it more clear just what is in the scope of the root sign. This habit is not normally used while writing with the computer, but if you still want to change the output of the square root, LaTeX gives you this possibility. Just add the following code in the preamble of your document:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
% New definition of square root:&lt;br /&gt;
% it renames \sqrt as \oldsqrt&lt;br /&gt;
\let\oldsqrt\sqrt&lt;br /&gt;
% it defines the new \sqrt in terms of the old one&lt;br /&gt;
\def\sqrt{\mathpalette\DHLhksqrt}&lt;br /&gt;
\def\DHLhksqrt#1#2{%&lt;br /&gt;
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0&lt;br /&gt;
\advance\dimen0-0.2\ht0&lt;br /&gt;
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%&lt;br /&gt;
{\box0\lower0.4pt\box2}&amp;lt;!----&amp;gt;}&lt;br /&gt;
|render=[[Image:Latex_new_squareroot.png|thumb|right|250px|The new style is on left, the old one on right]]&lt;br /&gt;
}}&lt;br /&gt;
This TeX code first renames the {{LaTeX/LaTeX|code=\sqrt}} command as {{LaTeX/LaTeX|code=\oldsqrt}}, then redefines {{LaTeX/LaTeX|code=\sqrt}} in terms of the old one, adding something more. The new square root can be seen in the picture on the right, compared to the old one. Unfortunately this code won't work if you want to use multiple roots: if you try to write &amp;lt;math&amp;gt;\sqrt[b]{a}&amp;lt;/math&amp;gt; as {{LaTeX/LaTeX|code=\sqrt[b]{a}&amp;lt;!----&amp;gt;}} after you used the code above, you'll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.&lt;br /&gt;
&lt;br /&gt;
== Sums and integrals ==&lt;br /&gt;
The {{LaTeX/LaTeX|code=\sum}} and {{LaTeX/LaTeX|code=\int}} commands insert the sum and integral symbols respectively, with limits specified using the caret (&amp;lt;code&amp;gt;^&amp;lt;/code&amp;gt;) and underscore (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;).  The typical notation for sums is:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \sum_{i=1}^{10} t_i &lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{i=1}^{10} t_i &lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
The limits for the integrals follow the same notation.  It's also important to represent the integration variables with an upright d, which in math mode is obtained through the \mathrm{} command, and with a small space separating it from the integrand, which is attained with the \, command.&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \int_0^\infty e^{-x}\,\mathrm{d}x&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\int_0^\infty e^{-x}\,\mathrm{d}x&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There are many other &amp;quot;big&amp;quot; commands which operate in a similar manner:&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;code&amp;gt;\sum&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\sum \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\prod&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\prod&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\coprod&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\coprod&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigoplus&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigoplus&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigotimes&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigotimes&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigodot&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigodot&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigcup&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigcup&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigcap&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigcap&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\biguplus&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\biguplus&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigsqcup&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigsqcup&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigvee&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigvee&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\bigwedge&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bigwedge&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\int&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\int&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\oint&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\oint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\iint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iint&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\iiint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iiint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\iiiint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\iiiint&amp;lt;/math&amp;gt; &lt;br /&gt;
|style=&amp;quot;padding-left:20px&amp;quot;|&lt;br /&gt;
| &amp;lt;code&amp;gt;\idotsint&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &amp;lt;math&amp;gt;\int \! \cdots \! \int&amp;lt;/math&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more integral symbols, including those not included by default in the Computer Modern font, try the {{LaTeX/Package|esint}} package.&lt;br /&gt;
&lt;br /&gt;
The {{LaTeX/LaTeX|code=\substack}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; allows the use of {{LaTeX/LaTeX|code=\\}} to write the limits over multiple lines:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \sum_{\substack{&lt;br /&gt;
   0&amp;lt;i&amp;lt;m \\&lt;br /&gt;
   0&amp;lt;j&amp;lt;n&lt;br /&gt;
  }&amp;lt;!----&amp;gt;} &lt;br /&gt;
 P(i,j)&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{\overset{\scriptstyle 0&amp;lt;i&amp;lt;m} {\scriptstyle 0&amp;lt;j&amp;lt;n}} P(i,j)&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want the limits of an integral to be specified above and below the symbol (like the sum), use the {{LaTeX/LaTeX|code=\limits}} command:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \int\limits_a^b&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\int\limits_a^b&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
However if you want this to apply to ALL integrals, it is preferable to specify the {{LaTeX/Parameter|intlimits}} option when loading the {{LaTeX/Package|amsmath}} package:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\usepackage[intlimits]{amsmath}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Subscripts and superscripts in other contexts as well as other parameters to {{LaTeX/Package|amsmath}} package related to them are described in [[LaTeX/Advanced_Mathematics#Advanced_formatting|Advanced Mathematics]] chapter.&lt;br /&gt;
&lt;br /&gt;
For bigger integrals, you may use personal declarations, or the {{LaTeX/Package|bigints}} package &amp;lt;ref name=LM&amp;gt; http://hdl.handle.net/2268/6219&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Brackets, braces and delimiters ==&lt;br /&gt;
&amp;lt;small&amp;gt;''How to use braces in multi line equations is described in the [[LaTeX/Advanced_Mathematics#Braces_spanning_multiple_lines|Advanced Mathematics]] chapter.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use of delimiters such as brackets soon becomes important when dealing with anything but the most trivial equations. Without them, formulas can become ambiguous. Also, special types of mathematical structures, such as matrices, typically rely on delimiters to enclose them.&lt;br /&gt;
&lt;br /&gt;
There are a variety of delimiters available for use in LaTeX:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 () \, [] \, \{\} \, {{!}}{{!}} \, \{{!}}\{{!}} \, &lt;br /&gt;
 \langle\rangle \, \lfloor\rfloor \, \lceil\rceil&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
() \, [] \, \{\} \, || \, \|\| \, \langle\rangle \, \lfloor\rfloor \, \lceil\rceil&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Automatic sizing ===&lt;br /&gt;
Very often mathematical features will differ in size, in which case the delimiters surrounding the expression should vary accordingly. This can be done automatically using the {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands. Any of the previous delimiters may be used in combination with these:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \left(\frac{x^2}{y^3}\right)&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\left(\frac{x^2}{y^3}\right)&lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
If a delimiter on only one side of an expression is required, then an invisible delimiter on the other side may be denoted using a period (&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Manual sizing ===&lt;br /&gt;
In certain cases, the sizing produced by the {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands may not be desirable, or you may simply want finer control over the delimiter sizes. In this case, the {{LaTeX/LaTeX|code=\big}}, {{LaTeX/LaTeX|code=\Big}}, {{LaTeX/LaTeX|code=\bigg}} and {{LaTeX/LaTeX|code=\Bigg}} modifier commands may be used:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 ( \big( \Big( \bigg( \Bigg( &lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
( \big( \Big( \bigg( \Bigg( &lt;br /&gt;
 \,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Matrices and arrays ==&lt;br /&gt;
A basic matrix may be created using the {{LaTeX/Environment|matrix}} environment&amp;lt;ref name=&amp;quot;amsmath&amp;quot;&amp;gt;requires the {{LaTeX/Package|amsmath}} package&amp;lt;/ref&amp;gt;: in common with other table-like structures, entries are specified by row, with columns separated using an ampersand ({{LaTeX/LaTeX|code=&amp;amp;}}) and a new rows separated with a double backslash ({{LaTeX/LaTeX|code=\\}})&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  a &amp;amp; b &amp;amp; c \\&lt;br /&gt;
  d &amp;amp; e &amp;amp; f \\&lt;br /&gt;
  g &amp;amp; h &amp;amp; i&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{matrix}&lt;br /&gt;
a &amp;amp; b &amp;amp; c \\&lt;br /&gt;
d &amp;amp; e &amp;amp; f \\&lt;br /&gt;
g &amp;amp; h &amp;amp; i&lt;br /&gt;
\end{matrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To specify alignment of columns in the table, use starred version&amp;lt;ref name=&amp;quot;mathtools&amp;quot;&amp;gt;requires the {{LaTeX/Package|mathtools}} package&amp;lt;/ref&amp;gt;:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
 =&lt;br /&gt;
 \begin{matrix*}[r]&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix*}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; 3 \\&lt;br /&gt;
  2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
 =&lt;br /&gt;
 \begin{matrix}&lt;br /&gt;
  -1 &amp;amp; \,\;\;3 \\&lt;br /&gt;
  \,\;\;2 &amp;amp; -4&lt;br /&gt;
 \end{matrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The alignment by default is {{LaTeX/Parameter|c}} but it can be any column type valid in {{LaTeX/Environment|array}} environment.&lt;br /&gt;
&lt;br /&gt;
However matrices are usually enclosed in delimiters of some kind, and while it is possible to use the [[#Automatic sizing|&amp;lt;tt&amp;gt;\left&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\right&amp;lt;/tt&amp;gt; commands]], there are various other predefined environments which automatically include delimiters:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment name&lt;br /&gt;
! Surrounding delimiter&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|pmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;( \, ) &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|pmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;( \, ) &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|bmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;[ \, ] &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|bmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;[ \, ] &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Bmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\{ \, \} &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Bmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\{ \, \} &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|vmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;| \, | &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|vmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;| \, | &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of columns in optional parameter&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Vmatrix}}&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\| \, \| &amp;lt;/math&amp;gt;&lt;br /&gt;
| centers columns by default&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/Environment|Vmatrix*}}&amp;lt;ref name=&amp;quot;mathtools&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\| \, \| &amp;lt;/math&amp;gt;&lt;br /&gt;
| allows to specify alignment of colums in optional parameter&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When writing down arbitrary sized matrices, it is common to use horizontal, vertical and diagonal triplets of dots (known as [[w:ellipsis|ellipses]]) to fill in certain columns and rows. These can be specified using the {{LaTeX/LaTeX|code=\cdots}}, {{LaTeX/LaTeX|code=\vdots}} and {{LaTeX/LaTeX|code=\ddots}} respectively:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 A_{m,n} = &lt;br /&gt;
 \begin{pmatrix}&lt;br /&gt;
  a_{1,1} &amp;amp; a_{1,2} &amp;amp; \cdots &amp;amp; a_{1,n} \\&lt;br /&gt;
  a_{2,1} &amp;amp; a_{2,2} &amp;amp; \cdots &amp;amp; a_{2,n} \\&lt;br /&gt;
  \vdots  &amp;amp; \vdots  &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
  a_{m,1} &amp;amp; a_{m,2} &amp;amp; \cdots &amp;amp; a_{m,n} &lt;br /&gt;
 \end{pmatrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
A_{m,n} = &lt;br /&gt;
\begin{pmatrix}&lt;br /&gt;
a_{1,1} &amp;amp; a_{1,2} &amp;amp; \cdots &amp;amp; a_{1,n} \\&lt;br /&gt;
a_{2,1} &amp;amp; a_{2,2} &amp;amp; \cdots &amp;amp; a_{2,n} \\&lt;br /&gt;
\vdots  &amp;amp; \vdots  &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
a_{m,1} &amp;amp; a_{m,2} &amp;amp; \cdots &amp;amp; a_{m,n} &lt;br /&gt;
\end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
In some cases you may want to have finer control of the alignment within each column, or want to insert lines between columns or rows. This can be achieved using the {{LaTeX/Environment|array}} environment, which is essentially a math-mode version of the [[../Tables#The tabular environment|&amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment]], which requires that the columns be pre-specified:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \begin{array}{c{{!}}c}&lt;br /&gt;
  1 &amp;amp; 2 \\ &lt;br /&gt;
  \hline&lt;br /&gt;
  3 &amp;amp; 4&lt;br /&gt;
 \end{array}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{c|c}&lt;br /&gt;
1 &amp;amp; 2 \\ &lt;br /&gt;
\hline&lt;br /&gt;
3 &amp;amp; 4&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You may see that the AMS matrix class of environments doesn't leave enough space when used together with fractions resulting in output similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0\\&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6}\\&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To counteract this problem, add additional leading space with the optional parameter to the {{LaTeX/LaTeX|code=\\}} command:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0           \\[0.3em]&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6} \\[0.3em]&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 M = \begin{bmatrix}&lt;br /&gt;
       \frac{5}{6} &amp;amp; \frac{1}{6} &amp;amp; 0           \\[0.3em]&lt;br /&gt;
       \frac{5}{6} &amp;amp; 0           &amp;amp; \frac{1}{6} \\[0.3em]&lt;br /&gt;
       0           &amp;amp; \frac{5}{6} &amp;amp; \frac{1}{6}&lt;br /&gt;
     \end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you need &amp;quot;border&amp;quot; or &amp;quot;indexes&amp;quot; on your matrix, plain TeX provides the macro {{LaTeX/LaTeX|code=\bordermatrix}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
M = \bordermatrix{~ &amp;amp; x &amp;amp; y \cr&lt;br /&gt;
                  A &amp;amp; 1 &amp;amp; 0 \cr&lt;br /&gt;
                  B &amp;amp; 0 &amp;amp; 1 \cr}&lt;br /&gt;
\]&lt;br /&gt;
|render=[[Image:bordermatrix.png|150px]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Matrices in running text ===&lt;br /&gt;
To insert a small matrix, and not increase leading in the line containing it, use {{LaTeX/Environment|smallmatrix}} environment:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
A matrix in text must be set smaller&lt;br /&gt;
$\bigl(\begin{smallmatrix}&lt;br /&gt;
a&amp;amp;b\\ c&amp;amp;d&lt;br /&gt;
\end{smallmatrix} \bigr)$&lt;br /&gt;
to not increase leading in a portion of text.&lt;br /&gt;
|render=[[Image:LaTeX-smallmatrix.png|370px]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Adding text to equations ==&lt;br /&gt;
&lt;br /&gt;
The math environment differs from the text environment in the representation of text.  Here is an example of trying to represent text within the math environment:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 apples \times 100 apples = lots of apples^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 50 apples \times 100 apples = lots of apples^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There are two noticeable problems: there are no spaces between words or numbers, and the letters are italicized and more spaced out than normal. Both issues are simply artifacts of the maths mode, in that it treats it as a mathematical expression: spaces are ignored (LaTeX spaces mathematics according to its own rules), and each character is a separate element (so are not positioned as closely as normal text).&lt;br /&gt;
&lt;br /&gt;
There are a number of ways that text can be added properly. The typical way is to wrap the text with the {{LaTeX/LaTeX|code=\text{...}&amp;lt;!----&amp;gt;}} command &amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; (a similar command is {{LaTeX/LaTeX|code=\mbox{...}&amp;lt;!----&amp;gt;}}, though this causes problems with subscripts, and has a less descriptive name). Let's see what happens when the above equation code is adapted:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \text{apples} \times 100 \text{apples} &lt;br /&gt;
 = \text{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \text{apples} \times 100 \text{apples} = \text{lots of apples}^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The text looks better. However, there are no gaps between the numbers and the words. Unfortunately, you are required to explicitly add these. There are many ways to add spaces between maths elements, but for the sake of simplicity you may literally add the space character in the affected {{LaTeX/LaTeX|code=\text}}(s) itself (just before the text.)&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \text{ apples} \times 100 \text{ apples}&lt;br /&gt;
 = \text{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \text{ apples} \times 100 \text{ apples} = \text{lots of apples}^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Formatted text ===&lt;br /&gt;
Using the {{LaTeX/LaTeX|code=\text}} is fine and gets the basic result. Yet, there is an alternative that offers a little more flexibility. You may recall the introduction of [[LaTeX/Formatting#Font Styles and size|font formatting commands]], such as {{LaTeX/LaTeX|code=\textrm}}, {{LaTeX/LaTeX|code=\textit}}, {{LaTeX/LaTeX|code=\textbf}}, etc. These commands format the argument accordingly, e.g., {{LaTeX/LaTeX|code=\textbf{bold text}&amp;lt;!----&amp;gt;}} gives '''bold text'''. These commands are equally valid within a maths environment to include text. The added benefit here is that you can have better control over the font formatting, rather than the standard text achieved with {{LaTeX/LaTeX|code=\text}}.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 50 \textrm{ apples} \times 100&lt;br /&gt;
 \textbf{ apples} = \textit{lots of apples}^2&lt;br /&gt;
\]&lt;br /&gt;
|render=&amp;lt;math&amp;gt;&lt;br /&gt;
 50 \;\textrm{ apples} \times 100 \;\textbf{ apples} = \textit{lots}\;of\;apples^2&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Formatting mathematics symbols ==&lt;br /&gt;
So we can format text, what about formatting mathematics? There are a set of formatting commands very similar to the font formatting ones just used, except they are aimed specifically for text in maths mode (requires {{LaTeX/Package|amsfonts}})&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! LaTeX command&lt;br /&gt;
! Sample&lt;br /&gt;
! Description&lt;br /&gt;
! Common use&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathnormal{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;ABCDEF abcdef 123456\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| the default math font&lt;br /&gt;
| most mathematical notation&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathrm{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathrm{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| this is the default or normal font, unitalicised&lt;br /&gt;
| units of measurement, one word functions&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathit{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathit{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| italicised font&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathbf{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathbf{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| bold font&lt;br /&gt;
| vectors&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathsf{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathsf{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:sans-serif|Sans-serif]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathtt{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;font style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ABCDEFabcdef123456&amp;lt;/font&amp;gt;&lt;br /&gt;
| [[w:Monospace font|Monospace (fixed-width) font]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathcal{…}&amp;lt;!----&amp;gt;}}&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathcal{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| Calligraphy (uppercase only)&lt;br /&gt;
| often used for sheaves/schemes and categories, used to denote [[w:en:Cryptography|cryptological]] concepts like an ''alphabet of deinition'' (&amp;lt;math&amp;gt;\mathcal{A}&amp;lt;/math&amp;gt;), ''message space'' (&amp;lt;math&amp;gt;\mathcal{M}&amp;lt;/math&amp;gt;), ''ciphertext space'' (&amp;lt;math&amp;gt;\mathcal{C}&amp;lt;/math&amp;gt;) and ''[[w:key space|key space]]'' (&amp;lt;math&amp;gt;\mathcal{K}&amp;lt;/math&amp;gt;); [[w:Kleene's O|Kleene's &amp;lt;math&amp;gt;\mathcal{O}&amp;lt;/math&amp;gt;]]; [[w:Description logic#Naming Convention|naming convention in description logic]]&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathfrak{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref name=&amp;quot;amsfonts&amp;quot;&amp;gt;requires &amp;lt;tt&amp;gt;amsfonts&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;amssymb&amp;lt;/tt&amp;gt; packages&amp;lt;/ref&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathfrak{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:Fraktur (script)|Fraktur]]&lt;br /&gt;
| Almost canonical font for Lie algebras, with superscript used to denote [[w:List of New Testament papyri|New Testament papyri]], [[w:Ideal (ring theory)|ideals]] in ring theory&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathbb{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref name=&amp;quot;amsfonts&amp;quot;/&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt;\mathbb{ABCDEF abcdef 123456}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| [[w:Blackboard bold|Blackboard bold]]&lt;br /&gt;
| Used to denote special sets (e.g. real numbers)&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\mathscr{…}&amp;lt;!----&amp;gt;}}&amp;lt;ref&amp;gt;require &amp;lt;tt&amp;gt;mathrsfs&amp;lt;/tt&amp;gt; package&amp;lt;/ref&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| [[w:Script (typefaces)|Script]]&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
The maths formatting commands can be wrapped around the entire equation, and not just on the textual elements: they only format letters, numbers, and uppercase Greek, and the rest of the maths syntax is ignored. &lt;br /&gt;
&lt;br /&gt;
To bold lowercase Greek or other symbols use the {{LaTeX/LaTeX|code=\boldsymbol}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt;; this will only work if there exists a bold version of the symbol in the current font. As a last resort there is the {{LaTeX/LaTeX|code=\pmb}} command&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; (poor mans bold): this prints multiple versions of the character slightly offset against each other&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
 \boldsymbol{\beta} = (\beta_1,\beta_2,\ldots,\beta_n)&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 \boldsymbol{\beta} = (\beta_1,\beta_2,\ldots,\beta_n)&lt;br /&gt;
\,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
To change the size of the fonts in math mode, see [[../Advanced Mathematics#Changing font size|Changing font size]].&lt;br /&gt;
&lt;br /&gt;
=== Accents ===&lt;br /&gt;
So what to do when you run out of symbols and fonts? Well the next step is to use accents:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| &amp;lt;code&amp;gt;a'&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a'\,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a'''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a'''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;a''''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;a''''\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\hat{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\hat{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\bar{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\bar{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\overline{aaa}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\overline{aaa} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\check{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\check{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\tilde{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\tilde{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\grave{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\grave{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\acute{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\acute{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\breve{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\breve{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\vec{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\vec{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\dot{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\dot{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\ddot{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\ddot{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\dddot{a}&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\ddddot{a}&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;amsmath&amp;quot;/&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;\not{a}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\not{a} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\mathring{a}&amp;lt;/code&amp;gt; ||&lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\widehat{AAA}&amp;lt;/code&amp;gt; || &amp;lt;math&amp;gt;\widehat{AAA} \,&amp;lt;/math&amp;gt; &lt;br /&gt;
| style=&amp;quot;padding-left:20px&amp;quot; |&lt;br /&gt;
| &amp;lt;code&amp;gt;\widetilde{AAA}&amp;lt;/code&amp;gt; ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Plus and minus signs==&lt;br /&gt;
&lt;br /&gt;
Latex deals with the + and − signs in two possible ways. The most common is as a binary operator. When two maths elements appear either side of the sign, it is assumed to be a binary operator, and as such, allocates some space either side of the sign. The alternative way is a sign designation. This is when you state whether a mathematical quantity is either positive or negative. This is common for the latter, as in maths, such elements are assumed to be positive unless a − is prefixed to it. In this instance, you want the sign to appear close to the appropriate element to show their association. If you put a + or a − with nothing before it but you want it to be handled like a binary operator you can add an ''invisible'' character before the operator using {{LaTeX/LaTeX|code={}&amp;lt;!----&amp;gt;}}. This can be useful if you are writing multiple-line formulas, and a new line could start with a = or a +, for example, then you can fix some strange alignments adding the invisible character where necessary.&lt;br /&gt;
&lt;br /&gt;
== Controlling horizontal spacing ==&lt;br /&gt;
&lt;br /&gt;
LaTeX is obviously pretty good at typesetting maths—it was one of the chief aims of the core Tex system that LaTeX extends. However, it can't always be relied upon to accurately interpret formulas in the way you did. It has to make certain assumptions when there are ambiguous expressions. The result tends to be slightly incorrect horizontal spacing. In these events, the output is still satisfactory, yet, any perfectionists will no doubt wish to ''fine-tune'' their formulas to ensure spacing is correct. These are generally very subtle adjustments.&lt;br /&gt;
&lt;br /&gt;
There are other occasions where LaTeX has done its job correctly, but you just want to add some space, maybe to add a comment of some kind. For example, in the following equation, it is preferable to ensure there is a decent amount of space between the maths and the text.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  f(n) = \left\{ &lt;br /&gt;
  \begin{array}{l l}&lt;br /&gt;
    n/2 &amp;amp; \quad \text{if $n$ is even}\\&lt;br /&gt;
    -(n+1)/2 &amp;amp; \quad \text{if $n$ is odd}\\&lt;br /&gt;
  \end{array} \right.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
f(n) =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
n/2 &amp;amp; \quad \text{if } n \text{ is even} \\&lt;br /&gt;
-(n+1)/2 &amp;amp; \quad \text{if } n \text{ is odd}\\ &lt;br /&gt;
\end{cases} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This code produces errors with Miktex 2.9 and does not yield the results seen on the right.&lt;br /&gt;
Use \textrm instead of just \text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Note that this particular example can be expressed in more elegant code by the {{LaTeX/Environment|cases}} construct provided by the {{LaTeX/Package|amsmath}} package described in [[LaTeX/Advanced_Mathematics#The_cases_environment|Advanced Mathematics]] chapter.)&lt;br /&gt;
&lt;br /&gt;
LaTeX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are {{LaTeX/LaTeX|code=\quad}} and {{LaTeX/LaTeX|code=\qquad}}&lt;br /&gt;
&lt;br /&gt;
A {{LaTeX/LaTeX|code=\quad}} is a space equal to the current font size. So, if you are using an 11pt font, then the space provided by {{LaTeX/LaTeX|code=\quad}} will also be 11pt (horizontally, of course.) The {{LaTeX/LaTeX|code=\qquad}} gives twice that amount. As you can see from the code from the above example, {{LaTeX/LaTeX|code=\quad}}s were used to add some separation between the maths and the text.&lt;br /&gt;
&lt;br /&gt;
OK, so back to the fine tuning as mentioned at the beginning of the document. A good example would be displaying the simple equation for the indefinite integral of ''y'' with respect to ''x'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\, \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you were to try this, you may write:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
However, this doesn't give the correct result. LaTeX doesn't respect the white-space left in the code to signify that the ''y'' and the d''x'' are independent entities. Instead, it lumps them altogether. A {{LaTeX/LaTeX|code=\quad}} would clearly be overkill is this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Size&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\,}}&lt;br /&gt;
| small space&lt;br /&gt;
| 3/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\:}}&lt;br /&gt;
| medium space&lt;br /&gt;
| 4/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\;}}&lt;br /&gt;
| large space&lt;br /&gt;
| 5/18 of a quad&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\!}}&lt;br /&gt;
| negative space&lt;br /&gt;
| -3/18 of a quad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NB you can use more than one command in a sequence to achieve a greater space if necessary.&lt;br /&gt;
&lt;br /&gt;
So, to rectify the current problem:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\, \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\, \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\: \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\;\;\!\! \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[ \int y\; \mathrm{d}x \]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\int y\; \mathrm{d}x&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The negative space may seem like an odd thing to use, however, it wouldn't be there if it didn't have ''some'' use! Take the following example:&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  \left(&lt;br /&gt;
    \begin{array}{c}&lt;br /&gt;
      n \\&lt;br /&gt;
      r&lt;br /&gt;
    \end{array}&lt;br /&gt;
  \right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\left(&lt;br /&gt;
   \begin{matrix}&lt;br /&gt;
     n \\&lt;br /&gt;
     r&lt;br /&gt;
   \end{matrix}&lt;br /&gt;
   \right) = \frac{n!}{r!(n-r)!}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The matrix-like expression for representing binomial coefficients is too padded. There is too much space between the brackets and the actual contents within. This can easily be corrected by adding a few negative spaces after the left bracket and before the right bracket.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\[&lt;br /&gt;
  \left(\!&lt;br /&gt;
    \begin{array}{c}&lt;br /&gt;
      n \\&lt;br /&gt;
      r&lt;br /&gt;
    \end{array}&lt;br /&gt;
  \!\right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
\]&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\left(\!&lt;br /&gt;
   \begin{matrix}&lt;br /&gt;
     n \\&lt;br /&gt;
     r&lt;br /&gt;
   \end{matrix}&lt;br /&gt;
   \!\right) = \frac{n!}{r!(n-r)!}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In any case, adding some spaces manually should be avoided whenever possible: it makes the source code more complex and it's against the basic principles of a What You See is What You Mean approach. The best thing to do is to define some commands using all the spaces you want and then, when you use your command, you don't have to add any other space. Later, if you change your mind about the length of the horizontal space, you can easily change it modifying only the command you defined before. Let us use an example: you want the ''d'' of a ''dx'' in an integral to be in roman font and a small space away from the rest. If you want to type an integral like {{LaTeX/LaTeX|code=\int x \; \mathrm{d} x}}, you can define a command like this:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\newcommand{\dd}{\; \mathrm{d}&amp;lt;!----&amp;gt;}&lt;br /&gt;
}}&lt;br /&gt;
in the preamble of your document. We have chosen {{LaTeX/LaTeX|code=\dd}} just because it reminds the &amp;quot;d&amp;quot; it replaces and it is fast to type. Doing so, the code for your integral becomes {{LaTeX/LaTeX|code=\int x \dd x}}. Now, whenever you write an integral, you just have to use the {{LaTeX/LaTeX|code=\dd}} instead of the &amp;quot;d&amp;quot;, and all your integrals will have the same style. If you change your mind, you just have to change the definition in the preamble, and all your integrals will be changed accordingly.&lt;br /&gt;
&lt;br /&gt;
==Advanced Mathematics: AMS Math package==&lt;br /&gt;
&lt;br /&gt;
The AMS ([[Wikipedia:American Mathematical Society|American Mathematical Society]]) mathematics package is a powerful package that creates a higher layer of abstraction over mathematical LaTeX language; if you use it it will make your life easier. Some commands {{LaTeX/Package|amsmath}} introduces will make other plain LaTeX commands obsolete: in order to keep consistency in the final output you'd better use {{LaTeX/Package|amsmath}} commands whenever possible. If you do so, you will get an elegant output without worrying about alignment and other details, keeping your source code readable. If you want to use it, you have to add this in the preamble:&lt;br /&gt;
{{LaTeX/Usage|code=&lt;br /&gt;
\usepackage{amsmath}&lt;br /&gt;
}}&lt;br /&gt;
 &lt;br /&gt;
===Introducing text and dots in formulas===&lt;br /&gt;
{{LaTeX/Package|amsmath}} defines also the {{LaTeX/LaTeX|code=\dots}} command, that is a generalization of the existing {{LaTeX/LaTeX|code=\ldots}}. You can use {{LaTeX/LaTeX|code=\dots}} in both text and math mode and LaTeX will replace it with three dots &amp;quot;…&amp;quot; but it will decide according to the context whether to put it on the bottom (like {{LaTeX/LaTeX|code=\ldots}}) or centered (like {{LaTeX/LaTeX|code=\cdots}}).&lt;br /&gt;
&lt;br /&gt;
===Dots===&lt;br /&gt;
&lt;br /&gt;
LaTeX gives you several commands to insert dots in your formulas. This can be particularly useful if you have to type big matrices omitting elements. First of all, here are the main dots-related commands LaTeX provides:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code !! Output !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\dots}} || &amp;lt;math&amp;gt;\dots&amp;lt;/math&amp;gt; || generic dots, to be used in text (outside formulas as well). It automatically manages whitespaces before and after itself according to the context, it's a higher level command.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\ldots}}|| &amp;lt;math&amp;gt;\ldots&amp;lt;/math&amp;gt; || the output is similar to the previous one, but there is no automatic whitespace management; it works at a lower level.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\cdots}} || &amp;lt;math&amp;gt;\cdots&amp;lt;/math&amp;gt; || These dots are centered relative to the height of a letter. There is also the binary multiplication operator, &amp;lt;tt&amp;gt;\cdot&amp;lt;/tt&amp;gt;, mentioned below.&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\vdots}} || &amp;lt;math&amp;gt;\vdots&amp;lt;/math&amp;gt; || vertical dots&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\ddots}} || &amp;lt;math&amp;gt;\ddots&amp;lt;/math&amp;gt; || diagonal dots&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\iddots}} ||  || inverse diagonal dots (requires the mathdots package)&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\hdotsfor{n}&amp;lt;!----&amp;gt;}} || &amp;lt;math&amp;gt;\ldots \ldots&amp;lt;/math&amp;gt;|| to be used in matrices, it creates a row of dots spanning ''n'' columns. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Instead of using {{LaTeX/LaTeX|code=\ldots}} and {{LaTeX/LaTeX|code=\cdots}}, you should use the semantically oriented commands. It makes it possible to adapt your document to different conventions on the fly, in case (for example) you have to submit it to a publisher who insists on following house tradition in this respect. The default treatment for the various kinds follows American Mathematical Society conventions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Code !! Output !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1,A_2,\dotsc,}} || [[File:LaTeX Dotsc.png]] || for &amp;quot;dots with commas&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1+\dotsb+A_N}} || [[File:LaTeX Dotsb.png]] || for &amp;quot;dots with binary operators/relations&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1 \dotsm A_N}} || [[File:LaTeX Dotsm.png]] || for &amp;quot;multiplication dots&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=\int_a^b \dotsi}} || [[File:LaTeX Dotsi.png]] || for &amp;quot;dots with integrals&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{LaTeX/LaTeX|code=A_1\dotso A_N}} || [[File:LaTeX Dotso.png]] || for &amp;quot;other dots&amp;quot; (none of the above)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==List of Mathematical Symbols==&lt;br /&gt;
All the pre-defined mathematical symbols from the \TeX\ package are listed below. More symbols are available from extra packages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|+Relation Symbols&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\leq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\leq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\geq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\geq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\equiv\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\equiv&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\models&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\models&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\prec&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\prec&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\succ&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\succ&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sim&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sim&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\perp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\perp&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\preceq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\preceq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\succeq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\succeq&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\simeq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\simeq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\mid&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\mid&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\ll&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ll&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\gg&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\gg&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\asymp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\asymp&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\parallel&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\parallel&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\subset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\subset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\supset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\supset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\approx&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\approx&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\bowtie&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\bowtie&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\subseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\supseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\supseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cong&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cong&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsubset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsubset&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsupset&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsupset&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neq\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\neq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\smile&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\smile&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsubseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsubseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\sqsupseteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sqsupseteq&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\doteq&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\doteq&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\frown&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\frown&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\in&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\in&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\ni&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ni&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\propto&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\propto&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;=\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;=&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\vdash&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\vdash&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\dashv&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\dashv&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;&amp;lt;\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;&amp;lt;&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;&amp;gt;\,&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Greek Letters&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Alpha\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\alpha\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Alpha&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\alpha&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Beta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Beta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\beta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Gamma\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\gamma\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Gamma&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\gamma&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Delta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\delta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Delta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\delta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Epsilon\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\epsilon\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varepsilon&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Epsilon&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\epsilon&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varepsilon&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Zeta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\zeta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Zeta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\zeta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Eta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\eta\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Eta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\eta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Theta\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\theta\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vartheta&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Theta&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\theta&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\vartheta&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Iota\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\iota\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Iota&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\iota&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Kappa\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\kappa\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Kappa&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\kappa&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Lambda\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\lambda\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Lambda&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\lambda&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Mu\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mu\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Mu&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\mu&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Nu\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\nu\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Nu&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\nu&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Xi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\xi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Xi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\xi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Pi\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\pi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varpi&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Pi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\pi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varpi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Rho\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\rho\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varrho&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Rho&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\rho&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varrho&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Sigma\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\sigma\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varsigma&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Sigma&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\sigma&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varsigma&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Tau\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\tau\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Tau&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\tau&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Upsilon\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\upsilon\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Upsilon&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\upsilon&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Phi\,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\phi\,&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\varphi&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Phi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;\phi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varphi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Chi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Chi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\chi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Psi\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\psi\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Psi&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\psi&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Omega\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\omega\,&amp;lt;/math&amp;gt;|| &amp;lt;tt&amp;gt;\Omega&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\omega&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+Binary Operations&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\pm\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\pm&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cap\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cap&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\diamond&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\diamond&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\oplus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\oplus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\mp&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\mp&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigtriangleup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigtriangleup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\ominus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ominus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\times\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\times&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\uplus&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\uplus&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigtriangledown&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigtriangledown&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\otimes&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\otimes&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\div&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\div&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\sqcap&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\sqcap&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\triangleleft&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\triangleleft&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\oslash&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\oslash&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ast&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ast&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\sqcup&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\sqcup&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\triangleright&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\triangleright&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\odot&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\odot&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\star&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\star&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\vee&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\vee&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bigcirc&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bigcirc&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\circ&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\circ&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\wedge&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\wedge&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\dagger\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\dagger&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\bullet&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bullet&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\setminus\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\setminus&amp;lt;/tt&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ddagger\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ddagger&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\cdot&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\wr&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\wr&amp;lt;/tt&amp;gt; || &amp;lt;math&amp;gt;\amalg&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\amalg&amp;lt;/tt&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|+Set and/or Logic Notation&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\exists\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\exists&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\forall\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\forall&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\neg\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\neg&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\in\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\notin\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\in&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\notin&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ni\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\ni&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\land\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\land&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\lor\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\lor&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rightarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rightarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\implies\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\implies&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\iff\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\iff&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\top\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\top&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\bot\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\bot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\emptyset\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\varnothing\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\emptyset&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\varnothing&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Delimiters&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\uparrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\uparrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Uparrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\Uparrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\downarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\downarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Downarrow\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\Downarrow&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\{\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\{&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\}\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\}&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\lceil\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\lceil&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rceil\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rceil&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\langle\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\langle&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rangle\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\rangle&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;/\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\backslash\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\backslash&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;|\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\|\,&amp;lt;/math&amp;gt; || &amp;lt;tt&amp;gt;\&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|+Other symbols&lt;br /&gt;
! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\partial&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\partial&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\infty&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\infty&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\nabla&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\nabla&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\hbar&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\hbar&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Box&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Box&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\aleph&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\aleph&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\ell&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\imath&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\imath&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\jmath&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\jmath&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Re&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Re&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\Im&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\Im&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\wp&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\wp&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|+Trigonometric Functions&lt;br /&gt;
! Symbol !! Script !! Symbol !! Script !! Symbol !! Script !! Symbol !! Script&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sin&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sin&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cos&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cos&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\tan&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\tan&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cot&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\arcsin&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arcsin&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arccos&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arccos&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arctan&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arctan&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\arccot&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\arccot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sinh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sinh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\cosh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\cosh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\tanh&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\tanh&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\coth&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\coth&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\sec&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\sec&amp;lt;/tt&amp;gt;|| &amp;lt;math&amp;gt;\csc&amp;lt;/math&amp;gt;||&amp;lt;tt&amp;gt;\csc&amp;lt;/tt&amp;gt;|| || || ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Sections remaining: Table 3 onwards from symbols.pdf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
As you begin to see, typesetting math can be tricky at times. However, because Latex provides so much control, you can get professional quality mathematics typesetting with relatively little effort (once you've had a bit of practice, of course!). It would be possible to keep going and going with math topics because it seems potentially limitless. However, with this tutorial, you should be able to get along sufficiently.&lt;br /&gt;
&lt;br /&gt;
{{TODO|&lt;br /&gt;
* introduce symbols from [http://www.andy-roberts.net/misc/latex/tutorial9/symbols.pdf]&lt;br /&gt;
* add symbols from [http://www.ctan.org/tex-archive/macros/latex/contrib/wasysym/wasysym.pdf]&lt;br /&gt;
* consider adding symbols from [http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf] -- the list of nearly all symbols available for LaTeX&lt;br /&gt;
* Consider, instead of using the symbols from the above mentioned, using what has already been introduced in [http://en.wikipedia.org/wiki/Math_markup] instead of retyping the tables&lt;br /&gt;
* How to box an equation within an align environment&lt;br /&gt;
* Color in equations&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Braces spanning multiple lines ===&lt;br /&gt;
If you want a brace to continue across a new line, do the following:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
 f(x) &amp;amp;= \pi \left\{ x^4 + 7x^3 + 2x^2 \right.\nonumber\\&lt;br /&gt;
 &amp;amp;\qquad \left. {} + 10x + 12 \right\}&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
f(x) &amp;amp;= \pi \left\{ x^4 + 7x^3 + 2x^2 \right.\\&lt;br /&gt;
&amp;amp;\qquad \left. {} + 10x + 12 \right\}  \qquad \qquad (4)&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In this construction, the sizes of the left and right braces are not automatically equal, in spite of the use of {{LaTeX/LaTeX|code=\left\{}} and {{LaTeX/LaTeX|code=\right\}&amp;lt;!--&lt;br /&gt;
--&amp;gt;}}. This is because each line is typeset as a completely separate equation &amp;amp;mdash;notice the use of {{LaTeX/LaTeX|code=\right.}} and {{LaTeX/LaTeX|code=\left.}} so there are no unpaired {{LaTeX/LaTeX|code=\left}} and {{LaTeX/LaTeX|code=\right}} commands within a line (these aren't needed if the formula is on one line). You can control the size of the braces manually with the {{LaTeX/LaTeX|code=\big}}, {{LaTeX/LaTeX|code=\Big}}, {{LaTeX/LaTeX|code=\bigg}}, and {{LaTeX/LaTeX|code=\Bigg}} commands.&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
\nabla ( n e^x E_n(n,x))&amp;amp;= \Bigg\{n e^x \Bigg(x^{n-1} \log (x) \Gamma (1-n,x)-x^{n-1}&lt;br /&gt;
\bigg(G_{2,3}^{3,0}\left(x\left|&lt;br /&gt;
\begin{array}{c}&lt;br /&gt;
 1,1 \\&lt;br /&gt;
 0,0,1-n \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\right.\right)\nonumber\\ &amp;amp;\qquad  {}+\log (x) \Gamma (1-n,x)\bigg)\Bigg)+  e^x E_n(x),n e^x E_n(x)-n e^x E_{n-1}(x)\Bigg\}&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \nabla ( n e^x E_n(n,x))&amp;amp;=&lt;br /&gt;
        \Bigg\{n e^x \Bigg(x^{n-1} \log (x) \Gamma (1-n,x)-x^{n-1}&lt;br /&gt;
   \bigg(G_{2,3}^{3,0}\left(x\left|&lt;br /&gt;
\begin{array}{c}&lt;br /&gt;
 1,1 \\&lt;br /&gt;
 0,0,1-n \\&lt;br /&gt;
\end{array}&lt;br /&gt;
  \right.\right)\nonumber\\ &amp;amp;\qquad  {}+\log (x) \Gamma (1-n,x)\bigg)\Bigg)+  e^x E_n(x),n e^x E_n(x)-n e^x&lt;br /&gt;
   E_{n-1}(x)\Bigg\}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the height of the taller equation can be replicated in the other using the {{LaTeX/LaTeX|code=\vphantom}} command:&lt;br /&gt;
{{LaTeX/Example|code=&lt;br /&gt;
\begin{align}&lt;br /&gt;
 A &amp;amp;=     \left(\int_t XXX       \right.\nonumber\\&lt;br /&gt;
   &amp;amp;\qquad \left.\vphantom{\int_t} YYY \dots \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
|render=&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
 A &amp;amp;=     \left(\int_t XXX\right.\\&lt;br /&gt;
   &amp;amp;\qquad YYY \dots \biggr)\qquad\qquad \mathrm{(5)}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* [[meta:Help:Displaying a formula]]: Wikimedia uses a subset of LaTeX commands.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols LaTeX maths symbols]&lt;br /&gt;
* [http://detexify.kirelabs.org detexify]: applet for looking up LaTeX symbols by handwriting them&lt;br /&gt;
* [ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf &amp;lt;tt&amp;gt;amsmath&amp;lt;/tt&amp;gt; documentation]&lt;br /&gt;
* [http://www.thestudentroom.co.uk/wiki/LaTeX LaTeX - The Student Room]&lt;br /&gt;
* [http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf The Comprehensive LaTeX Symbol List]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|Advanced Mathematics}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
[[pl:LaTeX/Matematyka]]&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=497</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=497"/>
				<updated>2015-01-28T12:40:04Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Two graphics side by side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Two graphics side by side ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
Figure~\ref{f:gradient-3} shows how ... and Figure~\ref{f:gradient-4} ...&lt;br /&gt;
  \begin{figure}[htbp]&lt;br /&gt;
    \setlength{\captionindent}{0pt}&lt;br /&gt;
    \begin{minipage}[t]{0.45\textwidth}&lt;br /&gt;
    \centering\includegraphics[width=\textwidth]{gradient-3}&lt;br /&gt;
  \caption{Gradient in $X$ deduced from gradient in $P$ and $A(p)x$.}\label{f:gradient-3}&lt;br /&gt;
    \end{minipage}\hfil%&lt;br /&gt;
    \begin{minipage}[t]{0.45\textwidth}&lt;br /&gt;
    \centering\includegraphics[width=\textwidth]{gradient-4}&lt;br /&gt;
     \caption{$P$ moved to the minimum where $\nabla f(p)=0$ and $\nabla f(x)=A(p)x$. }\label{f:gradient-4}&lt;br /&gt;
    \end{minipage}&lt;br /&gt;
  \end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. You can even keep your current headings (see example below). Be careful that it may not work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1, offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% You want to insert a scientific article in your thesis keeping &lt;br /&gt;
%  the current headings defined earlier in your text. Here the headings are&lt;br /&gt;
%  on top of pages and thus the scientific article is shifted downwards in&lt;br /&gt;
%  order to not overwrite the headings of the review:&lt;br /&gt;
\pagestyle{headings}&lt;br /&gt;
...&lt;br /&gt;
\includepdf[pages=1-, offset=+0in -1in, pagecommand={%&lt;br /&gt;
   \thispagestyle{headings}}{articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf}&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=496</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=496"/>
				<updated>2015-01-28T12:39:33Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Two figures side by side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Two graphics side by side ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
FFigure~\ref{f:gradient-3} shows how ... and Figure~\ref{f:gradient-4} ...&lt;br /&gt;
  \begin{figure}[htbp]&lt;br /&gt;
    \setlength{\captionindent}{0pt}&lt;br /&gt;
    \begin{minipage}[t]{0.45\textwidth}&lt;br /&gt;
    \centering\includegraphics[width=\textwidth]{gradient-3}&lt;br /&gt;
  \caption{Gradient in $X$ deduced from gradient in $P$ and $A(p)x$.}\label{f:gradient-3}&lt;br /&gt;
    \end{minipage}\hfil%&lt;br /&gt;
    \begin{minipage}[t]{0.45\textwidth}&lt;br /&gt;
    \centering\includegraphics[width=\textwidth]{gradient-4}&lt;br /&gt;
     \caption{$P$ moved to the minimum where $\nabla f(p)=0$ and $\nabla f(x)=A(p)x$. }\label{f:gradient-4}&lt;br /&gt;
    \end{minipage}&lt;br /&gt;
  \end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. You can even keep your current headings (see example below). Be careful that it may not work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1, offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% You want to insert a scientific article in your thesis keeping &lt;br /&gt;
%  the current headings defined earlier in your text. Here the headings are&lt;br /&gt;
%  on top of pages and thus the scientific article is shifted downwards in&lt;br /&gt;
%  order to not overwrite the headings of the review:&lt;br /&gt;
\pagestyle{headings}&lt;br /&gt;
...&lt;br /&gt;
\includepdf[pages=1-, offset=+0in -1in, pagecommand={%&lt;br /&gt;
   \thispagestyle{headings}}{articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf}&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=495</id>
		<title>Accueil</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=495"/>
				<updated>2014-12-10T13:50:30Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Programme */ test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il s'agit d'une formation interne de 3 demi-journées destinée à des doctorants de l'Institut national d'études démographiques. Le cours a donné lieu à ce site wiki qui s'est initialement inspiré du Wikibooks anglais mais a fait l'objet de nombreuses adaptations qui peuvent intéresser un public plus large. Le site, comme Wikibooks, est sous licence CCSA. Il est en anglais et ne peut être modifié que par les participants à ce cours.&lt;br /&gt;
&lt;br /&gt;
[[Fichier:LaTeX logo.svg|thumb|Logo de &amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Programme =&lt;br /&gt;
La matinée du mardi 31 mai de 9h30 à 12h30 en salle 111 sera consacrée à une présentation rapide de LaTeX.&lt;br /&gt;
&lt;br /&gt;
* 9h00 Accueil des participants et vérification des installations (wifi, latexlive)&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# L'essentiel de LaTeX: la structuration d'un texte (Nicolas Brouard)&lt;br /&gt;
# Les mathématiques, les tableaux, &lt;br /&gt;
# 11h00 Pause&lt;br /&gt;
# 11h15 La bibliographie BiBTeX et Jabref&lt;br /&gt;
&lt;br /&gt;
Le mardi après-midi peut être consacré à l'installation des logiciels non installés par LaTeXLive comme Gnu-emacs, OpenOffice pour writer2latex qui permet d'exporter un fichier MS Word en LaTeX.&lt;br /&gt;
&lt;br /&gt;
Le mercredi matin soit le 1er juin de 9h30 à 12h30 sera un atelier LaTeX animé par Nicolas Brouard, Matthieu Solignac.&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# Les dessins bitmap et vectoriels&lt;br /&gt;
# Les articles scientifiques et les revues&lt;br /&gt;
# Les présentations beamer (Matthieu Solignac)&lt;br /&gt;
# 11h00 pause &lt;br /&gt;
# 11h15 seconde partie&lt;br /&gt;
# Atelier d'entre-aide&lt;br /&gt;
&lt;br /&gt;
Le mercredi après-midi sera consacré à une présentation des outils collaboratifs de partage de bibliographie&lt;br /&gt;
(Matthieu Solignac)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nous personnalisons ici la documentation&lt;br /&gt;
sur '''&amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;''' telle que trouvée originellement sur WikiBooks.&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
&lt;br /&gt;
{{:LaTeX/Summary}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Wikipedia:de:LaTeX-Kompendium]]&lt;br /&gt;
[[Wikipedia:fr:LaTeX]]&lt;br /&gt;
[[Wikipedia:ru:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.math.jussieu.fr/~mpg/latex/begin&lt;br /&gt;
&lt;br /&gt;
http://www.ukonline.be/programmation/latex/tutoriel&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=494</id>
		<title>Accueil</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=494"/>
				<updated>2014-12-04T19:02:32Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Essai de Parsoid&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il s'agit d'une formation interne de 3 demi-journées destinée à des doctorants de l'Institut national d'études démographiques. Le cours a donné lieu à ce site wiki qui s'est initialement inspiré du Wikibooks anglais mais a fait l'objet de nombreuses adaptations qui peuvent intéresser un public plus large. Le site, comme Wikibooks, est sous licence CCSA. Il est en anglais et ne peut être modifié que par les participants à ce cours.&lt;br /&gt;
&lt;br /&gt;
[[Fichier:LaTeX logo.svg|thumb|Logo de &amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Programme =&lt;br /&gt;
La matinée du mardi 31 mai de 9h30 à 12h30 en salle 111 sera consacrée à une présentation rapide de LaTeX.&lt;br /&gt;
&lt;br /&gt;
* 9h00 Accueil des participants et vérification des installations (wifi, latexlive)&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# L'essentiel de LaTeX: la structuration d'un texte (Nicolas Brouard)&lt;br /&gt;
# Les mathématiques, les tableaux, &lt;br /&gt;
# 11h00 Pause&lt;br /&gt;
# 11h15 La bibliographie BiBTeX et Jabref&lt;br /&gt;
&lt;br /&gt;
Le mardi après-midi peut être consacré à l'installation des logiciels non installés par LaTeXLive comme Gnu-emacs, OpenOffice pour writer2latex qui permet d'exporter un fichier MS Word en LaTeX.&lt;br /&gt;
&lt;br /&gt;
Le mercredi matin 1er juin de 9h30 à 12h30 sera un atelier LaTeX animé par Nicolas Brouard, Matthieu Solignac.&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# Les dessins bitmap et vectoriels&lt;br /&gt;
# Les articles scientifiques et les revues&lt;br /&gt;
# Les présentations beamer (Matthieu Solignac)&lt;br /&gt;
# 11h00 pause &lt;br /&gt;
# 11h15 seconde partie&lt;br /&gt;
# Atelier d'entre-aide&lt;br /&gt;
&lt;br /&gt;
Le mercredi après-midi sera consacré à une présentation des outils collaboratifs de partage de bibliographie&lt;br /&gt;
(Matthieu Solignac)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nous personnalisons ici la documentation&lt;br /&gt;
sur '''&amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;''' telle que trouvée originellement sur WikiBooks.&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
&lt;br /&gt;
{{:LaTeX/Summary}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Wikipedia:de:LaTeX-Kompendium]]&lt;br /&gt;
[[Wikipedia:fr:LaTeX]]&lt;br /&gt;
[[Wikipedia:ru:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.math.jussieu.fr/~mpg/latex/begin&lt;br /&gt;
&lt;br /&gt;
http://www.ukonline.be/programmation/latex/tutoriel&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd.js&amp;diff=493</id>
		<title>MediaWiki:Gadget-wikEd.js</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd.js&amp;diff=493"/>
				<updated>2014-11-27T14:06:50Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page créée avec « // install Wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&amp;amp;action=raw&amp;amp;ctype=t... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor&lt;br /&gt;
importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'&lt;br /&gt;
+ '&amp;amp;action=raw&amp;amp;ctype=text/javascript');&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd/en&amp;diff=491</id>
		<title>MediaWiki:Gadget-wikEd/en</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd/en&amp;diff=491"/>
				<updated>2014-11-27T14:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page blanchie&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd/en&amp;diff=490</id>
		<title>MediaWiki:Gadget-wikEd/en</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadget-wikEd/en&amp;diff=490"/>
				<updated>2014-11-27T14:03:52Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page créée avec « // install Wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&amp;amp;action=raw&amp;amp;ctype=t... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor&lt;br /&gt;
importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'&lt;br /&gt;
+ '&amp;amp;action=raw&amp;amp;ctype=text/javascript');&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadgets-definition&amp;diff=489</id>
		<title>MediaWiki:Gadgets-definition</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=MediaWiki:Gadgets-definition&amp;diff=489"/>
				<updated>2014-11-27T13:56:57Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page créée avec « #Editing * wikEd|wikEd.js * refToolbar|refToolbar.js * textareasansserif|textareasansserif.css  #Interface * exlinks|exlinks.js * purgeTab|purgeTab.js * citations|citation... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#Editing&lt;br /&gt;
* wikEd|wikEd.js&lt;br /&gt;
* refToolbar|refToolbar.js&lt;br /&gt;
* textareasansserif|textareasansserif.css&lt;br /&gt;
&lt;br /&gt;
#Interface&lt;br /&gt;
* exlinks|exlinks.js&lt;br /&gt;
* purgeTab|purgeTab.js&lt;br /&gt;
* citations|citations.js&lt;br /&gt;
&lt;br /&gt;
#Misc&lt;br /&gt;
== library-gadgets ==&lt;br /&gt;
* JSL|JSL.js&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=488</id>
		<title>LaTeX/Installation</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=488"/>
				<updated>2014-03-18T07:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Calc2LaTeX installation on OpenOffice.org 2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= TeXLive=&lt;br /&gt;
&lt;br /&gt;
TeXLive2010 is a common distribution for Windows, Mac OS/X and Linux. In May 2011, TeXLive2011 is not out but most of packages, if upgraded from [http://www.ctan.org CTAN]. The Comprehensive TeX Archive Network is the place to get materials related to the TeX typesetting system. You need to read http://www.tug.org/texlive/doc/texlive-en/texlive-en.html  &lt;br /&gt;
&lt;br /&gt;
* On Windows you are supposed to download the ISO file and burn it on a DVD (see http://www.tug.org/texlive/acquire-dvd.html).&lt;br /&gt;
&lt;br /&gt;
* On Mac OS/X, you are supposed to get MaCTeX which includes TeXLive and run the dmg file for installation.&lt;br /&gt;
&lt;br /&gt;
*On Linux, texlive is installed by default. You may need to install some additional packages.&lt;br /&gt;
&lt;br /&gt;
== Windows installation ==&lt;br /&gt;
Insert the DVD and install the distribution. It may take half an hour or more. See http://www.tug.org/texlive/doc/texlive-en/texlive-en.html for Post instal actions.&lt;br /&gt;
In particular open a terminal and enter the command (copy and paste by right click)&lt;br /&gt;
 &amp;gt; tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet &lt;br /&gt;
&lt;br /&gt;
== For all 3 OS ==&lt;br /&gt;
&lt;br /&gt;
Follow the section '''3.5 Testing the installation''' and test the commands: latex, pdflatex, etc. on simple examples. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are finished, you can test the editor TeXworks which works on the 3 operating systems.&lt;br /&gt;
&lt;br /&gt;
Click on the TeXworks icon on your Desktop (Windows installation) and choose File =&amp;gt; New from a template. Choose a Beamer template. Run it, look at the pdf, move to another page. Right click somewhere on the pdf text and choose sync to the source code. Your left window will sync with the corresponding tex source line. Move to another section of the source text, right click and choose ''locate on PDF'' and the right pane (PDF window) will scroll to the corresponding section.&lt;br /&gt;
&lt;br /&gt;
Test a XeTeX template and run it. If it runs into error because of a missing font, comment the line by adding a % in front of the line and run again. XeTeX is able to run with any font of your OS and not only on &amp;quot;Computer Modern&amp;quot; fonts which are specific to TeX.&lt;br /&gt;
&lt;br /&gt;
Now you have a running mininal running installation.&lt;br /&gt;
&lt;br /&gt;
== Gnu-emacs and AucTeX==&lt;br /&gt;
&lt;br /&gt;
If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.&lt;br /&gt;
&lt;br /&gt;
Just download the Emacs zip (currently version 23.3) first and then extract it on &amp;lt;tt&amp;gt;c:\Program Files\Emacs&amp;lt;/tt&amp;gt; by creating an Emacs folder. It will created a tree &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3&amp;lt;/tt&amp;gt; of all the emacs distribution. In the directory &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3\bin&amp;lt;/tt&amp;gt;, you will find a file named &amp;lt;tt&amp;gt;runemacs.exe&amp;lt;/tt&amp;gt;. Right click and create an alias (link) file and then move this link on your desktop or menu bar in order to launch emacs.&lt;br /&gt;
&lt;br /&gt;
Now, unzip the AucTeX zipped file exactly on this emacs-23.3 folder in order to add the AucTeX tree to the emacs tree. In particular a newer &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file under the &amp;lt;tt&amp;gt;emac-23.3\info&amp;lt;/tt&amp;gt; will supersede the previous file with the same name (accept to overwrite &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file).&lt;br /&gt;
&lt;br /&gt;
Launch runemacs and open a tex file. It should work. See [[AucTeX]] for more information.&lt;br /&gt;
&lt;br /&gt;
== JabReF ==&lt;br /&gt;
&lt;br /&gt;
JabReF (see http://jabref.sourceforge.net/) is the tool which will be presented for the Bibliography management. Some exercises will be proposed using JabReF. It is very easy to download.&lt;br /&gt;
&lt;br /&gt;
=Other softwares=&lt;br /&gt;
&lt;br /&gt;
Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.&lt;br /&gt;
&lt;br /&gt;
== OpenOffice and writer2latex ==&lt;br /&gt;
If you want to export a Word document into a LaTeX document, a nicer way than copy and paste consists in loading the .doc file in Writer from Openoffice and export it using writer2latex as a LaTeX file.&lt;br /&gt;
&lt;br /&gt;
You can download OpenOffice at http://fr.openoffice.org/about-downloads.html and install the default installation with Java.&lt;br /&gt;
&lt;br /&gt;
Then go to http://writer2latex.sourceforge.net/index12.html#download in order to download ''Writer2LaTeX 1.1.7'' (April 2011) as a zip file. Unzip the file in a temporary folder and click on the file writer2latex.oxt which will open by OpenOffice and install as an extension.&lt;br /&gt;
&lt;br /&gt;
Now you can export a .doc into a .tex file. Amongst the various options, you can use Simple LaTeX, utf-8 encoding as well as xetex for the TeX engine instead of pdftex.&lt;br /&gt;
[[Fichier:writer2latex-exmaple.png|right|400px|Writer2latex: default, Xetex, no mulitlingual, separate folder for images.]]&lt;br /&gt;
&lt;br /&gt;
For non well structured documents you will find that Writer2LaTeX uses the principle garbage in – garbage out!&lt;br /&gt;
If you wish to simply get TeXed output of your Word document ie without the purpose of reworking on the LaTeX code, you can use the default layout, as shown on the figure.&lt;br /&gt;
&lt;br /&gt;
But for a well structured Word document, writer2latex (recent version only) simplifies the porting by creating images (png files) for most of the figures.&lt;br /&gt;
&lt;br /&gt;
You need Emacs or any editor to clean the LaTeX file.&lt;br /&gt;
&lt;br /&gt;
===Remarks concerning this wiki (wiki publisher) ===&lt;br /&gt;
If you want to improve this wiki and are used to work with Word, you can export from Word or Libre Office to a wiki source code, using the Sun wiki publisher extensions that you can get [http://extensions.services.openoffice.org/project/wikipublisher there]. Then under Writer, you can export to a file using the wiki format (you can also send to a wiki server, but it useful only if you do it regularly). A wiki text is supposed to be simpler to enter that html. It is more modern that LaTeX. &lt;br /&gt;
&lt;br /&gt;
If you want to export a table into a wiki, copy paste it into a Writer new document by using html special paste (right click). And then export to wiki format. Then you can paste your wiki table into a wiki server like this one.&lt;br /&gt;
&lt;br /&gt;
==Calc2LaTeX==&lt;br /&gt;
&lt;br /&gt;
Calc2LaTeX lets you select cells in your spreadsheets and output code for LaTeX tables. It is very very helpful but needs some installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX installation on OpenOffice.org 2.0 ===&lt;br /&gt;
&lt;br /&gt;
# Before installing Calc2LaTeX, you need to download a zip file from http://calc2latex.sourceforge.net and to extract its content on any temporary directory: &lt;br /&gt;
#Open OpenOffice Calc or (Libre Office) and click &amp;lt;tt&amp;gt;Tools&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Macros&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Organize Macros&amp;lt;/tt&amp;gt; =&amp;gt; &amp;lt;tt&amp;gt;OpenOffice.org Basic...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:[[Image:calc2latexinstall.jpg|frame|right|400px]]&lt;br /&gt;
#You will see 'OpenOffice.org Basic Macros' dialog box. Select 'My Macros' and push 'Organizer' button&lt;br /&gt;
:[[Fichier:calc2latex2.jpg|frame|right|400px]]&lt;br /&gt;
# Click 'Libraries' tab, and confirm that 'My Macros &amp;amp; Dialogs' is selected on the list of 'Location.' (If not, select it.)&lt;br /&gt;
:And then click &amp;lt;tt&amp;gt;Append&amp;lt;/tt&amp;gt; button.[[Fichier:calc2latex3.jpg|frame|right|400px]]&lt;br /&gt;
:[[Fichier:calc2latex3-fr-mac.jpg|frame|right|400px]]&lt;br /&gt;
# You will see a file dialog, so select &amp;lt;tt&amp;gt;script.xlb&amp;lt;/tt&amp;gt; which you have extracted from the zip file in advance.[[Fichier:calc2latex4.jpg|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
You can now use calc2latex to produce LaTeX tables. There is chapter on LaTeX and you will learn how to use calc2latex as well as how to improve the source code output by calc2latex as well as how to simplify it. The following section gives some advices and you can refer to it later.&lt;br /&gt;
&lt;br /&gt;
===Optional steps ===&lt;br /&gt;
====Changing the default output encoding to UTF-8 unicode ====&lt;br /&gt;
Default settings of Calc2LaTeX are nice except the encoding which is the old West European Latin 1 or ISO-8859-1 code instead of UNICODE (UTF-8). It doesn't really matter if you store the LaTeX code in your clipboard and paste it in your TeX editor because the transformation to the local encoding of your LaTeX file is done on the fly, but if your output is a file, that file will be ISO-8859-1 encoded. And you will have difficulties to mix words from East European languages as well as Russian, Arabic and Asian languages. Older TeX (1982) and even pdfTeX are not able to mix 'naturally' various languages like this wiki is able to do. Only XeTeX as well LuaTeX are able to do it. You are encouraged to use these engines instead of pdfTeX. Don't worry XeTeX and LuaTeX are outputting PDF formats by default and no more the old DVI format.&lt;br /&gt;
&lt;br /&gt;
Thus in order to make UTF-8 the default encoding of Calc2LaTeX (if not set already by a newer version than the current 0.2.4) you can do it during the installation. It is as easy or as difficult as the installation.&lt;br /&gt;
&lt;br /&gt;
Do the previous steps, and then Edit the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; macro. [[Fichier:calc2latex-edit-macro.png|frame|right|400px]] &lt;br /&gt;
then change ISO-8859-1 to UTF-8 and save.[[Fichier:calc2latex-change-main-macro.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
==== Adding the macro in a menu bar ====&lt;br /&gt;
:Once you verified that the macro is running, it can be more convenient to add it to a menu bar. :Therefore select View =&amp;gt; Toolbar =&amp;gt; Customize then choose (for example) the &amp;lt;tt&amp;gt;Standard&amp;lt;/tt&amp;gt; menu and scroll down to (after &amp;quot;New&amp;quot;, &amp;quot;Open&amp;quot;, &amp;quot;Save&amp;quot;, &amp;quot;Save as&amp;quot; etc.) &amp;quot;Export to pdf&amp;quot; and click &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt;. :Then select OpenOffice Macros, and Calc2latex (twice) in order to attach the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; subroutine to the menu bar. [[Fichier:calc2latex-add-to-menubar.png|thumb|right|400px]]&lt;br /&gt;
:In a second step, instead of &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt; you can click on &amp;lt;tt&amp;gt;Modify&amp;lt;/tt&amp;gt; in order to rename the name of the macro to be displayed by &amp;quot;Selection to LaTeX table&amp;quot; (or similar) instead of &amp;quot;Main&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:At last, you can add an icon such as this one [[Fichier:latex-table.png]] (right-click and save the image on your hard disk) by clicking on import [[Fichier:calc2latex-add-icon.png|frame|right|400px]]&lt;br /&gt;
and import&lt;br /&gt;
[[Fichier:calc2latex-import-icon.png|frame|right|400px]]&lt;br /&gt;
then it will display like this and after selecting contiguous cells you can click and the new icon.&lt;br /&gt;
[[Fichier:calc2latex-show-latex-icon.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
== Gnuplot (***)==&lt;br /&gt;
== Xfig (****)==&lt;br /&gt;
Linux and OS/X only!!!&lt;br /&gt;
&lt;br /&gt;
== Inkscape (***)==&lt;br /&gt;
&lt;br /&gt;
== IPE 7 (**)==&lt;br /&gt;
&lt;br /&gt;
See the wiki specific to ipe users http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7 as well as the official site http://ipe7.sourceforge.net/ and documentation at http://ipe7.sourceforge.net/manual/manual.pdf .&lt;br /&gt;
&lt;br /&gt;
For OS/X you can get an Ipe.app since version 7.1.1&lt;br /&gt;
&lt;br /&gt;
== Geogebra (**)==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom||Introduction}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=487</id>
		<title>Accueil</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=487"/>
				<updated>2012-10-12T13:20:31Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Introduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il s'agit d'une formation interne de 3 demi-journées destinée à des doctorants de l'Institut national d'études démographiques. Le cours a donné lieu à ce site wiki qui s'est initialement inspiré du Wikibooks anglais mais a fait l'objet de nombreuses adaptations qui peuvent intéresser un public plus large. Le site, comme Wikibooks, est sous licence CCSA. Il est en anglais et ne peut être modifié que par les participants à ce cours.&lt;br /&gt;
&lt;br /&gt;
[[Fichier:LaTeX logo.svg|thumb|Logo de &amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Programme =&lt;br /&gt;
Le mardi matin 31 mai de 9h30 à 12h30 en salle 111 sera consacré à une présentation rapide de LaTeX.&lt;br /&gt;
&lt;br /&gt;
* 9h00 Accueil des participants et vérification des installations (wifi, latexlive)&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# L'essentiel de LaTeX: la structuration d'un texte (Nicolas Brouard)&lt;br /&gt;
# Les mathématiques, les tableaux, &lt;br /&gt;
# 11h00 Pause&lt;br /&gt;
# 11h15 La bibliographie BiBTeX et Jabref&lt;br /&gt;
&lt;br /&gt;
Le mardi après-midi peut être consacré à l'installation des logiciels non installés par LaTeXLive comme Gnu-emacs, OpenOffice pour writer2latex qui permet d'exporter un fichier MS Word en LaTeX.&lt;br /&gt;
&lt;br /&gt;
Le mercredi matin 1er juin de 9h30 à 12h30 sera un atelier LaTeX animé par Nicolas Brouard, Matthieu Solignac.&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# Les dessins bitmap et vectoriels&lt;br /&gt;
# Les articles scientifiques et les revues&lt;br /&gt;
# Les présentations beamer (Matthieu Solignac)&lt;br /&gt;
# 11h00 pause &lt;br /&gt;
# 11h15 seconde partie&lt;br /&gt;
# Atelier d'entre-aide&lt;br /&gt;
&lt;br /&gt;
Le mercredi après-midi sera consacré à une présentation des outils collaboratifs de partage de bibliographie&lt;br /&gt;
(Matthieu Solignac)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nous personnalisons ici la documentation&lt;br /&gt;
sur '''&amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;''' telle que trouvée originellement sur WikiBooks.&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
&lt;br /&gt;
{{:LaTeX/Summary}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Wikipedia:de:LaTeX-Kompendium]]&lt;br /&gt;
[[Wikipedia:fr:LaTeX]]&lt;br /&gt;
[[Wikipedia:ru:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.math.jussieu.fr/~mpg/latex/begin&lt;br /&gt;
&lt;br /&gt;
http://www.ukonline.be/programmation/latex/tutoriel&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX&amp;diff=486</id>
		<title>LaTeX</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX&amp;diff=486"/>
				<updated>2012-10-12T13:12:33Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Introd plus large&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{{NavDébut|book={{PAGENAME}}|page=Généralités|pageText=Continuer}}--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
[[Fichier:LaTeX logo.svg|thumb|Logo de &amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
Nous personnalisons ici la documentation '''&amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;''' trouvée originellement sur WikiBooks et diverses autres sources mais nous nous limitons à l'essentiel dans le cadre d'une formation interne de 3 demi-journées à l'Institut national d'études démographiques pour des doctorants. Certaines informations peuvent être utiles à un public plus large et c'est pourquoi le site est rendu public en octobre 2012. Mais seuls les participants à cette formation ont le droit de modifier. Le contenu est sous la licence Creative Common Share Alike comme Wikibooks d'où bon nombre d'informations ont été extirpées à l'origine pour ce cours.&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
&lt;br /&gt;
{{:LaTeX/Summary}}&lt;br /&gt;
&lt;br /&gt;
== Sources Wikibooks ==&lt;br /&gt;
[[Wikibooks:en:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
[[Wikibooks:de:LaTeX-Kompendium]]&lt;br /&gt;
&lt;br /&gt;
[[Wikibooks:fr:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Wikibooks:ru:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Top|Introduction}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=485</id>
		<title>Accueil</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Accueil&amp;diff=485"/>
				<updated>2012-04-14T16:23:21Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Fichier:LaTeX logo.svg|thumb|Logo de &amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Programme =&lt;br /&gt;
Le mardi matin 31 mai de 9h30 à 12h30 en salle 111 sera consacré à une présentation rapide de LaTeX.&lt;br /&gt;
&lt;br /&gt;
* 9h00 Accueil des participants et vérification des installations (wifi, latexlive)&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# L'essentiel de LaTeX: la structuration d'un texte (Nicolas Brouard)&lt;br /&gt;
# Les mathématiques, les tableaux, &lt;br /&gt;
# 11h00 Pause&lt;br /&gt;
# 11h15 La bibliographie BiBTeX et Jabref&lt;br /&gt;
&lt;br /&gt;
Le mardi après-midi peut être consacré à l'installation des logiciels non installés par LaTeXLive comme Gnu-emacs, OpenOffice pour writer2latex qui permet d'exporter un fichier MS Word en LaTeX.&lt;br /&gt;
&lt;br /&gt;
Le mercredi matin 1er juin de 9h30 à 12h30 sera un atelier LaTeX animé par Nicolas Brouard, Matthieu Solignac et Aziz Belhassaini.&lt;br /&gt;
* 9h30 Début du cours&lt;br /&gt;
# Les dessins bitmap et vectoriels&lt;br /&gt;
# Les articles scientifiques et les revues&lt;br /&gt;
# Les présentations beamer (Matthieu Solignac)&lt;br /&gt;
# 11h00 pause &lt;br /&gt;
# 11h15 seconde partie&lt;br /&gt;
# Atelier d'entre-aide&lt;br /&gt;
&lt;br /&gt;
Le mercredi après-midi sera consacré à une présentation des outils collaboratifs de partage de bibliographie&lt;br /&gt;
(Matthieu Solignac)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nous personnalisons ici la documentation&lt;br /&gt;
sur '''&amp;lt;span style=&amp;quot;font-family:serif;margin-right:-.7em&amp;quot;&amp;gt;L&amp;lt;span style=&amp;quot;font-size:0.9em;position:relative;top:-.1em;left:-0.4em;&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.5em;&amp;quot;&amp;gt;T&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;top:.2em;left:-.6em;&amp;quot;&amp;gt;E&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;position:relative;left:-.7em;&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;''' telle que trouvée originellement sur WikiBooks.&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
&lt;br /&gt;
{{:LaTeX/Summary}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Wikipedia:de:LaTeX-Kompendium]]&lt;br /&gt;
[[Wikipedia:fr:LaTeX]]&lt;br /&gt;
[[Wikipedia:ru:LaTeX]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.math.jussieu.fr/~mpg/latex/begin&lt;br /&gt;
&lt;br /&gt;
http://www.ukonline.be/programmation/latex/tutoriel&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=484</id>
		<title>LaTeX/Spell and Grammar Checking</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=484"/>
				<updated>2012-04-14T16:20:02Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Grammar checking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Spell checking ==&lt;br /&gt;
&lt;br /&gt;
A nice spell checker is flyspell which can be used under the emacs editor if you use it. Under the TeXWorks family of editors, hunspell is used. You probably need to install the dictionaries (*.dic and *.aff) into the appropriate place.&lt;br /&gt;
&lt;br /&gt;
== Grammar checking ==&lt;br /&gt;
[http://www.languagetool.org/ Langtool] is a simple but nice grammar checker, under the emacs editor you need the [http://www.emacswiki.org/emacs/langtool.el langtool.el] file and install it using [http://www.languagetool.org/usage/ instructions on langtool]. Then you can launch M-x langtool-check-buffer and you will something similar to the picture&lt;br /&gt;
:[[Fichier:langtools-grammar-checker.png|frame|left|300px]]&lt;br /&gt;
You can easily check the missing spaces or similar simple grammar errors that have been detected in brown, while error detected in yellow have been detected by flyspell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Errors and Warnings|List Structures}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=483</id>
		<title>LaTeX/Spell and Grammar Checking</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=483"/>
				<updated>2012-04-13T16:12:07Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Spell checking ==&lt;br /&gt;
&lt;br /&gt;
A nice spell checker is flyspell which can be used under the emacs editor if you use it. Under the TeXWorks family of editors, hunspell is used. You probably need to install the dictionaries (*.dic and *.aff) into the appropriate place.&lt;br /&gt;
&lt;br /&gt;
== Grammar checking ==&lt;br /&gt;
[http://www.languagetool.org/ Langtool] is a simple but nice grammar checker, under the emacs editor you need the [http://www.emacswiki.org/emacs/langtool.el langtool.el] file and install it using [http://www.languagetool.org/usage/ instructions on langtool]. Then you can launch M-x langtool-check-buffer and you will something similar to:&lt;br /&gt;
:[[Fichier:langtools-grammar-checker.png|frame|left|400px]]&lt;br /&gt;
You can easily check the missing spaces or similar simple things.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Errors and Warnings|List Structures}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Fichier:Langtools-grammar-checker.png&amp;diff=482</id>
		<title>Fichier:Langtools-grammar-checker.png</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Fichier:Langtools-grammar-checker.png&amp;diff=482"/>
				<updated>2012-04-13T16:10:15Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=481</id>
		<title>LaTeX/Spell and Grammar Checking</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Spell_and_Grammar_Checking&amp;diff=481"/>
				<updated>2012-04-13T15:53:17Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page créée avec « &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;  &amp;lt;noinclude&amp;gt; {{LaTeX/Bottom|Errors and Warnings|List Structures}} &amp;lt;/noinclude&amp;gt; »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Errors and Warnings|List Structures}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Spell_and_Grammar_checking&amp;diff=480</id>
		<title>Spell and Grammar checking</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Spell_and_Grammar_checking&amp;diff=480"/>
				<updated>2012-04-13T15:49:53Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : a déplacé Spell and Grammar checking vers LaTeX/Spell and Grammar Checking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECTION [[LaTeX/Spell and Grammar Checking]]&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Errors_and_Warnings&amp;diff=478</id>
		<title>LaTeX/Errors and Warnings</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Errors_and_Warnings&amp;diff=478"/>
				<updated>2012-04-13T15:49:05Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LaTeX describes what it's typesetting while it does it, and if it encounters something it doesn't understand or can't do, it will display a message saying what's wrong. It may also display warnings for less serious conditions.&lt;br /&gt;
&lt;br /&gt;
''Don't panic if you see error messages'': it's very common to mistype or mis-spell commands, forget curly braces, type a forward slash instead of a backslash, or use a special character by mistake. &lt;br /&gt;
&lt;br /&gt;
Errors are often hard to find even if easily spotted in your editor. &lt;br /&gt;
&lt;br /&gt;
The main idea is to fix a first error and run LaTeX again to check you have fixed it and then go to next error. If you type a important quantity of text with mathematics one way is to add &amp;lt;tt&amp;gt;\end{document}&amp;lt;/tt&amp;gt; earlier in your document.&lt;br /&gt;
&lt;br /&gt;
Other kinds of errors are misspelling a word or wrong grammar, see the specific page [[Spell and Grammar checking]]&lt;br /&gt;
&lt;br /&gt;
Some of the most LaTeX common errors are described in next sections.&lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
The format of an error message is always the same. Error messages begin with an exclamation mark at the start of the line, and give a description of the error, followed by another line starting with the number, which refers to the line-number in your document file which LaTeX was processing when the error was spotted. Here's an example, showing that the user mistyped the &amp;lt;tt&amp;gt;\tableofcontents&amp;lt;/tt&amp;gt;&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Undefined control sequence.&lt;br /&gt;
l.6 \tableofcotnetns&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When LaTeX finds an error like this, it displays the error message and pauses. You must type one of the following letters to&lt;br /&gt;
continue:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key &lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|x&lt;br /&gt;
|Stop immediately and e'''x'''it the program.&lt;br /&gt;
|-&lt;br /&gt;
|q&lt;br /&gt;
|Carry on '''q'''uietly as best you can and don't bother me with any more error messages.&lt;br /&gt;
|-&lt;br /&gt;
|e&lt;br /&gt;
|Stop the program but re-position the text in my '''e'''ditor at the point where you found the error (This only works if you're using an editor which LaTeX can communicate with).&lt;br /&gt;
|-&lt;br /&gt;
|h&lt;br /&gt;
|Try to give me more '''h'''elp.&lt;br /&gt;
|-&lt;br /&gt;
|i&lt;br /&gt;
|(followed by a correction) means '''i'''nput the correction in place of the error and carry on (This is only a temporary fix to get the file processed. You still have to make that correction in the editor).&lt;br /&gt;
|-&lt;br /&gt;
|r&lt;br /&gt;
|'''r'''un in non-stop mode. Plow through any errors, unless too many pile up and it fails (100 errors).&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some systems (Emacs is one example) run LaTeX with a &amp;quot;nonstop&amp;quot; switch turned on, so it will always process through to the end of the file, regardless of errors, or until a limit is reached.&lt;br /&gt;
&lt;br /&gt;
==Warnings==&lt;br /&gt;
Warnings don't begin with an exclamation mark: they are just comments by LaTeX about things you might want to look into, such as overlong or underrun lines (often caused by unusual hyphenations, for example), pages running short or long, and other typographical niceties (most of which you can ignore until later).&lt;br /&gt;
Unlike other systems, which try to hide unevennesses in the text (usually unsuccessfully) by interfering with the letterspacing, LaTeX takes the view that the author or editor should be able to contribute. While it is certainly possible to set LaTeX's parameters so that the spacing is sufficiently sloppy that you will almost never get a warning about badly-fitting lines or pages, you will almost certainly just be delaying matters until you start to get complaints from your readers or publishers.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Only a few common error messages are given here: those most likely to be encountered by beginners. If you find another error message not shown here, and it's not clear what you should do, ask for help.&lt;br /&gt;
&lt;br /&gt;
Most error messages are self-explanatory, but be aware that the place where LaTeX spots and reports an error may be later in the file than the place where it actually occurred. For example if you forget to close a curly brace which encloses, say, italics, LaTeX won't report this until something else occurs which can't happen until the curly brace is encountered (e.g. the end of the document!) Some errors can only be righted by humans who can read and understand what the document is supposed to mean or look like.&lt;br /&gt;
&lt;br /&gt;
Newcomers should remember to check the list of special characters: a very large number of errors when you are learning LaTeX are due to accidentally typing a special character when you didn't mean to. This disappears after a few days as you get used to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Too many }'s ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	&lt;br /&gt;
! Too many }'s.&lt;br /&gt;
l.6 \date December 2004}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reason LaTeX thinks there are too many }'s here is that the opening curly brace is missing after the &amp;lt;tt&amp;gt;\date&amp;lt;/tt&amp;gt; control sequence and before the word December, so the closing curly brace is seen as one too many (which it is!). In fact, there are other things which can follow the &amp;lt;tt&amp;gt;\date&amp;lt;/tt&amp;gt; command apart from a date in curly braces, so LaTeX cannot possibly guess that you've missed out the opening curly brace until it finds a closing one!&lt;br /&gt;
&lt;br /&gt;
===Undefined control sequence===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Undefined control sequence.&lt;br /&gt;
l.6 \dtae&lt;br /&gt;
{December 2004}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, LaTeX is complaining that it has no such command (&amp;quot;control sequence&amp;quot;) as &amp;lt;tt&amp;gt;\dtae&amp;lt;/tt&amp;gt;. Obviously it's been mistyped, but only a human can detect that fact: all LaTeX knows is that &amp;lt;tt&amp;gt;\dtae&amp;lt;/tt&amp;gt; is not a command it knows about: it's undefined. Mistypings are the most common source of errors. If your editor has drop-down menus to insert common commands and environments, use them!&lt;br /&gt;
&lt;br /&gt;
===Not in Mathematics Mode===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Missing $ inserted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A character that can only be used in the mathematics was inserted in normal text. Either switch to mathematic mode via \begin{math}...\end{math} or use the 'quick math mode': \ensuremath{math stuff}&lt;br /&gt;
&lt;br /&gt;
This can also happen if you use the wrong character encoding, for example using utf8 without &amp;quot;\usepackage[utf8]{inputenc}&amp;quot; or using iso8859-1 without &amp;quot;\usepackage[latin1]{inputenc}&amp;quot;, there are several character encoding formats, make sure to pick the right one.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Runaway argument===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Runaway argument?&lt;br /&gt;
{December 2004 \maketitle&lt;br /&gt;
! Paragraph ended before \date was complete.&lt;br /&gt;
&amp;lt;to be read again&amp;gt;&lt;br /&gt;
\par&lt;br /&gt;
l.8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this error, the closing curly brace has been omitted from the date. It's the opposite of the error of too many }'s, and it results in &amp;lt;tt&amp;gt;\maketitle&amp;lt;/tt&amp;gt; trying to format the title page while LaTeX is still expecting more text for the date! As \maketitle creates new paragraphs on the title page, this is detected and LaTeX complains that the previous paragraph has ended but \date is not yet finished.&lt;br /&gt;
&lt;br /&gt;
===Underfull hbox===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	&lt;br /&gt;
Underfull \hbox (badness 1394) in paragraph&lt;br /&gt;
at lines 28--30&lt;br /&gt;
[][]\LY1/brm/b/n/10 Bull, RJ: \LY1/brm/m/n/10&lt;br /&gt;
Ac-count-ing in Busi-&lt;br /&gt;
[94]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a warning that LaTeX cannot stretch the line wide enough to fit, without making the spacing bigger than its currently permitted maximum. The badness (0-10,000) indicates how severe this is (here you can probably ignore a badness of 1394). It says what lines of your file it was typesetting when it found this, and the number in square brackets is the number of the page onto which the offending line was printed. The codes separated by slashes are the typeface and font style and size used in the line. Ignore them for the moment. &lt;br /&gt;
&lt;br /&gt;
This comes up if you force a linebreak, e.g., \\, and have a return before it. Normally TeX ignores linebreaks, providing full paragraphs to ragged text. In this case it is necessary to pull the linebreak up one line to the end of the previous sentence.&lt;br /&gt;
&lt;br /&gt;
===Overfull hbox===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[101]&lt;br /&gt;
Overfull \hbox (9.11617pt too wide) in paragraph&lt;br /&gt;
at lines 860--861&lt;br /&gt;
[]\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see&lt;br /&gt;
\LY1/brm/m/n/10 X Win-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An overfull \hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge.&lt;br /&gt;
&lt;br /&gt;
The warning is given so that you can find the line in the code that originates the problem (in this case: 860-861) and fix it. The line on this example is too long by a shade over 9pt. The chosen hyphenation point which minimizes the error is shown at the end of the line (Win-). Line numbers and page numbers are given as before. In this case, 9pt is too much to ignore (over 3mm), and a manual correction needs making (such as a change to the hyphenation), or the flexibility settings need changing.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;overfull&amp;quot; word includes a forward slash, such as &amp;quot;&amp;lt;code&amp;gt;input/output&amp;lt;/code&amp;gt;&amp;quot;, this should be properly typeset as &amp;quot;&amp;lt;code&amp;gt;input\slash output&amp;lt;/code&amp;gt;&amp;quot;. The use of &amp;lt;code&amp;gt;\slash&amp;lt;/code&amp;gt; has the same effect as using the &amp;quot;&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;&amp;quot; character, except that it can form the end of a line (with the following words appearing at the start of the next line). The &amp;quot;&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;&amp;quot; character is typically used in units, such as &amp;quot;&amp;lt;code&amp;gt;mm/year&amp;lt;/code&amp;gt;&amp;quot; character, which should not be broken over multiple lines.&lt;br /&gt;
&lt;br /&gt;
===Missing package===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! LaTeX Error: File paralisy.sty not found.&lt;br /&gt;
Type X to quit or &amp;lt;RETURN&amp;gt; to proceed,&lt;br /&gt;
or enter new name. (Default extension: sty)&lt;br /&gt;
Enter file name:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;tt&amp;gt;\usepackage&amp;lt;/tt&amp;gt; command to request LaTeX to use a certain package, it will look for a file with the specified name and the filetype &amp;lt;tt&amp;gt;.sty&amp;lt;/tt&amp;gt;. In this case the user has mistyped the name of the paralist package, so it's easy to fix. However, if you get the name right, but the package is not installed on your machine, you will need to download and install it before continuing. If you don't want to affect the global installation of the machine, you can simply download from Internet the necessary &amp;lt;tt&amp;gt;.sty&amp;lt;/tt&amp;gt; file and put it in the same folder of the document you are compiling.&lt;br /&gt;
&lt;br /&gt;
===Package babel Warning: No hyphenation patterns were loaded for the language X===&lt;br /&gt;
Although this is a warning from the Babel package and not from LaTeX, this error is very common and (can) give some strange hyphenation (word breaking) problems in your document. Wrong hyphenation rules can decrease the neatness of your document.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Package babel Warning: No hyphenation patterns were loaded for&lt;br /&gt;
(babel)                the language `Latin'&lt;br /&gt;
(babel)                I will use the patterns loaded for \language=0 instead.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can happen after the usage of: (see [[LaTeX/Internationalization]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage[latin]{babel}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is not difficult, just install the used language in your [[LaTeX/Installation#TeX_and_LaTeX|LaTeX distribution]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Structured document and document structure|Spell and Grammar Checking}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Errors_and_Warnings&amp;diff=474</id>
		<title>LaTeX/Errors and Warnings</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Errors_and_Warnings&amp;diff=474"/>
				<updated>2012-04-13T15:47:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Spell and grammar checking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LaTeX describes what it's typesetting while it does it, and if it encounters something it doesn't understand or can't do, it will display a message saying what's wrong. It may also display warnings for less serious conditions.&lt;br /&gt;
&lt;br /&gt;
''Don't panic if you see error messages'': it's very common to mistype or mis-spell commands, forget curly braces, type a forward slash instead of a backslash, or use a special character by mistake. &lt;br /&gt;
&lt;br /&gt;
Errors are often hard to find even if easily spotted in your editor. &lt;br /&gt;
&lt;br /&gt;
The main idea is to fix a first error and run LaTeX again to check you have fixed it and then go to next error. If you type a important quantity of text with mathematics one way is to add &amp;lt;tt&amp;gt;\end{document}&amp;lt;/tt&amp;gt; earlier in your document.&lt;br /&gt;
&lt;br /&gt;
Other kinds of errors are misspelling a word or wrong grammar, see the specific page [[Spell and Grammar checking]]&lt;br /&gt;
&lt;br /&gt;
Some of the most LaTeX common errors are described in next sections.&lt;br /&gt;
&lt;br /&gt;
== Error messages ==&lt;br /&gt;
The format of an error message is always the same. Error messages begin with an exclamation mark at the start of the line, and give a description of the error, followed by another line starting with the number, which refers to the line-number in your document file which LaTeX was processing when the error was spotted. Here's an example, showing that the user mistyped the &amp;lt;tt&amp;gt;\tableofcontents&amp;lt;/tt&amp;gt;&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Undefined control sequence.&lt;br /&gt;
l.6 \tableofcotnetns&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When LaTeX finds an error like this, it displays the error message and pauses. You must type one of the following letters to&lt;br /&gt;
continue:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Key &lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|x&lt;br /&gt;
|Stop immediately and e'''x'''it the program.&lt;br /&gt;
|-&lt;br /&gt;
|q&lt;br /&gt;
|Carry on '''q'''uietly as best you can and don't bother me with any more error messages.&lt;br /&gt;
|-&lt;br /&gt;
|e&lt;br /&gt;
|Stop the program but re-position the text in my '''e'''ditor at the point where you found the error (This only works if you're using an editor which LaTeX can communicate with).&lt;br /&gt;
|-&lt;br /&gt;
|h&lt;br /&gt;
|Try to give me more '''h'''elp.&lt;br /&gt;
|-&lt;br /&gt;
|i&lt;br /&gt;
|(followed by a correction) means '''i'''nput the correction in place of the error and carry on (This is only a temporary fix to get the file processed. You still have to make that correction in the editor).&lt;br /&gt;
|-&lt;br /&gt;
|r&lt;br /&gt;
|'''r'''un in non-stop mode. Plow through any errors, unless too many pile up and it fails (100 errors).&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some systems (Emacs is one example) run LaTeX with a &amp;quot;nonstop&amp;quot; switch turned on, so it will always process through to the end of the file, regardless of errors, or until a limit is reached.&lt;br /&gt;
&lt;br /&gt;
==Warnings==&lt;br /&gt;
Warnings don't begin with an exclamation mark: they are just comments by LaTeX about things you might want to look into, such as overlong or underrun lines (often caused by unusual hyphenations, for example), pages running short or long, and other typographical niceties (most of which you can ignore until later).&lt;br /&gt;
Unlike other systems, which try to hide unevennesses in the text (usually unsuccessfully) by interfering with the letterspacing, LaTeX takes the view that the author or editor should be able to contribute. While it is certainly possible to set LaTeX's parameters so that the spacing is sufficiently sloppy that you will almost never get a warning about badly-fitting lines or pages, you will almost certainly just be delaying matters until you start to get complaints from your readers or publishers.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Only a few common error messages are given here: those most likely to be encountered by beginners. If you find another error message not shown here, and it's not clear what you should do, ask for help.&lt;br /&gt;
&lt;br /&gt;
Most error messages are self-explanatory, but be aware that the place where LaTeX spots and reports an error may be later in the file than the place where it actually occurred. For example if you forget to close a curly brace which encloses, say, italics, LaTeX won't report this until something else occurs which can't happen until the curly brace is encountered (e.g. the end of the document!) Some errors can only be righted by humans who can read and understand what the document is supposed to mean or look like.&lt;br /&gt;
&lt;br /&gt;
Newcomers should remember to check the list of special characters: a very large number of errors when you are learning LaTeX are due to accidentally typing a special character when you didn't mean to. This disappears after a few days as you get used to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Too many }'s ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	&lt;br /&gt;
! Too many }'s.&lt;br /&gt;
l.6 \date December 2004}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reason LaTeX thinks there are too many }'s here is that the opening curly brace is missing after the &amp;lt;tt&amp;gt;\date&amp;lt;/tt&amp;gt; control sequence and before the word December, so the closing curly brace is seen as one too many (which it is!). In fact, there are other things which can follow the &amp;lt;tt&amp;gt;\date&amp;lt;/tt&amp;gt; command apart from a date in curly braces, so LaTeX cannot possibly guess that you've missed out the opening curly brace until it finds a closing one!&lt;br /&gt;
&lt;br /&gt;
===Undefined control sequence===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Undefined control sequence.&lt;br /&gt;
l.6 \dtae&lt;br /&gt;
{December 2004}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, LaTeX is complaining that it has no such command (&amp;quot;control sequence&amp;quot;) as &amp;lt;tt&amp;gt;\dtae&amp;lt;/tt&amp;gt;. Obviously it's been mistyped, but only a human can detect that fact: all LaTeX knows is that &amp;lt;tt&amp;gt;\dtae&amp;lt;/tt&amp;gt; is not a command it knows about: it's undefined. Mistypings are the most common source of errors. If your editor has drop-down menus to insert common commands and environments, use them!&lt;br /&gt;
&lt;br /&gt;
===Not in Mathematics Mode===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Missing $ inserted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A character that can only be used in the mathematics was inserted in normal text. Either switch to mathematic mode via \begin{math}...\end{math} or use the 'quick math mode': \ensuremath{math stuff}&lt;br /&gt;
&lt;br /&gt;
This can also happen if you use the wrong character encoding, for example using utf8 without &amp;quot;\usepackage[utf8]{inputenc}&amp;quot; or using iso8859-1 without &amp;quot;\usepackage[latin1]{inputenc}&amp;quot;, there are several character encoding formats, make sure to pick the right one.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Runaway argument===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Runaway argument?&lt;br /&gt;
{December 2004 \maketitle&lt;br /&gt;
! Paragraph ended before \date was complete.&lt;br /&gt;
&amp;lt;to be read again&amp;gt;&lt;br /&gt;
\par&lt;br /&gt;
l.8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this error, the closing curly brace has been omitted from the date. It's the opposite of the error of too many }'s, and it results in &amp;lt;tt&amp;gt;\maketitle&amp;lt;/tt&amp;gt; trying to format the title page while LaTeX is still expecting more text for the date! As \maketitle creates new paragraphs on the title page, this is detected and LaTeX complains that the previous paragraph has ended but \date is not yet finished.&lt;br /&gt;
&lt;br /&gt;
===Underfull hbox===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;	&lt;br /&gt;
Underfull \hbox (badness 1394) in paragraph&lt;br /&gt;
at lines 28--30&lt;br /&gt;
[][]\LY1/brm/b/n/10 Bull, RJ: \LY1/brm/m/n/10&lt;br /&gt;
Ac-count-ing in Busi-&lt;br /&gt;
[94]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a warning that LaTeX cannot stretch the line wide enough to fit, without making the spacing bigger than its currently permitted maximum. The badness (0-10,000) indicates how severe this is (here you can probably ignore a badness of 1394). It says what lines of your file it was typesetting when it found this, and the number in square brackets is the number of the page onto which the offending line was printed. The codes separated by slashes are the typeface and font style and size used in the line. Ignore them for the moment. &lt;br /&gt;
&lt;br /&gt;
This comes up if you force a linebreak, e.g., \\, and have a return before it. Normally TeX ignores linebreaks, providing full paragraphs to ragged text. In this case it is necessary to pull the linebreak up one line to the end of the previous sentence.&lt;br /&gt;
&lt;br /&gt;
===Overfull hbox===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[101]&lt;br /&gt;
Overfull \hbox (9.11617pt too wide) in paragraph&lt;br /&gt;
at lines 860--861&lt;br /&gt;
[]\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see&lt;br /&gt;
\LY1/brm/m/n/10 X Win-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An overfull \hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge.&lt;br /&gt;
&lt;br /&gt;
The warning is given so that you can find the line in the code that originates the problem (in this case: 860-861) and fix it. The line on this example is too long by a shade over 9pt. The chosen hyphenation point which minimizes the error is shown at the end of the line (Win-). Line numbers and page numbers are given as before. In this case, 9pt is too much to ignore (over 3mm), and a manual correction needs making (such as a change to the hyphenation), or the flexibility settings need changing.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;overfull&amp;quot; word includes a forward slash, such as &amp;quot;&amp;lt;code&amp;gt;input/output&amp;lt;/code&amp;gt;&amp;quot;, this should be properly typeset as &amp;quot;&amp;lt;code&amp;gt;input\slash output&amp;lt;/code&amp;gt;&amp;quot;. The use of &amp;lt;code&amp;gt;\slash&amp;lt;/code&amp;gt; has the same effect as using the &amp;quot;&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;&amp;quot; character, except that it can form the end of a line (with the following words appearing at the start of the next line). The &amp;quot;&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;&amp;quot; character is typically used in units, such as &amp;quot;&amp;lt;code&amp;gt;mm/year&amp;lt;/code&amp;gt;&amp;quot; character, which should not be broken over multiple lines.&lt;br /&gt;
&lt;br /&gt;
===Missing package===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! LaTeX Error: File paralisy.sty not found.&lt;br /&gt;
Type X to quit or &amp;lt;RETURN&amp;gt; to proceed,&lt;br /&gt;
or enter new name. (Default extension: sty)&lt;br /&gt;
Enter file name:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;tt&amp;gt;\usepackage&amp;lt;/tt&amp;gt; command to request LaTeX to use a certain package, it will look for a file with the specified name and the filetype &amp;lt;tt&amp;gt;.sty&amp;lt;/tt&amp;gt;. In this case the user has mistyped the name of the paralist package, so it's easy to fix. However, if you get the name right, but the package is not installed on your machine, you will need to download and install it before continuing. If you don't want to affect the global installation of the machine, you can simply download from Internet the necessary &amp;lt;tt&amp;gt;.sty&amp;lt;/tt&amp;gt; file and put it in the same folder of the document you are compiling.&lt;br /&gt;
&lt;br /&gt;
===Package babel Warning: No hyphenation patterns were loaded for the language X===&lt;br /&gt;
Although this is a warning from the Babel package and not from LaTeX, this error is very common and (can) give some strange hyphenation (word breaking) problems in your document. Wrong hyphenation rules can decrease the neatness of your document.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Package babel Warning: No hyphenation patterns were loaded for&lt;br /&gt;
(babel)                the language `Latin'&lt;br /&gt;
(babel)                I will use the patterns loaded for \language=0 instead.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can happen after the usage of: (see [[LaTeX/Internationalization]])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage[latin]{babel}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is not difficult, just install the used language in your [[LaTeX/Installation#TeX_and_LaTeX|LaTeX distribution]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Structured document and document structure|Spell and Grammar checking}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=473</id>
		<title>LaTeX/Summary</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=473"/>
				<updated>2012-04-13T15:45:51Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Spell and grammar checking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[LaTeX/Installation|Installation for May 31 2011]]&lt;br /&gt;
* [[LaTeX/Introduction|Introduction]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Absolute Beginners|Absolute Beginners]]--&amp;gt;&lt;br /&gt;
* [[LaTeX/Basics|Basics]]&lt;br /&gt;
* [[LaTeX/Structured document and document structure|Structured document and document structure]]&lt;br /&gt;
* [[LaTeX/Errors and Warnings|Errors and Warnings]] &lt;br /&gt;
* [[LaTeX/Spell and Grammar Checking|Spell and Grammar Checking]] &lt;br /&gt;
* [[LaTeX/List Structures|List Structures]]&lt;br /&gt;
* [[LaTeX/Importing Graphics|Importing Graphics and PDF pages]]&lt;br /&gt;
* [[LaTeX/Presentations|Presentations]]&lt;br /&gt;
* [[LaTeX/Bibliography Management|Bibliography Management]]&lt;br /&gt;
* [[LaTeX/Tables|Tables]]&lt;br /&gt;
* [[LaTeX/Page Layout|Page Layout]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Title Creation|Titles]]&lt;br /&gt;
* [[LaTeX/Formatting|Formatting]]&lt;br /&gt;
* [[LaTeX/Fonts|Fonts]]&lt;br /&gt;
* [[LaTeX/Mathematics|Mathematics]]&lt;br /&gt;
* [[LaTeX/Advanced Mathematics|Advanced Mathematics]]&lt;br /&gt;
* [[LaTeX/Theorems|Theorems]]&lt;br /&gt;
* [[LaTeX/Labels and Cross-referencing|Labels and Cross-referencing]]&lt;br /&gt;
* [[LaTeX/Indexing|Indexing]]&lt;br /&gt;
* [[LaTeX/Glossary|Glossary]]&lt;br /&gt;
* [[LaTeX/Algorithms and Pseudocode|Algorithms and Pseudocode]]&lt;br /&gt;
* [[LaTeX/Letters|Letters]]&lt;br /&gt;
* [[LaTeX/Teacher's_Corner|Teacher's Corner]]&lt;br /&gt;
* [[LaTeX/Creating Graphics|Creating Graphics]]&lt;br /&gt;
* [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]]&lt;br /&gt;
* [[LaTeX/Hyperlinks|Hyperlinks]]&lt;br /&gt;
* [[LaTeX/Colors|Colors]]&lt;br /&gt;
* [[LaTeX/Packages|Packages]]&lt;br /&gt;
* [[LaTeX/Advanced Topics|Advanced Topics]]&lt;br /&gt;
* [[LaTeX/Customizing LaTeX|Customizing LaTeX]]&lt;br /&gt;
* [[LaTeX/Multiple files|Multiple files]]&lt;br /&gt;
* [[LaTeX/Collaborative Writing of LaTeX Documents|Collaborative Writing]]&lt;br /&gt;
* [[LaTeX/Tips and Tricks|Tips / Tricks]]&lt;br /&gt;
* [[LaTeX/General Guidelines|General Guidelines]]&lt;br /&gt;
* [[LaTeX/Export To Other Formats|Export To Other Formats]]&lt;br /&gt;
* [[LaTeX/Internationalization|Internationalization]]&lt;br /&gt;
* [[LaTeX/Accents|Accents and Special Characters]]&lt;br /&gt;
* [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]]&lt;br /&gt;
* [[LaTeX/Index|Index]]&lt;br /&gt;
* [[LaTeX/Command Glossary|Command Glossary]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=472</id>
		<title>LaTeX/Tables</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=472"/>
				<updated>2012-04-12T12:02:42Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Clarifications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
In scientific writing, tables are a common feature. It is therefore a skill that needs mastering in order to produce quality papers.&lt;br /&gt;
&lt;br /&gt;
It is no more common to enter data with fingers. Today numeric keypads are rarely used and who knows that the middle finger rest position is on the unique key with a grip, the key 5. Tables on printed papers are scanned and submitted to Optical Characters Recognition (OCR) softwares which do exist even on smartphones. Data are treated by computer softwares, but in order to produce synthetic tables, your intermediate step is usually a spreadsheet which lets you make easy calculations like percentages as well as pretty printing.&lt;br /&gt;
&lt;br /&gt;
If basic tables are easy to be set in LaTeX, any serious table is a night mare and a tool to output the required LaTeX code directly in a file or in your clipboard is mandatory. Nevertheless, even with a sophisticated tool, it is often necessary to clean, simplify and beautify the LaTeX code. Thus, if we will learn how to use such a tool, you can't escape from learning the tabular environment and its avatars.&lt;br /&gt;
&lt;br /&gt;
The first step consists in learning how to use such a tool like the calc2latex plugins [http://calc2latex.sourceforge.net/ http://calc2latex.sourceforge.net/] which works for openoffice calc (or libreoffice) and the second step in how manage LaTeX tables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the section  [[#Calc2LaTeX]] below for how to install. If you use MS Excel Spreadsheet or any other spreadsheet you can usually copy and paste selected cells to OO calc or open the .xls file with OO calc. &lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX usage ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Run OpenOffice Calc.&lt;br /&gt;
#Select cells you want to convert into LaTeX format.&lt;br /&gt;
#Push 'Tools'-'Macro'. (In the case of OpenOffice1.1 RC, push 'Tools'-'Macros'-'Macro')&lt;br /&gt;
#You will see 'Macro' dialog box. And then click 'soffice'-'calc2latex' in Macro form to show 'Main' item.&lt;br /&gt;
#Select 'Main' in 'soffice'-'calc2latex'-'Main' and push 'Run' button.&lt;br /&gt;
:[[Fichier:calc2latex-usage-macro.png|500px]]&lt;br /&gt;
&lt;br /&gt;
After these steps...&lt;br /&gt;
&lt;br /&gt;
#To get results, select all strings in 'Results' dialog box. In the example below, the title of the table in A1 will be used as the caption (just copy it into memory and paste it into the caption of the dialog) and thus the tabular environment will be embedded into a floated &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment with classical priorities htbp (here first, top second, bottom third, page last). Columns B and C have to be right justified before export because it will minimize the code. In this exemple with 3 columns the argument will be lrr and you will avoid many \multicolumn{1}{r}{} which be output for each right justified cells when the column itself is left or center justified. You can unselect the &amp;lt;tt&amp;gt;Ruled line&amp;lt;/tt&amp;gt; in order to simplify and usually beautify the table. You can keep the Bold face/Italics features. Unfortunately the color of the cells will not be kept. [[Fichier:calc2latex-usage-macro-dialog.png|600px]]&lt;br /&gt;
#Select all and copy to your clipboard and paste it into your TeX editor. It contains the table environment with the tabular environment embedded such as seen below. [[Fichier:calc2latex-after-usage-macro.png|600px]]&lt;br /&gt;
# Put the LaTeX code in your editor within an \begin{document} \end{document} environment, choosing, for example a &amp;lt;tt&amp;gt;memoir&amp;lt;/tt&amp;gt; class, calling your floating table with a &amp;lt;tt&amp;gt;\ref{comptes-cnf}&amp;lt;/tt&amp;gt; and running the result&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=latex enclose=yes&amp;gt;&lt;br /&gt;
% -*-latex-*-&lt;br /&gt;
&lt;br /&gt;
%&lt;br /&gt;
% These lines tell gnu-emacs to typeset &lt;br /&gt;
% with the xetex engine &lt;br /&gt;
% which requires Unicode encoding only (utf-8)&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % If Times Roman&lt;br /&gt;
\usepackage{fontspec} % for xetex engine &lt;br /&gt;
&lt;br /&gt;
As you can see on the table~\table{comptes-cnf} &lt;br /&gt;
of the French committee of the IUSSP members, &lt;br /&gt;
the balance concerning the &lt;br /&gt;
\href{http://demopaedia.org}{Demopædia} &lt;br /&gt;
project .&lt;br /&gt;
  \begin{document}&lt;br /&gt;
\begin{table}[htbp]&lt;br /&gt;
\caption{Rapport financier (provisoire) pour &lt;br /&gt;
 l'assemblée générale ordinaire du 20 mai 2011}&lt;br /&gt;
\begin{tabular}{lrr}&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; Débit &amp;amp; Crédit \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 31/12/2010} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- solde du CCP &amp;amp;  &amp;amp; 343,75 \\ &lt;br /&gt;
- solde du Livret A &amp;amp;  &amp;amp; 1 017,84 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 1 361,59 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Recettes de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Intérêts capitalisés Livret A &lt;br /&gt;
(au titre de 2010)&lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des recettes &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Dépenses de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais bancaires \&amp;amp; frais généraux &amp;amp; 30,50 &amp;amp;  \\ &lt;br /&gt;
- Organisation AG 2011 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais déplacement AG 2011 &amp;amp; 260,90 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Demopaedia : &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Nom de domaine (2009, 2010 et 2011) &amp;amp; 86,10 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des dépenses &amp;amp; 377,50 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 20/05/2011} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- CCP &amp;amp;  &amp;amp; 216,25 \\ &lt;br /&gt;
- Livret A &amp;amp;  &amp;amp; 767,84 \\ &lt;br /&gt;
Total des encours &amp;amp;  &amp;amp; 984,09 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Bilan} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Différence des soldes &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
- Différences des recettes et des dépenses &lt;br /&gt;
 &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
\end{tabular}&lt;br /&gt;
\label{comptes-cnf}&lt;br /&gt;
\end{table}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex example calc2tex.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You probably need to adapt a little bit the code and here are some advices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.&lt;br /&gt;
&lt;br /&gt;
The first line of the environment has the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}[pos]{table spec}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the ''table spec'' argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.&lt;br /&gt;
&lt;br /&gt;
The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ''array'' has been loaded):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;l&amp;lt;/tt&amp;gt;&lt;br /&gt;
| left-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
| centered column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;&lt;br /&gt;
| right-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the top&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;m{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned in the middle (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the bottom (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| vertical line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| double vertical line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using &amp;lt;code&amp;gt;p{''width''}&amp;lt;/code&amp;gt; you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as pt and cm, or ''command lengths'', such as &amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;.You can find a complete list in appendix [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The optional parameter ''pos'' can be used to specify the vertical position of the table relative to&lt;br /&gt;
the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|bottom&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
|center (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|top&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;amp;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| column separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\\&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start new row (additional space may be specified after &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; using square brackets, such as &amp;lt;code&amp;gt;\\[6pt]&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| horizontal line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\newline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start a new line within a cell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\cline{''i''-''j''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| partial horizontal line beginning in column ''i'' and ending in column ''j''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, any white space inserted between these commands is purely down to ones' preferences. I personally add spaces between to make it easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Basic examples ===&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Expanding upon that by including some vertical lines:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To add horizontal lines to the very top and bottom edges of the table:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  \hline			&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
  \hline  &lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{center}&lt;br /&gt;
  \begin{tabular}{ l | c || r | }&lt;br /&gt;
    \hline&lt;br /&gt;
    1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
    4 &amp;amp; 5 &amp;amp; 6 \\ \hline&lt;br /&gt;
    7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
    \hline&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{center}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|r|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  7C0 &amp;amp; hexadecimal \\&lt;br /&gt;
  3700 &amp;amp; octal \\ \cline{2-2}&lt;br /&gt;
  11111000000 &amp;amp; binary \\&lt;br /&gt;
  \hline \hline&lt;br /&gt;
  1984 &amp;amp; decimal \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:Latex example tabular cline.png|250px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Column specification using &amp;lt;code&amp;gt;&amp;gt;{\cmd}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;{\cmd}&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Using the array package, the column specification can be altered. This is done in the &lt;br /&gt;
argument of the tabular environment using &amp;lt;code&amp;gt;&amp;gt;{\command}&amp;lt;/code&amp;gt; for commands executed right &lt;br /&gt;
''before'' each column element and &amp;lt;code&amp;gt;&amp;lt;{\command}&amp;lt;/code&amp;gt; for commands to be executed right&lt;br /&gt;
''after'' each column element. &lt;br /&gt;
As an example: to get a column in math mode enter: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{$}c&amp;lt;{$}}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Another example is changing the font: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{\small}c}&amp;lt;/code&amp;gt; to print the column in a small font.&lt;br /&gt;
&lt;br /&gt;
The argument of the &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; specifications must be correctly balanced when it comes to &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters. This means that &amp;lt;code&amp;gt;&amp;gt;{\bfseries}&amp;lt;/code&amp;gt; is valid, while &amp;lt;code&amp;gt;&amp;gt;{\textbf}&amp;lt;/code&amp;gt; will not work and &amp;lt;code&amp;gt;&amp;gt;{\textbf{}&amp;lt;/code&amp;gt; is not valid. If there is the need to use the text of the table as an argument (for instance, using the &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt; to produce bold text), one should use the &amp;lt;code&amp;gt;\bgroup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\egroup&amp;lt;/code&amp;gt; commands: &amp;lt;code&amp;gt;&amp;gt;{\textbf\bgroup}c&amp;lt;{\egroup}&amp;lt;/code&amp;gt; produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; to underline text, it is necessary to temporarily store the column text in a box using &amp;lt;code&amp;gt;lrbox&amp;lt;/code&amp;gt;. First, you must define such a box with &amp;lt;code&amp;gt;\newsavebox{\boxname}&amp;lt;/code&amp;gt; and then you can define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;{\begin{lrbox}{\boxname}}%&lt;br /&gt;
l%&lt;br /&gt;
&amp;lt;{\end{lrbox}%&lt;br /&gt;
  \underline{\unhbox\boxname}}%&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This stores the text in a box and afterwards, takes the text out of the box with &amp;lt;code&amp;gt;\unhbox&amp;lt;/code&amp;gt; (this destroys the box, if the box is needed again one should use &amp;lt;code&amp;gt;\unhcopy&amp;lt;/code&amp;gt; instead) and passing it to &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt;. (For LaTeX2e, you may want to use &amp;lt;code&amp;gt;\usebox{\boxname}&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\unhbox\boxname&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
This same trick done with &amp;lt;code&amp;gt;\raisebox&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.&lt;br /&gt;
&lt;br /&gt;
Here is an example showing the use of both &amp;lt;code&amp;gt;p{...}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;gt;{\centering}&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{&amp;gt;{\centering}p{3.5cm}&amp;gt;{\centering}p{3.5cm}}&lt;br /&gt;
Geometry  &amp;amp; Algebra&lt;br /&gt;
\tabularnewline&lt;br /&gt;
\hline&lt;br /&gt;
 Points &amp;amp; Addition &lt;br /&gt;
\tabularnewline&lt;br /&gt;
 Spheres &amp;amp; Multiplication &lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;code&amp;gt;\tabularnewline&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to avoid a &amp;lt;code&amp;gt;Misplaced \noalign&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Text wrapping in tables ===&lt;br /&gt;
&lt;br /&gt;
LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that you know will contain a certain amount of text, then it is recommended that you use the ''p'' attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). Use the ''m'' attribute to have the lines aligned toward the middle of the box and the ''b'' attribute to align along the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
Here is a practical example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article} &lt;br /&gt;
&lt;br /&gt;
\usepackage[english]{babel}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
Without specifying width for last column:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | l |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.&lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
With width specified:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | p{5cm} |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.  &lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You get the following output:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example wrapped table.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
Note that the first table is cropped: The output is wider than the page width.&lt;br /&gt;
&lt;br /&gt;
=== Text justification in tables ===&lt;br /&gt;
&lt;br /&gt;
On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package provides the command &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; which is like &amp;lt;code&amp;gt;\makebox&amp;lt;/code&amp;gt; but instead of a ''width'' argument, it takes a tag. During compilation it bookkeeps which &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; with a certain tag contains the widest text and can stretch all &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt;es with the same tag to that width. Combined with the &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; package, one can define a column specifier that justifies the text in all lines: (See the documentation of the &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package for more details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newsavebox{\tstretchbox}&lt;br /&gt;
\newcolumntype{S}[1]{%&lt;br /&gt;
 &amp;gt;{\begin{lrbox}{\tstretchbox}}%&lt;br /&gt;
 l%&lt;br /&gt;
 &amp;lt;{\end{lrbox}%&lt;br /&gt;
   \eqmakebox[#1][s]{\unhcopy\tstretchbox}}%&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other environments inside tables ===&lt;br /&gt;
&lt;br /&gt;
If you use some LaTeX environments inside table cells, like &amp;lt;tt&amp;gt;verbatim&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;[[LaTeX/Formatting#Enumerate|enumerate]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| c | c |}&lt;br /&gt;
	\hline&lt;br /&gt;
	\begin{verbatim}&lt;br /&gt;
	code&lt;br /&gt;
	\end{verbatim}&lt;br /&gt;
	&amp;amp; description&lt;br /&gt;
 	\\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might encounter errors similar to&lt;br /&gt;
 ! LaTeX Error: Something's wrong--perhaps a missing \item.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, change [[#The tabular environment|column specifier]] to &amp;quot;paragraph&amp;quot; (&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;m&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| m{5cm} | c |}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining multiple columns ===&lt;br /&gt;
&lt;br /&gt;
It is possible to define many identical columns at once using the &amp;lt;code&amp;gt;*{''num''}{''str''}&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
This is particularly useful when your table has many columns. &lt;br /&gt;
&lt;br /&gt;
Here is a table with six centered columns flanked by a single column on each side:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{l*{6}{c}r}&lt;br /&gt;
Team              &amp;amp; P &amp;amp; W &amp;amp; D &amp;amp; L &amp;amp; F  &amp;amp; A &amp;amp; Pts \\&lt;br /&gt;
\hline&lt;br /&gt;
Manchester United &amp;amp; 6 &amp;amp; 4 &amp;amp; 0 &amp;amp; 2 &amp;amp; 10 &amp;amp; 5 &amp;amp; 12  \\&lt;br /&gt;
Celtic            &amp;amp; 6 &amp;amp; 3 &amp;amp; 0 &amp;amp; 3 &amp;amp;  8 &amp;amp; 9 &amp;amp;  9  \\&lt;br /&gt;
Benfica           &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 3 &amp;amp;  7 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
FC Copenhagen     &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 2 &amp;amp;  5 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example defining multiple columns.png|450px]]&lt;br /&gt;
&lt;br /&gt;
=== @-expressions ===&lt;br /&gt;
&lt;br /&gt;
The column separator can be specified with the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct. &lt;br /&gt;
&lt;br /&gt;
It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. This command kills the inter-column space and replaces it with whatever is between the curly braces. To add space, use &amp;lt;code&amp;gt;@{\hspace{''width''}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r@{.}l}&lt;br /&gt;
  3   &amp;amp; 14159 \\&lt;br /&gt;
  16  &amp;amp; 2     \\&lt;br /&gt;
  123 &amp;amp; 456   \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:align.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the approach outlined above won't work well if the column header is longer than any of the numbers. To center the column on the decimal separator, use the &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt; package, which provides a new column specifier for floating point data.&lt;br /&gt;
&lt;br /&gt;
The space suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\ \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|l|l|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier1.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier3.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|@{}l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spanning ===&lt;br /&gt;
&lt;br /&gt;
To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.&lt;br /&gt;
&lt;br /&gt;
==== Rows spanning multiple columns ====&lt;br /&gt;
&lt;br /&gt;
The command for this looks like this: &amp;lt;code&amp;gt;\multicolumn{''num_cols''}{''alignment''}{''contents''}&amp;lt;/code&amp;gt;. ''num_cols'' is the number of subsequent columns to merge; ''alignment'' is, either l, c, r or to have text wrapping specifiy a width &amp;lt;code&amp;gt;p{5.0cm}&amp;lt;/code&amp;gt; . And ''contents'' is simply the actual data you want to be contained within that cell. A simple example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  \multicolumn{2}{|c|}{Team sheet} \\&lt;br /&gt;
  \hline&lt;br /&gt;
  GK &amp;amp; Paul Robinson \\&lt;br /&gt;
  LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
  DC &amp;amp; Michael Duberry \\&lt;br /&gt;
  DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
  RB &amp;amp; Didier Domi \\&lt;br /&gt;
  MC &amp;amp; David Batty \\&lt;br /&gt;
  MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
  MC &amp;amp; Jody Morris \\&lt;br /&gt;
  FW &amp;amp; Jamie McMaster \\&lt;br /&gt;
  ST &amp;amp; Alan Smith \\&lt;br /&gt;
  ST &amp;amp; Mark Viduka \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multicolumn.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Columns spanning multiple rows ====&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is add &amp;lt;code&amp;gt;\usepackage{multirow}&amp;lt;/code&amp;gt; [http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/] to the preamble. This then provides the command needed for spanning rows: &amp;lt;code&amp;gt;\multirow{''num_rows''}{''width''}{''contents''}&amp;lt;/code&amp;gt;. The arguments are pretty simple to deduce (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for the ''width'' means the content's natural width).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{|l|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{3}{|c|}{Team sheet} \\&lt;br /&gt;
\hline&lt;br /&gt;
Goalkeeper &amp;amp; GK &amp;amp; Paul Robinson \\ \hline&lt;br /&gt;
\multirow{4}{*}{Defenders} &amp;amp; LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Michael Duberry \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
 &amp;amp; RB &amp;amp; Didier Domi \\ \hline&lt;br /&gt;
\multirow{3}{*}{Midfielders} &amp;amp; MC &amp;amp; David Batty \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Jody Morris \\ \hline&lt;br /&gt;
Forward &amp;amp; FW &amp;amp; Jamie McMaster \\ \hline&lt;br /&gt;
\multirow{2}{*}{Strikers} &amp;amp; ST &amp;amp; Alan Smith \\&lt;br /&gt;
 &amp;amp; ST &amp;amp; Mark Viduka \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirow.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The main thing to note when using &amp;lt;code&amp;gt;\multirow&amp;lt;/code&amp;gt; is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.&lt;br /&gt;
&lt;br /&gt;
If there is no data for a cell, just don't type anything, but you still need the &amp;quot;&amp;amp;&amp;quot; separating it from the next column's data. The astute reader will already have deduced that for a table of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; columns, there must always be &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; ampersands in each row. The exception to this is when &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\multirow&amp;lt;/tt&amp;gt; are used to create cells which span multiple columns or rows.&lt;br /&gt;
&lt;br /&gt;
==== Spanning in both directions simultaneously ====&lt;br /&gt;
&lt;br /&gt;
Here is a nontrivial example how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{cc|c|c|c|c|l}&lt;br /&gt;
\cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; \multicolumn{4}{|c|}{Primes} \\ \cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; 2 &amp;amp; 3 &amp;amp; 5 &amp;amp; 7 \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{504} &amp;amp; 3 &amp;amp; 2 &amp;amp; 0 &amp;amp; 1 &amp;amp;     \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{540} &amp;amp; 2 &amp;amp; 3 &amp;amp; 1 &amp;amp; 0 &amp;amp;     \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{gcd} &amp;amp; 2 &amp;amp; 2 &amp;amp; 0 &amp;amp; 0 &amp;amp; min \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{lcm} &amp;amp; 3 &amp;amp; 3 &amp;amp; 1 &amp;amp; 1 &amp;amp; max \\ \cline{1-6}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirowandcolumnexample.png|300px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with &amp;lt;code&amp;gt;\multirow{2}{*}{...}&amp;lt;/code&amp;gt;, it still draws vertical borders that only span the first row. To compensate for that, we add &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; in the following rows spanned by the multirow. Note that we cannot just use &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command &amp;lt;code&amp;gt;\cline{2-6}&amp;lt;/code&amp;gt; and opt out the first column that contains the text &amp;quot;Powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is another example exploiting the same ideas to make&lt;br /&gt;
the familiar and popular &amp;quot;2x2&amp;quot; or double dichotomy:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r|c|c|}&lt;br /&gt;
\multicolumn{1}{r}{}&lt;br /&gt;
 &amp;amp;  \multicolumn{1}{c}{noninteractive}&lt;br /&gt;
 &amp;amp; \multicolumn{1}{c}{interactive} \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
massively multiple &amp;amp; Library &amp;amp; University \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
one-to-one &amp;amp; Book &amp;amp; Tutor \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex-tables-double-dichotomy-example.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Resize tables ===&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\resizebox{width}{height}{object}&amp;lt;/code&amp;gt; can be used with &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width/height ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\resizebox{8cm}{!} {&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use &amp;lt;code&amp;gt;\scalebox{ratio}{object}&amp;lt;/code&amp;gt; in the same way but with ratios rather than fixed sizes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\scalebox{0.7}{&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;code&amp;gt;\resizebox&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\scalebox&amp;lt;/code&amp;gt; require the graphicx package.&lt;br /&gt;
&lt;br /&gt;
To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: &amp;lt;code&amp;gt;\setlength{\tabcolsep}{5pt}&amp;lt;/code&amp;gt;.&lt;br /&gt;
The default value is 6pt.&lt;br /&gt;
&lt;br /&gt;
===Sideways tables ===&lt;br /&gt;
&lt;br /&gt;
Tables can also be put on their side within a document using the &amp;lt;code&amp;gt;rotating&amp;lt;/code&amp;gt; package and the &amp;lt;code&amp;gt;sidewaystable&amp;lt;/code&amp;gt; environments in place of the table environment. (NOTE: most DVI viewers do not support displaying rotated text. Convert your document to a PDF to see the result. Most, if not all, PDF viewers do support rotated text.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{rotating}&lt;br /&gt;
&lt;br /&gt;
\begin{sidewaystable}&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{sidewaystable}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, &amp;lt;code&amp;gt;rotfloat&amp;lt;/code&amp;gt; package may be used. Then one can use &amp;lt;code&amp;gt;\begin{sidewaystable}[H]&amp;lt;/code&amp;gt; just like for normal tables. The 'H' option can not be used without this package.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Row Colors in Tables ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package provides the necessary commands to produce tables with alternate row colors, when loaded with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; option.&lt;br /&gt;
The command &amp;lt;code&amp;gt;\rowcolors{&amp;lt;''starting row''&amp;gt;}{&amp;lt;''odd color''&amp;gt;}{&amp;lt;''even color''&amp;gt;}&amp;lt;/code&amp;gt; has to be specified right before the &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment starts.&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article}&lt;br /&gt;
&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
\rowcolors{1}{green}{pink}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{lll}&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | [[File:LaTeXAlternateRowTable.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
The command &amp;lt;code&amp;gt;\hiderowcolors&amp;lt;/code&amp;gt; is available to deactivate highlighting of a specified row.&lt;br /&gt;
Highlighting can be reactivated within the table via the &amp;lt;code&amp;gt;\showrowcolors&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Colors of individual Cells ===&lt;br /&gt;
&lt;br /&gt;
As above this uses the &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
% Include this somewhere in your document&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
% Enter this in the cell you wish to color a light grey.&lt;br /&gt;
% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. `0.9' denotes how dark the grey is.&lt;br /&gt;
\cellcolor[gray]{0.9}&lt;br /&gt;
% The following will color the cell red.&lt;br /&gt;
\cellcolor{red}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partial Vertical Lines ===&lt;br /&gt;
&lt;br /&gt;
Adding a partial vertical line to an individual cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r|}{6}  \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-add.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Removing part of a vertical line in a particular cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ | l | c | r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r}{6} \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-remove.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment - captioning etc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment inside a &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do the two different environments exist? Think of it this way: The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment is concerned with arranging elements in a tabular grid, while the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment represents the table more conceptually. This explains why it isn't &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; but &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; that provides for captioning (because the caption isn't displayed in the grid-like layout).&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment has a lot of similarities with a &amp;lt;code&amp;gt;figure&amp;lt;/code&amp;gt; environment, in the way the &amp;quot;floating&amp;quot; is handled etc.&lt;br /&gt;
For instance you can specify its placement in the page with the option &amp;lt;code&amp;gt;[placement]&amp;lt;/code&amp;gt;, the valid values are any combination of (order is not important):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
|where the table is declared ('''h'''ere)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''t'''op of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''b'''ottom of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&lt;br /&gt;
|on a dedicated '''p'''age of floats&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt;&lt;br /&gt;
|override the default float restrictions. E.g., the maximum size allowed of a &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; float is normally quite small; if you want a large one, you need this &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt; parameter as well.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;tt&amp;gt;[tbp]&amp;lt;/tt&amp;gt;. If you want to place a table in the place where it's declared, do not just write &amp;lt;tt&amp;gt;[h]&amp;lt;/tt&amp;gt;; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; float) which can be some distance away in the document. A good rule of thumb is to always use &amp;lt;tt&amp;gt;htbp&amp;lt;/tt&amp;gt; until the document is finished, at which stage the final float parameters can be fine-tuned.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment is also useful when you want to have a&lt;br /&gt;
list of tables at the beginning or end of your document with the command&lt;br /&gt;
&amp;lt;code&amp;gt;\listoftables&amp;lt;/code&amp;gt;;&lt;br /&gt;
it enables making cross-references to the table with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
You may refer to table~\ref{my_table} for an example.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}&lt;br /&gt;
     ...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{An example of table}&lt;br /&gt;
  \label{my_table}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment - controlling table width ==&lt;br /&gt;
&lt;br /&gt;
This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabWidth1.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ''rubber lengths'', which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill}} | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:LaTeX TabWidth2.png|right]]&lt;br /&gt;
&lt;br /&gt;
You will notice the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct added at the beginning of the column description. Within it is the &amp;lt;code&amp;gt;\extracolsep&amp;lt;/code&amp;gt; command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as &amp;lt;code&amp;gt;\fill&amp;lt;/code&amp;gt;, the columns are automatically spaced evenly.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; package - simple column stretching ==&lt;br /&gt;
&lt;br /&gt;
This package provides a table environment called &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; which is similar to the &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment, except that it has a new column specifier &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |X|X|X|X| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth1.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The content provided for the boxes is treated as for a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; column, except that the width is calculated automatically. If you use the package &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;, you may also apply any &amp;lt;tt&amp;gt;&amp;amp;gt;{\cmd}&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;lt;{\cmd}&amp;lt;/tt&amp;gt; command to achieve specific behavior (like &amp;lt;tt&amp;gt;\centering&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;\raggedright\arraybackslash&amp;lt;/tt&amp;gt;) as described previously.&lt;br /&gt;
&lt;br /&gt;
Another option is the use of &amp;lt;tt&amp;gt;\newcolumntype&amp;lt;/tt&amp;gt; in order to get selected columns formatted in a different way. It defines a new column specifier, e.g. &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; (in uppercase). In this example, the second and fourth column is adjusted in a different way (&amp;lt;tt&amp;gt;\raggedleft&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\newcolumntype{R}{&amp;gt;{\raggedleft\arraybackslash}X}%&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |l|R|l|R| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth2.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
Tabularx with rows spanning multiple columns using &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt;. The two central columns are posing as one by using the &amp;lt;tt&amp;gt;X@{}&amp;lt;/tt&amp;gt; option. Note that the &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\begin{tabularx}{1\textwidth}{|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|&amp;gt;{\setlength\hsize{1\hsize}\raggedleft}X@{} &amp;gt;{\setlength\hsize{1\hsize}\raggedright}X|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|} &lt;br /&gt;
  \hline&lt;br /&gt;
Label 1 &amp;amp; \multicolumn{2}{&amp;gt;{\centering\setlength\hsize{2\hsize}}X|}{Label 2} &amp;amp; Label 3\tabularnewline&lt;br /&gt;
\hline &lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX tabularx_multi.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vertically centered images ==&lt;br /&gt;
&lt;br /&gt;
Inserting images into a table row will align it at the top of the cell.&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt; package this problem can be solved.&lt;br /&gt;
Defining a new columntype will keep the image vertically centered.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newcolumntype{V}{&amp;gt;{\centering\arraybackslash} m{.4\linewidth} }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Or use a parbox to center the image.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\parbox[c]{1em}{\includegraphics{image.png}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Professional tables ==&lt;br /&gt;
&lt;br /&gt;
Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ''never'' use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;), and double-rules (using &amp;lt;code&amp;gt;\hline\hline&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&amp;quot;), which are regarded as unnecessary and distracting in a professionally published form.  The [http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ booktabs] package is useful for easily providing this professionalism in LaTeX tables, and the [http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf documentation] also provides guidelines on what constitutes a &amp;quot;good&amp;quot; table.&lt;br /&gt;
&lt;br /&gt;
In brief, the package uses &amp;lt;code&amp;gt;\toprule&amp;lt;/code&amp;gt; for the uppermost rule (or line), &amp;lt;code&amp;gt;\midrule&amp;lt;/code&amp;gt; for the rules appearing in the middle of the table (such as under the header), and &amp;lt;code&amp;gt;\bottomrule&amp;lt;/code&amp;gt; for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, &amp;lt;code&amp;gt;\cmidrule&amp;lt;/code&amp;gt; can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and normal LaTeX implementations (the later example requires &amp;lt;code&amp;gt;\usepackage{booktabs}&amp;lt;/code&amp;gt; in the preamble).&lt;br /&gt;
{|&lt;br /&gt;
! Normal LaTeX&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;booktabs&amp;lt;/tt&amp;gt;&lt;br /&gt;
|- valign=bottom&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\firsthline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\lasthline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{booktabs}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\toprule&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cmidrule(r){1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\midrule&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\bottomrule&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-valign=top&lt;br /&gt;
| [[Image:LaTeX animal table.png]]&lt;br /&gt;
|&lt;br /&gt;
| [[Image:LaTeX animal table with booktabs.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the [http://www.ctan.org/tex-archive/macros/latex/contrib/ctable/ ctable] package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ctable package uses the booktabs package.&lt;br /&gt;
&lt;br /&gt;
== Adding rule spacing above or below &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\cline&amp;lt;/tt&amp;gt; commands ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to adjust the rule spacing is to add &amp;lt;code&amp;gt;\noalign{\smallskip}&amp;lt;/code&amp;gt; before or after the &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\cline{i-j}&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
'''Normal LaTeX'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline\noalign{\smallskip}&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}\noalign{\smallskip}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\noalign{\smallskip}\hline\noalign{\smallskip}&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\noalign{\smallskip}\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify the skip after a line explicitly using glue after the line terminator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
Mineral &amp;amp; Color \\[1cm]&lt;br /&gt;
Ruby &amp;amp; red \\&lt;br /&gt;
Sapphire &amp;amp; blue \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tables with different font size ==&lt;br /&gt;
&lt;br /&gt;
A table can be globally switched to a different font size by simply adding the desired size command (here: &amp;lt;code&amp;gt;\footnotesize&amp;lt;/code&amp;gt;) after the &amp;lt;code&amp;gt;\begin{table}...&amp;lt;/code&amp;gt; statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}[h]\footnotesize&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table caption font size is not affected.&lt;br /&gt;
&lt;br /&gt;
To control the caption font size, see [[LaTeX/Floats,_Figures_and_Captions#Caption_Styles|Caption Styles]].&lt;br /&gt;
&lt;br /&gt;
== Table with legend ==&lt;br /&gt;
To add a legend to a table the [http://www.ctan.org/tex-archive/macros/latex/contrib/caption/ caption] package can be used. With the caption package a &amp;lt;code&amp;gt;\caption*{...}&amp;lt;/code&amp;gt; statement can be added besides the &lt;br /&gt;
normal &amp;lt;code&amp;gt;\caption{...}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{A normal caption}&lt;br /&gt;
  \caption*{&lt;br /&gt;
    A legend, even a table can be used&lt;br /&gt;
    \begin{tabular}{l l}&lt;br /&gt;
      item 1 &amp;amp; explanation 1 \\&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
  }&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The normal caption is needed for labels and references.&lt;br /&gt;
&lt;br /&gt;
== Other Examples ==&lt;br /&gt;
Borrowed to [http://vgoulet.act.ulaval.ca/en/latex/ Vincent Goulet][[Image:Goulet-TableauFisher.png|thumb]]&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % This if you want Times Roman fonts.&lt;br /&gt;
\usepackage{fontspec} % for xetex &lt;br /&gt;
&lt;br /&gt;
\usepackage{booktabs,longtable,lscape}&lt;br /&gt;
  % \usepackage{palatino,mathpazo} &lt;br /&gt;
  %  \usepackage{booktabs,longtable,lscape,Sweave-sans-ae}&lt;br /&gt;
&lt;br /&gt;
  % \addtolength{\topmargin}{-0.5cm}&lt;br /&gt;
  % \addtolength{\textheight}{2.5cm}&lt;br /&gt;
  % \addtolength{\oddsidemargin}{-1.5cm}&lt;br /&gt;
  % \addtolength{\textwidth}{2.5cm}&lt;br /&gt;
  % \pagestyle{empty}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
%%% Après l'étape Sweave, modifier le fichier TeX comme suit:&lt;br /&gt;
%%%&lt;br /&gt;
%%% changer \cline{1-15}&lt;br /&gt;
%%%    pour \cmidrule(l){3-15}&lt;br /&gt;
%%% effacer \midrule\endfoot&lt;br /&gt;
%%%&lt;br /&gt;
%%% NOTE: 'longtable' requiert plusieurs compilations (2-3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\begin{landscape}&lt;br /&gt;
  \centering&lt;br /&gt;
  \textbf{The \emph{F} distribution}&lt;br /&gt;
  \begin{displaymath}&lt;br /&gt;
    \Pr[F_{r_1, r_2} \leq f] = \int_0^f \frac{\Gamma((r_1+r_2)/2)&lt;br /&gt;
      (r_1/r_2)^{r_1/2} x^{(r_1/2 - 1)}}{\Gamma(r_1/2) \Gamma(r_2/2)&lt;br /&gt;
      (1 + r_1 x/r_2)^{(r_1+r_2)/2}}\, dx&lt;br /&gt;
  \end{displaymath}&lt;br /&gt;
% latex.default(m, dec = 2, file = &amp;quot;&amp;quot;, rowname = NULL, cgroup = c(&amp;quot;&amp;quot;,      &amp;quot;$r_1$&amp;quot;), n.cgroup = c(2, ncol(m) - 2), cgroupTexCmd = &amp;quot;mdseries&amp;quot;,      collabel.just = c(&amp;quot;l&amp;quot;, rep(&amp;quot;r&amp;quot;, ncol(m) - 1)), longtable = TRUE,      lines.page = 80, booktabs = TRUE, table.env = FALSE, center = &amp;quot;none&amp;quot;) &lt;br /&gt;
%&lt;br /&gt;
&lt;br /&gt;
\setlongtables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\begin{longtable}{lrcrrrrrrrrrrrr} \toprule&lt;br /&gt;
\multicolumn{2}{c}{\mdseries }&amp;amp;&lt;br /&gt;
\multicolumn{1}{c}{\mdseries }&amp;amp;&lt;br /&gt;
\multicolumn{12}{c}{\mdseries $r_1$}&lt;br /&gt;
\\ \cmidrule(l){3-15}&lt;br /&gt;
\multicolumn{1}{l}{$\Pr[F \leq f]$}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{$r_2$}&amp;amp;&lt;br /&gt;
\multicolumn{1}{c}{}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{1}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{2}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{3}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{4}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{5}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{6}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{7}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{8}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{9}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{10}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{12}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{15}&lt;br /&gt;
\\ \midrule&lt;br /&gt;
\endhead&lt;br /&gt;
0.95&amp;amp;$ 1$&amp;amp;&amp;amp;$ 161.45$&amp;amp;$ 199.50$&amp;amp;$ 215.71$&amp;amp;$ 224.58$&amp;amp;$ 230.16$&amp;amp;$ 233.99$&amp;amp;$ 236.77$&amp;amp;$ 238.88$&amp;amp;$ 240.54$&amp;amp;$ 241.88$&amp;amp;$ 243.91$&amp;amp;$ 245.95$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$ 647.79$&amp;amp;$ 799.50$&amp;amp;$ 864.16$&amp;amp;$ 899.58$&amp;amp;$ 921.85$&amp;amp;$ 937.11$&amp;amp;$ 948.22$&amp;amp;$ 956.66$&amp;amp;$ 963.28$&amp;amp;$ 968.63$&amp;amp;$ 976.71$&amp;amp;$ 984.87$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$4052.18$&amp;amp;$4999.50$&amp;amp;$5403.35$&amp;amp;$5624.58$&amp;amp;$5763.65$&amp;amp;$5858.99$&amp;amp;$5928.36$&amp;amp;$5981.07$&amp;amp;$6022.47$&amp;amp;$6055.85$&amp;amp;$6106.32$&amp;amp;$6157.28$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 2$&amp;amp;&amp;amp;$  18.51$&amp;amp;$  19.00$&amp;amp;$  19.16$&amp;amp;$  19.25$&amp;amp;$  19.30$&amp;amp;$  19.33$&amp;amp;$  19.35$&amp;amp;$  19.37$&amp;amp;$  19.38$&amp;amp;$  19.40$&amp;amp;$  19.41$&amp;amp;$  19.43$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  38.51$&amp;amp;$  39.00$&amp;amp;$  39.17$&amp;amp;$  39.25$&amp;amp;$  39.30$&amp;amp;$  39.33$&amp;amp;$  39.36$&amp;amp;$  39.37$&amp;amp;$  39.39$&amp;amp;$  39.40$&amp;amp;$  39.41$&amp;amp;$  39.43$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  98.50$&amp;amp;$  99.00$&amp;amp;$  99.17$&amp;amp;$  99.25$&amp;amp;$  99.30$&amp;amp;$  99.33$&amp;amp;$  99.36$&amp;amp;$  99.37$&amp;amp;$  99.39$&amp;amp;$  99.40$&amp;amp;$  99.42$&amp;amp;$  99.43$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 3$&amp;amp;&amp;amp;$  10.13$&amp;amp;$   9.55$&amp;amp;$   9.28$&amp;amp;$   9.12$&amp;amp;$   9.01$&amp;amp;$   8.94$&amp;amp;$   8.89$&amp;amp;$   8.85$&amp;amp;$   8.81$&amp;amp;$   8.79$&amp;amp;$   8.74$&amp;amp;$   8.70$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  17.44$&amp;amp;$  16.04$&amp;amp;$  15.44$&amp;amp;$  15.10$&amp;amp;$  14.88$&amp;amp;$  14.73$&amp;amp;$  14.62$&amp;amp;$  14.54$&amp;amp;$  14.47$&amp;amp;$  14.42$&amp;amp;$  14.34$&amp;amp;$  14.25$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  34.12$&amp;amp;$  30.82$&amp;amp;$  29.46$&amp;amp;$  28.71$&amp;amp;$  28.24$&amp;amp;$  27.91$&amp;amp;$  27.67$&amp;amp;$  27.49$&amp;amp;$  27.35$&amp;amp;$  27.23$&amp;amp;$  27.05$&amp;amp;$  26.87$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 4$&amp;amp;&amp;amp;$   7.71$&amp;amp;$   6.94$&amp;amp;$   6.59$&amp;amp;$   6.39$&amp;amp;$   6.26$&amp;amp;$   6.16$&amp;amp;$   6.09$&amp;amp;$   6.04$&amp;amp;$   6.00$&amp;amp;$   5.96$&amp;amp;$   5.91$&amp;amp;$   5.86$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  12.22$&amp;amp;$  10.65$&amp;amp;$   9.98$&amp;amp;$   9.60$&amp;amp;$   9.36$&amp;amp;$   9.20$&amp;amp;$   9.07$&amp;amp;$   8.98$&amp;amp;$   8.90$&amp;amp;$   8.84$&amp;amp;$   8.75$&amp;amp;$   8.66$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  21.20$&amp;amp;$  18.00$&amp;amp;$  16.69$&amp;amp;$  15.98$&amp;amp;$  15.52$&amp;amp;$  15.21$&amp;amp;$  14.98$&amp;amp;$  14.80$&amp;amp;$  14.66$&amp;amp;$  14.55$&amp;amp;$  14.37$&amp;amp;$  14.20$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 5$&amp;amp;&amp;amp;$   6.61$&amp;amp;$   5.79$&amp;amp;$   5.41$&amp;amp;$   5.19$&amp;amp;$   5.05$&amp;amp;$   4.95$&amp;amp;$   4.88$&amp;amp;$   4.82$&amp;amp;$   4.77$&amp;amp;$   4.74$&amp;amp;$   4.68$&amp;amp;$   4.62$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  10.01$&amp;amp;$   8.43$&amp;amp;$   7.76$&amp;amp;$   7.39$&amp;amp;$   7.15$&amp;amp;$   6.98$&amp;amp;$   6.85$&amp;amp;$   6.76$&amp;amp;$   6.68$&amp;amp;$   6.62$&amp;amp;$   6.52$&amp;amp;$   6.43$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  16.26$&amp;amp;$  13.27$&amp;amp;$  12.06$&amp;amp;$  11.39$&amp;amp;$  10.97$&amp;amp;$  10.67$&amp;amp;$  10.46$&amp;amp;$  10.29$&amp;amp;$  10.16$&amp;amp;$  10.05$&amp;amp;$   9.89$&amp;amp;$   9.72$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 6$&amp;amp;&amp;amp;$   5.99$&amp;amp;$   5.14$&amp;amp;$   4.76$&amp;amp;$   4.53$&amp;amp;$   4.39$&amp;amp;$   4.28$&amp;amp;$   4.21$&amp;amp;$   4.15$&amp;amp;$   4.10$&amp;amp;$   4.06$&amp;amp;$   4.00$&amp;amp;$   3.94$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   8.81$&amp;amp;$   7.26$&amp;amp;$   6.60$&amp;amp;$   6.23$&amp;amp;$   5.99$&amp;amp;$   5.82$&amp;amp;$   5.70$&amp;amp;$   5.60$&amp;amp;$   5.52$&amp;amp;$   5.46$&amp;amp;$   5.37$&amp;amp;$   5.27$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  13.75$&amp;amp;$  10.92$&amp;amp;$   9.78$&amp;amp;$   9.15$&amp;amp;$   8.75$&amp;amp;$   8.47$&amp;amp;$   8.26$&amp;amp;$   8.10$&amp;amp;$   7.98$&amp;amp;$   7.87$&amp;amp;$   7.72$&amp;amp;$   7.56$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 7$&amp;amp;&amp;amp;$   5.59$&amp;amp;$   4.74$&amp;amp;$   4.35$&amp;amp;$   4.12$&amp;amp;$   3.97$&amp;amp;$   3.87$&amp;amp;$   3.79$&amp;amp;$   3.73$&amp;amp;$   3.68$&amp;amp;$   3.64$&amp;amp;$   3.57$&amp;amp;$   3.51$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   8.07$&amp;amp;$   6.54$&amp;amp;$   5.89$&amp;amp;$   5.52$&amp;amp;$   5.29$&amp;amp;$   5.12$&amp;amp;$   4.99$&amp;amp;$   4.90$&amp;amp;$   4.82$&amp;amp;$   4.76$&amp;amp;$   4.67$&amp;amp;$   4.57$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  12.25$&amp;amp;$   9.55$&amp;amp;$   8.45$&amp;amp;$   7.85$&amp;amp;$   7.46$&amp;amp;$   7.19$&amp;amp;$   6.99$&amp;amp;$   6.84$&amp;amp;$   6.72$&amp;amp;$   6.62$&amp;amp;$   6.47$&amp;amp;$   6.31$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 8$&amp;amp;&amp;amp;$   5.32$&amp;amp;$   4.46$&amp;amp;$   4.07$&amp;amp;$   3.84$&amp;amp;$   3.69$&amp;amp;$   3.58$&amp;amp;$   3.50$&amp;amp;$   3.44$&amp;amp;$   3.39$&amp;amp;$   3.35$&amp;amp;$   3.28$&amp;amp;$   3.22$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   7.57$&amp;amp;$   6.06$&amp;amp;$   5.42$&amp;amp;$   5.05$&amp;amp;$   4.82$&amp;amp;$   4.65$&amp;amp;$   4.53$&amp;amp;$   4.43$&amp;amp;$   4.36$&amp;amp;$   4.30$&amp;amp;$   4.20$&amp;amp;$   4.10$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  11.26$&amp;amp;$   8.65$&amp;amp;$   7.59$&amp;amp;$   7.01$&amp;amp;$   6.63$&amp;amp;$   6.37$&amp;amp;$   6.18$&amp;amp;$   6.03$&amp;amp;$   5.91$&amp;amp;$   5.81$&amp;amp;$   5.67$&amp;amp;$   5.52$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 9$&amp;amp;&amp;amp;$   5.12$&amp;amp;$   4.26$&amp;amp;$   3.86$&amp;amp;$   3.63$&amp;amp;$   3.48$&amp;amp;$   3.37$&amp;amp;$   3.29$&amp;amp;$   3.23$&amp;amp;$   3.18$&amp;amp;$   3.14$&amp;amp;$   3.07$&amp;amp;$   3.01$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   7.21$&amp;amp;$   5.71$&amp;amp;$   5.08$&amp;amp;$   4.72$&amp;amp;$   4.48$&amp;amp;$   4.32$&amp;amp;$   4.20$&amp;amp;$   4.10$&amp;amp;$   4.03$&amp;amp;$   3.96$&amp;amp;$   3.87$&amp;amp;$   3.77$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  10.56$&amp;amp;$   8.02$&amp;amp;$   6.99$&amp;amp;$   6.42$&amp;amp;$   6.06$&amp;amp;$   5.80$&amp;amp;$   5.61$&amp;amp;$   5.47$&amp;amp;$   5.35$&amp;amp;$   5.26$&amp;amp;$   5.11$&amp;amp;$   4.96$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$10$&amp;amp;&amp;amp;$   4.96$&amp;amp;$   4.10$&amp;amp;$   3.71$&amp;amp;$   3.48$&amp;amp;$   3.33$&amp;amp;$   3.22$&amp;amp;$   3.14$&amp;amp;$   3.07$&amp;amp;$   3.02$&amp;amp;$   2.98$&amp;amp;$   2.91$&amp;amp;$   2.85$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.94$&amp;amp;$   5.46$&amp;amp;$   4.83$&amp;amp;$   4.47$&amp;amp;$   4.24$&amp;amp;$   4.07$&amp;amp;$   3.95$&amp;amp;$   3.85$&amp;amp;$   3.78$&amp;amp;$   3.72$&amp;amp;$   3.62$&amp;amp;$   3.52$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  10.04$&amp;amp;$   7.56$&amp;amp;$   6.55$&amp;amp;$   5.99$&amp;amp;$   5.64$&amp;amp;$   5.39$&amp;amp;$   5.20$&amp;amp;$   5.06$&amp;amp;$   4.94$&amp;amp;$   4.85$&amp;amp;$   4.71$&amp;amp;$   4.56$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$12$&amp;amp;&amp;amp;$   4.75$&amp;amp;$   3.89$&amp;amp;$   3.49$&amp;amp;$   3.26$&amp;amp;$   3.11$&amp;amp;$   3.00$&amp;amp;$   2.91$&amp;amp;$   2.85$&amp;amp;$   2.80$&amp;amp;$   2.75$&amp;amp;$   2.69$&amp;amp;$   2.62$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.55$&amp;amp;$   5.10$&amp;amp;$   4.47$&amp;amp;$   4.12$&amp;amp;$   3.89$&amp;amp;$   3.73$&amp;amp;$   3.61$&amp;amp;$   3.51$&amp;amp;$   3.44$&amp;amp;$   3.37$&amp;amp;$   3.28$&amp;amp;$   3.18$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$   9.33$&amp;amp;$   6.93$&amp;amp;$   5.95$&amp;amp;$   5.41$&amp;amp;$   5.06$&amp;amp;$   4.82$&amp;amp;$   4.64$&amp;amp;$   4.50$&amp;amp;$   4.39$&amp;amp;$   4.30$&amp;amp;$   4.16$&amp;amp;$   4.01$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$15$&amp;amp;&amp;amp;$   4.54$&amp;amp;$   3.68$&amp;amp;$   3.29$&amp;amp;$   3.06$&amp;amp;$   2.90$&amp;amp;$   2.79$&amp;amp;$   2.71$&amp;amp;$   2.64$&amp;amp;$   2.59$&amp;amp;$   2.54$&amp;amp;$   2.48$&amp;amp;$   2.40$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.20$&amp;amp;$   4.77$&amp;amp;$   4.15$&amp;amp;$   3.80$&amp;amp;$   3.58$&amp;amp;$   3.41$&amp;amp;$   3.29$&amp;amp;$   3.20$&amp;amp;$   3.12$&amp;amp;$   3.06$&amp;amp;$   2.96$&amp;amp;$   2.86$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$   8.68$&amp;amp;$   6.36$&amp;amp;$   5.42$&amp;amp;$   4.89$&amp;amp;$   4.56$&amp;amp;$   4.32$&amp;amp;$   4.14$&amp;amp;$   4.00$&amp;amp;$   3.89$&amp;amp;$   3.80$&amp;amp;$   3.67$&amp;amp;$   3.52$\\&lt;br /&gt;
\bottomrule&lt;br /&gt;
 \end{longtable}&lt;br /&gt;
\end{landscape}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% mode: latex&lt;br /&gt;
%%% TeX-master: t&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Need more complicated features? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at one of the following packages:&lt;br /&gt;
&lt;br /&gt;
* [http://tug.ctan.org/pkg/hhline &amp;lt;tt&amp;gt;hhline&amp;lt;/tt&amp;gt;]:   do whatever you want with horizontal lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/array &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;]:    gives you more freedom on how to define columns&lt;br /&gt;
* [http://tug.ctan.org/pkg/colortbl &amp;lt;tt&amp;gt;colortbl&amp;lt;/tt&amp;gt;]: make your table more colorful&lt;br /&gt;
* [http://tug.ctan.org/pkg/supertabular &amp;lt;tt&amp;gt;supertabular&amp;lt;/tt&amp;gt;]: for tables that need to stretch over several pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/longtable &amp;lt;tt&amp;gt;longtable&amp;lt;/tt&amp;gt;]:  similar to &amp;lt;tt&amp;gt;supertab&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Note: footnotes do not work properly in a normal tabular environment. If you replace it with a longtable environment, footnotes work properly&lt;br /&gt;
* [http://tug.ctan.org/pkg/xtab &amp;lt;tt&amp;gt;xtab&amp;lt;/tt&amp;gt;]: Yet another package for tables that need to span many pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/tabulary &amp;lt;tt&amp;gt;tabulary&amp;lt;/tt&amp;gt;]: modified &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; allowing width of columns set for equal heights&lt;br /&gt;
* [http://tug.ctan.org/pkg/arydshln &amp;lt;tt&amp;gt;arydshln&amp;lt;/tt&amp;gt;]: creates dashed horizontal and vertical lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/ctable &amp;lt;tt&amp;gt;ctable&amp;lt;/tt&amp;gt;]: allows for footnotes under table and properly spaced caption above (incorporates booktabs package)&lt;br /&gt;
* [http://tug.ctan.org/pkg/slashbox &amp;lt;tt&amp;gt;slashbox&amp;lt;/tt&amp;gt;]: create 2D tables with the first cell containing a description for both axes&lt;br /&gt;
* [http://tug.ctan.org/pkg/dcolumn &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt;]: decimal point alignment of numeric cells&lt;br /&gt;
* [http://tug.ctan.org/pkg/rccol &amp;lt;tt&amp;gt;rccol&amp;lt;/tt&amp;gt;]: advanced decimal point alignment of numeric cells with rounding&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This concludes discussion of basic tables. Experimentation quickly leads to mastery. The table syntax in LaTeX can look rather messy, and seeing new examples can look confusing. But hopefully, enough has been covered here so that a user can create any table needed for your papers. Unsurprisingly, LaTeX has plenty more up its sleeve, so expect a follow up tutorial covering more advanced features in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=AucTeX&amp;diff=471</id>
		<title>AucTeX</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=AucTeX&amp;diff=471"/>
				<updated>2011-09-20T17:31:01Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : From http://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are some commands for Emacs and AucTeX. AucTeX being a subset of Emacs.&lt;br /&gt;
* Auctex Refcard &amp;lt;ref&amp;gt;[http://devcheatsheet.com/static/pdf/auctex-ref.pdf Auctex Refcard]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* AEmacs Refcard &amp;lt;ref&amp;gt;[http://home.uchicago.edu/~gan/file/emacs.pdf Emacs Refcard]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;C-c C-h&amp;lt;/tt&amp;gt; shows all bindings that start C-c&lt;br /&gt;
* &amp;lt;tt&amp;gt;C-h b&amp;lt;/tt&amp;gt; shows all bindings currently available.&lt;br /&gt;
&lt;br /&gt;
Now for some details.&lt;br /&gt;
&lt;br /&gt;
=Macros=&lt;br /&gt;
&lt;br /&gt;
* C-c C-m insert macro (warning: pressing TAB at this point will take a while because auctex will load a list of all the macros it knows about. If the macro you pick is \usepackage and then TAB auctex will load a list of all the packages it knows about for you to choose from.)&lt;br /&gt;
&lt;br /&gt;
* C-c C-f C-e Add an \emph{} and place cursor between the braces. Or if you have some text marked, wrap it in \emph replace C-e by C-b, C-c C-i, C-t for \textbf \textsc \textit or \texttt respectively. C-c C-f ? will give you a list of all the possibilities. This command knows about mathmode and will behave accordingly inside dollars or in equation environment.&lt;br /&gt;
&lt;br /&gt;
=Sections/Environments=&lt;br /&gt;
&lt;br /&gt;
* C-c C-s create section with optional label&lt;br /&gt;
&lt;br /&gt;
* C-c C-e create environment (\start and \end tags) choose from an autocomplete list or type your own. (If you have LaTeX mode on in an empty file, this will default to the document environment, and prompt you for a documentclass.&lt;br /&gt;
&lt;br /&gt;
* C-u C-c C-e change the type of the current (innermost) environment&lt;br /&gt;
&lt;br /&gt;
* C-c . mark current environment&lt;br /&gt;
&lt;br /&gt;
* C-c * mark current section/subsection&lt;br /&gt;
&lt;br /&gt;
* C-c ] close current environment&lt;br /&gt;
&lt;br /&gt;
* C-M-a find matching begin environment, C-M-e find matching end&lt;br /&gt;
&lt;br /&gt;
=Compilation=&lt;br /&gt;
&lt;br /&gt;
*  C-c C-c do most appropriate compilation activity (LaTeX, BibTeX, View...) It's pretty smart, and you can override the default to pick what action you cant to do.&lt;br /&gt;
&lt;br /&gt;
* C-c C-r do most appropriate compilation activity (LaTeX, BibTeX, View...) to the region that has been pinned by C-c C-t C-r. Of course one wants to use C-c . or C-c * to ease the select a region.&lt;br /&gt;
&lt;br /&gt;
C-c C-v view document (without compiling)&lt;br /&gt;
&lt;br /&gt;
=RefTeX=&lt;br /&gt;
&lt;br /&gt;
RefTeX, while not strictly part of AucTeX is an essential part of your emacs/TeX working life.&lt;br /&gt;
&lt;br /&gt;
* C-c ( add label. Auto-suggests names based on current section.&lt;br /&gt;
&lt;br /&gt;
* C-c ) add \ref you can select from the list of currently defined labels. If you customise a certain variable (whose name escapes me) you can add hyperref, varioref and cleverref reference commands to the list of types of reference available.&lt;br /&gt;
&lt;br /&gt;
* C-c [ add citation. RefTeX understands bibliography commands and will search your .bib for references that match the pattern you supply to this command. Can be customised to have harvard, chicago and other kinds of reference commands available. (No BibLaTeX citation style support yet as far as I know.)&lt;br /&gt;
&lt;br /&gt;
* C-c = jump to section: opens list of sections/subsections etc you can jump to.&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
LaTeX-math-abbrev-prefix is a useful thing which is ` by default.&lt;br /&gt;
&lt;br /&gt;
This gives you access to a bunch of mathmode symbols in two keystrokes. For example, you can get \subset by typing ` {&lt;br /&gt;
&lt;br /&gt;
By customising LaTeX-math-list you can get whatever you like out of this prefix command. A bunch of the most useful are on the refcard.&lt;br /&gt;
&lt;br /&gt;
* C-c ; comment/uncomment region&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=470</id>
		<title>LaTeX/Installation</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=470"/>
				<updated>2011-09-20T17:19:41Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Gnu-emacs and AucTeX */ Auctex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= TeXLive=&lt;br /&gt;
&lt;br /&gt;
TeXLive2010 is a common distribution for Windows, Mac OS/X and Linux. In May 2011, TeXLive2011 is not out but most of packages, if upgraded from [http://www.ctan.org CTAN]. The Comprehensive TeX Archive Network is the place to get materials related to the TeX typesetting system. You need to read http://www.tug.org/texlive/doc/texlive-en/texlive-en.html  &lt;br /&gt;
&lt;br /&gt;
* On Windows you are supposed to download the ISO file and burn it on a DVD (see http://www.tug.org/texlive/acquire-dvd.html).&lt;br /&gt;
&lt;br /&gt;
* On Mac OS/X, you are supposed to get MaCTeX which includes TeXLive and run the dmg file for installation.&lt;br /&gt;
&lt;br /&gt;
*On Linux, texlive is installed by default. You may need to install some additional packages.&lt;br /&gt;
&lt;br /&gt;
== Windows installation ==&lt;br /&gt;
Insert the DVD and install the distribution. It may take half an hour or more. See http://www.tug.org/texlive/doc/texlive-en/texlive-en.html for Post instal actions.&lt;br /&gt;
In particular open a terminal and enter the command (copy and paste by right click)&lt;br /&gt;
 &amp;gt; tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet &lt;br /&gt;
&lt;br /&gt;
== For all 3 OS ==&lt;br /&gt;
&lt;br /&gt;
Follow the section '''3.5 Testing the installation''' and test the commands: latex, pdflatex, etc. on simple examples. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are finished, you can test the editor TeXworks which works on the 3 operating systems.&lt;br /&gt;
&lt;br /&gt;
Click on the TeXworks icon on your Desktop (Windows installation) and choose File =&amp;gt; New from a template. Choose a Beamer template. Run it, look at the pdf, move to another page. Right click somewhere on the pdf text and choose sync to the source code. Your left window will sync with the corresponding tex source line. Move to another section of the source text, right click and choose ''locate on PDF'' and the right pane (PDF window) will scroll to the corresponding section.&lt;br /&gt;
&lt;br /&gt;
Test a XeTeX template and run it. If it runs into error because of a missing font, comment the line by adding a % in front of the line and run again. XeTeX is able to run with any font of your OS and not only on &amp;quot;Computer Modern&amp;quot; fonts which are specific to TeX.&lt;br /&gt;
&lt;br /&gt;
Now you have a running mininal running installation.&lt;br /&gt;
&lt;br /&gt;
== Gnu-emacs and AucTeX==&lt;br /&gt;
&lt;br /&gt;
If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.&lt;br /&gt;
&lt;br /&gt;
Just download the Emacs zip (currently version 23.3) first and then extract it on &amp;lt;tt&amp;gt;c:\Program Files\Emacs&amp;lt;/tt&amp;gt; by creating an Emacs folder. It will created a tree &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3&amp;lt;/tt&amp;gt; of all the emacs distribution. In the directory &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3\bin&amp;lt;/tt&amp;gt;, you will find a file named &amp;lt;tt&amp;gt;runemacs.exe&amp;lt;/tt&amp;gt;. Right click and create an alias (link) file and then move this link on your desktop or menu bar in order to launch emacs.&lt;br /&gt;
&lt;br /&gt;
Now, unzip the AucTeX zipped file exactly on this emacs-23.3 folder in order to add the AucTeX tree to the emacs tree. In particular a newer &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file under the &amp;lt;tt&amp;gt;emac-23.3\info&amp;lt;/tt&amp;gt; will supersede the previous file with the same name (accept to overwrite &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file).&lt;br /&gt;
&lt;br /&gt;
Launch runemacs and open a tex file. It should work. See [[AucTeX]] for more information.&lt;br /&gt;
&lt;br /&gt;
== JabReF ==&lt;br /&gt;
&lt;br /&gt;
JabReF (see http://jabref.sourceforge.net/) is the tool which will be presented for the Bibliography management. Some exercises will be proposed using JabReF. It is very easy to download.&lt;br /&gt;
&lt;br /&gt;
=Other softwares=&lt;br /&gt;
&lt;br /&gt;
Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.&lt;br /&gt;
&lt;br /&gt;
== OpenOffice and writer2latex ==&lt;br /&gt;
If you want to export a Word document into a LaTeX document, a nicer way than copy and paste consists in loading the .doc file in Writer from Openoffice and export it using writer2latex as a LaTeX file.&lt;br /&gt;
&lt;br /&gt;
You can download OpenOffice at http://fr.openoffice.org/about-downloads.html and install the default installation with Java.&lt;br /&gt;
&lt;br /&gt;
Then go to http://writer2latex.sourceforge.net/index12.html#download in order to download ''Writer2LaTeX 1.1.7'' (April 2011) as a zip file. Unzip the file in a temporary folder and click on the file writer2latex.oxt which will open by OpenOffice and install as an extension.&lt;br /&gt;
&lt;br /&gt;
Now you can export a .doc into a .tex file. Amongst the various options, you can use Simple LaTeX, utf-8 encoding as well as xetex for the TeX engine instead of pdftex.&lt;br /&gt;
[[Fichier:writer2latex-exmaple.png|right|400px|Writer2latex: default, Xetex, no mulitlingual, separate folder for images.]]&lt;br /&gt;
&lt;br /&gt;
For non well structured documents you will find that Writer2LaTeX uses the principle garbage in – garbage out!&lt;br /&gt;
If you wish to simply get TeXed output of your Word document ie without the purpose of reworking on the LaTeX code, you can use the default layout, as shown on the figure.&lt;br /&gt;
&lt;br /&gt;
But for a well structured Word document, writer2latex (recent version only) simplifies the porting by creating images (png files) for most of the figures.&lt;br /&gt;
&lt;br /&gt;
You need Emacs or any editor to clean the LaTeX file.&lt;br /&gt;
&lt;br /&gt;
===Remarks concerning this wiki (wiki publisher) ===&lt;br /&gt;
If you want to improve this wiki and are used to work with Word, you can export from Word or Libre Office to a wiki source code, using the Sun wiki publisher extensions that you can get [http://extensions.services.openoffice.org/project/wikipublisher there]. Then under Writer, you can export to a file using the wiki format (you can also send to a wiki server, but it useful only if you do it regularly). A wiki text is supposed to be simpler to enter that html. It is more modern that LaTeX. &lt;br /&gt;
&lt;br /&gt;
If you want to export a table into a wiki, copy paste it into a Writer new document by using html special paste (right click). And then export to wiki format. Then you can paste your wiki table into a wiki server like this one.&lt;br /&gt;
&lt;br /&gt;
==Calc2LaTeX==&lt;br /&gt;
&lt;br /&gt;
Calc2LaTeX lets you select cells in your spreadsheets and output code for LaTeX tables. It is very very helpful but needs some installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX installation on OpenOffice.org 2.0 ===&lt;br /&gt;
&lt;br /&gt;
# Before you install Calc2LaTeX, download a zip file from http://calc2latex.sourceforge.net and extract it somewhere.&lt;br /&gt;
#Open OpenOffice Calc or (Libre Office) and click &amp;lt;tt&amp;gt;Tools&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Macros&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Organize Macros&amp;lt;/tt&amp;gt; =&amp;gt; &amp;lt;tt&amp;gt;OpenOffice.org Basic...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:[[Image:calc2latexinstall.jpg|frame|right|400px]]&lt;br /&gt;
#You will see 'OpenOffice.org Basic Macros' dialog box. Select 'My Macros' and push 'Organizer' button&lt;br /&gt;
:[[Fichier:calc2latex2.jpg|frame|right|400px]]&lt;br /&gt;
# Click 'Libraries' tab, and confirm that 'My Macros &amp;amp; Dialogs' is selected on the list of 'Location.' (If not, select it.)&lt;br /&gt;
:And then click &amp;lt;tt&amp;gt;Append&amp;lt;/tt&amp;gt; button.[[Fichier:calc2latex3.jpg|frame|right|400px]]&lt;br /&gt;
:[[Fichier:calc2latex3-fr-mac.jpg|frame|right|400px]]&lt;br /&gt;
# You will see a file dialog, so select &amp;lt;tt&amp;gt;script.xlb&amp;lt;/tt&amp;gt; which you have extracted from the zip file in advance.[[Fichier:calc2latex4.jpg|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
You can now use calc2latex to produce LaTeX tables. There is chapter on LaTeX and you will learn how to use calc2latex as well as how to improve the source code output by calc2latex as well as how to simplify it. The following section gives some advices and you can refer to it later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Optional steps ===&lt;br /&gt;
====Changing the default output encoding to UTF-8 unicode ====&lt;br /&gt;
Default settings of Calc2LaTeX are nice except the encoding which is the old West European Latin 1 or ISO-8859-1 code instead of UNICODE (UTF-8). It doesn't really matter if you store the LaTeX code in your clipboard and paste it in your TeX editor because the transformation to the local encoding of your LaTeX file is done on the fly, but if your output is a file, that file will be ISO-8859-1 encoded. And you will have difficulties to mix words from East European languages as well as Russian, Arabic and Asian languages. Older TeX (1982) and even pdfTeX are not able to mix 'naturally' various languages like this wiki is able to do. Only XeTeX as well LuaTeX are able to do it. You are encouraged to use these engines instead of pdfTeX. Don't worry XeTeX and LuaTeX are outputting PDF formats by default and no more the old DVI format.&lt;br /&gt;
&lt;br /&gt;
Thus in order to make UTF-8 the default encoding of Calc2LaTeX (if not set already by a newer version than the current 0.2.4) you can do it during the installation. It is as easy or as difficult as the installation.&lt;br /&gt;
&lt;br /&gt;
Do the previous steps, and then Edit the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; macro. [[Fichier:calc2latex-edit-macro.png|frame|right|400px]] &lt;br /&gt;
then change ISO-8859-1 to UTF-8 and save.[[Fichier:calc2latex-change-main-macro.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
==== Adding the macro in a menu bar ====&lt;br /&gt;
:Once you verified that the macro is running, it can be more convenient to add it to a menu bar. :Therefore select View =&amp;gt; Toolbar =&amp;gt; Customize then choose (for example) the &amp;lt;tt&amp;gt;Standard&amp;lt;/tt&amp;gt; menu and scroll down to (after &amp;quot;New&amp;quot;, &amp;quot;Open&amp;quot;, &amp;quot;Save&amp;quot;, &amp;quot;Save as&amp;quot; etc.) &amp;quot;Export to pdf&amp;quot; and click &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt;. :Then select OpenOffice Macros, and Calc2latex (twice) in order to attach the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; subroutine to the menu bar. [[Fichier:calc2latex-add-to-menubar.png|thumb|right|400px]]&lt;br /&gt;
:In a second step, instead of &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt; you can click on &amp;lt;tt&amp;gt;Modify&amp;lt;/tt&amp;gt; in order to rename the name of the macro to be displayed by &amp;quot;Selection to LaTeX table&amp;quot; (or similar) instead of &amp;quot;Main&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:At last, you can add an icon such as this one [[Fichier:latex-table.png]] (right-click and save the image on your hard disk) by clicking on import [[Fichier:calc2latex-add-icon.png|frame|right|400px]]&lt;br /&gt;
and import&lt;br /&gt;
[[Fichier:calc2latex-import-icon.png|frame|right|400px]]&lt;br /&gt;
then it will display like this and after selecting contiguous cells you can click and the new icon.&lt;br /&gt;
[[Fichier:calc2latex-show-latex-icon.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
== Gnuplot (***)==&lt;br /&gt;
== Xfig (****)==&lt;br /&gt;
Linux and OS/X only!!!&lt;br /&gt;
&lt;br /&gt;
== Inkscape (***)==&lt;br /&gt;
&lt;br /&gt;
== IPE 7 (**)==&lt;br /&gt;
&lt;br /&gt;
See the wiki specific to ipe users http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7 as well as the official site http://ipe7.sourceforge.net/ and documentation at http://ipe7.sourceforge.net/manual/manual.pdf .&lt;br /&gt;
&lt;br /&gt;
For OS/X you can get an Ipe.app since version 7.1.1&lt;br /&gt;
&lt;br /&gt;
== Geogebra (**)==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom||Introduction}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=469</id>
		<title>LaTeX/Installation</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Installation&amp;diff=469"/>
				<updated>2011-09-15T12:52:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Ipe 7.1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= TeXLive=&lt;br /&gt;
&lt;br /&gt;
TeXLive2010 is a common distribution for Windows, Mac OS/X and Linux. In May 2011, TeXLive2011 is not out but most of packages, if upgraded from [http://www.ctan.org CTAN]. The Comprehensive TeX Archive Network is the place to get materials related to the TeX typesetting system. You need to read http://www.tug.org/texlive/doc/texlive-en/texlive-en.html  &lt;br /&gt;
&lt;br /&gt;
* On Windows you are supposed to download the ISO file and burn it on a DVD (see http://www.tug.org/texlive/acquire-dvd.html).&lt;br /&gt;
&lt;br /&gt;
* On Mac OS/X, you are supposed to get MaCTeX which includes TeXLive and run the dmg file for installation.&lt;br /&gt;
&lt;br /&gt;
*On Linux, texlive is installed by default. You may need to install some additional packages.&lt;br /&gt;
&lt;br /&gt;
== Windows installation ==&lt;br /&gt;
Insert the DVD and install the distribution. It may take half an hour or more. See http://www.tug.org/texlive/doc/texlive-en/texlive-en.html for Post instal actions.&lt;br /&gt;
In particular open a terminal and enter the command (copy and paste by right click)&lt;br /&gt;
 &amp;gt; tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet &lt;br /&gt;
&lt;br /&gt;
== For all 3 OS ==&lt;br /&gt;
&lt;br /&gt;
Follow the section '''3.5 Testing the installation''' and test the commands: latex, pdflatex, etc. on simple examples. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you are finished, you can test the editor TeXworks which works on the 3 operating systems.&lt;br /&gt;
&lt;br /&gt;
Click on the TeXworks icon on your Desktop (Windows installation) and choose File =&amp;gt; New from a template. Choose a Beamer template. Run it, look at the pdf, move to another page. Right click somewhere on the pdf text and choose sync to the source code. Your left window will sync with the corresponding tex source line. Move to another section of the source text, right click and choose ''locate on PDF'' and the right pane (PDF window) will scroll to the corresponding section.&lt;br /&gt;
&lt;br /&gt;
Test a XeTeX template and run it. If it runs into error because of a missing font, comment the line by adding a % in front of the line and run again. XeTeX is able to run with any font of your OS and not only on &amp;quot;Computer Modern&amp;quot; fonts which are specific to TeX.&lt;br /&gt;
&lt;br /&gt;
Now you have a running mininal running installation.&lt;br /&gt;
&lt;br /&gt;
== Gnu-emacs and AucTeX==&lt;br /&gt;
&lt;br /&gt;
If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.&lt;br /&gt;
&lt;br /&gt;
Just download the Emacs zip (currently version 23.3) first and then extract it on &amp;lt;tt&amp;gt;c:\Program Files\Emacs&amp;lt;/tt&amp;gt; by creating an Emacs folder. It will created a tree &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3&amp;lt;/tt&amp;gt; of all the emacs distribution. In the directory &amp;lt;tt&amp;gt;c:\Program Files\Emacs\emacs-23.3\bin&amp;lt;/tt&amp;gt;, you will find a file named &amp;lt;tt&amp;gt;runemacs.exe&amp;lt;/tt&amp;gt;. Right click and create an alias (link) file and then move this link on your desktop or menu bar in order to launch emacs.&lt;br /&gt;
&lt;br /&gt;
Now, unzip the AucTeX zipped file exactly on this emacs-23.3 folder in order to add the AucTeX tree to the emacs tree. In particular a newer &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file under the &amp;lt;tt&amp;gt;emac-23.3\info&amp;lt;/tt&amp;gt; will supersede the previous file with the same name (accept to overwrite &amp;lt;tt&amp;gt;dir&amp;lt;/tt&amp;gt; file).&lt;br /&gt;
&lt;br /&gt;
Launch runemacs and open a tex file. It should work.&lt;br /&gt;
&lt;br /&gt;
== JabReF ==&lt;br /&gt;
&lt;br /&gt;
JabReF (see http://jabref.sourceforge.net/) is the tool which will be presented for the Bibliography management. Some exercises will be proposed using JabReF. It is very easy to download.&lt;br /&gt;
&lt;br /&gt;
=Other softwares=&lt;br /&gt;
&lt;br /&gt;
Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.&lt;br /&gt;
&lt;br /&gt;
== OpenOffice and writer2latex ==&lt;br /&gt;
If you want to export a Word document into a LaTeX document, a nicer way than copy and paste consists in loading the .doc file in Writer from Openoffice and export it using writer2latex as a LaTeX file.&lt;br /&gt;
&lt;br /&gt;
You can download OpenOffice at http://fr.openoffice.org/about-downloads.html and install the default installation with Java.&lt;br /&gt;
&lt;br /&gt;
Then go to http://writer2latex.sourceforge.net/index12.html#download in order to download ''Writer2LaTeX 1.1.7'' (April 2011) as a zip file. Unzip the file in a temporary folder and click on the file writer2latex.oxt which will open by OpenOffice and install as an extension.&lt;br /&gt;
&lt;br /&gt;
Now you can export a .doc into a .tex file. Amongst the various options, you can use Simple LaTeX, utf-8 encoding as well as xetex for the TeX engine instead of pdftex.&lt;br /&gt;
[[Fichier:writer2latex-exmaple.png|right|400px|Writer2latex: default, Xetex, no mulitlingual, separate folder for images.]]&lt;br /&gt;
&lt;br /&gt;
For non well structured documents you will find that Writer2LaTeX uses the principle garbage in – garbage out!&lt;br /&gt;
If you wish to simply get TeXed output of your Word document ie without the purpose of reworking on the LaTeX code, you can use the default layout, as shown on the figure.&lt;br /&gt;
&lt;br /&gt;
But for a well structured Word document, writer2latex (recent version only) simplifies the porting by creating images (png files) for most of the figures.&lt;br /&gt;
&lt;br /&gt;
You need Emacs or any editor to clean the LaTeX file.&lt;br /&gt;
&lt;br /&gt;
===Remarks concerning this wiki (wiki publisher) ===&lt;br /&gt;
If you want to improve this wiki and are used to work with Word, you can export from Word or Libre Office to a wiki source code, using the Sun wiki publisher extensions that you can get [http://extensions.services.openoffice.org/project/wikipublisher there]. Then under Writer, you can export to a file using the wiki format (you can also send to a wiki server, but it useful only if you do it regularly). A wiki text is supposed to be simpler to enter that html. It is more modern that LaTeX. &lt;br /&gt;
&lt;br /&gt;
If you want to export a table into a wiki, copy paste it into a Writer new document by using html special paste (right click). And then export to wiki format. Then you can paste your wiki table into a wiki server like this one.&lt;br /&gt;
&lt;br /&gt;
==Calc2LaTeX==&lt;br /&gt;
&lt;br /&gt;
Calc2LaTeX lets you select cells in your spreadsheets and output code for LaTeX tables. It is very very helpful but needs some installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX installation on OpenOffice.org 2.0 ===&lt;br /&gt;
&lt;br /&gt;
# Before you install Calc2LaTeX, download a zip file from http://calc2latex.sourceforge.net and extract it somewhere.&lt;br /&gt;
#Open OpenOffice Calc or (Libre Office) and click &amp;lt;tt&amp;gt;Tools&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Macros&amp;lt;/tt&amp;gt;=&amp;gt;&amp;lt;tt&amp;gt;Organize Macros&amp;lt;/tt&amp;gt; =&amp;gt; &amp;lt;tt&amp;gt;OpenOffice.org Basic...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:[[Image:calc2latexinstall.jpg|frame|right|400px]]&lt;br /&gt;
#You will see 'OpenOffice.org Basic Macros' dialog box. Select 'My Macros' and push 'Organizer' button&lt;br /&gt;
:[[Fichier:calc2latex2.jpg|frame|right|400px]]&lt;br /&gt;
# Click 'Libraries' tab, and confirm that 'My Macros &amp;amp; Dialogs' is selected on the list of 'Location.' (If not, select it.)&lt;br /&gt;
:And then click &amp;lt;tt&amp;gt;Append&amp;lt;/tt&amp;gt; button.[[Fichier:calc2latex3.jpg|frame|right|400px]]&lt;br /&gt;
:[[Fichier:calc2latex3-fr-mac.jpg|frame|right|400px]]&lt;br /&gt;
# You will see a file dialog, so select &amp;lt;tt&amp;gt;script.xlb&amp;lt;/tt&amp;gt; which you have extracted from the zip file in advance.[[Fichier:calc2latex4.jpg|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
You can now use calc2latex to produce LaTeX tables. There is chapter on LaTeX and you will learn how to use calc2latex as well as how to improve the source code output by calc2latex as well as how to simplify it. The following section gives some advices and you can refer to it later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Optional steps ===&lt;br /&gt;
====Changing the default output encoding to UTF-8 unicode ====&lt;br /&gt;
Default settings of Calc2LaTeX are nice except the encoding which is the old West European Latin 1 or ISO-8859-1 code instead of UNICODE (UTF-8). It doesn't really matter if you store the LaTeX code in your clipboard and paste it in your TeX editor because the transformation to the local encoding of your LaTeX file is done on the fly, but if your output is a file, that file will be ISO-8859-1 encoded. And you will have difficulties to mix words from East European languages as well as Russian, Arabic and Asian languages. Older TeX (1982) and even pdfTeX are not able to mix 'naturally' various languages like this wiki is able to do. Only XeTeX as well LuaTeX are able to do it. You are encouraged to use these engines instead of pdfTeX. Don't worry XeTeX and LuaTeX are outputting PDF formats by default and no more the old DVI format.&lt;br /&gt;
&lt;br /&gt;
Thus in order to make UTF-8 the default encoding of Calc2LaTeX (if not set already by a newer version than the current 0.2.4) you can do it during the installation. It is as easy or as difficult as the installation.&lt;br /&gt;
&lt;br /&gt;
Do the previous steps, and then Edit the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; macro. [[Fichier:calc2latex-edit-macro.png|frame|right|400px]] &lt;br /&gt;
then change ISO-8859-1 to UTF-8 and save.[[Fichier:calc2latex-change-main-macro.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
==== Adding the macro in a menu bar ====&lt;br /&gt;
:Once you verified that the macro is running, it can be more convenient to add it to a menu bar. :Therefore select View =&amp;gt; Toolbar =&amp;gt; Customize then choose (for example) the &amp;lt;tt&amp;gt;Standard&amp;lt;/tt&amp;gt; menu and scroll down to (after &amp;quot;New&amp;quot;, &amp;quot;Open&amp;quot;, &amp;quot;Save&amp;quot;, &amp;quot;Save as&amp;quot; etc.) &amp;quot;Export to pdf&amp;quot; and click &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt;. :Then select OpenOffice Macros, and Calc2latex (twice) in order to attach the &amp;lt;tt&amp;gt;Main&amp;lt;/tt&amp;gt; subroutine to the menu bar. [[Fichier:calc2latex-add-to-menubar.png|thumb|right|400px]]&lt;br /&gt;
:In a second step, instead of &amp;lt;tt&amp;gt;Add&amp;lt;/tt&amp;gt; you can click on &amp;lt;tt&amp;gt;Modify&amp;lt;/tt&amp;gt; in order to rename the name of the macro to be displayed by &amp;quot;Selection to LaTeX table&amp;quot; (or similar) instead of &amp;quot;Main&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:At last, you can add an icon such as this one [[Fichier:latex-table.png]] (right-click and save the image on your hard disk) by clicking on import [[Fichier:calc2latex-add-icon.png|frame|right|400px]]&lt;br /&gt;
and import&lt;br /&gt;
[[Fichier:calc2latex-import-icon.png|frame|right|400px]]&lt;br /&gt;
then it will display like this and after selecting contiguous cells you can click and the new icon.&lt;br /&gt;
[[Fichier:calc2latex-show-latex-icon.png|frame|right|400px]]&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
== Gnuplot (***)==&lt;br /&gt;
== Xfig (****)==&lt;br /&gt;
Linux and OS/X only!!!&lt;br /&gt;
&lt;br /&gt;
== Inkscape (***)==&lt;br /&gt;
&lt;br /&gt;
== IPE 7 (**)==&lt;br /&gt;
&lt;br /&gt;
See the wiki specific to ipe users http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7 as well as the official site http://ipe7.sourceforge.net/ and documentation at http://ipe7.sourceforge.net/manual/manual.pdf .&lt;br /&gt;
&lt;br /&gt;
For OS/X you can get an Ipe.app since version 7.1.1&lt;br /&gt;
&lt;br /&gt;
== Geogebra (**)==&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom||Introduction}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=468</id>
		<title>LaTeX/Bibliography Management</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=468"/>
				<updated>2011-08-17T07:49:23Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Demographic reviews */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded system ==&lt;br /&gt;
&lt;br /&gt;
If you are writing only one or two documents and aren't planning on writing more on the same subject for a long time, maybe you don't want to waste time creating a database of references you are never going to use. In this case you should consider using the basic and simple bibliography support that is embedded within LaTeX.&lt;br /&gt;
&lt;br /&gt;
LaTeX provides an environment called &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; that you have to use where you want the bibliography; that usually means at the very end of your document, just before the &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; command. Here is a practical example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
The \LaTeX system~\cite{lamport94} is set of macros for the \TeX engine.&lt;br /&gt;
&lt;br /&gt;
\begin{thebibliography}{9}&lt;br /&gt;
 \bibitem{lamport94}&lt;br /&gt;
  Leslie Lamport,&lt;br /&gt;
  \emph{\LaTeX: A Document Preparation System}.&lt;br /&gt;
  Addison Wesley, Massachusetts,&lt;br /&gt;
  2nd Edition,&lt;br /&gt;
  1994.&lt;br /&gt;
\end{thebibliography}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will be displayed with numbered references:&lt;br /&gt;
::The LaTeX system [1] is set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
Now if you add an optional argument to bibitem (&amp;lt;tt&amp;gt;\bibitem[(Lamport 1994)]{lamport94}&amp;lt;/tt&amp;gt;, it will be used both in the text as well as in the bibliography.&lt;br /&gt;
::The LaTeX system (Lamport 1994) is a set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
OK, so what is going on here? The first thing to notice is the establishment of the environment. &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; is a keyword that LaTeX recognizes as everything between the begin and end tags as being data for the bibliography. The optional argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that it is not a literal parameter, i.e the number 9 in this case, but a text width. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in width, which means no more than nine references in total. If you want more than ten, then input a two-digit number, such as '99' which permits fewer than 100 references.&lt;br /&gt;
&lt;br /&gt;
Next is the actual reference entry itself. This is prefixed with the &amp;lt;code&amp;gt;\bibitem{''cite_key''}&amp;lt;/code&amp;gt; command. The ''cite_key'' should be a unique identifier for that particular reference, and is often some sort of mnemonic consisting of any sequence of letters, numbers and punctuation symbols (although not a comma). I often use the surname of the first author, followed by the last two digits of the year (hence ''lamport94''). If that author has produced more than one reference for a given year, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the key is the reference itself. You need to type it as you want it to be presented. I have put the different parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored by LaTeX. I wanted the title to be in italics, so I used the &amp;lt;code&amp;gt;\emph{}&amp;lt;/code&amp;gt; command to achieve this.&lt;br /&gt;
&lt;br /&gt;
== Citations ==&lt;br /&gt;
To actually cite a given document is very easy. Go to the point where you want the citation to appear, and use the following: &amp;lt;code&amp;gt;\cite{''cite_key''}&amp;lt;/code&amp;gt;, where the ''cite_key'' is that of the bibitem you wish to cite. When LaTeX processes the document, the citation will be cross-referenced with the bibitems and replaced with the appropriate number citation. The advantage here, once again, is that LaTeX looks after the numbering for you. If it were totally manual, then adding or removing a reference would be a real chore, as you would have to re-number all the citations by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Instead of WYSIWYG editors, typesetting systems like \TeX{} or \LaTeX{} \cite{lamport94} can be used.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Referring More Specific ===&lt;br /&gt;
Sometimes you want to refer to a certain page, figure or theorem in a text book. For that you can use the arguments to the &amp;lt;code&amp;gt;\cite&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite[p.~215]{citation01}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument, &amp;quot;p. 215&amp;quot;, will show up inside the same brackets. Note the tilde in [p.~215], which replaces the end-of-sentence spacing with a non-breakable inter-word space. There are two reasons: end-of-sentence spacing is too wide, and &amp;quot;p.&amp;quot; should not be separated from the page number.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Citations ===&lt;br /&gt;
&lt;br /&gt;
When a sequence of multiple citations are needed, you should use a single &amp;lt;code&amp;gt;\cite{}&amp;lt;/code&amp;gt; command. The citations are then separated by commas. Note that you must not use spaces between the citations. Here's an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite{citation01,citation02,citation03}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result will then be shown as citations inside the same brackets.&lt;br /&gt;
&lt;br /&gt;
=== No Cite ===&lt;br /&gt;
&lt;br /&gt;
If you only want a reference to appear in the bibliography, but not where it is referenced in the main text, then the &amp;lt;code&amp;gt;\nocite{}&amp;lt;/code&amp;gt; command can be used, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Lamport showed in 1995 something...  \nocite{lamport95}.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A special version of the command, &amp;lt;code&amp;gt;\nocite{*}&amp;lt;/code&amp;gt;, includes all entries from the database, whether they are referenced in the document or not.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BibTeX ==&lt;br /&gt;
The bibliography which is contained within the &amp;lt;tt&amp;gt;\begin{thebibliography}&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\end{thebibliography}&amp;lt;/tt&amp;gt; can be generated automatically by a specific engine, the so-called BibTeX engine. &lt;br /&gt;
&lt;br /&gt;
In fact, &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; is able to read the cite keys which have been referenced in the text by &amp;lt;tt&amp;gt;\cite{cite_key}&amp;lt;/tt&amp;gt;, and to generate the formatted bibliography by accessing to the complete reference (title, authors, year, journal etc.) which is stored with other references in a &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography file. The name of the bibliography file(s) are given as arguments of the command &amp;lt;tt&amp;gt;\bibliography{aids,disability}&amp;lt;/tt&amp;gt; which also stipulates where the bibliography section must start.&lt;br /&gt;
&lt;br /&gt;
A specific bibliography style (.bst files) can be specified by the order &amp;lt;tt&amp;gt;\bibliographystyle{apalike}&amp;lt;/tt&amp;gt; if you like the apa style.&lt;br /&gt;
&lt;br /&gt;
Once the LaTeX command is run on the latex file, say &amp;lt;tt&amp;gt;latex foo.tex&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;latex foo&amp;lt;/tt&amp;gt;), references as well as styles and bibliography files names, are stored in an ''auxiliary file'' named &amp;lt;tt&amp;gt;foo.aux&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The action of the &amp;lt;tt&amp;gt;bibtex foo.aux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bibtex foo&amp;lt;/tt&amp;gt; command is to read the .aux file, and scan for any citation while fetching the complete reference in the bibliography databases. The output is a file named &amp;lt;tt&amp;gt;foo.bbl&amp;lt;/tt&amp;gt; which corresponds to the thebibliography environment.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;latex&amp;lt;/tt&amp;gt; is run a second time, the .bbl file is incorporated into the PDF output file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Using a specific BibTeX file to create a bibliography ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create a BibTeX file ====&lt;br /&gt;
&lt;br /&gt;
You can put all your references into a separate file. Save them in a .bib (as &amp;quot;mybiblio.bib&amp;quot; ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the ''Vikat2007'' article starts with the &amp;lt;tt&amp;gt;@article{Vikat2007,&amp;lt;/tt&amp;gt; and ends with right bracket. A second article is then described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
@article{Vikat2007,&lt;br /&gt;
	Author = {Solaz, A.},&lt;br /&gt;
	Doi = {10.4054/DemRes.2007.17.14},&lt;br /&gt;
	Journal = {Demographic Research},&lt;br /&gt;
	Number = {14},&lt;br /&gt;
	Pages = {389-440},&lt;br /&gt;
	Title = {Generation and Gender Survey (GGS): Towards a better understanding of relationships and processes in the life course},&lt;br /&gt;
	Volume = {17},&lt;br /&gt;
	Year = {2007},&lt;br /&gt;
	Bdsk-Url-1 = {http://dx.doi.org/10.4054/DemRes.2007.17.14}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@article{Régnier-Loilier2006,&lt;br /&gt;
author = {Régnier-Loilier, A.},&lt;br /&gt;
title= {How often do adult children see their parents?},&lt;br /&gt;
year = {2006},&lt;br /&gt;
URL = {http://www.ined.fr/fichier/t_publication/1211/publi_pdf2_pop.and.soc.english.427.pdf},&lt;br /&gt;
journal = {Population &amp;amp; Societies},&lt;br /&gt;
volume = {427},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's &amp;lt;tt&amp;gt;URL&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;doi&amp;lt;/tt&amp;gt; did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX.&lt;br /&gt;
&lt;br /&gt;
You can also add your own field.&lt;br /&gt;
&lt;br /&gt;
It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields.&lt;br /&gt;
&lt;br /&gt;
It can be a software like &amp;lt;tt&amp;gt;jabref&amp;lt;/tt&amp;gt; which will be discussed later as well as Web services like &amp;lt;tt&amp;gt;Zotero&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Mendeley&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Bibsonomy&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Standard templates===&lt;br /&gt;
Usually BibTeX templates are inserted on request by your text editor into your .bib file and can be filled, tested for integrity (a missing parenthesis?) and cleaned by specific commands. &lt;br /&gt;
 &lt;br /&gt;
;@article : An article from a magazine or a journal.&lt;br /&gt;
:*Required fields: author, title, journal, year.&lt;br /&gt;
:*Optional fields: volume, number, pages, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@article{Xarticle,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    journal   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@book : A published book&lt;br /&gt;
:*Required fields: author/editor, title, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, address, edition, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@book{Xbook,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    publisher = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    %edition  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@booklet : A bound work without a named publisher or sponsor.&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, howpublished, address, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@booklet{Xbooklet,&lt;br /&gt;
    %author   = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@conference : Equal to inproceedings&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@conference{Xconference,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    booktitle = &amp;quot;&amp;quot;,&lt;br /&gt;
    %editor   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %publisher= &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@inbook : A section of a book ''without'' its own title.&lt;br /&gt;
:*Required fields: author/editor, booktitle, chapter and/or pages, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, type, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@incollection : A section of a book having its own title.&lt;br /&gt;
:*Required fields: author, title, booktitle, publisher, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@inproceedings : An article in a conference proceedings.&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@manual : Technical manual&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, organization, address, edition, month, year, note.&lt;br /&gt;
&lt;br /&gt;
;@mastersthesis : Master's thesis&lt;br /&gt;
:*Required fields: author, title, school, year.&lt;br /&gt;
:*Optional fields: type (eg. &amp;quot;diploma thesis&amp;quot;), address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@mastersthesis{Xthesis,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    school    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;diploma thesis&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@misc : Template useful for other kinds of publication&lt;br /&gt;
:*Required fields: none&lt;br /&gt;
:*Optional fields: author, title, howpublished, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@misc{Xmisc,&lt;br /&gt;
    %author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished = &amp;quot;&amp;quot;,&lt;br /&gt;
    %year     = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@phdthesis : Ph.D. thesis&lt;br /&gt;
:*Required fields: author, title, year, school.&lt;br /&gt;
:*Optional fields: address, month, keywords, note.&lt;br /&gt;
&lt;br /&gt;
;@proceedings : The proceedings of a conference.&lt;br /&gt;
:*Required fields: title, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@techreport : Technical report from educational, commercial or standardization institution.&lt;br /&gt;
:*Required fields: author, title, institution, year.&lt;br /&gt;
:*Optional fields: type, number, address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@techreport{Xtreport,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    institution = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;&amp;quot;, &lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@unpublished : An unpublished article, book, thesis, etc.&lt;br /&gt;
:*Required fields: author, title, note.&lt;br /&gt;
:*Optional fields: month, year.&lt;br /&gt;
&lt;br /&gt;
== BiBTeX styles for reviews ==&lt;br /&gt;
=== Economic reviews ===&lt;br /&gt;
You can access to some bibliographic styles specific to economic reviews at the URL&lt;br /&gt;
http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic&lt;br /&gt;
&lt;br /&gt;
The README file should be read first. &lt;br /&gt;
&lt;br /&gt;
For the springer journals, you can access to the ''Instruction for authors'' at the following URL:&lt;br /&gt;
http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip?SGWID=0-0-45-468198-0&lt;br /&gt;
&lt;br /&gt;
=== Demographic reviews ===&lt;br /&gt;
&lt;br /&gt;
For Mathematical Population Studies the [http://www.tandf.co.uk/journals/journal.asp?issn=0889-8480&amp;amp;linktype=44 style for the bibliography] seems to be similar to the ''apa'' style. But in order to use the command &amp;lt;tt&amp;gt;\bibliographystyle{apa}&amp;lt;/tt&amp;gt; you also need to add the ''natbib'' package. The [http://merkel.zoneo.net/Latex/natbib.php natbib] package completely reimplements the &amp;lt;tt&amp;gt;cite&amp;lt;/tt&amp;gt; command and introduces new useful commands two basic citation commands, &amp;lt;tt&amp;gt;\citet&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\citep&amp;lt;/tt&amp;gt; for textual and parenthetical citations, respectively. There also exist the starred versions &amp;lt;tt&amp;gt;\citet*&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\citep*&amp;lt;/tt&amp;gt; that print the full author list, and not just the abbreviated one. All of these may take one or two optional arguments to add some text before and after the citation.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command&lt;br /&gt;
! &lt;br /&gt;
! Output&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet{jon90}&amp;lt;/tt&amp;gt;	   || --&amp;gt;||    	Jones et al. (1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet[chap. 2]{jon90}&amp;lt;/tt&amp;gt;	||    --&amp;gt;||    	Jones et al. (1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||    	(Jones et al., 1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[chap. 2]{jon90}	&amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	(Jones et al., 1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[see][]{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||        	(see Jones et al., 1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[see][chap. 2]{jon90}	&amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	(see Jones et al., 1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet*{jon90}	    &amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	Jones, Baker, and Williams (1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep*{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||     	(Jones, Baker, and Williams, 1990)&lt;br /&gt;
|}&lt;br /&gt;
You can have a numerical style as well as suppressing parentheses etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
 \usepackage{natbib} &lt;br /&gt;
 \bibliographystyle{apa}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 \bibliography{mydemographicbiblio}&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using JabRef to manage your bibliography ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;JabRef&amp;lt;/tt&amp;gt; is an open source bibliography reference manager written in Java. It lets you manage your &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography files as well as fetch references on many public like Medline or private like Jstor or Science direct databases on the Internet.&lt;br /&gt;
&lt;br /&gt;
Once you clicked on Jabref, you need to open a new .bib file in order to start fetching.&lt;br /&gt;
=== Fetching Medline ===&lt;br /&gt;
&lt;br /&gt;
MEDLINE is the U.S. National Library of Medicine's premier bibliographic database. It contains references to journal articles in life sciences with a concentration on biomedicine.&lt;br /&gt;
&lt;br /&gt;
JabRef can download citations from the Medline database. To use this feature, choose Web search -&amp;gt; Fetch Medline, and the Medline interface will appear in the side pane.&lt;br /&gt;
&lt;br /&gt;
There are two ways of specifying which entries to download:&lt;br /&gt;
:Enter one or more Medline IDs (separated by comma/semicolon) in the text field.&lt;br /&gt;
:Enter a set of names and/or words to search for. You can use the operators &amp;lt;tt&amp;gt;and&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;or&amp;lt;/tt&amp;gt; and parentheses to refine your search expression.&lt;br /&gt;
:Examples:&lt;br /&gt;
::Brouard [au] AND Pontone [au]&lt;br /&gt;
::Anderson RM [au] HIV [ti]&lt;br /&gt;
::Valleron [au] 1988:2000[dp] HIV [ti]&lt;br /&gt;
::Valleron [au] AND 1987:2000[dp] AND (AIDS [ti] OR HIV[ti])&lt;br /&gt;
::Anderson [au] AND Nature [ta]&lt;br /&gt;
::Population [ta]&lt;br /&gt;
&lt;br /&gt;
In both cases, press &amp;lt;tt&amp;gt;Enter&amp;lt;/tt&amp;gt; or the &amp;lt;tt&amp;gt;Fetch&amp;lt;/tt&amp;gt; button. &lt;br /&gt;
&lt;br /&gt;
If you use a text search, you will be prompted with the number of entries found, and given a choice of how many to download. They are usually numerous and you can limit your selection by specifying an author &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[au]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; a title &amp;lt;tt&amp;gt;ti&amp;lt;/tt&amp;gt;, a date of publication &amp;lt;tt&amp;gt;dp&amp;lt;/tt&amp;gt; or a journal &amp;lt;tt&amp;gt;ta&amp;lt;/tt&amp;gt; as well as any other descriptor of Medline.&lt;br /&gt;
&lt;br /&gt;
Within your new window including the result of your selection, you can refine by examining each entry and selecting/unselecting them.&lt;br /&gt;
&lt;br /&gt;
The entries fetched and selected will be added to your currently active database. &lt;br /&gt;
&lt;br /&gt;
=== Examining the BibTeX field of a reference ===&lt;br /&gt;
An important feature of Jabref is to verify the source code of a reference, by clicking on BibTeX -&amp;gt; Edit entry (or CTRL_e on Windows and cmd_e on OS/X). A BibTeX key, just after &amp;lt;tt&amp;gt;@article{,&amp;lt;/tt&amp;gt; must not be empty. Please fill it: &amp;lt;tt&amp;gt;@article{Anderson-May-Nature,&amp;lt;/tt&amp;gt; or ask jabref to generate once (you can speficify to jabref how to create bibtex keys in your preferences. You can also verify by clicking on the &amp;lt;tt&amp;gt;Required fields&amp;lt;/tt&amp;gt; that they are all filled otherwise the &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; program will complain.&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;General&amp;lt;/tt&amp;gt; tab you can look at the &amp;lt;tt&amp;gt;File&amp;lt;/tt&amp;gt; row and click on the + in order to let you access the pdf file (stored on your hard disk) corresponding to the article.&lt;br /&gt;
&lt;br /&gt;
[[File:Jabref-fetch.png|right|Jabref, fetching Medline and editing an Inproceeding text.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Insert your BiBTeX file into your main file ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You just need to insert into your main LaTeX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can choose a specific style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliographystyle{econometrica-fr}&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Bottom|Presentations|Tables}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=467</id>
		<title>LaTeX/Bibliography Management</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=467"/>
				<updated>2011-08-17T07:48:09Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* BiBTeX styles for reviews */ natbib package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded system ==&lt;br /&gt;
&lt;br /&gt;
If you are writing only one or two documents and aren't planning on writing more on the same subject for a long time, maybe you don't want to waste time creating a database of references you are never going to use. In this case you should consider using the basic and simple bibliography support that is embedded within LaTeX.&lt;br /&gt;
&lt;br /&gt;
LaTeX provides an environment called &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; that you have to use where you want the bibliography; that usually means at the very end of your document, just before the &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; command. Here is a practical example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
The \LaTeX system~\cite{lamport94} is set of macros for the \TeX engine.&lt;br /&gt;
&lt;br /&gt;
\begin{thebibliography}{9}&lt;br /&gt;
 \bibitem{lamport94}&lt;br /&gt;
  Leslie Lamport,&lt;br /&gt;
  \emph{\LaTeX: A Document Preparation System}.&lt;br /&gt;
  Addison Wesley, Massachusetts,&lt;br /&gt;
  2nd Edition,&lt;br /&gt;
  1994.&lt;br /&gt;
\end{thebibliography}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will be displayed with numbered references:&lt;br /&gt;
::The LaTeX system [1] is set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
Now if you add an optional argument to bibitem (&amp;lt;tt&amp;gt;\bibitem[(Lamport 1994)]{lamport94}&amp;lt;/tt&amp;gt;, it will be used both in the text as well as in the bibliography.&lt;br /&gt;
::The LaTeX system (Lamport 1994) is a set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
OK, so what is going on here? The first thing to notice is the establishment of the environment. &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; is a keyword that LaTeX recognizes as everything between the begin and end tags as being data for the bibliography. The optional argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that it is not a literal parameter, i.e the number 9 in this case, but a text width. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in width, which means no more than nine references in total. If you want more than ten, then input a two-digit number, such as '99' which permits fewer than 100 references.&lt;br /&gt;
&lt;br /&gt;
Next is the actual reference entry itself. This is prefixed with the &amp;lt;code&amp;gt;\bibitem{''cite_key''}&amp;lt;/code&amp;gt; command. The ''cite_key'' should be a unique identifier for that particular reference, and is often some sort of mnemonic consisting of any sequence of letters, numbers and punctuation symbols (although not a comma). I often use the surname of the first author, followed by the last two digits of the year (hence ''lamport94''). If that author has produced more than one reference for a given year, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the key is the reference itself. You need to type it as you want it to be presented. I have put the different parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored by LaTeX. I wanted the title to be in italics, so I used the &amp;lt;code&amp;gt;\emph{}&amp;lt;/code&amp;gt; command to achieve this.&lt;br /&gt;
&lt;br /&gt;
== Citations ==&lt;br /&gt;
To actually cite a given document is very easy. Go to the point where you want the citation to appear, and use the following: &amp;lt;code&amp;gt;\cite{''cite_key''}&amp;lt;/code&amp;gt;, where the ''cite_key'' is that of the bibitem you wish to cite. When LaTeX processes the document, the citation will be cross-referenced with the bibitems and replaced with the appropriate number citation. The advantage here, once again, is that LaTeX looks after the numbering for you. If it were totally manual, then adding or removing a reference would be a real chore, as you would have to re-number all the citations by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Instead of WYSIWYG editors, typesetting systems like \TeX{} or \LaTeX{} \cite{lamport94} can be used.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Referring More Specific ===&lt;br /&gt;
Sometimes you want to refer to a certain page, figure or theorem in a text book. For that you can use the arguments to the &amp;lt;code&amp;gt;\cite&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite[p.~215]{citation01}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument, &amp;quot;p. 215&amp;quot;, will show up inside the same brackets. Note the tilde in [p.~215], which replaces the end-of-sentence spacing with a non-breakable inter-word space. There are two reasons: end-of-sentence spacing is too wide, and &amp;quot;p.&amp;quot; should not be separated from the page number.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Citations ===&lt;br /&gt;
&lt;br /&gt;
When a sequence of multiple citations are needed, you should use a single &amp;lt;code&amp;gt;\cite{}&amp;lt;/code&amp;gt; command. The citations are then separated by commas. Note that you must not use spaces between the citations. Here's an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite{citation01,citation02,citation03}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result will then be shown as citations inside the same brackets.&lt;br /&gt;
&lt;br /&gt;
=== No Cite ===&lt;br /&gt;
&lt;br /&gt;
If you only want a reference to appear in the bibliography, but not where it is referenced in the main text, then the &amp;lt;code&amp;gt;\nocite{}&amp;lt;/code&amp;gt; command can be used, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Lamport showed in 1995 something...  \nocite{lamport95}.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A special version of the command, &amp;lt;code&amp;gt;\nocite{*}&amp;lt;/code&amp;gt;, includes all entries from the database, whether they are referenced in the document or not.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BibTeX ==&lt;br /&gt;
The bibliography which is contained within the &amp;lt;tt&amp;gt;\begin{thebibliography}&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\end{thebibliography}&amp;lt;/tt&amp;gt; can be generated automatically by a specific engine, the so-called BibTeX engine. &lt;br /&gt;
&lt;br /&gt;
In fact, &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; is able to read the cite keys which have been referenced in the text by &amp;lt;tt&amp;gt;\cite{cite_key}&amp;lt;/tt&amp;gt;, and to generate the formatted bibliography by accessing to the complete reference (title, authors, year, journal etc.) which is stored with other references in a &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography file. The name of the bibliography file(s) are given as arguments of the command &amp;lt;tt&amp;gt;\bibliography{aids,disability}&amp;lt;/tt&amp;gt; which also stipulates where the bibliography section must start.&lt;br /&gt;
&lt;br /&gt;
A specific bibliography style (.bst files) can be specified by the order &amp;lt;tt&amp;gt;\bibliographystyle{apalike}&amp;lt;/tt&amp;gt; if you like the apa style.&lt;br /&gt;
&lt;br /&gt;
Once the LaTeX command is run on the latex file, say &amp;lt;tt&amp;gt;latex foo.tex&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;latex foo&amp;lt;/tt&amp;gt;), references as well as styles and bibliography files names, are stored in an ''auxiliary file'' named &amp;lt;tt&amp;gt;foo.aux&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The action of the &amp;lt;tt&amp;gt;bibtex foo.aux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bibtex foo&amp;lt;/tt&amp;gt; command is to read the .aux file, and scan for any citation while fetching the complete reference in the bibliography databases. The output is a file named &amp;lt;tt&amp;gt;foo.bbl&amp;lt;/tt&amp;gt; which corresponds to the thebibliography environment.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;latex&amp;lt;/tt&amp;gt; is run a second time, the .bbl file is incorporated into the PDF output file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Using a specific BibTeX file to create a bibliography ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create a BibTeX file ====&lt;br /&gt;
&lt;br /&gt;
You can put all your references into a separate file. Save them in a .bib (as &amp;quot;mybiblio.bib&amp;quot; ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the ''Vikat2007'' article starts with the &amp;lt;tt&amp;gt;@article{Vikat2007,&amp;lt;/tt&amp;gt; and ends with right bracket. A second article is then described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
@article{Vikat2007,&lt;br /&gt;
	Author = {Solaz, A.},&lt;br /&gt;
	Doi = {10.4054/DemRes.2007.17.14},&lt;br /&gt;
	Journal = {Demographic Research},&lt;br /&gt;
	Number = {14},&lt;br /&gt;
	Pages = {389-440},&lt;br /&gt;
	Title = {Generation and Gender Survey (GGS): Towards a better understanding of relationships and processes in the life course},&lt;br /&gt;
	Volume = {17},&lt;br /&gt;
	Year = {2007},&lt;br /&gt;
	Bdsk-Url-1 = {http://dx.doi.org/10.4054/DemRes.2007.17.14}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@article{Régnier-Loilier2006,&lt;br /&gt;
author = {Régnier-Loilier, A.},&lt;br /&gt;
title= {How often do adult children see their parents?},&lt;br /&gt;
year = {2006},&lt;br /&gt;
URL = {http://www.ined.fr/fichier/t_publication/1211/publi_pdf2_pop.and.soc.english.427.pdf},&lt;br /&gt;
journal = {Population &amp;amp; Societies},&lt;br /&gt;
volume = {427},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's &amp;lt;tt&amp;gt;URL&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;doi&amp;lt;/tt&amp;gt; did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX.&lt;br /&gt;
&lt;br /&gt;
You can also add your own field.&lt;br /&gt;
&lt;br /&gt;
It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields.&lt;br /&gt;
&lt;br /&gt;
It can be a software like &amp;lt;tt&amp;gt;jabref&amp;lt;/tt&amp;gt; which will be discussed later as well as Web services like &amp;lt;tt&amp;gt;Zotero&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Mendeley&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Bibsonomy&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Standard templates===&lt;br /&gt;
Usually BibTeX templates are inserted on request by your text editor into your .bib file and can be filled, tested for integrity (a missing parenthesis?) and cleaned by specific commands. &lt;br /&gt;
 &lt;br /&gt;
;@article : An article from a magazine or a journal.&lt;br /&gt;
:*Required fields: author, title, journal, year.&lt;br /&gt;
:*Optional fields: volume, number, pages, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@article{Xarticle,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    journal   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@book : A published book&lt;br /&gt;
:*Required fields: author/editor, title, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, address, edition, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@book{Xbook,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    publisher = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    %edition  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@booklet : A bound work without a named publisher or sponsor.&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, howpublished, address, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@booklet{Xbooklet,&lt;br /&gt;
    %author   = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@conference : Equal to inproceedings&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@conference{Xconference,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    booktitle = &amp;quot;&amp;quot;,&lt;br /&gt;
    %editor   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %publisher= &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@inbook : A section of a book ''without'' its own title.&lt;br /&gt;
:*Required fields: author/editor, booktitle, chapter and/or pages, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, type, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@incollection : A section of a book having its own title.&lt;br /&gt;
:*Required fields: author, title, booktitle, publisher, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@inproceedings : An article in a conference proceedings.&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@manual : Technical manual&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, organization, address, edition, month, year, note.&lt;br /&gt;
&lt;br /&gt;
;@mastersthesis : Master's thesis&lt;br /&gt;
:*Required fields: author, title, school, year.&lt;br /&gt;
:*Optional fields: type (eg. &amp;quot;diploma thesis&amp;quot;), address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@mastersthesis{Xthesis,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    school    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;diploma thesis&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@misc : Template useful for other kinds of publication&lt;br /&gt;
:*Required fields: none&lt;br /&gt;
:*Optional fields: author, title, howpublished, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@misc{Xmisc,&lt;br /&gt;
    %author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished = &amp;quot;&amp;quot;,&lt;br /&gt;
    %year     = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@phdthesis : Ph.D. thesis&lt;br /&gt;
:*Required fields: author, title, year, school.&lt;br /&gt;
:*Optional fields: address, month, keywords, note.&lt;br /&gt;
&lt;br /&gt;
;@proceedings : The proceedings of a conference.&lt;br /&gt;
:*Required fields: title, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@techreport : Technical report from educational, commercial or standardization institution.&lt;br /&gt;
:*Required fields: author, title, institution, year.&lt;br /&gt;
:*Optional fields: type, number, address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@techreport{Xtreport,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    institution = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;&amp;quot;, &lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@unpublished : An unpublished article, book, thesis, etc.&lt;br /&gt;
:*Required fields: author, title, note.&lt;br /&gt;
:*Optional fields: month, year.&lt;br /&gt;
&lt;br /&gt;
== BiBTeX styles for reviews ==&lt;br /&gt;
=== Economic reviews ===&lt;br /&gt;
You can access to some bibliographic styles specific to economic reviews at the URL&lt;br /&gt;
http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic&lt;br /&gt;
&lt;br /&gt;
The README file should be read first. &lt;br /&gt;
&lt;br /&gt;
For the springer journals, you can access to the ''Instruction for authors'' at the following URL:&lt;br /&gt;
http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip?SGWID=0-0-45-468198-0&lt;br /&gt;
&lt;br /&gt;
=== Demographic reviews ===&lt;br /&gt;
&lt;br /&gt;
For Mathematical Population Studies the [http://www.tandf.co.uk/journals/journal.asp?issn=0889-8480&amp;amp;linktype=44 style for the bibliography] seems to be similar to the ''apa'' style. But in order to use the command &amp;lt;tt&amp;gt;\bibliographystyle{apa}&amp;lt;/tt&amp;gt; you also need to add the ''natbib'' package. The [http://merkel.zoneo.net/Latex/natbib.php natbib] package completely reimplements the &amp;lt;tt&amp;gt;cite&amp;lt;/tt&amp;gt; command and introduces new useful commands two basic citation commands, &amp;lt;tt&amp;gt;\citet&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\citep&amp;lt;/tt&amp;gt; for textual and parenthetical citations, respectively. There also exist the starred versions &amp;lt;tt&amp;gt;\citet*&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\citep*&amp;lt;/tt&amp;gt; that print the full author list, and not just the abbreviated one. All of these may take one or two optional arguments to add some text before and after the citation.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command&lt;br /&gt;
! &lt;br /&gt;
! Output&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet{jon90}&amp;lt;/tt&amp;gt;	   || --&amp;gt;||    	Jones et al. (1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet[chap. 2]{jon90}&amp;lt;/tt&amp;gt;	||    --&amp;gt;||    	Jones et al. (1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||    	(Jones et al., 1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[chap. 2]{jon90}	&amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	(Jones et al., 1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[see][]{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||        	(see Jones et al., 1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep[see][chap. 2]{jon90}	&amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	(see Jones et al., 1990, chap. 2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citet*{jon90}	    &amp;lt;/tt&amp;gt;	||    --&amp;gt;||      	Jones, Baker, and Williams (1990)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\citep*{jon90}	 &amp;lt;/tt&amp;gt;	||    --&amp;gt;||     	(Jones, Baker, and Williams, 1990)&lt;br /&gt;
|}&lt;br /&gt;
You can have a numerical style as well as suppressing the parenthesis etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source language=latex&amp;gt;&lt;br /&gt;
 \usepackage{natbib} &lt;br /&gt;
 \bibliographystyle{apa}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 \bibliography{mydemographicbiblio}&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using JabRef to manage your bibliography ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;JabRef&amp;lt;/tt&amp;gt; is an open source bibliography reference manager written in Java. It lets you manage your &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography files as well as fetch references on many public like Medline or private like Jstor or Science direct databases on the Internet.&lt;br /&gt;
&lt;br /&gt;
Once you clicked on Jabref, you need to open a new .bib file in order to start fetching.&lt;br /&gt;
=== Fetching Medline ===&lt;br /&gt;
&lt;br /&gt;
MEDLINE is the U.S. National Library of Medicine's premier bibliographic database. It contains references to journal articles in life sciences with a concentration on biomedicine.&lt;br /&gt;
&lt;br /&gt;
JabRef can download citations from the Medline database. To use this feature, choose Web search -&amp;gt; Fetch Medline, and the Medline interface will appear in the side pane.&lt;br /&gt;
&lt;br /&gt;
There are two ways of specifying which entries to download:&lt;br /&gt;
:Enter one or more Medline IDs (separated by comma/semicolon) in the text field.&lt;br /&gt;
:Enter a set of names and/or words to search for. You can use the operators &amp;lt;tt&amp;gt;and&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;or&amp;lt;/tt&amp;gt; and parentheses to refine your search expression.&lt;br /&gt;
:Examples:&lt;br /&gt;
::Brouard [au] AND Pontone [au]&lt;br /&gt;
::Anderson RM [au] HIV [ti]&lt;br /&gt;
::Valleron [au] 1988:2000[dp] HIV [ti]&lt;br /&gt;
::Valleron [au] AND 1987:2000[dp] AND (AIDS [ti] OR HIV[ti])&lt;br /&gt;
::Anderson [au] AND Nature [ta]&lt;br /&gt;
::Population [ta]&lt;br /&gt;
&lt;br /&gt;
In both cases, press &amp;lt;tt&amp;gt;Enter&amp;lt;/tt&amp;gt; or the &amp;lt;tt&amp;gt;Fetch&amp;lt;/tt&amp;gt; button. &lt;br /&gt;
&lt;br /&gt;
If you use a text search, you will be prompted with the number of entries found, and given a choice of how many to download. They are usually numerous and you can limit your selection by specifying an author &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[au]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; a title &amp;lt;tt&amp;gt;ti&amp;lt;/tt&amp;gt;, a date of publication &amp;lt;tt&amp;gt;dp&amp;lt;/tt&amp;gt; or a journal &amp;lt;tt&amp;gt;ta&amp;lt;/tt&amp;gt; as well as any other descriptor of Medline.&lt;br /&gt;
&lt;br /&gt;
Within your new window including the result of your selection, you can refine by examining each entry and selecting/unselecting them.&lt;br /&gt;
&lt;br /&gt;
The entries fetched and selected will be added to your currently active database. &lt;br /&gt;
&lt;br /&gt;
=== Examining the BibTeX field of a reference ===&lt;br /&gt;
An important feature of Jabref is to verify the source code of a reference, by clicking on BibTeX -&amp;gt; Edit entry (or CTRL_e on Windows and cmd_e on OS/X). A BibTeX key, just after &amp;lt;tt&amp;gt;@article{,&amp;lt;/tt&amp;gt; must not be empty. Please fill it: &amp;lt;tt&amp;gt;@article{Anderson-May-Nature,&amp;lt;/tt&amp;gt; or ask jabref to generate once (you can speficify to jabref how to create bibtex keys in your preferences. You can also verify by clicking on the &amp;lt;tt&amp;gt;Required fields&amp;lt;/tt&amp;gt; that they are all filled otherwise the &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; program will complain.&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;General&amp;lt;/tt&amp;gt; tab you can look at the &amp;lt;tt&amp;gt;File&amp;lt;/tt&amp;gt; row and click on the + in order to let you access the pdf file (stored on your hard disk) corresponding to the article.&lt;br /&gt;
&lt;br /&gt;
[[File:Jabref-fetch.png|right|Jabref, fetching Medline and editing an Inproceeding text.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Insert your BiBTeX file into your main file ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You just need to insert into your main LaTeX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can choose a specific style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliographystyle{econometrica-fr}&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Bottom|Presentations|Tables}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=466</id>
		<title>LaTeX/Bibliography Management</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=466"/>
				<updated>2011-08-17T07:24:50Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Standard templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded system ==&lt;br /&gt;
&lt;br /&gt;
If you are writing only one or two documents and aren't planning on writing more on the same subject for a long time, maybe you don't want to waste time creating a database of references you are never going to use. In this case you should consider using the basic and simple bibliography support that is embedded within LaTeX.&lt;br /&gt;
&lt;br /&gt;
LaTeX provides an environment called &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; that you have to use where you want the bibliography; that usually means at the very end of your document, just before the &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; command. Here is a practical example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
The \LaTeX system~\cite{lamport94} is set of macros for the \TeX engine.&lt;br /&gt;
&lt;br /&gt;
\begin{thebibliography}{9}&lt;br /&gt;
 \bibitem{lamport94}&lt;br /&gt;
  Leslie Lamport,&lt;br /&gt;
  \emph{\LaTeX: A Document Preparation System}.&lt;br /&gt;
  Addison Wesley, Massachusetts,&lt;br /&gt;
  2nd Edition,&lt;br /&gt;
  1994.&lt;br /&gt;
\end{thebibliography}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will be displayed with numbered references:&lt;br /&gt;
::The LaTeX system [1] is set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
Now if you add an optional argument to bibitem (&amp;lt;tt&amp;gt;\bibitem[(Lamport 1994)]{lamport94}&amp;lt;/tt&amp;gt;, it will be used both in the text as well as in the bibliography.&lt;br /&gt;
::The LaTeX system (Lamport 1994) is a set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
OK, so what is going on here? The first thing to notice is the establishment of the environment. &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; is a keyword that LaTeX recognizes as everything between the begin and end tags as being data for the bibliography. The optional argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that it is not a literal parameter, i.e the number 9 in this case, but a text width. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in width, which means no more than nine references in total. If you want more than ten, then input a two-digit number, such as '99' which permits fewer than 100 references.&lt;br /&gt;
&lt;br /&gt;
Next is the actual reference entry itself. This is prefixed with the &amp;lt;code&amp;gt;\bibitem{''cite_key''}&amp;lt;/code&amp;gt; command. The ''cite_key'' should be a unique identifier for that particular reference, and is often some sort of mnemonic consisting of any sequence of letters, numbers and punctuation symbols (although not a comma). I often use the surname of the first author, followed by the last two digits of the year (hence ''lamport94''). If that author has produced more than one reference for a given year, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the key is the reference itself. You need to type it as you want it to be presented. I have put the different parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored by LaTeX. I wanted the title to be in italics, so I used the &amp;lt;code&amp;gt;\emph{}&amp;lt;/code&amp;gt; command to achieve this.&lt;br /&gt;
&lt;br /&gt;
== Citations ==&lt;br /&gt;
To actually cite a given document is very easy. Go to the point where you want the citation to appear, and use the following: &amp;lt;code&amp;gt;\cite{''cite_key''}&amp;lt;/code&amp;gt;, where the ''cite_key'' is that of the bibitem you wish to cite. When LaTeX processes the document, the citation will be cross-referenced with the bibitems and replaced with the appropriate number citation. The advantage here, once again, is that LaTeX looks after the numbering for you. If it were totally manual, then adding or removing a reference would be a real chore, as you would have to re-number all the citations by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Instead of WYSIWYG editors, typesetting systems like \TeX{} or \LaTeX{} \cite{lamport94} can be used.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Referring More Specific ===&lt;br /&gt;
Sometimes you want to refer to a certain page, figure or theorem in a text book. For that you can use the arguments to the &amp;lt;code&amp;gt;\cite&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite[p.~215]{citation01}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument, &amp;quot;p. 215&amp;quot;, will show up inside the same brackets. Note the tilde in [p.~215], which replaces the end-of-sentence spacing with a non-breakable inter-word space. There are two reasons: end-of-sentence spacing is too wide, and &amp;quot;p.&amp;quot; should not be separated from the page number.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Citations ===&lt;br /&gt;
&lt;br /&gt;
When a sequence of multiple citations are needed, you should use a single &amp;lt;code&amp;gt;\cite{}&amp;lt;/code&amp;gt; command. The citations are then separated by commas. Note that you must not use spaces between the citations. Here's an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite{citation01,citation02,citation03}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result will then be shown as citations inside the same brackets.&lt;br /&gt;
&lt;br /&gt;
=== No Cite ===&lt;br /&gt;
&lt;br /&gt;
If you only want a reference to appear in the bibliography, but not where it is referenced in the main text, then the &amp;lt;code&amp;gt;\nocite{}&amp;lt;/code&amp;gt; command can be used, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Lamport showed in 1995 something...  \nocite{lamport95}.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A special version of the command, &amp;lt;code&amp;gt;\nocite{*}&amp;lt;/code&amp;gt;, includes all entries from the database, whether they are referenced in the document or not.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BibTeX ==&lt;br /&gt;
The bibliography which is contained within the &amp;lt;tt&amp;gt;\begin{thebibliography}&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\end{thebibliography}&amp;lt;/tt&amp;gt; can be generated automatically by a specific engine, the so-called BibTeX engine. &lt;br /&gt;
&lt;br /&gt;
In fact, &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; is able to read the cite keys which have been referenced in the text by &amp;lt;tt&amp;gt;\cite{cite_key}&amp;lt;/tt&amp;gt;, and to generate the formatted bibliography by accessing to the complete reference (title, authors, year, journal etc.) which is stored with other references in a &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography file. The name of the bibliography file(s) are given as arguments of the command &amp;lt;tt&amp;gt;\bibliography{aids,disability}&amp;lt;/tt&amp;gt; which also stipulates where the bibliography section must start.&lt;br /&gt;
&lt;br /&gt;
A specific bibliography style (.bst files) can be specified by the order &amp;lt;tt&amp;gt;\bibliographystyle{apalike}&amp;lt;/tt&amp;gt; if you like the apa style.&lt;br /&gt;
&lt;br /&gt;
Once the LaTeX command is run on the latex file, say &amp;lt;tt&amp;gt;latex foo.tex&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;latex foo&amp;lt;/tt&amp;gt;), references as well as styles and bibliography files names, are stored in an ''auxiliary file'' named &amp;lt;tt&amp;gt;foo.aux&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The action of the &amp;lt;tt&amp;gt;bibtex foo.aux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bibtex foo&amp;lt;/tt&amp;gt; command is to read the .aux file, and scan for any citation while fetching the complete reference in the bibliography databases. The output is a file named &amp;lt;tt&amp;gt;foo.bbl&amp;lt;/tt&amp;gt; which corresponds to the thebibliography environment.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;latex&amp;lt;/tt&amp;gt; is run a second time, the .bbl file is incorporated into the PDF output file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Using a specific BibTeX file to create a bibliography ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create a BibTeX file ====&lt;br /&gt;
&lt;br /&gt;
You can put all your references into a separate file. Save them in a .bib (as &amp;quot;mybiblio.bib&amp;quot; ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the ''Vikat2007'' article starts with the &amp;lt;tt&amp;gt;@article{Vikat2007,&amp;lt;/tt&amp;gt; and ends with right bracket. A second article is then described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
@article{Vikat2007,&lt;br /&gt;
	Author = {Solaz, A.},&lt;br /&gt;
	Doi = {10.4054/DemRes.2007.17.14},&lt;br /&gt;
	Journal = {Demographic Research},&lt;br /&gt;
	Number = {14},&lt;br /&gt;
	Pages = {389-440},&lt;br /&gt;
	Title = {Generation and Gender Survey (GGS): Towards a better understanding of relationships and processes in the life course},&lt;br /&gt;
	Volume = {17},&lt;br /&gt;
	Year = {2007},&lt;br /&gt;
	Bdsk-Url-1 = {http://dx.doi.org/10.4054/DemRes.2007.17.14}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@article{Régnier-Loilier2006,&lt;br /&gt;
author = {Régnier-Loilier, A.},&lt;br /&gt;
title= {How often do adult children see their parents?},&lt;br /&gt;
year = {2006},&lt;br /&gt;
URL = {http://www.ined.fr/fichier/t_publication/1211/publi_pdf2_pop.and.soc.english.427.pdf},&lt;br /&gt;
journal = {Population &amp;amp; Societies},&lt;br /&gt;
volume = {427},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's &amp;lt;tt&amp;gt;URL&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;doi&amp;lt;/tt&amp;gt; did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX.&lt;br /&gt;
&lt;br /&gt;
You can also add your own field.&lt;br /&gt;
&lt;br /&gt;
It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields.&lt;br /&gt;
&lt;br /&gt;
It can be a software like &amp;lt;tt&amp;gt;jabref&amp;lt;/tt&amp;gt; which will be discussed later as well as Web services like &amp;lt;tt&amp;gt;Zotero&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Mendeley&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Bibsonomy&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Standard templates===&lt;br /&gt;
Usually BibTeX templates are inserted on request by your text editor into your .bib file and can be filled, tested for integrity (a missing parenthesis?) and cleaned by specific commands. &lt;br /&gt;
 &lt;br /&gt;
;@article : An article from a magazine or a journal.&lt;br /&gt;
:*Required fields: author, title, journal, year.&lt;br /&gt;
:*Optional fields: volume, number, pages, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@article{Xarticle,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    journal   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@book : A published book&lt;br /&gt;
:*Required fields: author/editor, title, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, address, edition, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@book{Xbook,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    publisher = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    %edition  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@booklet : A bound work without a named publisher or sponsor.&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, howpublished, address, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@booklet{Xbooklet,&lt;br /&gt;
    %author   = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@conference : Equal to inproceedings&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@conference{Xconference,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    booktitle = &amp;quot;&amp;quot;,&lt;br /&gt;
    %editor   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %publisher= &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@inbook : A section of a book ''without'' its own title.&lt;br /&gt;
:*Required fields: author/editor, booktitle, chapter and/or pages, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, type, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@incollection : A section of a book having its own title.&lt;br /&gt;
:*Required fields: author, title, booktitle, publisher, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@inproceedings : An article in a conference proceedings.&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@manual : Technical manual&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, organization, address, edition, month, year, note.&lt;br /&gt;
&lt;br /&gt;
;@mastersthesis : Master's thesis&lt;br /&gt;
:*Required fields: author, title, school, year.&lt;br /&gt;
:*Optional fields: type (eg. &amp;quot;diploma thesis&amp;quot;), address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@mastersthesis{Xthesis,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    school    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;diploma thesis&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@misc : Template useful for other kinds of publication&lt;br /&gt;
:*Required fields: none&lt;br /&gt;
:*Optional fields: author, title, howpublished, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@misc{Xmisc,&lt;br /&gt;
    %author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished = &amp;quot;&amp;quot;,&lt;br /&gt;
    %year     = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@phdthesis : Ph.D. thesis&lt;br /&gt;
:*Required fields: author, title, year, school.&lt;br /&gt;
:*Optional fields: address, month, keywords, note.&lt;br /&gt;
&lt;br /&gt;
;@proceedings : The proceedings of a conference.&lt;br /&gt;
:*Required fields: title, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@techreport : Technical report from educational, commercial or standardization institution.&lt;br /&gt;
:*Required fields: author, title, institution, year.&lt;br /&gt;
:*Optional fields: type, number, address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@techreport{Xtreport,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    institution = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;&amp;quot;, &lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@unpublished : An unpublished article, book, thesis, etc.&lt;br /&gt;
:*Required fields: author, title, note.&lt;br /&gt;
:*Optional fields: month, year.&lt;br /&gt;
&lt;br /&gt;
== BiBTeX styles for reviews ==&lt;br /&gt;
=== Economic reviews ===&lt;br /&gt;
You can access to some bibliographic styles specific to economic reviews at the URL&lt;br /&gt;
http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic&lt;br /&gt;
&lt;br /&gt;
The README file should be read first. &lt;br /&gt;
&lt;br /&gt;
For the springer journals, you can access to the ''Instruction for authors'' at the following URL:&lt;br /&gt;
http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip?SGWID=0-0-45-468198-0&lt;br /&gt;
&lt;br /&gt;
==Using JabRef to manage your bibliography ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;JabRef&amp;lt;/tt&amp;gt; is an open source bibliography reference manager written in Java. It lets you manage your &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography files as well as fetch references on many public like Medline or private like Jstor or Science direct databases on the Internet.&lt;br /&gt;
&lt;br /&gt;
Once you clicked on Jabref, you need to open a new .bib file in order to start fetching.&lt;br /&gt;
=== Fetching Medline ===&lt;br /&gt;
&lt;br /&gt;
MEDLINE is the U.S. National Library of Medicine's premier bibliographic database. It contains references to journal articles in life sciences with a concentration on biomedicine.&lt;br /&gt;
&lt;br /&gt;
JabRef can download citations from the Medline database. To use this feature, choose Web search -&amp;gt; Fetch Medline, and the Medline interface will appear in the side pane.&lt;br /&gt;
&lt;br /&gt;
There are two ways of specifying which entries to download:&lt;br /&gt;
:Enter one or more Medline IDs (separated by comma/semicolon) in the text field.&lt;br /&gt;
:Enter a set of names and/or words to search for. You can use the operators &amp;lt;tt&amp;gt;and&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;or&amp;lt;/tt&amp;gt; and parentheses to refine your search expression.&lt;br /&gt;
:Examples:&lt;br /&gt;
::Brouard [au] AND Pontone [au]&lt;br /&gt;
::Anderson RM [au] HIV [ti]&lt;br /&gt;
::Valleron [au] 1988:2000[dp] HIV [ti]&lt;br /&gt;
::Valleron [au] AND 1987:2000[dp] AND (AIDS [ti] OR HIV[ti])&lt;br /&gt;
::Anderson [au] AND Nature [ta]&lt;br /&gt;
::Population [ta]&lt;br /&gt;
&lt;br /&gt;
In both cases, press &amp;lt;tt&amp;gt;Enter&amp;lt;/tt&amp;gt; or the &amp;lt;tt&amp;gt;Fetch&amp;lt;/tt&amp;gt; button. &lt;br /&gt;
&lt;br /&gt;
If you use a text search, you will be prompted with the number of entries found, and given a choice of how many to download. They are usually numerous and you can limit your selection by specifying an author &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[au]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; a title &amp;lt;tt&amp;gt;ti&amp;lt;/tt&amp;gt;, a date of publication &amp;lt;tt&amp;gt;dp&amp;lt;/tt&amp;gt; or a journal &amp;lt;tt&amp;gt;ta&amp;lt;/tt&amp;gt; as well as any other descriptor of Medline.&lt;br /&gt;
&lt;br /&gt;
Within your new window including the result of your selection, you can refine by examining each entry and selecting/unselecting them.&lt;br /&gt;
&lt;br /&gt;
The entries fetched and selected will be added to your currently active database. &lt;br /&gt;
&lt;br /&gt;
=== Examining the BibTeX field of a reference ===&lt;br /&gt;
An important feature of Jabref is to verify the source code of a reference, by clicking on BibTeX -&amp;gt; Edit entry (or CTRL_e on Windows and cmd_e on OS/X). A BibTeX key, just after &amp;lt;tt&amp;gt;@article{,&amp;lt;/tt&amp;gt; must not be empty. Please fill it: &amp;lt;tt&amp;gt;@article{Anderson-May-Nature,&amp;lt;/tt&amp;gt; or ask jabref to generate once (you can speficify to jabref how to create bibtex keys in your preferences. You can also verify by clicking on the &amp;lt;tt&amp;gt;Required fields&amp;lt;/tt&amp;gt; that they are all filled otherwise the &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; program will complain.&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;General&amp;lt;/tt&amp;gt; tab you can look at the &amp;lt;tt&amp;gt;File&amp;lt;/tt&amp;gt; row and click on the + in order to let you access the pdf file (stored on your hard disk) corresponding to the article.&lt;br /&gt;
&lt;br /&gt;
[[File:Jabref-fetch.png|right|Jabref, fetching Medline and editing an Inproceeding text.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Insert your BiBTeX file into your main file ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You just need to insert into your main LaTeX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can choose a specific style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliographystyle{econometrica-fr}&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Bottom|Presentations|Tables}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=465</id>
		<title>LaTeX/Bibliography Management</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Bibliography_Management&amp;diff=465"/>
				<updated>2011-08-17T07:16:16Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Using BibTeX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded system ==&lt;br /&gt;
&lt;br /&gt;
If you are writing only one or two documents and aren't planning on writing more on the same subject for a long time, maybe you don't want to waste time creating a database of references you are never going to use. In this case you should consider using the basic and simple bibliography support that is embedded within LaTeX.&lt;br /&gt;
&lt;br /&gt;
LaTeX provides an environment called &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; that you have to use where you want the bibliography; that usually means at the very end of your document, just before the &amp;lt;code&amp;gt;\end{document}&amp;lt;/code&amp;gt; command. Here is a practical example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
The \LaTeX system~\cite{lamport94} is set of macros for the \TeX engine.&lt;br /&gt;
&lt;br /&gt;
\begin{thebibliography}{9}&lt;br /&gt;
 \bibitem{lamport94}&lt;br /&gt;
  Leslie Lamport,&lt;br /&gt;
  \emph{\LaTeX: A Document Preparation System}.&lt;br /&gt;
  Addison Wesley, Massachusetts,&lt;br /&gt;
  2nd Edition,&lt;br /&gt;
  1994.&lt;br /&gt;
\end{thebibliography}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will be displayed with numbered references:&lt;br /&gt;
::The LaTeX system [1] is set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
Now if you add an optional argument to bibitem (&amp;lt;tt&amp;gt;\bibitem[(Lamport 1994)]{lamport94}&amp;lt;/tt&amp;gt;, it will be used both in the text as well as in the bibliography.&lt;br /&gt;
::The LaTeX system (Lamport 1994) is a set of macros for the TeX engine.&lt;br /&gt;
&lt;br /&gt;
OK, so what is going on here? The first thing to notice is the establishment of the environment. &amp;lt;code&amp;gt;thebibliography&amp;lt;/code&amp;gt; is a keyword that LaTeX recognizes as everything between the begin and end tags as being data for the bibliography. The optional argument, which I supplied after the begin statement, is telling LaTeX how wide the item label will be when printed. Note however, that it is not a literal parameter, i.e the number 9 in this case, but a text width. Therefore, I am effectively telling LaTeX that I will only need reference labels of one character in width, which means no more than nine references in total. If you want more than ten, then input a two-digit number, such as '99' which permits fewer than 100 references.&lt;br /&gt;
&lt;br /&gt;
Next is the actual reference entry itself. This is prefixed with the &amp;lt;code&amp;gt;\bibitem{''cite_key''}&amp;lt;/code&amp;gt; command. The ''cite_key'' should be a unique identifier for that particular reference, and is often some sort of mnemonic consisting of any sequence of letters, numbers and punctuation symbols (although not a comma). I often use the surname of the first author, followed by the last two digits of the year (hence ''lamport94''). If that author has produced more than one reference for a given year, then I add letters after, 'a', 'b', etc. But, you should do whatever works for you. Everything after the key is the reference itself. You need to type it as you want it to be presented. I have put the different parts of the reference, such as author, title, etc., on different lines for readability. These linebreaks are ignored by LaTeX. I wanted the title to be in italics, so I used the &amp;lt;code&amp;gt;\emph{}&amp;lt;/code&amp;gt; command to achieve this.&lt;br /&gt;
&lt;br /&gt;
== Citations ==&lt;br /&gt;
To actually cite a given document is very easy. Go to the point where you want the citation to appear, and use the following: &amp;lt;code&amp;gt;\cite{''cite_key''}&amp;lt;/code&amp;gt;, where the ''cite_key'' is that of the bibitem you wish to cite. When LaTeX processes the document, the citation will be cross-referenced with the bibitems and replaced with the appropriate number citation. The advantage here, once again, is that LaTeX looks after the numbering for you. If it were totally manual, then adding or removing a reference would be a real chore, as you would have to re-number all the citations by hand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Instead of WYSIWYG editors, typesetting systems like \TeX{} or \LaTeX{} \cite{lamport94} can be used.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Referring More Specific ===&lt;br /&gt;
Sometimes you want to refer to a certain page, figure or theorem in a text book. For that you can use the arguments to the &amp;lt;code&amp;gt;\cite&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite[p.~215]{citation01}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The argument, &amp;quot;p. 215&amp;quot;, will show up inside the same brackets. Note the tilde in [p.~215], which replaces the end-of-sentence spacing with a non-breakable inter-word space. There are two reasons: end-of-sentence spacing is too wide, and &amp;quot;p.&amp;quot; should not be separated from the page number.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Citations ===&lt;br /&gt;
&lt;br /&gt;
When a sequence of multiple citations are needed, you should use a single &amp;lt;code&amp;gt;\cite{}&amp;lt;/code&amp;gt; command. The citations are then separated by commas. Note that you must not use spaces between the citations. Here's an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\cite{citation01,citation02,citation03}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result will then be shown as citations inside the same brackets.&lt;br /&gt;
&lt;br /&gt;
=== No Cite ===&lt;br /&gt;
&lt;br /&gt;
If you only want a reference to appear in the bibliography, but not where it is referenced in the main text, then the &amp;lt;code&amp;gt;\nocite{}&amp;lt;/code&amp;gt; command can be used, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
Lamport showed in 1995 something...  \nocite{lamport95}.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A special version of the command, &amp;lt;code&amp;gt;\nocite{*}&amp;lt;/code&amp;gt;, includes all entries from the database, whether they are referenced in the document or not.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using BibTeX ==&lt;br /&gt;
The bibliography which is contained within the &amp;lt;tt&amp;gt;\begin{thebibliography}&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\end{thebibliography}&amp;lt;/tt&amp;gt; can be generated automatically by a specific engine, the so-called BibTeX engine. &lt;br /&gt;
&lt;br /&gt;
In fact, &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; is able to read the cite keys which have been referenced in the text by &amp;lt;tt&amp;gt;\cite{cite_key}&amp;lt;/tt&amp;gt;, and to generate the formatted bibliography by accessing to the complete reference (title, authors, year, journal etc.) which is stored with other references in a &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography file. The name of the bibliography file(s) are given as arguments of the command &amp;lt;tt&amp;gt;\bibliography{aids,disability}&amp;lt;/tt&amp;gt; which also stipulates where the bibliography section must start.&lt;br /&gt;
&lt;br /&gt;
A specific bibliography style (.bst files) can be specified by the order &amp;lt;tt&amp;gt;\bibliographystyle{apalike}&amp;lt;/tt&amp;gt; if you like the apa style.&lt;br /&gt;
&lt;br /&gt;
Once the LaTeX command is run on the latex file, say &amp;lt;tt&amp;gt;latex foo.tex&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;latex foo&amp;lt;/tt&amp;gt;), references as well as styles and bibliography files names, are stored in an ''auxiliary file'' named &amp;lt;tt&amp;gt;foo.aux&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
The action of the &amp;lt;tt&amp;gt;bibtex foo.aux&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bibtex foo&amp;lt;/tt&amp;gt; command is to read the .aux file, and scan for any citation while fetching the complete reference in the bibliography databases. The output is a file named &amp;lt;tt&amp;gt;foo.bbl&amp;lt;/tt&amp;gt; which corresponds to the thebibliography environment.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;latex&amp;lt;/tt&amp;gt; is run a second time, the .bbl file is incorporated into the PDF output file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Using a specific BibTeX file to create a bibliography ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create a BibTeX file ====&lt;br /&gt;
&lt;br /&gt;
You can put all your references into a separate file. Save them in a .bib (as &amp;quot;mybiblio.bib&amp;quot; ) in the same folder than your main LaTeX file. A BibTeX file contains references to text of various kinds. In the following example, the description of the ''Vikat2007'' article starts with the &amp;lt;tt&amp;gt;@article{Vikat2007,&amp;lt;/tt&amp;gt; and ends with right bracket. A second article is then described.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
@article{Vikat2007,&lt;br /&gt;
	Author = {Solaz, A.},&lt;br /&gt;
	Doi = {10.4054/DemRes.2007.17.14},&lt;br /&gt;
	Journal = {Demographic Research},&lt;br /&gt;
	Number = {14},&lt;br /&gt;
	Pages = {389-440},&lt;br /&gt;
	Title = {Generation and Gender Survey (GGS): Towards a better understanding of relationships and processes in the life course},&lt;br /&gt;
	Volume = {17},&lt;br /&gt;
	Year = {2007},&lt;br /&gt;
	Bdsk-Url-1 = {http://dx.doi.org/10.4054/DemRes.2007.17.14}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@article{Régnier-Loilier2006,&lt;br /&gt;
author = {Régnier-Loilier, A.},&lt;br /&gt;
title= {How often do adult children see their parents?},&lt;br /&gt;
year = {2006},&lt;br /&gt;
URL = {http://www.ined.fr/fichier/t_publication/1211/publi_pdf2_pop.and.soc.english.427.pdf},&lt;br /&gt;
journal = {Population &amp;amp; Societies},&lt;br /&gt;
volume = {427},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BibTeX format has evolved since the mid 80's and is currently used by many softwares, databases and servers. In the mid 80's &amp;lt;tt&amp;gt;URL&amp;lt;/tt&amp;gt; as well as &amp;lt;tt&amp;gt;doi&amp;lt;/tt&amp;gt; did not exist and are now very common; that's the reason for the inclusion in most modern BiBTeX files. But many fields are proprietary fields added by database specific to scientific reviews as well as scientific databases like JStor. The are treated as comments by BibTeX.&lt;br /&gt;
&lt;br /&gt;
You can also add your own field.&lt;br /&gt;
&lt;br /&gt;
It is very rare to enter manually the various fields required to specify an article and you will use a software which will help you fill the mandatory fields (author, title, year) as well as the optional fields.&lt;br /&gt;
&lt;br /&gt;
It can be a software like &amp;lt;tt&amp;gt;jabref&amp;lt;/tt&amp;gt; which will be discussed later as well as Web services like &amp;lt;tt&amp;gt;Zotero&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Mendeley&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Bibsonomy&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Standard templates===&lt;br /&gt;
;@article : An article from a magazine or a journal.&lt;br /&gt;
:*Required fields: author, title, journal, year.&lt;br /&gt;
:*Optional fields: volume, number, pages, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@article{Xarticle,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    journal   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@book : A published book&lt;br /&gt;
:*Required fields: author/editor, title, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, address, edition, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@book{Xbook,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    publisher = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    %edition  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@booklet : A bound work without a named publisher or sponsor.&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, howpublished, address, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@booklet{Xbooklet,&lt;br /&gt;
    %author   = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@conference : Equal to inproceedings&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@conference{Xconference,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    booktitle = &amp;quot;&amp;quot;,&lt;br /&gt;
    %editor   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %volume   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %series   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %pages    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %publisher= &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@inbook : A section of a book ''without'' its own title.&lt;br /&gt;
:*Required fields: author/editor, booktitle, chapter and/or pages, publisher, year.&lt;br /&gt;
:*Optional fields: volume/number, series, type, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@incollection : A section of a book having its own title.&lt;br /&gt;
:*Required fields: author, title, booktitle, publisher, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, type, chapter, pages, address, edition, month, note.&lt;br /&gt;
&lt;br /&gt;
;@inproceedings : An article in a conference proceedings.&lt;br /&gt;
:*Required fields: author, title, booktitle, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, pages, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@manual : Technical manual&lt;br /&gt;
:*Required fields: title.&lt;br /&gt;
:*Optional fields: author, organization, address, edition, month, year, note.&lt;br /&gt;
&lt;br /&gt;
;@mastersthesis : Master's thesis&lt;br /&gt;
:*Required fields: author, title, school, year.&lt;br /&gt;
:*Optional fields: type (eg. &amp;quot;diploma thesis&amp;quot;), address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@mastersthesis{Xthesis,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    school    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;diploma thesis&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@misc : Template useful for other kinds of publication&lt;br /&gt;
:*Required fields: none&lt;br /&gt;
:*Optional fields: author, title, howpublished, month, year, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@misc{Xmisc,&lt;br /&gt;
    %author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    %howpublished = &amp;quot;&amp;quot;,&lt;br /&gt;
    %year     = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@phdthesis : Ph.D. thesis&lt;br /&gt;
:*Required fields: author, title, year, school.&lt;br /&gt;
:*Optional fields: address, month, keywords, note.&lt;br /&gt;
&lt;br /&gt;
;@proceedings : The proceedings of a conference.&lt;br /&gt;
:*Required fields: title, year.&lt;br /&gt;
:*Optional fields: editor, volume/number, series, address, month, organization, publisher, note.&lt;br /&gt;
&lt;br /&gt;
;@techreport : Technical report from educational, commercial or standardization institution.&lt;br /&gt;
:*Required fields: author, title, institution, year.&lt;br /&gt;
:*Optional fields: type, number, address, month, note.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bibtex&amp;quot;&amp;gt;&lt;br /&gt;
@techreport{Xtreport,&lt;br /&gt;
    author    = &amp;quot;&amp;quot;,&lt;br /&gt;
    title     = &amp;quot;&amp;quot;,&lt;br /&gt;
    institution = &amp;quot;&amp;quot;,&lt;br /&gt;
    %type     = &amp;quot;&amp;quot;, &lt;br /&gt;
    %number   = &amp;quot;&amp;quot;,&lt;br /&gt;
    %address  = &amp;quot;&amp;quot;,&lt;br /&gt;
    year      = &amp;quot;XXXX&amp;quot;,&lt;br /&gt;
    %month    = &amp;quot;&amp;quot;,&lt;br /&gt;
    %note     = &amp;quot;&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;@unpublished : An unpublished article, book, thesis, etc.&lt;br /&gt;
:*Required fields: author, title, note.&lt;br /&gt;
:*Optional fields: month, year.&lt;br /&gt;
&lt;br /&gt;
== BiBTeX styles for reviews ==&lt;br /&gt;
=== Economic reviews ===&lt;br /&gt;
You can access to some bibliographic styles specific to economic reviews at the URL&lt;br /&gt;
http://www.ctan.org/tex-archive/biblio/bibtex/contrib/economic&lt;br /&gt;
&lt;br /&gt;
The README file should be read first. &lt;br /&gt;
&lt;br /&gt;
For the springer journals, you can access to the ''Instruction for authors'' at the following URL:&lt;br /&gt;
http://www.springer.com/cda/content/document/cda_downloaddocument/LaTeX.zip?SGWID=0-0-45-468198-0&lt;br /&gt;
&lt;br /&gt;
==Using JabRef to manage your bibliography ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;JabRef&amp;lt;/tt&amp;gt; is an open source bibliography reference manager written in Java. It lets you manage your &amp;lt;tt&amp;gt;.bib&amp;lt;/tt&amp;gt; bibliography files as well as fetch references on many public like Medline or private like Jstor or Science direct databases on the Internet.&lt;br /&gt;
&lt;br /&gt;
Once you clicked on Jabref, you need to open a new .bib file in order to start fetching.&lt;br /&gt;
=== Fetching Medline ===&lt;br /&gt;
&lt;br /&gt;
MEDLINE is the U.S. National Library of Medicine's premier bibliographic database. It contains references to journal articles in life sciences with a concentration on biomedicine.&lt;br /&gt;
&lt;br /&gt;
JabRef can download citations from the Medline database. To use this feature, choose Web search -&amp;gt; Fetch Medline, and the Medline interface will appear in the side pane.&lt;br /&gt;
&lt;br /&gt;
There are two ways of specifying which entries to download:&lt;br /&gt;
:Enter one or more Medline IDs (separated by comma/semicolon) in the text field.&lt;br /&gt;
:Enter a set of names and/or words to search for. You can use the operators &amp;lt;tt&amp;gt;and&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;or&amp;lt;/tt&amp;gt; and parentheses to refine your search expression.&lt;br /&gt;
:Examples:&lt;br /&gt;
::Brouard [au] AND Pontone [au]&lt;br /&gt;
::Anderson RM [au] HIV [ti]&lt;br /&gt;
::Valleron [au] 1988:2000[dp] HIV [ti]&lt;br /&gt;
::Valleron [au] AND 1987:2000[dp] AND (AIDS [ti] OR HIV[ti])&lt;br /&gt;
::Anderson [au] AND Nature [ta]&lt;br /&gt;
::Population [ta]&lt;br /&gt;
&lt;br /&gt;
In both cases, press &amp;lt;tt&amp;gt;Enter&amp;lt;/tt&amp;gt; or the &amp;lt;tt&amp;gt;Fetch&amp;lt;/tt&amp;gt; button. &lt;br /&gt;
&lt;br /&gt;
If you use a text search, you will be prompted with the number of entries found, and given a choice of how many to download. They are usually numerous and you can limit your selection by specifying an author &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[au]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; a title &amp;lt;tt&amp;gt;ti&amp;lt;/tt&amp;gt;, a date of publication &amp;lt;tt&amp;gt;dp&amp;lt;/tt&amp;gt; or a journal &amp;lt;tt&amp;gt;ta&amp;lt;/tt&amp;gt; as well as any other descriptor of Medline.&lt;br /&gt;
&lt;br /&gt;
Within your new window including the result of your selection, you can refine by examining each entry and selecting/unselecting them.&lt;br /&gt;
&lt;br /&gt;
The entries fetched and selected will be added to your currently active database. &lt;br /&gt;
&lt;br /&gt;
=== Examining the BibTeX field of a reference ===&lt;br /&gt;
An important feature of Jabref is to verify the source code of a reference, by clicking on BibTeX -&amp;gt; Edit entry (or CTRL_e on Windows and cmd_e on OS/X). A BibTeX key, just after &amp;lt;tt&amp;gt;@article{,&amp;lt;/tt&amp;gt; must not be empty. Please fill it: &amp;lt;tt&amp;gt;@article{Anderson-May-Nature,&amp;lt;/tt&amp;gt; or ask jabref to generate once (you can speficify to jabref how to create bibtex keys in your preferences. You can also verify by clicking on the &amp;lt;tt&amp;gt;Required fields&amp;lt;/tt&amp;gt; that they are all filled otherwise the &amp;lt;tt&amp;gt;bibtex&amp;lt;/tt&amp;gt; program will complain.&lt;br /&gt;
&lt;br /&gt;
In the &amp;lt;tt&amp;gt;General&amp;lt;/tt&amp;gt; tab you can look at the &amp;lt;tt&amp;gt;File&amp;lt;/tt&amp;gt; row and click on the + in order to let you access the pdf file (stored on your hard disk) corresponding to the article.&lt;br /&gt;
&lt;br /&gt;
[[File:Jabref-fetch.png|right|Jabref, fetching Medline and editing an Inproceeding text.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Insert your BiBTeX file into your main file ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You just need to insert into your main LaTeX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can choose a specific style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\bibliographystyle{econometrica-fr}&lt;br /&gt;
\bibliography{mybiblio}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LaTeX/Bottom|Presentations|Tables}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=464</id>
		<title>LaTeX/Tables</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=464"/>
				<updated>2011-07-06T07:07:59Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Other examples */ Goulet Table Fisher&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
In scientific writing, tables are a common feature. It is therefore a skill that needs mastering in order to produce quality papers.&lt;br /&gt;
&lt;br /&gt;
It is no more common to enter data with fingers. Numeric keypads are rarely used today and who remembers that the middle finger rest position is on the unique key with a grip the key 5. Tables on printed papers are scanned and submitted to Optical Characters Recognition (OCR) softwares which do exist even on smartphones. Data are treated by computer softwares, but in order to produce synthetic tables, your intermediate step is usually a spreadsheet which lets you make easy calculations like percentages as well as pretty printing.&lt;br /&gt;
&lt;br /&gt;
If basic tables are easy to be set in LaTeX, any serious table is a night mare and a tool to output the required LaTeX code directly in a file or in your clipboard is necessary. It might be necessary to clean, simplify and beautify the code.&lt;br /&gt;
&lt;br /&gt;
Thus, the first step consists in learning how to use such a tool like the calc2latex plugins [http://calc2latex.sourceforge.net/ http://calc2latex.sourceforge.net/] which works for openoffice calc (or libreoffice) and the second step in how manage LaTeX tables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the section  [[#Calc2LaTeX]] below for how to install. If you use MS Excel Spreadsheet or any other spreadsheet you can usually copy and paste selected cells to OO calc or open the .xls file with OO calc. &lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX usage ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Run OpenOffice Calc.&lt;br /&gt;
#Select cells you want to convert into LaTeX format.&lt;br /&gt;
#Push 'Tools'-'Macro'. (In the case of OpenOffice1.1 RC, push 'Tools'-'Macros'-'Macro')&lt;br /&gt;
#You will see 'Macro' dialog box. And then click 'soffice'-'calc2latex' in Macro form to show 'Main' item.&lt;br /&gt;
#Select 'Main' in 'soffice'-'calc2latex'-'Main' and push 'Run' button.&lt;br /&gt;
:[[Fichier:calc2latex-usage-macro.png|500px]]&lt;br /&gt;
&lt;br /&gt;
After these steps...&lt;br /&gt;
&lt;br /&gt;
#To get results, select all strings in 'Results' dialog box. In the example below, the title of the table in A1 will be used as the caption (just copy it into memory and paste it into the caption of the dialog) and thus the tabular environment will be embedded into a floated &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment with classical priorities htbp (here first, top second, bottom third, page last). Columns B and C have to be right justified before export because it will minimize the code. In this exemple with 3 columns the argument will be lrr and you will avoid many \multicolumn{1}{r}{} which be output for each right justified cells when the column itself is left or center justified. You can unselect the &amp;lt;tt&amp;gt;Ruled line&amp;lt;/tt&amp;gt; in order to simplify and usually beautify the table. You can keep the Bold face/Italics features. Unfortunately the color of the cells will not be kept. [[Fichier:calc2latex-usage-macro-dialog.png|600px]]&lt;br /&gt;
#Select all and copy to your clipboard and paste it into your TeX editor. It contains the table environment with the tabular environment embedded such as seen below. [[Fichier:calc2latex-after-usage-macro.png|600px]]&lt;br /&gt;
# Put the LaTeX code in your editor within an \begin{document} \end{document} environment, choosing, for example a &amp;lt;tt&amp;gt;memoir&amp;lt;/tt&amp;gt; class, calling your floating table with a &amp;lt;tt&amp;gt;\ref{comptes-cnf}&amp;lt;/tt&amp;gt; and running the result&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=latex enclose=yes&amp;gt;&lt;br /&gt;
% -*-latex-*-&lt;br /&gt;
&lt;br /&gt;
%&lt;br /&gt;
% These lines tell gnu-emacs to typeset &lt;br /&gt;
% with the xetex engine &lt;br /&gt;
% which requires Unicode encoding only (utf-8)&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % If Times Roman&lt;br /&gt;
\usepackage{fontspec} % for xetex engine &lt;br /&gt;
&lt;br /&gt;
As you can see on the table~\table{comptes-cnf} &lt;br /&gt;
of the French committee of the IUSSP members, &lt;br /&gt;
the balance concerning the &lt;br /&gt;
\href{http://demopaedia.org}{Demopædia} &lt;br /&gt;
project .&lt;br /&gt;
  \begin{document}&lt;br /&gt;
\begin{table}[htbp]&lt;br /&gt;
\caption{Rapport financier (provisoire) pour &lt;br /&gt;
 l'assemblée générale ordinaire du 20 mai 2011}&lt;br /&gt;
\begin{tabular}{lrr}&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; Débit &amp;amp; Crédit \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 31/12/2010} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- solde du CCP &amp;amp;  &amp;amp; 343,75 \\ &lt;br /&gt;
- solde du Livret A &amp;amp;  &amp;amp; 1 017,84 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 1 361,59 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Recettes de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Intérêts capitalisés Livret A &lt;br /&gt;
(au titre de 2010)&lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des recettes &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Dépenses de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais bancaires \&amp;amp; frais généraux &amp;amp; 30,50 &amp;amp;  \\ &lt;br /&gt;
- Organisation AG 2011 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais déplacement AG 2011 &amp;amp; 260,90 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Demopaedia : &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Nom de domaine (2009, 2010 et 2011) &amp;amp; 86,10 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des dépenses &amp;amp; 377,50 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 20/05/2011} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- CCP &amp;amp;  &amp;amp; 216,25 \\ &lt;br /&gt;
- Livret A &amp;amp;  &amp;amp; 767,84 \\ &lt;br /&gt;
Total des encours &amp;amp;  &amp;amp; 984,09 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Bilan} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Différence des soldes &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
- Différences des recettes et des dépenses &lt;br /&gt;
 &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
\end{tabular}&lt;br /&gt;
\label{comptes-cnf}&lt;br /&gt;
\end{table}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex example calc2tex.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You probably need to adapt a little bit the code and here are some advices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.&lt;br /&gt;
&lt;br /&gt;
The first line of the environment has the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}[pos]{table spec}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the ''table spec'' argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.&lt;br /&gt;
&lt;br /&gt;
The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ''array'' has been loaded):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;l&amp;lt;/tt&amp;gt;&lt;br /&gt;
| left-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
| centered column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;&lt;br /&gt;
| right-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the top&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;m{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned in the middle (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the bottom (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| vertical line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| double vertical line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using &amp;lt;code&amp;gt;p{''width''}&amp;lt;/code&amp;gt; you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as pt and cm, or ''command lengths'', such as &amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;.You can find a complete list in appendix [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The optional parameter ''pos'' can be used to specify the vertical position of the table relative to&lt;br /&gt;
the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|bottom&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
|center (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|top&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;amp;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| column separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\\&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start new row (additional space may be specified after &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; using square brackets, such as &amp;lt;code&amp;gt;\\[6pt]&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| horizontal line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\newline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start a new line within a cell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\cline{''i''-''j''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| partial horizontal line beginning in column ''i'' and ending in column ''j''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, any white space inserted between these commands is purely down to ones' preferences. I personally add spaces between to make it easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Basic examples ===&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Expanding upon that by including some vertical lines:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To add horizontal lines to the very top and bottom edges of the table:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  \hline			&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
  \hline  &lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{center}&lt;br /&gt;
  \begin{tabular}{ l | c || r | }&lt;br /&gt;
    \hline&lt;br /&gt;
    1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
    4 &amp;amp; 5 &amp;amp; 6 \\ \hline&lt;br /&gt;
    7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
    \hline&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{center}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|r|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  7C0 &amp;amp; hexadecimal \\&lt;br /&gt;
  3700 &amp;amp; octal \\ \cline{2-2}&lt;br /&gt;
  11111000000 &amp;amp; binary \\&lt;br /&gt;
  \hline \hline&lt;br /&gt;
  1984 &amp;amp; decimal \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:Latex example tabular cline.png|250px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Column specification using &amp;lt;code&amp;gt;&amp;gt;{\cmd}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;{\cmd}&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Using the array package, the column specification can be altered. This is done in the &lt;br /&gt;
argument of the tabular environment using &amp;lt;code&amp;gt;&amp;gt;{\command}&amp;lt;/code&amp;gt; for commands executed right &lt;br /&gt;
''before'' each column element and &amp;lt;code&amp;gt;&amp;lt;{\command}&amp;lt;/code&amp;gt; for commands to be executed right&lt;br /&gt;
''after'' each column element. &lt;br /&gt;
As an example: to get a column in math mode enter: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{$}c&amp;lt;{$}}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Another example is changing the font: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{\small}c}&amp;lt;/code&amp;gt; to print the column in a small font.&lt;br /&gt;
&lt;br /&gt;
The argument of the &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; specifications must be correctly balanced when it comes to &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters. This means that &amp;lt;code&amp;gt;&amp;gt;{\bfseries}&amp;lt;/code&amp;gt; is valid, while &amp;lt;code&amp;gt;&amp;gt;{\textbf}&amp;lt;/code&amp;gt; will not work and &amp;lt;code&amp;gt;&amp;gt;{\textbf{}&amp;lt;/code&amp;gt; is not valid. If there is the need to use the text of the table as an argument (for instance, using the &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt; to produce bold text), one should use the &amp;lt;code&amp;gt;\bgroup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\egroup&amp;lt;/code&amp;gt; commands: &amp;lt;code&amp;gt;&amp;gt;{\textbf\bgroup}c&amp;lt;{\egroup}&amp;lt;/code&amp;gt; produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; to underline text, it is necessary to temporarily store the column text in a box using &amp;lt;code&amp;gt;lrbox&amp;lt;/code&amp;gt;. First, you must define such a box with &amp;lt;code&amp;gt;\newsavebox{\boxname}&amp;lt;/code&amp;gt; and then you can define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;{\begin{lrbox}{\boxname}}%&lt;br /&gt;
l%&lt;br /&gt;
&amp;lt;{\end{lrbox}%&lt;br /&gt;
  \underline{\unhbox\boxname}}%&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This stores the text in a box and afterwards, takes the text out of the box with &amp;lt;code&amp;gt;\unhbox&amp;lt;/code&amp;gt; (this destroys the box, if the box is needed again one should use &amp;lt;code&amp;gt;\unhcopy&amp;lt;/code&amp;gt; instead) and passing it to &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt;. (For LaTeX2e, you may want to use &amp;lt;code&amp;gt;\usebox{\boxname}&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\unhbox\boxname&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
This same trick done with &amp;lt;code&amp;gt;\raisebox&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.&lt;br /&gt;
&lt;br /&gt;
Here is an example showing the use of both &amp;lt;code&amp;gt;p{...}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;gt;{\centering}&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{&amp;gt;{\centering}p{3.5cm}&amp;gt;{\centering}p{3.5cm}}&lt;br /&gt;
Geometry  &amp;amp; Algebra&lt;br /&gt;
\tabularnewline&lt;br /&gt;
\hline&lt;br /&gt;
 Points &amp;amp; Addition &lt;br /&gt;
\tabularnewline&lt;br /&gt;
 Spheres &amp;amp; Multiplication &lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;code&amp;gt;\tabularnewline&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to avoid a &amp;lt;code&amp;gt;Misplaced \noalign&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Text wrapping in tables ===&lt;br /&gt;
&lt;br /&gt;
LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that you know will contain a certain amount of text, then it is recommended that you use the ''p'' attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). Use the ''m'' attribute to have the lines aligned toward the middle of the box and the ''b'' attribute to align along the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
Here is a practical example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article} &lt;br /&gt;
&lt;br /&gt;
\usepackage[english]{babel}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
Without specifying width for last column:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | l |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.&lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
With width specified:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | p{5cm} |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.  &lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You get the following output:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example wrapped table.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
Note that the first table is cropped: The output is wider than the page width.&lt;br /&gt;
&lt;br /&gt;
=== Text justification in tables ===&lt;br /&gt;
&lt;br /&gt;
On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package provides the command &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; which is like &amp;lt;code&amp;gt;\makebox&amp;lt;/code&amp;gt; but instead of a ''width'' argument, it takes a tag. During compilation it bookkeeps which &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; with a certain tag contains the widest text and can stretch all &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt;es with the same tag to that width. Combined with the &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; package, one can define a column specifier that justifies the text in all lines: (See the documentation of the &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package for more details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newsavebox{\tstretchbox}&lt;br /&gt;
\newcolumntype{S}[1]{%&lt;br /&gt;
 &amp;gt;{\begin{lrbox}{\tstretchbox}}%&lt;br /&gt;
 l%&lt;br /&gt;
 &amp;lt;{\end{lrbox}%&lt;br /&gt;
   \eqmakebox[#1][s]{\unhcopy\tstretchbox}}%&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other environments inside tables ===&lt;br /&gt;
&lt;br /&gt;
If you use some LaTeX environments inside table cells, like &amp;lt;tt&amp;gt;verbatim&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;[[LaTeX/Formatting#Enumerate|enumerate]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| c | c |}&lt;br /&gt;
	\hline&lt;br /&gt;
	\begin{verbatim}&lt;br /&gt;
	code&lt;br /&gt;
	\end{verbatim}&lt;br /&gt;
	&amp;amp; description&lt;br /&gt;
 	\\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might encounter errors similar to&lt;br /&gt;
 ! LaTeX Error: Something's wrong--perhaps a missing \item.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, change [[#The tabular environment|column specifier]] to &amp;quot;paragraph&amp;quot; (&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;m&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| m{5cm} | c |}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining multiple columns ===&lt;br /&gt;
&lt;br /&gt;
It is possible to define many identical columns at once using the &amp;lt;code&amp;gt;*{''num''}{''str''}&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
This is particularly useful when your table has many columns. &lt;br /&gt;
&lt;br /&gt;
Here is a table with six centered columns flanked by a single column on each side:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{l*{6}{c}r}&lt;br /&gt;
Team              &amp;amp; P &amp;amp; W &amp;amp; D &amp;amp; L &amp;amp; F  &amp;amp; A &amp;amp; Pts \\&lt;br /&gt;
\hline&lt;br /&gt;
Manchester United &amp;amp; 6 &amp;amp; 4 &amp;amp; 0 &amp;amp; 2 &amp;amp; 10 &amp;amp; 5 &amp;amp; 12  \\&lt;br /&gt;
Celtic            &amp;amp; 6 &amp;amp; 3 &amp;amp; 0 &amp;amp; 3 &amp;amp;  8 &amp;amp; 9 &amp;amp;  9  \\&lt;br /&gt;
Benfica           &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 3 &amp;amp;  7 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
FC Copenhagen     &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 2 &amp;amp;  5 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example defining multiple columns.png|450px]]&lt;br /&gt;
&lt;br /&gt;
=== @-expressions ===&lt;br /&gt;
&lt;br /&gt;
The column separator can be specified with the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct. &lt;br /&gt;
&lt;br /&gt;
It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. This command kills the inter-column space and replaces it with whatever is between the curly braces. To add space, use &amp;lt;code&amp;gt;@{\hspace{''width''}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r@{.}l}&lt;br /&gt;
  3   &amp;amp; 14159 \\&lt;br /&gt;
  16  &amp;amp; 2     \\&lt;br /&gt;
  123 &amp;amp; 456   \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:align.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the approach outlined above won't work well if the column header is longer than any of the numbers. To center the column on the decimal separator, use the &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt; package, which provides a new column specifier for floating point data.&lt;br /&gt;
&lt;br /&gt;
The space suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\ \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|l|l|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier1.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier3.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|@{}l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spanning ===&lt;br /&gt;
&lt;br /&gt;
To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.&lt;br /&gt;
&lt;br /&gt;
==== Rows spanning multiple columns ====&lt;br /&gt;
&lt;br /&gt;
The command for this looks like this: &amp;lt;code&amp;gt;\multicolumn{''num_cols''}{''alignment''}{''contents''}&amp;lt;/code&amp;gt;. ''num_cols'' is the number of subsequent columns to merge; ''alignment'' is, either l, c, r or to have text wrapping specifiy a width &amp;lt;code&amp;gt;p{5.0cm}&amp;lt;/code&amp;gt; . And ''contents'' is simply the actual data you want to be contained within that cell. A simple example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  \multicolumn{2}{|c|}{Team sheet} \\&lt;br /&gt;
  \hline&lt;br /&gt;
  GK &amp;amp; Paul Robinson \\&lt;br /&gt;
  LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
  DC &amp;amp; Michael Duberry \\&lt;br /&gt;
  DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
  RB &amp;amp; Didier Domi \\&lt;br /&gt;
  MC &amp;amp; David Batty \\&lt;br /&gt;
  MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
  MC &amp;amp; Jody Morris \\&lt;br /&gt;
  FW &amp;amp; Jamie McMaster \\&lt;br /&gt;
  ST &amp;amp; Alan Smith \\&lt;br /&gt;
  ST &amp;amp; Mark Viduka \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multicolumn.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Columns spanning multiple rows ====&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is add &amp;lt;code&amp;gt;\usepackage{multirow}&amp;lt;/code&amp;gt; [http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/] to the preamble. This then provides the command needed for spanning rows: &amp;lt;code&amp;gt;\multirow{''num_rows''}{''width''}{''contents''}&amp;lt;/code&amp;gt;. The arguments are pretty simple to deduce (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for the ''width'' means the content's natural width).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{|l|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{3}{|c|}{Team sheet} \\&lt;br /&gt;
\hline&lt;br /&gt;
Goalkeeper &amp;amp; GK &amp;amp; Paul Robinson \\ \hline&lt;br /&gt;
\multirow{4}{*}{Defenders} &amp;amp; LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Michael Duberry \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
 &amp;amp; RB &amp;amp; Didier Domi \\ \hline&lt;br /&gt;
\multirow{3}{*}{Midfielders} &amp;amp; MC &amp;amp; David Batty \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Jody Morris \\ \hline&lt;br /&gt;
Forward &amp;amp; FW &amp;amp; Jamie McMaster \\ \hline&lt;br /&gt;
\multirow{2}{*}{Strikers} &amp;amp; ST &amp;amp; Alan Smith \\&lt;br /&gt;
 &amp;amp; ST &amp;amp; Mark Viduka \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirow.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The main thing to note when using &amp;lt;code&amp;gt;\multirow&amp;lt;/code&amp;gt; is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.&lt;br /&gt;
&lt;br /&gt;
If there is no data for a cell, just don't type anything, but you still need the &amp;quot;&amp;amp;&amp;quot; separating it from the next column's data. The astute reader will already have deduced that for a table of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; columns, there must always be &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; ampersands in each row. The exception to this is when &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\multirow&amp;lt;/tt&amp;gt; are used to create cells which span multiple columns or rows.&lt;br /&gt;
&lt;br /&gt;
==== Spanning in both directions simultaneously ====&lt;br /&gt;
&lt;br /&gt;
Here is a nontrivial example how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{cc|c|c|c|c|l}&lt;br /&gt;
\cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; \multicolumn{4}{|c|}{Primes} \\ \cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; 2 &amp;amp; 3 &amp;amp; 5 &amp;amp; 7 \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{504} &amp;amp; 3 &amp;amp; 2 &amp;amp; 0 &amp;amp; 1 &amp;amp;     \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{540} &amp;amp; 2 &amp;amp; 3 &amp;amp; 1 &amp;amp; 0 &amp;amp;     \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{gcd} &amp;amp; 2 &amp;amp; 2 &amp;amp; 0 &amp;amp; 0 &amp;amp; min \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{lcm} &amp;amp; 3 &amp;amp; 3 &amp;amp; 1 &amp;amp; 1 &amp;amp; max \\ \cline{1-6}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirowandcolumnexample.png|300px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with &amp;lt;code&amp;gt;\multirow{2}{*}{...}&amp;lt;/code&amp;gt;, it still draws vertical borders that only span the first row. To compensate for that, we add &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; in the following rows spanned by the multirow. Note that we cannot just use &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command &amp;lt;code&amp;gt;\cline{2-6}&amp;lt;/code&amp;gt; and opt out the first column that contains the text &amp;quot;Powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is another example exploiting the same ideas to make&lt;br /&gt;
the familiar and popular &amp;quot;2x2&amp;quot; or double dichotomy:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r|c|c|}&lt;br /&gt;
\multicolumn{1}{r}{}&lt;br /&gt;
 &amp;amp;  \multicolumn{1}{c}{noninteractive}&lt;br /&gt;
 &amp;amp; \multicolumn{1}{c}{interactive} \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
massively multiple &amp;amp; Library &amp;amp; University \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
one-to-one &amp;amp; Book &amp;amp; Tutor \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex-tables-double-dichotomy-example.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Resize tables ===&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\resizebox{width}{height}{object}&amp;lt;/code&amp;gt; can be used with &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width/height ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\resizebox{8cm}{!} {&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use &amp;lt;code&amp;gt;\scalebox{ratio}{object}&amp;lt;/code&amp;gt; in the same way but with ratios rather than fixed sizes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\scalebox{0.7}{&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;code&amp;gt;\resizebox&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\scalebox&amp;lt;/code&amp;gt; require the graphicx package.&lt;br /&gt;
&lt;br /&gt;
To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: &amp;lt;code&amp;gt;\setlength{\tabcolsep}{5pt}&amp;lt;/code&amp;gt;.&lt;br /&gt;
The default value is 6pt.&lt;br /&gt;
&lt;br /&gt;
===Sideways tables ===&lt;br /&gt;
&lt;br /&gt;
Tables can also be put on their side within a document using the &amp;lt;code&amp;gt;rotating&amp;lt;/code&amp;gt; package and the &amp;lt;code&amp;gt;sidewaystable&amp;lt;/code&amp;gt; environments in place of the table environment. (NOTE: most DVI viewers do not support displaying rotated text. Convert your document to a PDF to see the result. Most, if not all, PDF viewers do support rotated text.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{rotating}&lt;br /&gt;
&lt;br /&gt;
\begin{sidewaystable}&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{sidewaystable}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, &amp;lt;code&amp;gt;rotfloat&amp;lt;/code&amp;gt; package may be used. Then one can use &amp;lt;code&amp;gt;\begin{sidewaystable}[H]&amp;lt;/code&amp;gt; just like for normal tables. The 'H' option can not be used without this package.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Row Colors in Tables ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package provides the necessary commands to produce tables with alternate row colors, when loaded with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; option.&lt;br /&gt;
The command &amp;lt;code&amp;gt;\rowcolors{&amp;lt;''starting row''&amp;gt;}{&amp;lt;''odd color''&amp;gt;}{&amp;lt;''even color''&amp;gt;}&amp;lt;/code&amp;gt; has to be specified right before the &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment starts.&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article}&lt;br /&gt;
&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
\rowcolors{1}{green}{pink}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{lll}&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | [[File:LaTeXAlternateRowTable.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
The command &amp;lt;code&amp;gt;\hiderowcolors&amp;lt;/code&amp;gt; is available to deactivate highlighting of a specified row.&lt;br /&gt;
Highlighting can be reactivated within the table via the &amp;lt;code&amp;gt;\showrowcolors&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Colors of individual Cells ===&lt;br /&gt;
&lt;br /&gt;
As above this uses the &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
% Include this somewhere in your document&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
% Enter this in the cell you wish to color a light grey.&lt;br /&gt;
% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. `0.9' denotes how dark the grey is.&lt;br /&gt;
\cellcolor[gray]{0.9}&lt;br /&gt;
% The following will color the cell red.&lt;br /&gt;
\cellcolor{red}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partial Vertical Lines ===&lt;br /&gt;
&lt;br /&gt;
Adding a partial vertical line to an individual cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r|}{6}  \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-add.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Removing part of a vertical line in a particular cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ | l | c | r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r}{6} \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-remove.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment - captioning etc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment inside a &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do the two different environments exist? Think of it this way: The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment is concerned with arranging elements in a tabular grid, while the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment represents the table more conceptually. This explains why it isn't &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; but &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; that provides for captioning (because the caption isn't displayed in the grid-like layout).&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment has a lot of similarities with a &amp;lt;code&amp;gt;figure&amp;lt;/code&amp;gt; environment, in the way the &amp;quot;floating&amp;quot; is handled etc.&lt;br /&gt;
For instance you can specify its placement in the page with the option &amp;lt;code&amp;gt;[placement]&amp;lt;/code&amp;gt;, the valid values are any combination of (order is not important):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
|where the table is declared ('''h'''ere)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''t'''op of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''b'''ottom of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&lt;br /&gt;
|on a dedicated '''p'''age of floats&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt;&lt;br /&gt;
|override the default float restrictions. E.g., the maximum size allowed of a &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; float is normally quite small; if you want a large one, you need this &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt; parameter as well.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;tt&amp;gt;[tbp]&amp;lt;/tt&amp;gt;. If you want to place a table in the place where it's declared, do not just write &amp;lt;tt&amp;gt;[h]&amp;lt;/tt&amp;gt;; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; float) which can be some distance away in the document. A good rule of thumb is to always use &amp;lt;tt&amp;gt;htbp&amp;lt;/tt&amp;gt; until the document is finished, at which stage the final float parameters can be fine-tuned.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment is also useful when you want to have a&lt;br /&gt;
list of tables at the beginning or end of your document with the command&lt;br /&gt;
&amp;lt;code&amp;gt;\listoftables&amp;lt;/code&amp;gt;;&lt;br /&gt;
it enables making cross-references to the table with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
You may refer to table~\ref{my_table} for an example.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}&lt;br /&gt;
     ...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{An example of table}&lt;br /&gt;
  \label{my_table}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment - controlling table width ==&lt;br /&gt;
&lt;br /&gt;
This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabWidth1.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ''rubber lengths'', which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill}} | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:LaTeX TabWidth2.png|right]]&lt;br /&gt;
&lt;br /&gt;
You will notice the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct added at the beginning of the column description. Within it is the &amp;lt;code&amp;gt;\extracolsep&amp;lt;/code&amp;gt; command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as &amp;lt;code&amp;gt;\fill&amp;lt;/code&amp;gt;, the columns are automatically spaced evenly.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; package - simple column stretching ==&lt;br /&gt;
&lt;br /&gt;
This package provides a table environment called &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; which is similar to the &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment, except that it has a new column specifier &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |X|X|X|X| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth1.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The content provided for the boxes is treated as for a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; column, except that the width is calculated automatically. If you use the package &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;, you may also apply any &amp;lt;tt&amp;gt;&amp;amp;gt;{\cmd}&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;lt;{\cmd}&amp;lt;/tt&amp;gt; command to achieve specific behavior (like &amp;lt;tt&amp;gt;\centering&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;\raggedright\arraybackslash&amp;lt;/tt&amp;gt;) as described previously.&lt;br /&gt;
&lt;br /&gt;
Another option is the use of &amp;lt;tt&amp;gt;\newcolumntype&amp;lt;/tt&amp;gt; in order to get selected columns formatted in a different way. It defines a new column specifier, e.g. &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; (in uppercase). In this example, the second and fourth column is adjusted in a different way (&amp;lt;tt&amp;gt;\raggedleft&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\newcolumntype{R}{&amp;gt;{\raggedleft\arraybackslash}X}%&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |l|R|l|R| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth2.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
Tabularx with rows spanning multiple columns using &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt;. The two central columns are posing as one by using the &amp;lt;tt&amp;gt;X@{}&amp;lt;/tt&amp;gt; option. Note that the &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\begin{tabularx}{1\textwidth}{|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|&amp;gt;{\setlength\hsize{1\hsize}\raggedleft}X@{} &amp;gt;{\setlength\hsize{1\hsize}\raggedright}X|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|} &lt;br /&gt;
  \hline&lt;br /&gt;
Label 1 &amp;amp; \multicolumn{2}{&amp;gt;{\centering\setlength\hsize{2\hsize}}X|}{Label 2} &amp;amp; Label 3\tabularnewline&lt;br /&gt;
\hline &lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX tabularx_multi.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vertically centered images ==&lt;br /&gt;
&lt;br /&gt;
Inserting images into a table row will align it at the top of the cell.&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt; package this problem can be solved.&lt;br /&gt;
Defining a new columntype will keep the image vertically centered.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newcolumntype{V}{&amp;gt;{\centering\arraybackslash} m{.4\linewidth} }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Or use a parbox to center the image.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\parbox[c]{1em}{\includegraphics{image.png}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Professional tables ==&lt;br /&gt;
&lt;br /&gt;
Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ''never'' use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;), and double-rules (using &amp;lt;code&amp;gt;\hline\hline&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&amp;quot;), which are regarded as unnecessary and distracting in a professionally published form.  The [http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ booktabs] package is useful for easily providing this professionalism in LaTeX tables, and the [http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf documentation] also provides guidelines on what constitutes a &amp;quot;good&amp;quot; table.&lt;br /&gt;
&lt;br /&gt;
In brief, the package uses &amp;lt;code&amp;gt;\toprule&amp;lt;/code&amp;gt; for the uppermost rule (or line), &amp;lt;code&amp;gt;\midrule&amp;lt;/code&amp;gt; for the rules appearing in the middle of the table (such as under the header), and &amp;lt;code&amp;gt;\bottomrule&amp;lt;/code&amp;gt; for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, &amp;lt;code&amp;gt;\cmidrule&amp;lt;/code&amp;gt; can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and normal LaTeX implementations (the later example requires &amp;lt;code&amp;gt;\usepackage{booktabs}&amp;lt;/code&amp;gt; in the preamble).&lt;br /&gt;
{|&lt;br /&gt;
! Normal LaTeX&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;booktabs&amp;lt;/tt&amp;gt;&lt;br /&gt;
|- valign=bottom&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\firsthline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\lasthline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{booktabs}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\toprule&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cmidrule(r){1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\midrule&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\bottomrule&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-valign=top&lt;br /&gt;
| [[Image:LaTeX animal table.png]]&lt;br /&gt;
|&lt;br /&gt;
| [[Image:LaTeX animal table with booktabs.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the [http://www.ctan.org/tex-archive/macros/latex/contrib/ctable/ ctable] package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ctable package uses the booktabs package.&lt;br /&gt;
&lt;br /&gt;
== Adding rule spacing above or below &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\cline&amp;lt;/tt&amp;gt; commands ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to adjust the rule spacing is to add &amp;lt;code&amp;gt;\noalign{\smallskip}&amp;lt;/code&amp;gt; before or after the &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\cline{i-j}&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
'''Normal LaTeX'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline\noalign{\smallskip}&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}\noalign{\smallskip}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\noalign{\smallskip}\hline\noalign{\smallskip}&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\noalign{\smallskip}\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify the skip after a line explicitly using glue after the line terminator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
Mineral &amp;amp; Color \\[1cm]&lt;br /&gt;
Ruby &amp;amp; red \\&lt;br /&gt;
Sapphire &amp;amp; blue \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tables with different font size ==&lt;br /&gt;
&lt;br /&gt;
A table can be globally switched to a different font size by simply adding the desired size command (here: &amp;lt;code&amp;gt;\footnotesize&amp;lt;/code&amp;gt;) after the &amp;lt;code&amp;gt;\begin{table}...&amp;lt;/code&amp;gt; statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}[h]\footnotesize&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table caption font size is not affected.&lt;br /&gt;
&lt;br /&gt;
To control the caption font size, see [[LaTeX/Floats,_Figures_and_Captions#Caption_Styles|Caption Styles]].&lt;br /&gt;
&lt;br /&gt;
== Table with legend ==&lt;br /&gt;
To add a legend to a table the [http://www.ctan.org/tex-archive/macros/latex/contrib/caption/ caption] package can be used. With the caption package a &amp;lt;code&amp;gt;\caption*{...}&amp;lt;/code&amp;gt; statement can be added besides the &lt;br /&gt;
normal &amp;lt;code&amp;gt;\caption{...}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{A normal caption}&lt;br /&gt;
  \caption*{&lt;br /&gt;
    A legend, even a table can be used&lt;br /&gt;
    \begin{tabular}{l l}&lt;br /&gt;
      item 1 &amp;amp; explanation 1 \\&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
  }&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The normal caption is needed for labels and references.&lt;br /&gt;
&lt;br /&gt;
== Other Examples ==&lt;br /&gt;
Borrowed to [http://vgoulet.act.ulaval.ca/en/latex/ Vincent Goulet][[Image:Goulet-TableauFisher.png|thumb]]&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % This if you want Times Roman fonts.&lt;br /&gt;
\usepackage{fontspec} % for xetex &lt;br /&gt;
&lt;br /&gt;
\usepackage{booktabs,longtable,lscape}&lt;br /&gt;
  % \usepackage{palatino,mathpazo} &lt;br /&gt;
  %  \usepackage{booktabs,longtable,lscape,Sweave-sans-ae}&lt;br /&gt;
&lt;br /&gt;
  % \addtolength{\topmargin}{-0.5cm}&lt;br /&gt;
  % \addtolength{\textheight}{2.5cm}&lt;br /&gt;
  % \addtolength{\oddsidemargin}{-1.5cm}&lt;br /&gt;
  % \addtolength{\textwidth}{2.5cm}&lt;br /&gt;
  % \pagestyle{empty}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
%%% Après l'étape Sweave, modifier le fichier TeX comme suit:&lt;br /&gt;
%%%&lt;br /&gt;
%%% changer \cline{1-15}&lt;br /&gt;
%%%    pour \cmidrule(l){3-15}&lt;br /&gt;
%%% effacer \midrule\endfoot&lt;br /&gt;
%%%&lt;br /&gt;
%%% NOTE: 'longtable' requiert plusieurs compilations (2-3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\begin{landscape}&lt;br /&gt;
  \centering&lt;br /&gt;
  \textbf{The \emph{F} distribution}&lt;br /&gt;
  \begin{displaymath}&lt;br /&gt;
    \Pr[F_{r_1, r_2} \leq f] = \int_0^f \frac{\Gamma((r_1+r_2)/2)&lt;br /&gt;
      (r_1/r_2)^{r_1/2} x^{(r_1/2 - 1)}}{\Gamma(r_1/2) \Gamma(r_2/2)&lt;br /&gt;
      (1 + r_1 x/r_2)^{(r_1+r_2)/2}}\, dx&lt;br /&gt;
  \end{displaymath}&lt;br /&gt;
% latex.default(m, dec = 2, file = &amp;quot;&amp;quot;, rowname = NULL, cgroup = c(&amp;quot;&amp;quot;,      &amp;quot;$r_1$&amp;quot;), n.cgroup = c(2, ncol(m) - 2), cgroupTexCmd = &amp;quot;mdseries&amp;quot;,      collabel.just = c(&amp;quot;l&amp;quot;, rep(&amp;quot;r&amp;quot;, ncol(m) - 1)), longtable = TRUE,      lines.page = 80, booktabs = TRUE, table.env = FALSE, center = &amp;quot;none&amp;quot;) &lt;br /&gt;
%&lt;br /&gt;
&lt;br /&gt;
\setlongtables&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\begin{longtable}{lrcrrrrrrrrrrrr} \toprule&lt;br /&gt;
\multicolumn{2}{c}{\mdseries }&amp;amp;&lt;br /&gt;
\multicolumn{1}{c}{\mdseries }&amp;amp;&lt;br /&gt;
\multicolumn{12}{c}{\mdseries $r_1$}&lt;br /&gt;
\\ \cmidrule(l){3-15}&lt;br /&gt;
\multicolumn{1}{l}{$\Pr[F \leq f]$}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{$r_2$}&amp;amp;&lt;br /&gt;
\multicolumn{1}{c}{}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{1}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{2}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{3}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{4}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{5}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{6}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{7}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{8}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{9}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{10}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{12}&amp;amp;&lt;br /&gt;
\multicolumn{1}{r}{15}&lt;br /&gt;
\\ \midrule&lt;br /&gt;
\endhead&lt;br /&gt;
0.95&amp;amp;$ 1$&amp;amp;&amp;amp;$ 161.45$&amp;amp;$ 199.50$&amp;amp;$ 215.71$&amp;amp;$ 224.58$&amp;amp;$ 230.16$&amp;amp;$ 233.99$&amp;amp;$ 236.77$&amp;amp;$ 238.88$&amp;amp;$ 240.54$&amp;amp;$ 241.88$&amp;amp;$ 243.91$&amp;amp;$ 245.95$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$ 647.79$&amp;amp;$ 799.50$&amp;amp;$ 864.16$&amp;amp;$ 899.58$&amp;amp;$ 921.85$&amp;amp;$ 937.11$&amp;amp;$ 948.22$&amp;amp;$ 956.66$&amp;amp;$ 963.28$&amp;amp;$ 968.63$&amp;amp;$ 976.71$&amp;amp;$ 984.87$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$4052.18$&amp;amp;$4999.50$&amp;amp;$5403.35$&amp;amp;$5624.58$&amp;amp;$5763.65$&amp;amp;$5858.99$&amp;amp;$5928.36$&amp;amp;$5981.07$&amp;amp;$6022.47$&amp;amp;$6055.85$&amp;amp;$6106.32$&amp;amp;$6157.28$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 2$&amp;amp;&amp;amp;$  18.51$&amp;amp;$  19.00$&amp;amp;$  19.16$&amp;amp;$  19.25$&amp;amp;$  19.30$&amp;amp;$  19.33$&amp;amp;$  19.35$&amp;amp;$  19.37$&amp;amp;$  19.38$&amp;amp;$  19.40$&amp;amp;$  19.41$&amp;amp;$  19.43$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  38.51$&amp;amp;$  39.00$&amp;amp;$  39.17$&amp;amp;$  39.25$&amp;amp;$  39.30$&amp;amp;$  39.33$&amp;amp;$  39.36$&amp;amp;$  39.37$&amp;amp;$  39.39$&amp;amp;$  39.40$&amp;amp;$  39.41$&amp;amp;$  39.43$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  98.50$&amp;amp;$  99.00$&amp;amp;$  99.17$&amp;amp;$  99.25$&amp;amp;$  99.30$&amp;amp;$  99.33$&amp;amp;$  99.36$&amp;amp;$  99.37$&amp;amp;$  99.39$&amp;amp;$  99.40$&amp;amp;$  99.42$&amp;amp;$  99.43$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 3$&amp;amp;&amp;amp;$  10.13$&amp;amp;$   9.55$&amp;amp;$   9.28$&amp;amp;$   9.12$&amp;amp;$   9.01$&amp;amp;$   8.94$&amp;amp;$   8.89$&amp;amp;$   8.85$&amp;amp;$   8.81$&amp;amp;$   8.79$&amp;amp;$   8.74$&amp;amp;$   8.70$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  17.44$&amp;amp;$  16.04$&amp;amp;$  15.44$&amp;amp;$  15.10$&amp;amp;$  14.88$&amp;amp;$  14.73$&amp;amp;$  14.62$&amp;amp;$  14.54$&amp;amp;$  14.47$&amp;amp;$  14.42$&amp;amp;$  14.34$&amp;amp;$  14.25$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  34.12$&amp;amp;$  30.82$&amp;amp;$  29.46$&amp;amp;$  28.71$&amp;amp;$  28.24$&amp;amp;$  27.91$&amp;amp;$  27.67$&amp;amp;$  27.49$&amp;amp;$  27.35$&amp;amp;$  27.23$&amp;amp;$  27.05$&amp;amp;$  26.87$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 4$&amp;amp;&amp;amp;$   7.71$&amp;amp;$   6.94$&amp;amp;$   6.59$&amp;amp;$   6.39$&amp;amp;$   6.26$&amp;amp;$   6.16$&amp;amp;$   6.09$&amp;amp;$   6.04$&amp;amp;$   6.00$&amp;amp;$   5.96$&amp;amp;$   5.91$&amp;amp;$   5.86$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  12.22$&amp;amp;$  10.65$&amp;amp;$   9.98$&amp;amp;$   9.60$&amp;amp;$   9.36$&amp;amp;$   9.20$&amp;amp;$   9.07$&amp;amp;$   8.98$&amp;amp;$   8.90$&amp;amp;$   8.84$&amp;amp;$   8.75$&amp;amp;$   8.66$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  21.20$&amp;amp;$  18.00$&amp;amp;$  16.69$&amp;amp;$  15.98$&amp;amp;$  15.52$&amp;amp;$  15.21$&amp;amp;$  14.98$&amp;amp;$  14.80$&amp;amp;$  14.66$&amp;amp;$  14.55$&amp;amp;$  14.37$&amp;amp;$  14.20$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 5$&amp;amp;&amp;amp;$   6.61$&amp;amp;$   5.79$&amp;amp;$   5.41$&amp;amp;$   5.19$&amp;amp;$   5.05$&amp;amp;$   4.95$&amp;amp;$   4.88$&amp;amp;$   4.82$&amp;amp;$   4.77$&amp;amp;$   4.74$&amp;amp;$   4.68$&amp;amp;$   4.62$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$  10.01$&amp;amp;$   8.43$&amp;amp;$   7.76$&amp;amp;$   7.39$&amp;amp;$   7.15$&amp;amp;$   6.98$&amp;amp;$   6.85$&amp;amp;$   6.76$&amp;amp;$   6.68$&amp;amp;$   6.62$&amp;amp;$   6.52$&amp;amp;$   6.43$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  16.26$&amp;amp;$  13.27$&amp;amp;$  12.06$&amp;amp;$  11.39$&amp;amp;$  10.97$&amp;amp;$  10.67$&amp;amp;$  10.46$&amp;amp;$  10.29$&amp;amp;$  10.16$&amp;amp;$  10.05$&amp;amp;$   9.89$&amp;amp;$   9.72$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 6$&amp;amp;&amp;amp;$   5.99$&amp;amp;$   5.14$&amp;amp;$   4.76$&amp;amp;$   4.53$&amp;amp;$   4.39$&amp;amp;$   4.28$&amp;amp;$   4.21$&amp;amp;$   4.15$&amp;amp;$   4.10$&amp;amp;$   4.06$&amp;amp;$   4.00$&amp;amp;$   3.94$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   8.81$&amp;amp;$   7.26$&amp;amp;$   6.60$&amp;amp;$   6.23$&amp;amp;$   5.99$&amp;amp;$   5.82$&amp;amp;$   5.70$&amp;amp;$   5.60$&amp;amp;$   5.52$&amp;amp;$   5.46$&amp;amp;$   5.37$&amp;amp;$   5.27$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  13.75$&amp;amp;$  10.92$&amp;amp;$   9.78$&amp;amp;$   9.15$&amp;amp;$   8.75$&amp;amp;$   8.47$&amp;amp;$   8.26$&amp;amp;$   8.10$&amp;amp;$   7.98$&amp;amp;$   7.87$&amp;amp;$   7.72$&amp;amp;$   7.56$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 7$&amp;amp;&amp;amp;$   5.59$&amp;amp;$   4.74$&amp;amp;$   4.35$&amp;amp;$   4.12$&amp;amp;$   3.97$&amp;amp;$   3.87$&amp;amp;$   3.79$&amp;amp;$   3.73$&amp;amp;$   3.68$&amp;amp;$   3.64$&amp;amp;$   3.57$&amp;amp;$   3.51$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   8.07$&amp;amp;$   6.54$&amp;amp;$   5.89$&amp;amp;$   5.52$&amp;amp;$   5.29$&amp;amp;$   5.12$&amp;amp;$   4.99$&amp;amp;$   4.90$&amp;amp;$   4.82$&amp;amp;$   4.76$&amp;amp;$   4.67$&amp;amp;$   4.57$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  12.25$&amp;amp;$   9.55$&amp;amp;$   8.45$&amp;amp;$   7.85$&amp;amp;$   7.46$&amp;amp;$   7.19$&amp;amp;$   6.99$&amp;amp;$   6.84$&amp;amp;$   6.72$&amp;amp;$   6.62$&amp;amp;$   6.47$&amp;amp;$   6.31$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 8$&amp;amp;&amp;amp;$   5.32$&amp;amp;$   4.46$&amp;amp;$   4.07$&amp;amp;$   3.84$&amp;amp;$   3.69$&amp;amp;$   3.58$&amp;amp;$   3.50$&amp;amp;$   3.44$&amp;amp;$   3.39$&amp;amp;$   3.35$&amp;amp;$   3.28$&amp;amp;$   3.22$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   7.57$&amp;amp;$   6.06$&amp;amp;$   5.42$&amp;amp;$   5.05$&amp;amp;$   4.82$&amp;amp;$   4.65$&amp;amp;$   4.53$&amp;amp;$   4.43$&amp;amp;$   4.36$&amp;amp;$   4.30$&amp;amp;$   4.20$&amp;amp;$   4.10$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  11.26$&amp;amp;$   8.65$&amp;amp;$   7.59$&amp;amp;$   7.01$&amp;amp;$   6.63$&amp;amp;$   6.37$&amp;amp;$   6.18$&amp;amp;$   6.03$&amp;amp;$   5.91$&amp;amp;$   5.81$&amp;amp;$   5.67$&amp;amp;$   5.52$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$ 9$&amp;amp;&amp;amp;$   5.12$&amp;amp;$   4.26$&amp;amp;$   3.86$&amp;amp;$   3.63$&amp;amp;$   3.48$&amp;amp;$   3.37$&amp;amp;$   3.29$&amp;amp;$   3.23$&amp;amp;$   3.18$&amp;amp;$   3.14$&amp;amp;$   3.07$&amp;amp;$   3.01$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   7.21$&amp;amp;$   5.71$&amp;amp;$   5.08$&amp;amp;$   4.72$&amp;amp;$   4.48$&amp;amp;$   4.32$&amp;amp;$   4.20$&amp;amp;$   4.10$&amp;amp;$   4.03$&amp;amp;$   3.96$&amp;amp;$   3.87$&amp;amp;$   3.77$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  10.56$&amp;amp;$   8.02$&amp;amp;$   6.99$&amp;amp;$   6.42$&amp;amp;$   6.06$&amp;amp;$   5.80$&amp;amp;$   5.61$&amp;amp;$   5.47$&amp;amp;$   5.35$&amp;amp;$   5.26$&amp;amp;$   5.11$&amp;amp;$   4.96$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$10$&amp;amp;&amp;amp;$   4.96$&amp;amp;$   4.10$&amp;amp;$   3.71$&amp;amp;$   3.48$&amp;amp;$   3.33$&amp;amp;$   3.22$&amp;amp;$   3.14$&amp;amp;$   3.07$&amp;amp;$   3.02$&amp;amp;$   2.98$&amp;amp;$   2.91$&amp;amp;$   2.85$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.94$&amp;amp;$   5.46$&amp;amp;$   4.83$&amp;amp;$   4.47$&amp;amp;$   4.24$&amp;amp;$   4.07$&amp;amp;$   3.95$&amp;amp;$   3.85$&amp;amp;$   3.78$&amp;amp;$   3.72$&amp;amp;$   3.62$&amp;amp;$   3.52$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$  10.04$&amp;amp;$   7.56$&amp;amp;$   6.55$&amp;amp;$   5.99$&amp;amp;$   5.64$&amp;amp;$   5.39$&amp;amp;$   5.20$&amp;amp;$   5.06$&amp;amp;$   4.94$&amp;amp;$   4.85$&amp;amp;$   4.71$&amp;amp;$   4.56$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$12$&amp;amp;&amp;amp;$   4.75$&amp;amp;$   3.89$&amp;amp;$   3.49$&amp;amp;$   3.26$&amp;amp;$   3.11$&amp;amp;$   3.00$&amp;amp;$   2.91$&amp;amp;$   2.85$&amp;amp;$   2.80$&amp;amp;$   2.75$&amp;amp;$   2.69$&amp;amp;$   2.62$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.55$&amp;amp;$   5.10$&amp;amp;$   4.47$&amp;amp;$   4.12$&amp;amp;$   3.89$&amp;amp;$   3.73$&amp;amp;$   3.61$&amp;amp;$   3.51$&amp;amp;$   3.44$&amp;amp;$   3.37$&amp;amp;$   3.28$&amp;amp;$   3.18$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$   9.33$&amp;amp;$   6.93$&amp;amp;$   5.95$&amp;amp;$   5.41$&amp;amp;$   5.06$&amp;amp;$   4.82$&amp;amp;$   4.64$&amp;amp;$   4.50$&amp;amp;$   4.39$&amp;amp;$   4.30$&amp;amp;$   4.16$&amp;amp;$   4.01$\\&lt;br /&gt;
&amp;amp;$$&amp;amp;&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$&amp;amp;$$\\&lt;br /&gt;
0.95&amp;amp;$15$&amp;amp;&amp;amp;$   4.54$&amp;amp;$   3.68$&amp;amp;$   3.29$&amp;amp;$   3.06$&amp;amp;$   2.90$&amp;amp;$   2.79$&amp;amp;$   2.71$&amp;amp;$   2.64$&amp;amp;$   2.59$&amp;amp;$   2.54$&amp;amp;$   2.48$&amp;amp;$   2.40$\\&lt;br /&gt;
0.975&amp;amp;$$&amp;amp;&amp;amp;$   6.20$&amp;amp;$   4.77$&amp;amp;$   4.15$&amp;amp;$   3.80$&amp;amp;$   3.58$&amp;amp;$   3.41$&amp;amp;$   3.29$&amp;amp;$   3.20$&amp;amp;$   3.12$&amp;amp;$   3.06$&amp;amp;$   2.96$&amp;amp;$   2.86$\\&lt;br /&gt;
0.99&amp;amp;$$&amp;amp;&amp;amp;$   8.68$&amp;amp;$   6.36$&amp;amp;$   5.42$&amp;amp;$   4.89$&amp;amp;$   4.56$&amp;amp;$   4.32$&amp;amp;$   4.14$&amp;amp;$   4.00$&amp;amp;$   3.89$&amp;amp;$   3.80$&amp;amp;$   3.67$&amp;amp;$   3.52$\\&lt;br /&gt;
\bottomrule&lt;br /&gt;
 \end{longtable}&lt;br /&gt;
\end{landscape}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% mode: latex&lt;br /&gt;
%%% TeX-master: t&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Need more complicated features? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at one of the following packages:&lt;br /&gt;
&lt;br /&gt;
* [http://tug.ctan.org/pkg/hhline &amp;lt;tt&amp;gt;hhline&amp;lt;/tt&amp;gt;]:   do whatever you want with horizontal lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/array &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;]:    gives you more freedom on how to define columns&lt;br /&gt;
* [http://tug.ctan.org/pkg/colortbl &amp;lt;tt&amp;gt;colortbl&amp;lt;/tt&amp;gt;]: make your table more colorful&lt;br /&gt;
* [http://tug.ctan.org/pkg/supertabular &amp;lt;tt&amp;gt;supertabular&amp;lt;/tt&amp;gt;]: for tables that need to stretch over several pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/longtable &amp;lt;tt&amp;gt;longtable&amp;lt;/tt&amp;gt;]:  similar to &amp;lt;tt&amp;gt;supertab&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Note: footnotes do not work properly in a normal tabular environment. If you replace it with a longtable environment, footnotes work properly&lt;br /&gt;
* [http://tug.ctan.org/pkg/xtab &amp;lt;tt&amp;gt;xtab&amp;lt;/tt&amp;gt;]: Yet another package for tables that need to span many pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/tabulary &amp;lt;tt&amp;gt;tabulary&amp;lt;/tt&amp;gt;]: modified &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; allowing width of columns set for equal heights&lt;br /&gt;
* [http://tug.ctan.org/pkg/arydshln &amp;lt;tt&amp;gt;arydshln&amp;lt;/tt&amp;gt;]: creates dashed horizontal and vertical lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/ctable &amp;lt;tt&amp;gt;ctable&amp;lt;/tt&amp;gt;]: allows for footnotes under table and properly spaced caption above (incorporates booktabs package)&lt;br /&gt;
* [http://tug.ctan.org/pkg/slashbox &amp;lt;tt&amp;gt;slashbox&amp;lt;/tt&amp;gt;]: create 2D tables with the first cell containing a description for both axes&lt;br /&gt;
* [http://tug.ctan.org/pkg/dcolumn &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt;]: decimal point alignment of numeric cells&lt;br /&gt;
* [http://tug.ctan.org/pkg/rccol &amp;lt;tt&amp;gt;rccol&amp;lt;/tt&amp;gt;]: advanced decimal point alignment of numeric cells with rounding&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This concludes discussion of basic tables. Experimentation quickly leads to mastery. The table syntax in LaTeX can look rather messy, and seeing new examples can look confusing. But hopefully, enough has been covered here so that a user can create any table needed for your papers. Unsurprisingly, LaTeX has plenty more up its sleeve, so expect a follow up tutorial covering more advanced features in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=Fichier:Goulet-TableauFisher.png&amp;diff=463</id>
		<title>Fichier:Goulet-TableauFisher.png</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=Fichier:Goulet-TableauFisher.png&amp;diff=463"/>
				<updated>2011-07-06T07:07:28Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Borrowed to [http://vgoulet.act.ulaval.ca/en/latex/ Vincent Goulet]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Borrowed to [http://vgoulet.act.ulaval.ca/en/latex/ Vincent Goulet]&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=462</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=462"/>
				<updated>2011-06-30T17:19:48Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* How page styles work in memoir */ makepagestyle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf which itself is a synthesis of the ''memoir'' class documentation which you can find at http://www.tex.ac.uk/CTAN/macros/latex2e/contrib/memoir/memman.pdf .&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
A new page style is defined by \makepagestyle{mystyle} as in the following example.&lt;br /&gt;
&lt;br /&gt;
== Simple 'page number' centered in the foot ==&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\makepagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\makeoddfoot{pageonfoot}{}{-\thepage-}{} &lt;br /&gt;
\makeevenfoot{pageonfoot}{}{-\thepage-}{}&lt;br /&gt;
&lt;br /&gt;
\pagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=461</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=461"/>
				<updated>2011-06-30T17:18:04Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Simple page number centered in the foot */ typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf which itself is a synthesis of the ''memoir'' class documentation which you can find at http://www.tex.ac.uk/CTAN/macros/latex2e/contrib/memoir/memman.pdf .&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
== Simple 'page number' centered in the foot ==&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\makepagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\makeoddfoot{pageonfoot}{}{-\thepage-}{} &lt;br /&gt;
\makeevenfoot{pageonfoot}{}{-\thepage-}{}&lt;br /&gt;
&lt;br /&gt;
\pagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=460</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=460"/>
				<updated>2011-06-30T17:16:08Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Link to memoir class documentation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf which itself is a synthesis of the ''memoir'' class documentation which you can find at http://www.tex.ac.uk/CTAN/macros/latex2e/contrib/memoir/memman.pdf .&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
== Simple page number centered in the foot ==&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass[a4paper]{memoir}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\makepagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\makeoddfoot{mystyle}{}{\thepage}{} &lt;br /&gt;
\makeevenfoot{mystyle}{}{\thepage}{}&lt;br /&gt;
&lt;br /&gt;
\pagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=459</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=459"/>
				<updated>2011-06-30T16:05:21Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf:&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
== Simple page number centered in the foot ==&lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
\documentclass[a4paper]{memoir}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\makepagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\makeoddfoot{mystyle}{}{\thepage}{} &lt;br /&gt;
\makeevenfoot{mystyle}{}{\thepage}{}&lt;br /&gt;
&lt;br /&gt;
\pagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=458</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=458"/>
				<updated>2011-06-30T16:00:32Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* How page styles work in memoir */ page on foot example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf:&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
== Simple page number centered in the foot ==&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
\documentclass[a4paper]{memoir}&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\makepagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\makeoddfoot{mystyle}{}{\thepage}{} &lt;br /&gt;
\makeevenhead{mystyle}{}{\thepage}{}&lt;br /&gt;
&lt;br /&gt;
\pagestyle{pageonfoot}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=457</id>
		<title>LaTeX/Page Layout</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Page_Layout&amp;diff=457"/>
				<updated>2011-06-30T15:17:30Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Borrowed mostly to Lars Madsen&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
The reference is http://tug.org/pracjourn/2008-2/madsen/madsen.pdf:&lt;br /&gt;
&lt;br /&gt;
The standard classes (book, article, report), are not particularly flexible. There are basically no configuration interfaces at all; one needs to resort to external packages.&lt;br /&gt;
&lt;br /&gt;
In the area of page styling, the situation in the standard classes is no different. The standard classes have several annoying features regarding the material used in the page styles.&lt;br /&gt;
# All mark content provided by \chapter, \section, etc. are hardwired to be in upper case.&lt;br /&gt;
# Marks set by macros and environments such as \tableofcontents, the bib- liography and the index are all in upper case. This feature cannot easily be changed without having to copy a large number of code lines and then only changing one or two lines of that code.&lt;br /&gt;
# In case your setup allows a blank page before starting a new chapter (default in the book class), that »blank« page is not really blank; it has the same page style as all other regular pages, which looks odd if there is no other content on the page. The solution is to manually change \cleardoublepage in order&lt;br /&gt;
to automatically make these pages truly blank. &lt;br /&gt;
# There is no easy way to redesign the look of the footers and headers. &lt;br /&gt;
# Creating truly flexible sectional marking macros — \chaptermark, \sec-&lt;br /&gt;
tionmark, etc. used internally by \chapter etc. — demands a lot of LATEX knowledge from the (novice) user.&lt;br /&gt;
&lt;br /&gt;
== The fancyhdr package ==&lt;br /&gt;
The fancyhdr package can handle several of these problems but with some costs. Also fancyhdr isn't compatible with the ''memoir'' class which also have fancy heading facilities.&lt;br /&gt;
&lt;br /&gt;
== Page styling in memoir ==&lt;br /&gt;
&lt;br /&gt;
In memoir we deal with two types of page styles, aliases and regular page styles. An alias page style is a style that just refers to another style, i.e. if the style alias is an alias for the empty style, then \pagestyle{alias} is the same as \pagestyle{empty}. &lt;br /&gt;
&lt;br /&gt;
The advantage of having aliases is that we can, for example, provide the first page of a chapter with its very own page style without the need to create a specific style for it. &lt;br /&gt;
&lt;br /&gt;
We just let the chapter style point to some other style, say, plain; and if we later decide that we want a different look for the chapter title page, then we just let chapter point to some other page style.&lt;br /&gt;
&lt;br /&gt;
=== How page styles work in memoir ===&lt;br /&gt;
As mentioned earlier the headers and footers are added to the page via the four macros \@evenhead, \@oddhead, \@evenfoot and \@oddfoot. In memoir a given page style ⟨style⟩ consists of a number of specially created macros, all associated with the name ⟨style⟩, and activating ⟨style⟩ causes LATEX to rebuild those four macros using the current content of the macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
The memoir page style interface interacts with the special macros associated with ⟨style⟩.&lt;br /&gt;
&lt;br /&gt;
:\pagestyle{empty}&lt;br /&gt;
:\pagestyle{plain}&lt;br /&gt;
:\pagestyle{headings}&lt;br /&gt;
:\pagestyle{ruled}&lt;br /&gt;
:\pagestyle{Ruled}&lt;br /&gt;
&lt;br /&gt;
The main macros for dealing with the design of the headers and footers are:&lt;br /&gt;
:\makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeevenfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
:\makeoddfoot{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩}&lt;br /&gt;
&lt;br /&gt;
and in order to manage rules:&lt;br /&gt;
:\makeheadrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩} &lt;br /&gt;
:\makefootrule{⟨style⟩}{⟨width⟩}{⟨thickness⟩}{⟨skip⟩}&lt;br /&gt;
:\normalrulethickness&lt;br /&gt;
&lt;br /&gt;
Thus the standard ''headings'' style is simply:&lt;br /&gt;
:\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}&lt;br /&gt;
:\makeevenhead{headings}{\thepage}{}{\slshape\rightmark}&lt;br /&gt;
which means that the ''page number'' is on top right on odd pages (and top left on even pages) while the current heading (chapter title etc.) is slanted and opposite to page number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=456</id>
		<title>LaTeX/Tables</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=456"/>
				<updated>2011-06-30T14:48:22Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
In scientific writing, tables are a common feature. It is therefore a skill that needs mastering in order to produce quality papers.&lt;br /&gt;
&lt;br /&gt;
It is no more common to enter data with fingers. Numeric keypads are rarely used today and who remembers that the middle finger rest position is on the unique key with a grip the key 5. Tables on printed papers are scanned and submitted to Optical Characters Recognition (OCR) softwares which do exist even on smartphones. Data are treated by computer softwares, but in order to produce synthetic tables, your intermediate step is usually a spreadsheet which lets you make easy calculations like percentages as well as pretty printing.&lt;br /&gt;
&lt;br /&gt;
If basic tables are easy to be set in LaTeX, any serious table is a night mare and a tool to output the required LaTeX code directly in a file or in your clipboard is necessary. It might be necessary to clean, simplify and beautify the code.&lt;br /&gt;
&lt;br /&gt;
Thus, the first step consists in learning how to use such a tool like the calc2latex plugins [http://calc2latex.sourceforge.net/ http://calc2latex.sourceforge.net/] which works for openoffice calc (or libreoffice) and the second step in how manage LaTeX tables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the section  [[#Calc2LaTeX]] below for how to install. If you use MS Excel Spreadsheet or any other spreadsheet you can usually copy and paste selected cells to OO calc or open the .xls file with OO calc. &lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX usage ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Run OpenOffice Calc.&lt;br /&gt;
#Select cells you want to convert into LaTeX format.&lt;br /&gt;
#Push 'Tools'-'Macro'. (In the case of OpenOffice1.1 RC, push 'Tools'-'Macros'-'Macro')&lt;br /&gt;
#You will see 'Macro' dialog box. And then click 'soffice'-'calc2latex' in Macro form to show 'Main' item.&lt;br /&gt;
#Select 'Main' in 'soffice'-'calc2latex'-'Main' and push 'Run' button.&lt;br /&gt;
:[[Fichier:calc2latex-usage-macro.png|500px]]&lt;br /&gt;
&lt;br /&gt;
After these steps...&lt;br /&gt;
&lt;br /&gt;
#To get results, select all strings in 'Results' dialog box. In the example below, the title of the table in A1 will be used as the caption (just copy it into memory and paste it into the caption of the dialog) and thus the tabular environment will be embedded into a floated &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment with classical priorities htbp (here first, top second, bottom third, page last). Columns B and C have to be right justified before export because it will minimize the code. In this exemple with 3 columns the argument will be lrr and you will avoid many \multicolumn{1}{r}{} which be output for each right justified cells when the column itself is left or center justified. You can unselect the &amp;lt;tt&amp;gt;Ruled line&amp;lt;/tt&amp;gt; in order to simplify and usually beautify the table. You can keep the Bold face/Italics features. Unfortunately the color of the cells will not be kept. [[Fichier:calc2latex-usage-macro-dialog.png|600px]]&lt;br /&gt;
#Select all and copy to your clipboard and paste it into your TeX editor. It contains the table environment with the tabular environment embedded such as seen below. [[Fichier:calc2latex-after-usage-macro.png|600px]]&lt;br /&gt;
# Put the LaTeX code in your editor within an \begin{document} \end{document} environment, choosing, for example a &amp;lt;tt&amp;gt;memoir&amp;lt;/tt&amp;gt; class, calling your floating table with a &amp;lt;tt&amp;gt;\ref{comptes-cnf}&amp;lt;/tt&amp;gt; and running the result&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=latex enclose=yes&amp;gt;&lt;br /&gt;
% -*-latex-*-&lt;br /&gt;
&lt;br /&gt;
%&lt;br /&gt;
% These lines tell gnu-emacs to typeset &lt;br /&gt;
% with the xetex engine &lt;br /&gt;
% which requires Unicode encoding only (utf-8)&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % If Times Roman&lt;br /&gt;
\usepackage{fontspec} % for xetex engine &lt;br /&gt;
&lt;br /&gt;
As you can see on the table~\table{comptes-cnf} &lt;br /&gt;
of the French committee of the IUSSP members, &lt;br /&gt;
the balance concerning the &lt;br /&gt;
\href{http://demopaedia.org}{Demopædia} &lt;br /&gt;
project .&lt;br /&gt;
  \begin{document}&lt;br /&gt;
\begin{table}[htbp]&lt;br /&gt;
\caption{Rapport financier (provisoire) pour &lt;br /&gt;
 l'assemblée générale ordinaire du 20 mai 2011}&lt;br /&gt;
\begin{tabular}{lrr}&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; Débit &amp;amp; Crédit \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 31/12/2010} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- solde du CCP &amp;amp;  &amp;amp; 343,75 \\ &lt;br /&gt;
- solde du Livret A &amp;amp;  &amp;amp; 1 017,84 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 1 361,59 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Recettes de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Intérêts capitalisés Livret A &lt;br /&gt;
(au titre de 2010)&lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des recettes &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Dépenses de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais bancaires \&amp;amp; frais généraux &amp;amp; 30,50 &amp;amp;  \\ &lt;br /&gt;
- Organisation AG 2011 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais déplacement AG 2011 &amp;amp; 260,90 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Demopaedia : &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Nom de domaine (2009, 2010 et 2011) &amp;amp; 86,10 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des dépenses &amp;amp; 377,50 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 20/05/2011} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- CCP &amp;amp;  &amp;amp; 216,25 \\ &lt;br /&gt;
- Livret A &amp;amp;  &amp;amp; 767,84 \\ &lt;br /&gt;
Total des encours &amp;amp;  &amp;amp; 984,09 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Bilan} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Différence des soldes &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
- Différences des recettes et des dépenses &lt;br /&gt;
 &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
\end{tabular}&lt;br /&gt;
\label{comptes-cnf}&lt;br /&gt;
\end{table}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex example calc2tex.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You probably need to adapt a little bit the code and here are some advices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.&lt;br /&gt;
&lt;br /&gt;
The first line of the environment has the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}[pos]{table spec}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the ''table spec'' argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.&lt;br /&gt;
&lt;br /&gt;
The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ''array'' has been loaded):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;l&amp;lt;/tt&amp;gt;&lt;br /&gt;
| left-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
| centered column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;&lt;br /&gt;
| right-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the top&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;m{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned in the middle (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the bottom (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| vertical line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| double vertical line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using &amp;lt;code&amp;gt;p{''width''}&amp;lt;/code&amp;gt; you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as pt and cm, or ''command lengths'', such as &amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;.You can find a complete list in appendix [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The optional parameter ''pos'' can be used to specify the vertical position of the table relative to&lt;br /&gt;
the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|bottom&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
|center (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|top&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;amp;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| column separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\\&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start new row (additional space may be specified after &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; using square brackets, such as &amp;lt;code&amp;gt;\\[6pt]&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| horizontal line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\newline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start a new line within a cell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\cline{''i''-''j''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| partial horizontal line beginning in column ''i'' and ending in column ''j''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, any white space inserted between these commands is purely down to ones' preferences. I personally add spaces between to make it easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Basic examples ===&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Expanding upon that by including some vertical lines:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To add horizontal lines to the very top and bottom edges of the table:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  \hline			&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
  \hline  &lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{center}&lt;br /&gt;
  \begin{tabular}{ l | c || r | }&lt;br /&gt;
    \hline&lt;br /&gt;
    1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
    4 &amp;amp; 5 &amp;amp; 6 \\ \hline&lt;br /&gt;
    7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
    \hline&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{center}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|r|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  7C0 &amp;amp; hexadecimal \\&lt;br /&gt;
  3700 &amp;amp; octal \\ \cline{2-2}&lt;br /&gt;
  11111000000 &amp;amp; binary \\&lt;br /&gt;
  \hline \hline&lt;br /&gt;
  1984 &amp;amp; decimal \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:Latex example tabular cline.png|250px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Column specification using &amp;lt;code&amp;gt;&amp;gt;{\cmd}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;{\cmd}&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Using the array package, the column specification can be altered. This is done in the &lt;br /&gt;
argument of the tabular environment using &amp;lt;code&amp;gt;&amp;gt;{\command}&amp;lt;/code&amp;gt; for commands executed right &lt;br /&gt;
''before'' each column element and &amp;lt;code&amp;gt;&amp;lt;{\command}&amp;lt;/code&amp;gt; for commands to be executed right&lt;br /&gt;
''after'' each column element. &lt;br /&gt;
As an example: to get a column in math mode enter: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{$}c&amp;lt;{$}}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Another example is changing the font: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{\small}c}&amp;lt;/code&amp;gt; to print the column in a small font.&lt;br /&gt;
&lt;br /&gt;
The argument of the &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; specifications must be correctly balanced when it comes to &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters. This means that &amp;lt;code&amp;gt;&amp;gt;{\bfseries}&amp;lt;/code&amp;gt; is valid, while &amp;lt;code&amp;gt;&amp;gt;{\textbf}&amp;lt;/code&amp;gt; will not work and &amp;lt;code&amp;gt;&amp;gt;{\textbf{}&amp;lt;/code&amp;gt; is not valid. If there is the need to use the text of the table as an argument (for instance, using the &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt; to produce bold text), one should use the &amp;lt;code&amp;gt;\bgroup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\egroup&amp;lt;/code&amp;gt; commands: &amp;lt;code&amp;gt;&amp;gt;{\textbf\bgroup}c&amp;lt;{\egroup}&amp;lt;/code&amp;gt; produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; to underline text, it is necessary to temporarily store the column text in a box using &amp;lt;code&amp;gt;lrbox&amp;lt;/code&amp;gt;. First, you must define such a box with &amp;lt;code&amp;gt;\newsavebox{\boxname}&amp;lt;/code&amp;gt; and then you can define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;{\begin{lrbox}{\boxname}}%&lt;br /&gt;
l%&lt;br /&gt;
&amp;lt;{\end{lrbox}%&lt;br /&gt;
  \underline{\unhbox\boxname}}%&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This stores the text in a box and afterwards, takes the text out of the box with &amp;lt;code&amp;gt;\unhbox&amp;lt;/code&amp;gt; (this destroys the box, if the box is needed again one should use &amp;lt;code&amp;gt;\unhcopy&amp;lt;/code&amp;gt; instead) and passing it to &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt;. (For LaTeX2e, you may want to use &amp;lt;code&amp;gt;\usebox{\boxname}&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\unhbox\boxname&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
This same trick done with &amp;lt;code&amp;gt;\raisebox&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.&lt;br /&gt;
&lt;br /&gt;
Here is an example showing the use of both &amp;lt;code&amp;gt;p{...}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;gt;{\centering}&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{&amp;gt;{\centering}p{3.5cm}&amp;gt;{\centering}p{3.5cm}}&lt;br /&gt;
Geometry  &amp;amp; Algebra&lt;br /&gt;
\tabularnewline&lt;br /&gt;
\hline&lt;br /&gt;
 Points &amp;amp; Addition &lt;br /&gt;
\tabularnewline&lt;br /&gt;
 Spheres &amp;amp; Multiplication &lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;code&amp;gt;\tabularnewline&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to avoid a &amp;lt;code&amp;gt;Misplaced \noalign&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Text wrapping in tables ===&lt;br /&gt;
&lt;br /&gt;
LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that you know will contain a certain amount of text, then it is recommended that you use the ''p'' attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). Use the ''m'' attribute to have the lines aligned toward the middle of the box and the ''b'' attribute to align along the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
Here is a practical example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article} &lt;br /&gt;
&lt;br /&gt;
\usepackage[english]{babel}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
Without specifying width for last column:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | l |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.&lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
With width specified:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | p{5cm} |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.  &lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You get the following output:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example wrapped table.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
Note that the first table is cropped: The output is wider than the page width.&lt;br /&gt;
&lt;br /&gt;
=== Text justification in tables ===&lt;br /&gt;
&lt;br /&gt;
On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package provides the command &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; which is like &amp;lt;code&amp;gt;\makebox&amp;lt;/code&amp;gt; but instead of a ''width'' argument, it takes a tag. During compilation it bookkeeps which &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; with a certain tag contains the widest text and can stretch all &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt;es with the same tag to that width. Combined with the &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; package, one can define a column specifier that justifies the text in all lines: (See the documentation of the &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package for more details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newsavebox{\tstretchbox}&lt;br /&gt;
\newcolumntype{S}[1]{%&lt;br /&gt;
 &amp;gt;{\begin{lrbox}{\tstretchbox}}%&lt;br /&gt;
 l%&lt;br /&gt;
 &amp;lt;{\end{lrbox}%&lt;br /&gt;
   \eqmakebox[#1][s]{\unhcopy\tstretchbox}}%&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other environments inside tables ===&lt;br /&gt;
&lt;br /&gt;
If you use some LaTeX environments inside table cells, like &amp;lt;tt&amp;gt;verbatim&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;[[LaTeX/Formatting#Enumerate|enumerate]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| c | c |}&lt;br /&gt;
	\hline&lt;br /&gt;
	\begin{verbatim}&lt;br /&gt;
	code&lt;br /&gt;
	\end{verbatim}&lt;br /&gt;
	&amp;amp; description&lt;br /&gt;
 	\\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might encounter errors similar to&lt;br /&gt;
 ! LaTeX Error: Something's wrong--perhaps a missing \item.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, change [[#The tabular environment|column specifier]] to &amp;quot;paragraph&amp;quot; (&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;m&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| m{5cm} | c |}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining multiple columns ===&lt;br /&gt;
&lt;br /&gt;
It is possible to define many identical columns at once using the &amp;lt;code&amp;gt;*{''num''}{''str''}&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
This is particularly useful when your table has many columns. &lt;br /&gt;
&lt;br /&gt;
Here is a table with six centered columns flanked by a single column on each side:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{l*{6}{c}r}&lt;br /&gt;
Team              &amp;amp; P &amp;amp; W &amp;amp; D &amp;amp; L &amp;amp; F  &amp;amp; A &amp;amp; Pts \\&lt;br /&gt;
\hline&lt;br /&gt;
Manchester United &amp;amp; 6 &amp;amp; 4 &amp;amp; 0 &amp;amp; 2 &amp;amp; 10 &amp;amp; 5 &amp;amp; 12  \\&lt;br /&gt;
Celtic            &amp;amp; 6 &amp;amp; 3 &amp;amp; 0 &amp;amp; 3 &amp;amp;  8 &amp;amp; 9 &amp;amp;  9  \\&lt;br /&gt;
Benfica           &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 3 &amp;amp;  7 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
FC Copenhagen     &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 2 &amp;amp;  5 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example defining multiple columns.png|450px]]&lt;br /&gt;
&lt;br /&gt;
=== @-expressions ===&lt;br /&gt;
&lt;br /&gt;
The column separator can be specified with the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct. &lt;br /&gt;
&lt;br /&gt;
It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. This command kills the inter-column space and replaces it with whatever is between the curly braces. To add space, use &amp;lt;code&amp;gt;@{\hspace{''width''}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r@{.}l}&lt;br /&gt;
  3   &amp;amp; 14159 \\&lt;br /&gt;
  16  &amp;amp; 2     \\&lt;br /&gt;
  123 &amp;amp; 456   \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:align.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the approach outlined above won't work well if the column header is longer than any of the numbers. To center the column on the decimal separator, use the &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt; package, which provides a new column specifier for floating point data.&lt;br /&gt;
&lt;br /&gt;
The space suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\ \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|l|l|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier1.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier3.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|@{}l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spanning ===&lt;br /&gt;
&lt;br /&gt;
To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.&lt;br /&gt;
&lt;br /&gt;
==== Rows spanning multiple columns ====&lt;br /&gt;
&lt;br /&gt;
The command for this looks like this: &amp;lt;code&amp;gt;\multicolumn{''num_cols''}{''alignment''}{''contents''}&amp;lt;/code&amp;gt;. ''num_cols'' is the number of subsequent columns to merge; ''alignment'' is, either l, c, r or to have text wrapping specifiy a width &amp;lt;code&amp;gt;p{5.0cm}&amp;lt;/code&amp;gt; . And ''contents'' is simply the actual data you want to be contained within that cell. A simple example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  \multicolumn{2}{|c|}{Team sheet} \\&lt;br /&gt;
  \hline&lt;br /&gt;
  GK &amp;amp; Paul Robinson \\&lt;br /&gt;
  LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
  DC &amp;amp; Michael Duberry \\&lt;br /&gt;
  DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
  RB &amp;amp; Didier Domi \\&lt;br /&gt;
  MC &amp;amp; David Batty \\&lt;br /&gt;
  MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
  MC &amp;amp; Jody Morris \\&lt;br /&gt;
  FW &amp;amp; Jamie McMaster \\&lt;br /&gt;
  ST &amp;amp; Alan Smith \\&lt;br /&gt;
  ST &amp;amp; Mark Viduka \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multicolumn.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Columns spanning multiple rows ====&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is add &amp;lt;code&amp;gt;\usepackage{multirow}&amp;lt;/code&amp;gt; [http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/] to the preamble. This then provides the command needed for spanning rows: &amp;lt;code&amp;gt;\multirow{''num_rows''}{''width''}{''contents''}&amp;lt;/code&amp;gt;. The arguments are pretty simple to deduce (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for the ''width'' means the content's natural width).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{|l|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{3}{|c|}{Team sheet} \\&lt;br /&gt;
\hline&lt;br /&gt;
Goalkeeper &amp;amp; GK &amp;amp; Paul Robinson \\ \hline&lt;br /&gt;
\multirow{4}{*}{Defenders} &amp;amp; LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Michael Duberry \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
 &amp;amp; RB &amp;amp; Didier Domi \\ \hline&lt;br /&gt;
\multirow{3}{*}{Midfielders} &amp;amp; MC &amp;amp; David Batty \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Jody Morris \\ \hline&lt;br /&gt;
Forward &amp;amp; FW &amp;amp; Jamie McMaster \\ \hline&lt;br /&gt;
\multirow{2}{*}{Strikers} &amp;amp; ST &amp;amp; Alan Smith \\&lt;br /&gt;
 &amp;amp; ST &amp;amp; Mark Viduka \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirow.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The main thing to note when using &amp;lt;code&amp;gt;\multirow&amp;lt;/code&amp;gt; is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.&lt;br /&gt;
&lt;br /&gt;
If there is no data for a cell, just don't type anything, but you still need the &amp;quot;&amp;amp;&amp;quot; separating it from the next column's data. The astute reader will already have deduced that for a table of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; columns, there must always be &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; ampersands in each row. The exception to this is when &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\multirow&amp;lt;/tt&amp;gt; are used to create cells which span multiple columns or rows.&lt;br /&gt;
&lt;br /&gt;
==== Spanning in both directions simultaneously ====&lt;br /&gt;
&lt;br /&gt;
Here is a nontrivial example how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{cc|c|c|c|c|l}&lt;br /&gt;
\cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; \multicolumn{4}{|c|}{Primes} \\ \cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; 2 &amp;amp; 3 &amp;amp; 5 &amp;amp; 7 \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{504} &amp;amp; 3 &amp;amp; 2 &amp;amp; 0 &amp;amp; 1 &amp;amp;     \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{540} &amp;amp; 2 &amp;amp; 3 &amp;amp; 1 &amp;amp; 0 &amp;amp;     \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{gcd} &amp;amp; 2 &amp;amp; 2 &amp;amp; 0 &amp;amp; 0 &amp;amp; min \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{lcm} &amp;amp; 3 &amp;amp; 3 &amp;amp; 1 &amp;amp; 1 &amp;amp; max \\ \cline{1-6}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirowandcolumnexample.png|300px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with &amp;lt;code&amp;gt;\multirow{2}{*}{...}&amp;lt;/code&amp;gt;, it still draws vertical borders that only span the first row. To compensate for that, we add &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; in the following rows spanned by the multirow. Note that we cannot just use &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command &amp;lt;code&amp;gt;\cline{2-6}&amp;lt;/code&amp;gt; and opt out the first column that contains the text &amp;quot;Powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is another example exploiting the same ideas to make&lt;br /&gt;
the familiar and popular &amp;quot;2x2&amp;quot; or double dichotomy:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r|c|c|}&lt;br /&gt;
\multicolumn{1}{r}{}&lt;br /&gt;
 &amp;amp;  \multicolumn{1}{c}{noninteractive}&lt;br /&gt;
 &amp;amp; \multicolumn{1}{c}{interactive} \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
massively multiple &amp;amp; Library &amp;amp; University \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
one-to-one &amp;amp; Book &amp;amp; Tutor \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex-tables-double-dichotomy-example.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Resize tables ===&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\resizebox{width}{height}{object}&amp;lt;/code&amp;gt; can be used with &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width/height ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\resizebox{8cm}{!} {&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use &amp;lt;code&amp;gt;\scalebox{ratio}{object}&amp;lt;/code&amp;gt; in the same way but with ratios rather than fixed sizes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\scalebox{0.7}{&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;code&amp;gt;\resizebox&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\scalebox&amp;lt;/code&amp;gt; require the graphicx package.&lt;br /&gt;
&lt;br /&gt;
To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: &amp;lt;code&amp;gt;\setlength{\tabcolsep}{5pt}&amp;lt;/code&amp;gt;.&lt;br /&gt;
The default value is 6pt.&lt;br /&gt;
&lt;br /&gt;
===Sideways tables ===&lt;br /&gt;
&lt;br /&gt;
Tables can also be put on their side within a document using the &amp;lt;code&amp;gt;rotating&amp;lt;/code&amp;gt; package and the &amp;lt;code&amp;gt;sidewaystable&amp;lt;/code&amp;gt; environments in place of the table environment. (NOTE: most DVI viewers do not support displaying rotated text. Convert your document to a PDF to see the result. Most, if not all, PDF viewers do support rotated text.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{rotating}&lt;br /&gt;
&lt;br /&gt;
\begin{sidewaystable}&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{sidewaystable}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, &amp;lt;code&amp;gt;rotfloat&amp;lt;/code&amp;gt; package may be used. Then one can use &amp;lt;code&amp;gt;\begin{sidewaystable}[H]&amp;lt;/code&amp;gt; just like for normal tables. The 'H' option can not be used without this package.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Row Colors in Tables ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package provides the necessary commands to produce tables with alternate row colors, when loaded with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; option.&lt;br /&gt;
The command &amp;lt;code&amp;gt;\rowcolors{&amp;lt;''starting row''&amp;gt;}{&amp;lt;''odd color''&amp;gt;}{&amp;lt;''even color''&amp;gt;}&amp;lt;/code&amp;gt; has to be specified right before the &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment starts.&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article}&lt;br /&gt;
&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
\rowcolors{1}{green}{pink}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{lll}&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | [[File:LaTeXAlternateRowTable.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
The command &amp;lt;code&amp;gt;\hiderowcolors&amp;lt;/code&amp;gt; is available to deactivate highlighting of a specified row.&lt;br /&gt;
Highlighting can be reactivated within the table via the &amp;lt;code&amp;gt;\showrowcolors&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Colors of individual Cells ===&lt;br /&gt;
&lt;br /&gt;
As above this uses the &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
% Include this somewhere in your document&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
% Enter this in the cell you wish to color a light grey.&lt;br /&gt;
% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. `0.9' denotes how dark the grey is.&lt;br /&gt;
\cellcolor[gray]{0.9}&lt;br /&gt;
% The following will color the cell red.&lt;br /&gt;
\cellcolor{red}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partial Vertical Lines ===&lt;br /&gt;
&lt;br /&gt;
Adding a partial vertical line to an individual cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r|}{6}  \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-add.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Removing part of a vertical line in a particular cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ | l | c | r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r}{6} \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-remove.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment - captioning etc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment inside a &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do the two different environments exist? Think of it this way: The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment is concerned with arranging elements in a tabular grid, while the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment represents the table more conceptually. This explains why it isn't &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; but &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; that provides for captioning (because the caption isn't displayed in the grid-like layout).&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment has a lot of similarities with a &amp;lt;code&amp;gt;figure&amp;lt;/code&amp;gt; environment, in the way the &amp;quot;floating&amp;quot; is handled etc.&lt;br /&gt;
For instance you can specify its placement in the page with the option &amp;lt;code&amp;gt;[placement]&amp;lt;/code&amp;gt;, the valid values are any combination of (order is not important):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
|where the table is declared ('''h'''ere)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''t'''op of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''b'''ottom of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&lt;br /&gt;
|on a dedicated '''p'''age of floats&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt;&lt;br /&gt;
|override the default float restrictions. E.g., the maximum size allowed of a &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; float is normally quite small; if you want a large one, you need this &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt; parameter as well.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;tt&amp;gt;[tbp]&amp;lt;/tt&amp;gt;. If you want to place a table in the place where it's declared, do not just write &amp;lt;tt&amp;gt;[h]&amp;lt;/tt&amp;gt;; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; float) which can be some distance away in the document. A good rule of thumb is to always use &amp;lt;tt&amp;gt;htbp&amp;lt;/tt&amp;gt; until the document is finished, at which stage the final float parameters can be fine-tuned.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment is also useful when you want to have a&lt;br /&gt;
list of tables at the beginning or end of your document with the command&lt;br /&gt;
&amp;lt;code&amp;gt;\listoftables&amp;lt;/code&amp;gt;;&lt;br /&gt;
it enables making cross-references to the table with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
You may refer to table~\ref{my_table} for an example.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}&lt;br /&gt;
     ...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{An example of table}&lt;br /&gt;
  \label{my_table}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment - controlling table width ==&lt;br /&gt;
&lt;br /&gt;
This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabWidth1.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ''rubber lengths'', which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill}} | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:LaTeX TabWidth2.png|right]]&lt;br /&gt;
&lt;br /&gt;
You will notice the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct added at the beginning of the column description. Within it is the &amp;lt;code&amp;gt;\extracolsep&amp;lt;/code&amp;gt; command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as &amp;lt;code&amp;gt;\fill&amp;lt;/code&amp;gt;, the columns are automatically spaced evenly.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; package - simple column stretching ==&lt;br /&gt;
&lt;br /&gt;
This package provides a table environment called &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; which is similar to the &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment, except that it has a new column specifier &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |X|X|X|X| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth1.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The content provided for the boxes is treated as for a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; column, except that the width is calculated automatically. If you use the package &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;, you may also apply any &amp;lt;tt&amp;gt;&amp;amp;gt;{\cmd}&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;lt;{\cmd}&amp;lt;/tt&amp;gt; command to achieve specific behavior (like &amp;lt;tt&amp;gt;\centering&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;\raggedright\arraybackslash&amp;lt;/tt&amp;gt;) as described previously.&lt;br /&gt;
&lt;br /&gt;
Another option is the use of &amp;lt;tt&amp;gt;\newcolumntype&amp;lt;/tt&amp;gt; in order to get selected columns formatted in a different way. It defines a new column specifier, e.g. &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; (in uppercase). In this example, the second and fourth column is adjusted in a different way (&amp;lt;tt&amp;gt;\raggedleft&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\newcolumntype{R}{&amp;gt;{\raggedleft\arraybackslash}X}%&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |l|R|l|R| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth2.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
Tabularx with rows spanning multiple columns using &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt;. The two central columns are posing as one by using the &amp;lt;tt&amp;gt;X@{}&amp;lt;/tt&amp;gt; option. Note that the &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\begin{tabularx}{1\textwidth}{|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|&amp;gt;{\setlength\hsize{1\hsize}\raggedleft}X@{} &amp;gt;{\setlength\hsize{1\hsize}\raggedright}X|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|} &lt;br /&gt;
  \hline&lt;br /&gt;
Label 1 &amp;amp; \multicolumn{2}{&amp;gt;{\centering\setlength\hsize{2\hsize}}X|}{Label 2} &amp;amp; Label 3\tabularnewline&lt;br /&gt;
\hline &lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX tabularx_multi.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vertically centered images ==&lt;br /&gt;
&lt;br /&gt;
Inserting images into a table row will align it at the top of the cell.&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt; package this problem can be solved.&lt;br /&gt;
Defining a new columntype will keep the image vertically centered.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newcolumntype{V}{&amp;gt;{\centering\arraybackslash} m{.4\linewidth} }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Or use a parbox to center the image.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\parbox[c]{1em}{\includegraphics{image.png}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Professional tables ==&lt;br /&gt;
&lt;br /&gt;
Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ''never'' use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;), and double-rules (using &amp;lt;code&amp;gt;\hline\hline&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&amp;quot;), which are regarded as unnecessary and distracting in a professionally published form.  The [http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ booktabs] package is useful for easily providing this professionalism in LaTeX tables, and the [http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf documentation] also provides guidelines on what constitutes a &amp;quot;good&amp;quot; table.&lt;br /&gt;
&lt;br /&gt;
In brief, the package uses &amp;lt;code&amp;gt;\toprule&amp;lt;/code&amp;gt; for the uppermost rule (or line), &amp;lt;code&amp;gt;\midrule&amp;lt;/code&amp;gt; for the rules appearing in the middle of the table (such as under the header), and &amp;lt;code&amp;gt;\bottomrule&amp;lt;/code&amp;gt; for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, &amp;lt;code&amp;gt;\cmidrule&amp;lt;/code&amp;gt; can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and normal LaTeX implementations (the later example requires &amp;lt;code&amp;gt;\usepackage{booktabs}&amp;lt;/code&amp;gt; in the preamble).&lt;br /&gt;
{|&lt;br /&gt;
! Normal LaTeX&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;booktabs&amp;lt;/tt&amp;gt;&lt;br /&gt;
|- valign=bottom&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\firsthline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\lasthline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{booktabs}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\toprule&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cmidrule(r){1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\midrule&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\bottomrule&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-valign=top&lt;br /&gt;
| [[Image:LaTeX animal table.png]]&lt;br /&gt;
|&lt;br /&gt;
| [[Image:LaTeX animal table with booktabs.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the [http://www.ctan.org/tex-archive/macros/latex/contrib/ctable/ ctable] package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ctable package uses the booktabs package.&lt;br /&gt;
&lt;br /&gt;
== Adding rule spacing above or below &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\cline&amp;lt;/tt&amp;gt; commands ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to adjust the rule spacing is to add &amp;lt;code&amp;gt;\noalign{\smallskip}&amp;lt;/code&amp;gt; before or after the &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\cline{i-j}&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
'''Normal LaTeX'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline\noalign{\smallskip}&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}\noalign{\smallskip}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\noalign{\smallskip}\hline\noalign{\smallskip}&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\noalign{\smallskip}\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify the skip after a line explicitly using glue after the line terminator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
Mineral &amp;amp; Color \\[1cm]&lt;br /&gt;
Ruby &amp;amp; red \\&lt;br /&gt;
Sapphire &amp;amp; blue \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tables with different font size ==&lt;br /&gt;
&lt;br /&gt;
A table can be globally switched to a different font size by simply adding the desired size command (here: &amp;lt;code&amp;gt;\footnotesize&amp;lt;/code&amp;gt;) after the &amp;lt;code&amp;gt;\begin{table}...&amp;lt;/code&amp;gt; statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}[h]\footnotesize&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table caption font size is not affected.&lt;br /&gt;
&lt;br /&gt;
To control the caption font size, see [[LaTeX/Floats,_Figures_and_Captions#Caption_Styles|Caption Styles]].&lt;br /&gt;
&lt;br /&gt;
== Table with legend ==&lt;br /&gt;
To add a legend to a table the [http://www.ctan.org/tex-archive/macros/latex/contrib/caption/ caption] package can be used. With the caption package a &amp;lt;code&amp;gt;\caption*{...}&amp;lt;/code&amp;gt; statement can be added besides the &lt;br /&gt;
normal &amp;lt;code&amp;gt;\caption{...}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{A normal caption}&lt;br /&gt;
  \caption*{&lt;br /&gt;
    A legend, even a table can be used&lt;br /&gt;
    \begin{tabular}{l l}&lt;br /&gt;
      item 1 &amp;amp; explanation 1 \\&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
  }&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The normal caption is needed for labels and references.&lt;br /&gt;
&lt;br /&gt;
== Need more complicated features? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at one of the following packages:&lt;br /&gt;
&lt;br /&gt;
* [http://tug.ctan.org/pkg/hhline &amp;lt;tt&amp;gt;hhline&amp;lt;/tt&amp;gt;]:   do whatever you want with horizontal lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/array &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;]:    gives you more freedom on how to define columns&lt;br /&gt;
* [http://tug.ctan.org/pkg/colortbl &amp;lt;tt&amp;gt;colortbl&amp;lt;/tt&amp;gt;]: make your table more colorful&lt;br /&gt;
* [http://tug.ctan.org/pkg/supertabular &amp;lt;tt&amp;gt;supertabular&amp;lt;/tt&amp;gt;]: for tables that need to stretch over several pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/longtable &amp;lt;tt&amp;gt;longtable&amp;lt;/tt&amp;gt;]:  similar to &amp;lt;tt&amp;gt;supertab&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Note: footnotes do not work properly in a normal tabular environment. If you replace it with a longtable environment, footnotes work properly&lt;br /&gt;
* [http://tug.ctan.org/pkg/xtab &amp;lt;tt&amp;gt;xtab&amp;lt;/tt&amp;gt;]: Yet another package for tables that need to span many pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/tabulary &amp;lt;tt&amp;gt;tabulary&amp;lt;/tt&amp;gt;]: modified &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; allowing width of columns set for equal heights&lt;br /&gt;
* [http://tug.ctan.org/pkg/arydshln &amp;lt;tt&amp;gt;arydshln&amp;lt;/tt&amp;gt;]: creates dashed horizontal and vertical lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/ctable &amp;lt;tt&amp;gt;ctable&amp;lt;/tt&amp;gt;]: allows for footnotes under table and properly spaced caption above (incorporates booktabs package)&lt;br /&gt;
* [http://tug.ctan.org/pkg/slashbox &amp;lt;tt&amp;gt;slashbox&amp;lt;/tt&amp;gt;]: create 2D tables with the first cell containing a description for both axes&lt;br /&gt;
* [http://tug.ctan.org/pkg/dcolumn &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt;]: decimal point alignment of numeric cells&lt;br /&gt;
* [http://tug.ctan.org/pkg/rccol &amp;lt;tt&amp;gt;rccol&amp;lt;/tt&amp;gt;]: advanced decimal point alignment of numeric cells with rounding&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This concludes discussion of basic tables. Experimentation quickly leads to mastery. The table syntax in LaTeX can look rather messy, and seeing new examples can look confusing. But hopefully, enough has been covered here so that a user can create any table needed for your papers. Unsurprisingly, LaTeX has plenty more up its sleeve, so expect a follow up tutorial covering more advanced features in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=455</id>
		<title>LaTeX/Tables</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=455"/>
				<updated>2011-06-30T14:37:19Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : reducing figures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
In scientific writing, tables are a common feature. It is therefore a skill that needs mastering in order to produce quality papers.&lt;br /&gt;
&lt;br /&gt;
It is no more common to enter data with fingers. Numeric keypads are rarely used today and who remembers that the middle finger rest position is on the unique key with a grip the key 5. Tables on printed papers are scanned and submitted to Optical Characters Recognition (OCR) softwares which do exist even on smartphones. Data are treated by computer softwares, but in order to produce synthetic tables, your intermediate step is usually a spreadsheet which lets you make easy calculations like percentages as well as pretty printing.&lt;br /&gt;
&lt;br /&gt;
If basic tables are easy to be set in LaTeX, any serious table is a night mare and a tool to output the required LaTeX code directly in a file or in your clipboard is necessary. It might be necessary to clean, simplify and beautify the code.&lt;br /&gt;
&lt;br /&gt;
Thus, the first step consists in learning how to use such a tool like the calc2latex plugins [http://calc2latex.sourceforge.net/ http://calc2latex.sourceforge.net/] which works for openoffice calc (or libreoffice) and the second step in how manage LaTeX tables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the section  [[#Calc2LaTeX]] below for how to install. If you use MS Excel Spreadsheet or any other spreadsheet you can usually copy and paste selected cells to OO calc or open the .xls file with OO calc. &lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX usage ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Run OpenOffice Calc.&lt;br /&gt;
#Select cells you want to convert into LaTeX format.&lt;br /&gt;
#Push 'Tools'-'Macro'. (In the case of OpenOffice1.1 RC, push 'Tools'-'Macros'-'Macro')&lt;br /&gt;
#You will see 'Macro' dialog box. And then click 'soffice'-'calc2latex' in Macro form to show 'Main' item.&lt;br /&gt;
#Select 'Main' in 'soffice'-'calc2latex'-'Main' and push 'Run' button.&lt;br /&gt;
:[[Fichier:calc2latex-usage-macro.png|500px]]&lt;br /&gt;
&lt;br /&gt;
After these steps...&lt;br /&gt;
&lt;br /&gt;
#To get results, select all strings in 'Results' dialog box. In the example below, the title of the table in A1 will be used as the caption (just copy it into memory and paste it into the caption of the dialog) and thus the tabular environment will be embedded into a floated &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment with classical priorities htbp (here first, top second, bottom third, page last). Columns B and C have to be right justified before export because it will minimize the code. In this exemple with 3 columns the argument will be lrr and you will avoid many \multicolumn{1}{r}{} which be output for each right justified cells when the column itself is left or center justified. You can unselect the &amp;lt;tt&amp;gt;Ruled line&amp;lt;/tt&amp;gt; in order to simplify and usually beautify the table. You can keep the Bold face/Italics features. Unfortunately the color of the cells will not be kept. [[Fichier:calc2latex-usage-macro-dialog.png|600px]]&lt;br /&gt;
#Select all and copy to your clipboard and paste it into your TeX editor. It contains the table environment with the tabular environment embedded such as seen below. [[Fichier:calc2latex-after-usage-macro.png|600px]]&lt;br /&gt;
# Put the LaTeX code in your editor within an \begin{document} \end{document} environment, choosing, for example a &amp;lt;tt&amp;gt;memoir&amp;lt;/tt&amp;gt; class, calling your floating table with a &amp;lt;tt&amp;gt;\ref{comptes-cnf}&amp;lt;/tt&amp;gt; and running the result&lt;br /&gt;
&amp;lt;source lang=latex enclose=yes&amp;gt;&lt;br /&gt;
% -*-latex-*-&lt;br /&gt;
&lt;br /&gt;
%&lt;br /&gt;
% These lines tell gnu-emacs to typeset with the xetex engine &lt;br /&gt;
%  which requires Unicode encoding only (utf-8)&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
% These lines tell TeXworks to typeset with xelatex, and to open and&lt;br /&gt;
% save the source with Unicode encoding.&lt;br /&gt;
% !TEX program = xelatex&lt;br /&gt;
% !TEX encoding = UTF-8 Unicode&lt;br /&gt;
&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % This if you want Times Roman fonts.&lt;br /&gt;
\usepackage{xltxtra} % for xetex engine (includes fonstpec)&lt;br /&gt;
%\usepackage{fontspec} % for luatex engine&lt;br /&gt;
%\usepackage[utf8x]{inputenc} %for pdftex engine and unicode characters&lt;br /&gt;
%\usepackage[latin1]{inputenc} % for pdftex engine and iso-8859-1 characters&lt;br /&gt;
%\usepackage[T1]{fontenc} % for pdftex and Cork fonts (extended CMR fonts)&lt;br /&gt;
&lt;br /&gt;
\usepackage{hyperref} % Used for \url{http://foo.com} and \href{http://foo.com}{foo}&lt;br /&gt;
&lt;br /&gt;
As you can see on the table~\table{comptes-cnf} of the &lt;br /&gt;
French committee of the IUSSP members, the balance concerning &lt;br /&gt;
the \href{http://demopaedia.org}{Demopædia} project .&lt;br /&gt;
  \begin{document}&lt;br /&gt;
\begin{table}[htbp]&lt;br /&gt;
\caption{Rapport financier (provisoire) pour l'assemblée &lt;br /&gt;
  générale ordinaire du 20 mai 2011}&lt;br /&gt;
\begin{tabular}{lrr}&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; Débit &amp;amp; Crédit \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 31/12/2010} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- solde du CCP &amp;amp;  &amp;amp; 343,75 \\ &lt;br /&gt;
- solde du Livret A &amp;amp;  &amp;amp; 1 017,84 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 1 361,59 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Recettes de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Intérêts capitalisés Livret A (au titre de 2010) &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des recettes &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Dépenses de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais bancaires \&amp;amp; frais généraux &amp;amp; 30,50 &amp;amp;  \\ &lt;br /&gt;
- Organisation AG 2011 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais déplacement AG 2011 &amp;amp; 260,90 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Demopaedia : &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Nom de domaine (2009, 2010 et 2011) &amp;amp; 86,10 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des dépenses &amp;amp; 377,50 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 20/05/2011} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- CCP &amp;amp;  &amp;amp; 216,25 \\ &lt;br /&gt;
- Livret A &amp;amp;  &amp;amp; 767,84 \\ &lt;br /&gt;
Total des encours &amp;amp;  &amp;amp; 984,09 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Bilan} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Différence des soldes &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
- Différences des recettes et des dépenses &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
\end{tabular}&lt;br /&gt;
\label{comptes-cnf}&lt;br /&gt;
\end{table}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Image:Latex example calc2tex.png|250px]]&lt;br /&gt;
&lt;br /&gt;
You probably need to adapt a little bit the code and here many advices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.&lt;br /&gt;
&lt;br /&gt;
The first line of the environment has the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}[pos]{table spec}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the ''table spec'' argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.&lt;br /&gt;
&lt;br /&gt;
The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ''array'' has been loaded):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;l&amp;lt;/tt&amp;gt;&lt;br /&gt;
| left-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
| centered column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;&lt;br /&gt;
| right-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the top&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;m{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned in the middle (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the bottom (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| vertical line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| double vertical line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using &amp;lt;code&amp;gt;p{''width''}&amp;lt;/code&amp;gt; you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as pt and cm, or ''command lengths'', such as &amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;.You can find a complete list in appendix [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The optional parameter ''pos'' can be used to specify the vertical position of the table relative to&lt;br /&gt;
the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|bottom&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
|center (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|top&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;amp;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| column separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\\&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start new row (additional space may be specified after &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; using square brackets, such as &amp;lt;code&amp;gt;\\[6pt]&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| horizontal line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\newline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start a new line within a cell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\cline{''i''-''j''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| partial horizontal line beginning in column ''i'' and ending in column ''j''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, any white space inserted between these commands is purely down to ones' preferences. I personally add spaces between to make it easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Basic examples ===&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Expanding upon that by including some vertical lines:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To add horizontal lines to the very top and bottom edges of the table:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  \hline			&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
  \hline  &lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{center}&lt;br /&gt;
  \begin{tabular}{ l | c || r | }&lt;br /&gt;
    \hline&lt;br /&gt;
    1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
    4 &amp;amp; 5 &amp;amp; 6 \\ \hline&lt;br /&gt;
    7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
    \hline&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{center}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|r|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  7C0 &amp;amp; hexadecimal \\&lt;br /&gt;
  3700 &amp;amp; octal \\ \cline{2-2}&lt;br /&gt;
  11111000000 &amp;amp; binary \\&lt;br /&gt;
  \hline \hline&lt;br /&gt;
  1984 &amp;amp; decimal \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:Latex example tabular cline.png|250px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Column specification using &amp;lt;code&amp;gt;&amp;gt;{\cmd}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;{\cmd}&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Using the array package, the column specification can be altered. This is done in the &lt;br /&gt;
argument of the tabular environment using &amp;lt;code&amp;gt;&amp;gt;{\command}&amp;lt;/code&amp;gt; for commands executed right &lt;br /&gt;
''before'' each column element and &amp;lt;code&amp;gt;&amp;lt;{\command}&amp;lt;/code&amp;gt; for commands to be executed right&lt;br /&gt;
''after'' each column element. &lt;br /&gt;
As an example: to get a column in math mode enter: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{$}c&amp;lt;{$}}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Another example is changing the font: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{\small}c}&amp;lt;/code&amp;gt; to print the column in a small font.&lt;br /&gt;
&lt;br /&gt;
The argument of the &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; specifications must be correctly balanced when it comes to &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters. This means that &amp;lt;code&amp;gt;&amp;gt;{\bfseries}&amp;lt;/code&amp;gt; is valid, while &amp;lt;code&amp;gt;&amp;gt;{\textbf}&amp;lt;/code&amp;gt; will not work and &amp;lt;code&amp;gt;&amp;gt;{\textbf{}&amp;lt;/code&amp;gt; is not valid. If there is the need to use the text of the table as an argument (for instance, using the &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt; to produce bold text), one should use the &amp;lt;code&amp;gt;\bgroup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\egroup&amp;lt;/code&amp;gt; commands: &amp;lt;code&amp;gt;&amp;gt;{\textbf\bgroup}c&amp;lt;{\egroup}&amp;lt;/code&amp;gt; produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; to underline text, it is necessary to temporarily store the column text in a box using &amp;lt;code&amp;gt;lrbox&amp;lt;/code&amp;gt;. First, you must define such a box with &amp;lt;code&amp;gt;\newsavebox{\boxname}&amp;lt;/code&amp;gt; and then you can define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;{\begin{lrbox}{\boxname}}%&lt;br /&gt;
l%&lt;br /&gt;
&amp;lt;{\end{lrbox}%&lt;br /&gt;
  \underline{\unhbox\boxname}}%&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This stores the text in a box and afterwards, takes the text out of the box with &amp;lt;code&amp;gt;\unhbox&amp;lt;/code&amp;gt; (this destroys the box, if the box is needed again one should use &amp;lt;code&amp;gt;\unhcopy&amp;lt;/code&amp;gt; instead) and passing it to &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt;. (For LaTeX2e, you may want to use &amp;lt;code&amp;gt;\usebox{\boxname}&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\unhbox\boxname&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
This same trick done with &amp;lt;code&amp;gt;\raisebox&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.&lt;br /&gt;
&lt;br /&gt;
Here is an example showing the use of both &amp;lt;code&amp;gt;p{...}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;gt;{\centering}&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{&amp;gt;{\centering}p{3.5cm}&amp;gt;{\centering}p{3.5cm}}&lt;br /&gt;
Geometry  &amp;amp; Algebra&lt;br /&gt;
\tabularnewline&lt;br /&gt;
\hline&lt;br /&gt;
 Points &amp;amp; Addition &lt;br /&gt;
\tabularnewline&lt;br /&gt;
 Spheres &amp;amp; Multiplication &lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;code&amp;gt;\tabularnewline&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to avoid a &amp;lt;code&amp;gt;Misplaced \noalign&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Text wrapping in tables ===&lt;br /&gt;
&lt;br /&gt;
LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that you know will contain a certain amount of text, then it is recommended that you use the ''p'' attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). Use the ''m'' attribute to have the lines aligned toward the middle of the box and the ''b'' attribute to align along the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
Here is a practical example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article} &lt;br /&gt;
&lt;br /&gt;
\usepackage[english]{babel}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
Without specifying width for last column:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | l |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.&lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
With width specified:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | p{5cm} |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.  &lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You get the following output:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example wrapped table.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
Note that the first table is cropped: The output is wider than the page width.&lt;br /&gt;
&lt;br /&gt;
=== Text justification in tables ===&lt;br /&gt;
&lt;br /&gt;
On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package provides the command &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; which is like &amp;lt;code&amp;gt;\makebox&amp;lt;/code&amp;gt; but instead of a ''width'' argument, it takes a tag. During compilation it bookkeeps which &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; with a certain tag contains the widest text and can stretch all &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt;es with the same tag to that width. Combined with the &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; package, one can define a column specifier that justifies the text in all lines: (See the documentation of the &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package for more details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newsavebox{\tstretchbox}&lt;br /&gt;
\newcolumntype{S}[1]{%&lt;br /&gt;
 &amp;gt;{\begin{lrbox}{\tstretchbox}}%&lt;br /&gt;
 l%&lt;br /&gt;
 &amp;lt;{\end{lrbox}%&lt;br /&gt;
   \eqmakebox[#1][s]{\unhcopy\tstretchbox}}%&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other environments inside tables ===&lt;br /&gt;
&lt;br /&gt;
If you use some LaTeX environments inside table cells, like &amp;lt;tt&amp;gt;verbatim&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;[[LaTeX/Formatting#Enumerate|enumerate]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| c | c |}&lt;br /&gt;
	\hline&lt;br /&gt;
	\begin{verbatim}&lt;br /&gt;
	code&lt;br /&gt;
	\end{verbatim}&lt;br /&gt;
	&amp;amp; description&lt;br /&gt;
 	\\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might encounter errors similar to&lt;br /&gt;
 ! LaTeX Error: Something's wrong--perhaps a missing \item.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, change [[#The tabular environment|column specifier]] to &amp;quot;paragraph&amp;quot; (&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;m&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| m{5cm} | c |}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining multiple columns ===&lt;br /&gt;
&lt;br /&gt;
It is possible to define many identical columns at once using the &amp;lt;code&amp;gt;*{''num''}{''str''}&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
This is particularly useful when your table has many columns. &lt;br /&gt;
&lt;br /&gt;
Here is a table with six centered columns flanked by a single column on each side:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{l*{6}{c}r}&lt;br /&gt;
Team              &amp;amp; P &amp;amp; W &amp;amp; D &amp;amp; L &amp;amp; F  &amp;amp; A &amp;amp; Pts \\&lt;br /&gt;
\hline&lt;br /&gt;
Manchester United &amp;amp; 6 &amp;amp; 4 &amp;amp; 0 &amp;amp; 2 &amp;amp; 10 &amp;amp; 5 &amp;amp; 12  \\&lt;br /&gt;
Celtic            &amp;amp; 6 &amp;amp; 3 &amp;amp; 0 &amp;amp; 3 &amp;amp;  8 &amp;amp; 9 &amp;amp;  9  \\&lt;br /&gt;
Benfica           &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 3 &amp;amp;  7 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
FC Copenhagen     &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 2 &amp;amp;  5 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example defining multiple columns.png|450px]]&lt;br /&gt;
&lt;br /&gt;
=== @-expressions ===&lt;br /&gt;
&lt;br /&gt;
The column separator can be specified with the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct. &lt;br /&gt;
&lt;br /&gt;
It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. This command kills the inter-column space and replaces it with whatever is between the curly braces. To add space, use &amp;lt;code&amp;gt;@{\hspace{''width''}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r@{.}l}&lt;br /&gt;
  3   &amp;amp; 14159 \\&lt;br /&gt;
  16  &amp;amp; 2     \\&lt;br /&gt;
  123 &amp;amp; 456   \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:align.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the approach outlined above won't work well if the column header is longer than any of the numbers. To center the column on the decimal separator, use the &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt; package, which provides a new column specifier for floating point data.&lt;br /&gt;
&lt;br /&gt;
The space suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\ \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|l|l|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier1.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier3.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|@{}l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spanning ===&lt;br /&gt;
&lt;br /&gt;
To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.&lt;br /&gt;
&lt;br /&gt;
==== Rows spanning multiple columns ====&lt;br /&gt;
&lt;br /&gt;
The command for this looks like this: &amp;lt;code&amp;gt;\multicolumn{''num_cols''}{''alignment''}{''contents''}&amp;lt;/code&amp;gt;. ''num_cols'' is the number of subsequent columns to merge; ''alignment'' is, either l, c, r or to have text wrapping specifiy a width &amp;lt;code&amp;gt;p{5.0cm}&amp;lt;/code&amp;gt; . And ''contents'' is simply the actual data you want to be contained within that cell. A simple example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  \multicolumn{2}{|c|}{Team sheet} \\&lt;br /&gt;
  \hline&lt;br /&gt;
  GK &amp;amp; Paul Robinson \\&lt;br /&gt;
  LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
  DC &amp;amp; Michael Duberry \\&lt;br /&gt;
  DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
  RB &amp;amp; Didier Domi \\&lt;br /&gt;
  MC &amp;amp; David Batty \\&lt;br /&gt;
  MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
  MC &amp;amp; Jody Morris \\&lt;br /&gt;
  FW &amp;amp; Jamie McMaster \\&lt;br /&gt;
  ST &amp;amp; Alan Smith \\&lt;br /&gt;
  ST &amp;amp; Mark Viduka \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multicolumn.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Columns spanning multiple rows ====&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is add &amp;lt;code&amp;gt;\usepackage{multirow}&amp;lt;/code&amp;gt; [http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/] to the preamble. This then provides the command needed for spanning rows: &amp;lt;code&amp;gt;\multirow{''num_rows''}{''width''}{''contents''}&amp;lt;/code&amp;gt;. The arguments are pretty simple to deduce (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for the ''width'' means the content's natural width).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{|l|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{3}{|c|}{Team sheet} \\&lt;br /&gt;
\hline&lt;br /&gt;
Goalkeeper &amp;amp; GK &amp;amp; Paul Robinson \\ \hline&lt;br /&gt;
\multirow{4}{*}{Defenders} &amp;amp; LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Michael Duberry \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
 &amp;amp; RB &amp;amp; Didier Domi \\ \hline&lt;br /&gt;
\multirow{3}{*}{Midfielders} &amp;amp; MC &amp;amp; David Batty \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Jody Morris \\ \hline&lt;br /&gt;
Forward &amp;amp; FW &amp;amp; Jamie McMaster \\ \hline&lt;br /&gt;
\multirow{2}{*}{Strikers} &amp;amp; ST &amp;amp; Alan Smith \\&lt;br /&gt;
 &amp;amp; ST &amp;amp; Mark Viduka \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirow.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The main thing to note when using &amp;lt;code&amp;gt;\multirow&amp;lt;/code&amp;gt; is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.&lt;br /&gt;
&lt;br /&gt;
If there is no data for a cell, just don't type anything, but you still need the &amp;quot;&amp;amp;&amp;quot; separating it from the next column's data. The astute reader will already have deduced that for a table of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; columns, there must always be &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; ampersands in each row. The exception to this is when &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\multirow&amp;lt;/tt&amp;gt; are used to create cells which span multiple columns or rows.&lt;br /&gt;
&lt;br /&gt;
==== Spanning in both directions simultaneously ====&lt;br /&gt;
&lt;br /&gt;
Here is a nontrivial example how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{cc|c|c|c|c|l}&lt;br /&gt;
\cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; \multicolumn{4}{|c|}{Primes} \\ \cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; 2 &amp;amp; 3 &amp;amp; 5 &amp;amp; 7 \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{504} &amp;amp; 3 &amp;amp; 2 &amp;amp; 0 &amp;amp; 1 &amp;amp;     \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{540} &amp;amp; 2 &amp;amp; 3 &amp;amp; 1 &amp;amp; 0 &amp;amp;     \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{gcd} &amp;amp; 2 &amp;amp; 2 &amp;amp; 0 &amp;amp; 0 &amp;amp; min \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{lcm} &amp;amp; 3 &amp;amp; 3 &amp;amp; 1 &amp;amp; 1 &amp;amp; max \\ \cline{1-6}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirowandcolumnexample.png|300px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with &amp;lt;code&amp;gt;\multirow{2}{*}{...}&amp;lt;/code&amp;gt;, it still draws vertical borders that only span the first row. To compensate for that, we add &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; in the following rows spanned by the multirow. Note that we cannot just use &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command &amp;lt;code&amp;gt;\cline{2-6}&amp;lt;/code&amp;gt; and opt out the first column that contains the text &amp;quot;Powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is another example exploiting the same ideas to make&lt;br /&gt;
the familiar and popular &amp;quot;2x2&amp;quot; or double dichotomy:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r|c|c|}&lt;br /&gt;
\multicolumn{1}{r}{}&lt;br /&gt;
 &amp;amp;  \multicolumn{1}{c}{noninteractive}&lt;br /&gt;
 &amp;amp; \multicolumn{1}{c}{interactive} \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
massively multiple &amp;amp; Library &amp;amp; University \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
one-to-one &amp;amp; Book &amp;amp; Tutor \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex-tables-double-dichotomy-example.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Resize tables ===&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\resizebox{width}{height}{object}&amp;lt;/code&amp;gt; can be used with &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width/height ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\resizebox{8cm}{!} {&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use &amp;lt;code&amp;gt;\scalebox{ratio}{object}&amp;lt;/code&amp;gt; in the same way but with ratios rather than fixed sizes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\scalebox{0.7}{&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;code&amp;gt;\resizebox&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\scalebox&amp;lt;/code&amp;gt; require the graphicx package.&lt;br /&gt;
&lt;br /&gt;
To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: &amp;lt;code&amp;gt;\setlength{\tabcolsep}{5pt}&amp;lt;/code&amp;gt;.&lt;br /&gt;
The default value is 6pt.&lt;br /&gt;
&lt;br /&gt;
===Sideways tables ===&lt;br /&gt;
&lt;br /&gt;
Tables can also be put on their side within a document using the &amp;lt;code&amp;gt;rotating&amp;lt;/code&amp;gt; package and the &amp;lt;code&amp;gt;sidewaystable&amp;lt;/code&amp;gt; environments in place of the table environment. (NOTE: most DVI viewers do not support displaying rotated text. Convert your document to a PDF to see the result. Most, if not all, PDF viewers do support rotated text.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{rotating}&lt;br /&gt;
&lt;br /&gt;
\begin{sidewaystable}&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{sidewaystable}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, &amp;lt;code&amp;gt;rotfloat&amp;lt;/code&amp;gt; package may be used. Then one can use &amp;lt;code&amp;gt;\begin{sidewaystable}[H]&amp;lt;/code&amp;gt; just like for normal tables. The 'H' option can not be used without this package.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Row Colors in Tables ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package provides the necessary commands to produce tables with alternate row colors, when loaded with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; option.&lt;br /&gt;
The command &amp;lt;code&amp;gt;\rowcolors{&amp;lt;''starting row''&amp;gt;}{&amp;lt;''odd color''&amp;gt;}{&amp;lt;''even color''&amp;gt;}&amp;lt;/code&amp;gt; has to be specified right before the &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment starts.&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article}&lt;br /&gt;
&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
\rowcolors{1}{green}{pink}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{lll}&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | [[File:LaTeXAlternateRowTable.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
The command &amp;lt;code&amp;gt;\hiderowcolors&amp;lt;/code&amp;gt; is available to deactivate highlighting of a specified row.&lt;br /&gt;
Highlighting can be reactivated within the table via the &amp;lt;code&amp;gt;\showrowcolors&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Colors of individual Cells ===&lt;br /&gt;
&lt;br /&gt;
As above this uses the &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
% Include this somewhere in your document&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
% Enter this in the cell you wish to color a light grey.&lt;br /&gt;
% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. `0.9' denotes how dark the grey is.&lt;br /&gt;
\cellcolor[gray]{0.9}&lt;br /&gt;
% The following will color the cell red.&lt;br /&gt;
\cellcolor{red}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partial Vertical Lines ===&lt;br /&gt;
&lt;br /&gt;
Adding a partial vertical line to an individual cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r|}{6}  \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-add.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Removing part of a vertical line in a particular cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ | l | c | r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r}{6} \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-remove.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment - captioning etc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment inside a &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do the two different environments exist? Think of it this way: The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment is concerned with arranging elements in a tabular grid, while the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment represents the table more conceptually. This explains why it isn't &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; but &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; that provides for captioning (because the caption isn't displayed in the grid-like layout).&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment has a lot of similarities with a &amp;lt;code&amp;gt;figure&amp;lt;/code&amp;gt; environment, in the way the &amp;quot;floating&amp;quot; is handled etc.&lt;br /&gt;
For instance you can specify its placement in the page with the option &amp;lt;code&amp;gt;[placement]&amp;lt;/code&amp;gt;, the valid values are any combination of (order is not important):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
|where the table is declared ('''h'''ere)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''t'''op of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''b'''ottom of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&lt;br /&gt;
|on a dedicated '''p'''age of floats&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt;&lt;br /&gt;
|override the default float restrictions. E.g., the maximum size allowed of a &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; float is normally quite small; if you want a large one, you need this &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt; parameter as well.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;tt&amp;gt;[tbp]&amp;lt;/tt&amp;gt;. If you want to place a table in the place where it's declared, do not just write &amp;lt;tt&amp;gt;[h]&amp;lt;/tt&amp;gt;; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; float) which can be some distance away in the document. A good rule of thumb is to always use &amp;lt;tt&amp;gt;htbp&amp;lt;/tt&amp;gt; until the document is finished, at which stage the final float parameters can be fine-tuned.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment is also useful when you want to have a&lt;br /&gt;
list of tables at the beginning or end of your document with the command&lt;br /&gt;
&amp;lt;code&amp;gt;\listoftables&amp;lt;/code&amp;gt;;&lt;br /&gt;
it enables making cross-references to the table with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
You may refer to table~\ref{my_table} for an example.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}&lt;br /&gt;
     ...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{An example of table}&lt;br /&gt;
  \label{my_table}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment - controlling table width ==&lt;br /&gt;
&lt;br /&gt;
This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabWidth1.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ''rubber lengths'', which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill}} | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:LaTeX TabWidth2.png|right]]&lt;br /&gt;
&lt;br /&gt;
You will notice the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct added at the beginning of the column description. Within it is the &amp;lt;code&amp;gt;\extracolsep&amp;lt;/code&amp;gt; command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as &amp;lt;code&amp;gt;\fill&amp;lt;/code&amp;gt;, the columns are automatically spaced evenly.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; package - simple column stretching ==&lt;br /&gt;
&lt;br /&gt;
This package provides a table environment called &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; which is similar to the &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment, except that it has a new column specifier &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |X|X|X|X| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth1.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The content provided for the boxes is treated as for a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; column, except that the width is calculated automatically. If you use the package &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;, you may also apply any &amp;lt;tt&amp;gt;&amp;amp;gt;{\cmd}&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;lt;{\cmd}&amp;lt;/tt&amp;gt; command to achieve specific behavior (like &amp;lt;tt&amp;gt;\centering&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;\raggedright\arraybackslash&amp;lt;/tt&amp;gt;) as described previously.&lt;br /&gt;
&lt;br /&gt;
Another option is the use of &amp;lt;tt&amp;gt;\newcolumntype&amp;lt;/tt&amp;gt; in order to get selected columns formatted in a different way. It defines a new column specifier, e.g. &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; (in uppercase). In this example, the second and fourth column is adjusted in a different way (&amp;lt;tt&amp;gt;\raggedleft&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\newcolumntype{R}{&amp;gt;{\raggedleft\arraybackslash}X}%&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |l|R|l|R| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth2.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
Tabularx with rows spanning multiple columns using &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt;. The two central columns are posing as one by using the &amp;lt;tt&amp;gt;X@{}&amp;lt;/tt&amp;gt; option. Note that the &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\begin{tabularx}{1\textwidth}{|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|&amp;gt;{\setlength\hsize{1\hsize}\raggedleft}X@{} &amp;gt;{\setlength\hsize{1\hsize}\raggedright}X|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|} &lt;br /&gt;
  \hline&lt;br /&gt;
Label 1 &amp;amp; \multicolumn{2}{&amp;gt;{\centering\setlength\hsize{2\hsize}}X|}{Label 2} &amp;amp; Label 3\tabularnewline&lt;br /&gt;
\hline &lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX tabularx_multi.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vertically centered images ==&lt;br /&gt;
&lt;br /&gt;
Inserting images into a table row will align it at the top of the cell.&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt; package this problem can be solved.&lt;br /&gt;
Defining a new columntype will keep the image vertically centered.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newcolumntype{V}{&amp;gt;{\centering\arraybackslash} m{.4\linewidth} }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Or use a parbox to center the image.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\parbox[c]{1em}{\includegraphics{image.png}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Professional tables ==&lt;br /&gt;
&lt;br /&gt;
Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ''never'' use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;), and double-rules (using &amp;lt;code&amp;gt;\hline\hline&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&amp;quot;), which are regarded as unnecessary and distracting in a professionally published form.  The [http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ booktabs] package is useful for easily providing this professionalism in LaTeX tables, and the [http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf documentation] also provides guidelines on what constitutes a &amp;quot;good&amp;quot; table.&lt;br /&gt;
&lt;br /&gt;
In brief, the package uses &amp;lt;code&amp;gt;\toprule&amp;lt;/code&amp;gt; for the uppermost rule (or line), &amp;lt;code&amp;gt;\midrule&amp;lt;/code&amp;gt; for the rules appearing in the middle of the table (such as under the header), and &amp;lt;code&amp;gt;\bottomrule&amp;lt;/code&amp;gt; for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, &amp;lt;code&amp;gt;\cmidrule&amp;lt;/code&amp;gt; can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and normal LaTeX implementations (the later example requires &amp;lt;code&amp;gt;\usepackage{booktabs}&amp;lt;/code&amp;gt; in the preamble).&lt;br /&gt;
{|&lt;br /&gt;
! Normal LaTeX&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;booktabs&amp;lt;/tt&amp;gt;&lt;br /&gt;
|- valign=bottom&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\firsthline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\lasthline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{booktabs}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\toprule&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cmidrule(r){1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\midrule&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\bottomrule&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-valign=top&lt;br /&gt;
| [[Image:LaTeX animal table.png]]&lt;br /&gt;
|&lt;br /&gt;
| [[Image:LaTeX animal table with booktabs.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the [http://www.ctan.org/tex-archive/macros/latex/contrib/ctable/ ctable] package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ctable package uses the booktabs package.&lt;br /&gt;
&lt;br /&gt;
== Adding rule spacing above or below &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\cline&amp;lt;/tt&amp;gt; commands ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to adjust the rule spacing is to add &amp;lt;code&amp;gt;\noalign{\smallskip}&amp;lt;/code&amp;gt; before or after the &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\cline{i-j}&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
'''Normal LaTeX'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline\noalign{\smallskip}&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}\noalign{\smallskip}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\noalign{\smallskip}\hline\noalign{\smallskip}&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\noalign{\smallskip}\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify the skip after a line explicitly using glue after the line terminator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
Mineral &amp;amp; Color \\[1cm]&lt;br /&gt;
Ruby &amp;amp; red \\&lt;br /&gt;
Sapphire &amp;amp; blue \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tables with different font size ==&lt;br /&gt;
&lt;br /&gt;
A table can be globally switched to a different font size by simply adding the desired size command (here: &amp;lt;code&amp;gt;\footnotesize&amp;lt;/code&amp;gt;) after the &amp;lt;code&amp;gt;\begin{table}...&amp;lt;/code&amp;gt; statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}[h]\footnotesize&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table caption font size is not affected.&lt;br /&gt;
&lt;br /&gt;
To control the caption font size, see [[LaTeX/Floats,_Figures_and_Captions#Caption_Styles|Caption Styles]].&lt;br /&gt;
&lt;br /&gt;
== Table with legend ==&lt;br /&gt;
To add a legend to a table the [http://www.ctan.org/tex-archive/macros/latex/contrib/caption/ caption] package can be used. With the caption package a &amp;lt;code&amp;gt;\caption*{...}&amp;lt;/code&amp;gt; statement can be added besides the &lt;br /&gt;
normal &amp;lt;code&amp;gt;\caption{...}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{A normal caption}&lt;br /&gt;
  \caption*{&lt;br /&gt;
    A legend, even a table can be used&lt;br /&gt;
    \begin{tabular}{l l}&lt;br /&gt;
      item 1 &amp;amp; explanation 1 \\&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
  }&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The normal caption is needed for labels and references.&lt;br /&gt;
&lt;br /&gt;
== Need more complicated features? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at one of the following packages:&lt;br /&gt;
&lt;br /&gt;
* [http://tug.ctan.org/pkg/hhline &amp;lt;tt&amp;gt;hhline&amp;lt;/tt&amp;gt;]:   do whatever you want with horizontal lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/array &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;]:    gives you more freedom on how to define columns&lt;br /&gt;
* [http://tug.ctan.org/pkg/colortbl &amp;lt;tt&amp;gt;colortbl&amp;lt;/tt&amp;gt;]: make your table more colorful&lt;br /&gt;
* [http://tug.ctan.org/pkg/supertabular &amp;lt;tt&amp;gt;supertabular&amp;lt;/tt&amp;gt;]: for tables that need to stretch over several pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/longtable &amp;lt;tt&amp;gt;longtable&amp;lt;/tt&amp;gt;]:  similar to &amp;lt;tt&amp;gt;supertab&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Note: footnotes do not work properly in a normal tabular environment. If you replace it with a longtable environment, footnotes work properly&lt;br /&gt;
* [http://tug.ctan.org/pkg/xtab &amp;lt;tt&amp;gt;xtab&amp;lt;/tt&amp;gt;]: Yet another package for tables that need to span many pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/tabulary &amp;lt;tt&amp;gt;tabulary&amp;lt;/tt&amp;gt;]: modified &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; allowing width of columns set for equal heights&lt;br /&gt;
* [http://tug.ctan.org/pkg/arydshln &amp;lt;tt&amp;gt;arydshln&amp;lt;/tt&amp;gt;]: creates dashed horizontal and vertical lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/ctable &amp;lt;tt&amp;gt;ctable&amp;lt;/tt&amp;gt;]: allows for footnotes under table and properly spaced caption above (incorporates booktabs package)&lt;br /&gt;
* [http://tug.ctan.org/pkg/slashbox &amp;lt;tt&amp;gt;slashbox&amp;lt;/tt&amp;gt;]: create 2D tables with the first cell containing a description for both axes&lt;br /&gt;
* [http://tug.ctan.org/pkg/dcolumn &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt;]: decimal point alignment of numeric cells&lt;br /&gt;
* [http://tug.ctan.org/pkg/rccol &amp;lt;tt&amp;gt;rccol&amp;lt;/tt&amp;gt;]: advanced decimal point alignment of numeric cells with rounding&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This concludes discussion of basic tables. Experimentation quickly leads to mastery. The table syntax in LaTeX can look rather messy, and seeing new examples can look confusing. But hopefully, enough has been covered here so that a user can create any table needed for your papers. Unsurprisingly, LaTeX has plenty more up its sleeve, so expect a follow up tutorial covering more advanced features in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=454</id>
		<title>LaTeX/Tables</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Tables&amp;diff=454"/>
				<updated>2011-06-30T14:33:49Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Summary */ Page Layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
In scientific writing, tables are a common feature. It is therefore a skill that needs mastering in order to produce quality papers.&lt;br /&gt;
&lt;br /&gt;
It is no more common to enter data with fingers. Numeric keypads are rarely used today and who remembers that the middle finger rest position is on the unique key with a grip the key 5. Tables on printed papers are scanned and submitted to Optical Characters Recognition (OCR) softwares which do exist even on smartphones. Data are treated by computer softwares, but in order to produce synthetic tables, your intermediate step is usually a spreadsheet which lets you make easy calculations like percentages as well as pretty printing.&lt;br /&gt;
&lt;br /&gt;
If basic tables are easy to be set in LaTeX, any serious table is a night mare and a tool to output the required LaTeX code directly in a file or in your clipboard is necessary. It might be necessary to clean, simplify and beautify the code.&lt;br /&gt;
&lt;br /&gt;
Thus, the first step consists in learning how to use such a tool like the calc2latex plugins [http://calc2latex.sourceforge.net/ http://calc2latex.sourceforge.net/] which works for openoffice calc (or libreoffice) and the second step in how manage LaTeX tables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the section  [[#Calc2LaTeX]] below for how to install. If you use MS Excel Spreadsheet or any other spreadsheet you can usually copy and paste selected cells to OO calc or open the .xls file with OO calc. &lt;br /&gt;
&lt;br /&gt;
=== Calc2LaTeX usage ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Run OpenOffice Calc.&lt;br /&gt;
#Select cells you want to convert into LaTeX format.&lt;br /&gt;
#Push 'Tools'-'Macro'. (In the case of OpenOffice1.1 RC, push 'Tools'-'Macros'-'Macro')&lt;br /&gt;
#You will see 'Macro' dialog box. And then click 'soffice'-'calc2latex' in Macro form to show 'Main' item.&lt;br /&gt;
#Select 'Main' in 'soffice'-'calc2latex'-'Main' and push 'Run' button.&lt;br /&gt;
:[[Fichier:calc2latex-usage-macro.png]]&lt;br /&gt;
&lt;br /&gt;
After these steps...&lt;br /&gt;
&lt;br /&gt;
#To get results, select all strings in 'Results' dialog box. In the example below, the title of the table in A1 will be used as the caption (just copy it into memory and paste it into the caption of the dialog) and thus the tabular environment will be embedded into a floated &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment with classical priorities htbp (here first, top second, bottom third, page last). Columns B and C have to be right justified before export because it will minimize the code. In this exemple with 3 columns the argument will be lrr and you will avoid many \multicolumn{1}{r}{} which be output for each right justified cells when the column itself is left or center justified. You can unselect the &amp;lt;tt&amp;gt;Ruled line&amp;lt;/tt&amp;gt; in order to simplify and usually beautify the table. You can keep the Bold face/Italics features. Unfortunately the color of the cells will not be kept. [[Fichier:calc2latex-usage-macro-dialog.png]]&lt;br /&gt;
#Select all and copy to your clipboard and paste it into your TeX editor. It contains the table environment with the tabular environment embedded such as seen below. [[Fichier:calc2latex-after-usage-macro.png]]&lt;br /&gt;
# Put the LaTeX code in your editor within an \begin{document} \end{document} environment, choosing, for example a &amp;lt;tt&amp;gt;memoir&amp;lt;/tt&amp;gt; class, calling your floating table with a \ref{comptes-cnf} and running the result&lt;br /&gt;
&amp;lt;source lang=latex enclose=yes&amp;gt;&lt;br /&gt;
% -*-latex-*-&lt;br /&gt;
&lt;br /&gt;
%&lt;br /&gt;
% These lines tell gnu-emacs to typeset with the xetex engine &lt;br /&gt;
%  which requires Unicode encoding only (utf-8)&lt;br /&gt;
%%% Local Variables:&lt;br /&gt;
%%% TeX-engine: xetex&lt;br /&gt;
%%% coding: utf-8&lt;br /&gt;
%%% End:&lt;br /&gt;
&lt;br /&gt;
% These lines tell TeXworks to typeset with xelatex, and to open and&lt;br /&gt;
% save the source with Unicode encoding.&lt;br /&gt;
% !TEX program = xelatex&lt;br /&gt;
% !TEX encoding = UTF-8 Unicode&lt;br /&gt;
&lt;br /&gt;
\documentclass{memoir}&lt;br /&gt;
\usepackage{mathptmx} % This if you want Times Roman fonts.&lt;br /&gt;
\usepackage{xltxtra} % for xetex engine (includes fonstpec)&lt;br /&gt;
%\usepackage{fontspec} % for luatex engine&lt;br /&gt;
%\usepackage[utf8x]{inputenc} %for pdftex engine and unicode characters&lt;br /&gt;
%\usepackage[latin1]{inputenc} % for pdftex engine and iso-8859-1 characters&lt;br /&gt;
%\usepackage[T1]{fontenc} % for pdftex and Cork fonts (extended CMR fonts)&lt;br /&gt;
&lt;br /&gt;
\usepackage{hyperref} % Used for \url{http://foo.com} and \href{http://foo.com}{foo}&lt;br /&gt;
&lt;br /&gt;
As you can see on the table~\table{comptes-cnf} of the &lt;br /&gt;
French committee of the IUSSP members, the balance concerning &lt;br /&gt;
the \href{http://demopaedia.org}{Demopædia} project .&lt;br /&gt;
  \begin{document}&lt;br /&gt;
\begin{table}[htbp]&lt;br /&gt;
\caption{Rapport financier (provisoire) pour l'assemblée &lt;br /&gt;
  générale ordinaire du 20 mai 2011}&lt;br /&gt;
\begin{tabular}{lrr}&lt;br /&gt;
&lt;br /&gt;
 &amp;amp; Débit &amp;amp; Crédit \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 31/12/2010} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- solde du CCP &amp;amp;  &amp;amp; 343,75 \\ &lt;br /&gt;
- solde du Livret A &amp;amp;  &amp;amp; 1 017,84 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 1 361,59 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Recettes de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Intérêts capitalisés Livret A (au titre de 2010) &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des recettes &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Dépenses de l'exercice} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais bancaires \&amp;amp; frais généraux &amp;amp; 30,50 &amp;amp;  \\ &lt;br /&gt;
- Organisation AG 2011 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Frais déplacement AG 2011 &amp;amp; 260,90 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Demopaedia : &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Nom de domaine (2009, 2010 et 2011) &amp;amp; 86,10 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
Total des dépenses &amp;amp; 377,50 &amp;amp;  \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Solde au 20/05/2011} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- CCP &amp;amp;  &amp;amp; 216,25 \\ &lt;br /&gt;
- Livret A &amp;amp;  &amp;amp; 767,84 \\ &lt;br /&gt;
Total des encours &amp;amp;  &amp;amp; 984,09 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
\textbf{Bilan} &amp;amp;  &amp;amp;  \\ &lt;br /&gt;
- Différence des soldes &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
- Différences des recettes et des dépenses &amp;amp;  &amp;amp; -377,50 \\ &lt;br /&gt;
 &amp;amp;  &amp;amp; 0,00 \\ &lt;br /&gt;
\end{tabular}&lt;br /&gt;
\label{comptes-cnf}&lt;br /&gt;
\end{table}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Image:Latex example calc2tex.png|250px]]&lt;br /&gt;
&lt;br /&gt;
You probably need to adapt a little bit the code and here many advices. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular&amp;lt;/tt&amp;gt; environment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.&lt;br /&gt;
&lt;br /&gt;
The first line of the environment has the form:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}[pos]{table spec}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the ''table spec'' argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.&lt;br /&gt;
&lt;br /&gt;
The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ''array'' has been loaded):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;l&amp;lt;/tt&amp;gt;&lt;br /&gt;
| left-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
| centered column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;&lt;br /&gt;
| right-justified column&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the top&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;m{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned in the middle (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b{''width''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| paragraph column with text vertically aligned at the bottom (requires array package)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| vertical line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| double vertical line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using &amp;lt;code&amp;gt;p{''width''}&amp;lt;/code&amp;gt; you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as pt and cm, or ''command lengths'', such as &amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;.You can find a complete list in appendix [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The optional parameter ''pos'' can be used to specify the vertical position of the table relative to&lt;br /&gt;
the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|bottom&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;c&amp;lt;/tt&amp;gt;&lt;br /&gt;
|center (default)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|top&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;&amp;amp;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| column separator&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\\&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start new row (additional space may be specified after &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; using square brackets, such as &amp;lt;code&amp;gt;\\[6pt]&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| horizontal line&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\newline&amp;lt;/tt&amp;gt;&lt;br /&gt;
| start a new line within a cell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;\cline{''i''-''j''}&amp;lt;/tt&amp;gt;&lt;br /&gt;
| partial horizontal line beginning in column ''i'' and ending in column ''j''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note, any white space inserted between these commands is purely down to ones' preferences. I personally add spaces between to make it easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Basic examples ===&lt;br /&gt;
&lt;br /&gt;
This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Expanding upon that by including some vertical lines:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To add horizontal lines to the very top and bottom edges of the table:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l | c || r | }&lt;br /&gt;
  \hline			&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; 6 \\&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
  \hline  &lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{center}&lt;br /&gt;
  \begin{tabular}{ l | c || r | }&lt;br /&gt;
    \hline&lt;br /&gt;
    1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
    4 &amp;amp; 5 &amp;amp; 6 \\ \hline&lt;br /&gt;
    7 &amp;amp; 8 &amp;amp; 9 \\&lt;br /&gt;
    \hline&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{center}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:basic_table4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|r|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  7C0 &amp;amp; hexadecimal \\&lt;br /&gt;
  3700 &amp;amp; octal \\ \cline{2-2}&lt;br /&gt;
  11111000000 &amp;amp; binary \\&lt;br /&gt;
  \hline \hline&lt;br /&gt;
  1984 &amp;amp; decimal \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:Latex example tabular cline.png|250px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Column specification using &amp;lt;code&amp;gt;&amp;gt;{\cmd}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;{\cmd}&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Using the array package, the column specification can be altered. This is done in the &lt;br /&gt;
argument of the tabular environment using &amp;lt;code&amp;gt;&amp;gt;{\command}&amp;lt;/code&amp;gt; for commands executed right &lt;br /&gt;
''before'' each column element and &amp;lt;code&amp;gt;&amp;lt;{\command}&amp;lt;/code&amp;gt; for commands to be executed right&lt;br /&gt;
''after'' each column element. &lt;br /&gt;
As an example: to get a column in math mode enter: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{$}c&amp;lt;{$}}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Another example is changing the font: &amp;lt;code&amp;gt;\begin{tabular}{&amp;gt;{\small}c}&amp;lt;/code&amp;gt; to print the column in a small font.&lt;br /&gt;
&lt;br /&gt;
The argument of the &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;&amp;lt;/code&amp;gt; specifications must be correctly balanced when it comes to &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters. This means that &amp;lt;code&amp;gt;&amp;gt;{\bfseries}&amp;lt;/code&amp;gt; is valid, while &amp;lt;code&amp;gt;&amp;gt;{\textbf}&amp;lt;/code&amp;gt; will not work and &amp;lt;code&amp;gt;&amp;gt;{\textbf{}&amp;lt;/code&amp;gt; is not valid. If there is the need to use the text of the table as an argument (for instance, using the &amp;lt;code&amp;gt;\textbf&amp;lt;/code&amp;gt; to produce bold text), one should use the &amp;lt;code&amp;gt;\bgroup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\egroup&amp;lt;/code&amp;gt; commands: &amp;lt;code&amp;gt;&amp;gt;{\textbf\bgroup}c&amp;lt;{\egroup}&amp;lt;/code&amp;gt; produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; to underline text, it is necessary to temporarily store the column text in a box using &amp;lt;code&amp;gt;lrbox&amp;lt;/code&amp;gt;. First, you must define such a box with &amp;lt;code&amp;gt;\newsavebox{\boxname}&amp;lt;/code&amp;gt; and then you can define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;{\begin{lrbox}{\boxname}}%&lt;br /&gt;
l%&lt;br /&gt;
&amp;lt;{\end{lrbox}%&lt;br /&gt;
  \underline{\unhbox\boxname}}%&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This stores the text in a box and afterwards, takes the text out of the box with &amp;lt;code&amp;gt;\unhbox&amp;lt;/code&amp;gt; (this destroys the box, if the box is needed again one should use &amp;lt;code&amp;gt;\unhcopy&amp;lt;/code&amp;gt; instead) and passing it to &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt;. (For LaTeX2e, you may want to use &amp;lt;code&amp;gt;\usebox{\boxname}&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\unhbox\boxname&amp;lt;/code&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
This same trick done with &amp;lt;code&amp;gt;\raisebox&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\underline&amp;lt;/code&amp;gt; can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.&lt;br /&gt;
&lt;br /&gt;
Here is an example showing the use of both &amp;lt;code&amp;gt;p{...}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;gt;{\centering}&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{&amp;gt;{\centering}p{3.5cm}&amp;gt;{\centering}p{3.5cm}}&lt;br /&gt;
Geometry  &amp;amp; Algebra&lt;br /&gt;
\tabularnewline&lt;br /&gt;
\hline&lt;br /&gt;
 Points &amp;amp; Addition &lt;br /&gt;
\tabularnewline&lt;br /&gt;
 Spheres &amp;amp; Multiplication &lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;code&amp;gt;\tabularnewline&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; to avoid a &amp;lt;code&amp;gt;Misplaced \noalign&amp;lt;/code&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Text wrapping in tables ===&lt;br /&gt;
&lt;br /&gt;
LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that you know will contain a certain amount of text, then it is recommended that you use the ''p'' attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). Use the ''m'' attribute to have the lines aligned toward the middle of the box and the ''b'' attribute to align along the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
Here is a practical example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article} &lt;br /&gt;
&lt;br /&gt;
\usepackage[english]{babel}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
Without specifying width for last column:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | l |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.&lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
With width specified:&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
    \begin{tabular}{ | l | l | l | p{5cm} |}&lt;br /&gt;
    \hline&lt;br /&gt;
    Day &amp;amp; Min Temp &amp;amp; Max Temp &amp;amp; Summary \\ \hline&lt;br /&gt;
    Monday &amp;amp; 11C &amp;amp; 22C &amp;amp; A clear day with lots of sunshine.  &lt;br /&gt;
    However, the strong breeze will bring down the temperatures. \\ \hline&lt;br /&gt;
    Tuesday &amp;amp; 9C &amp;amp; 19C &amp;amp; Cloudy with rain, across many northern regions. Clear spells &lt;br /&gt;
    across most of Scotland and Northern Ireland, &lt;br /&gt;
    but rain reaching the far northwest. \\ \hline&lt;br /&gt;
    Wednesday &amp;amp; 10C &amp;amp; 21C &amp;amp; Rain will still linger for the morning. &lt;br /&gt;
    Conditions will improve by early afternoon and continue &lt;br /&gt;
    throughout the evening. \\&lt;br /&gt;
    \hline&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You get the following output:&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example wrapped table.png|800px|center]]&lt;br /&gt;
&lt;br /&gt;
Note that the first table is cropped: The output is wider than the page width.&lt;br /&gt;
&lt;br /&gt;
=== Text justification in tables ===&lt;br /&gt;
&lt;br /&gt;
On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package provides the command &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; which is like &amp;lt;code&amp;gt;\makebox&amp;lt;/code&amp;gt; but instead of a ''width'' argument, it takes a tag. During compilation it bookkeeps which &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt; with a certain tag contains the widest text and can stretch all &amp;lt;code&amp;gt;\eqmakebox&amp;lt;/code&amp;gt;es with the same tag to that width. Combined with the &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; package, one can define a column specifier that justifies the text in all lines: (See the documentation of the &amp;lt;code&amp;gt;eqparbox&amp;lt;/code&amp;gt; package for more details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newsavebox{\tstretchbox}&lt;br /&gt;
\newcolumntype{S}[1]{%&lt;br /&gt;
 &amp;gt;{\begin{lrbox}{\tstretchbox}}%&lt;br /&gt;
 l%&lt;br /&gt;
 &amp;lt;{\end{lrbox}%&lt;br /&gt;
   \eqmakebox[#1][s]{\unhcopy\tstretchbox}}%&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Other environments inside tables ===&lt;br /&gt;
&lt;br /&gt;
If you use some LaTeX environments inside table cells, like &amp;lt;tt&amp;gt;verbatim&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;[[LaTeX/Formatting#Enumerate|enumerate]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| c | c |}&lt;br /&gt;
	\hline&lt;br /&gt;
	\begin{verbatim}&lt;br /&gt;
	code&lt;br /&gt;
	\end{verbatim}&lt;br /&gt;
	&amp;amp; description&lt;br /&gt;
 	\\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you might encounter errors similar to&lt;br /&gt;
 ! LaTeX Error: Something's wrong--perhaps a missing \item.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, change [[#The tabular environment|column specifier]] to &amp;quot;paragraph&amp;quot; (&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;m&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{| m{5cm} | c |}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Defining multiple columns ===&lt;br /&gt;
&lt;br /&gt;
It is possible to define many identical columns at once using the &amp;lt;code&amp;gt;*{''num''}{''str''}&amp;lt;/code&amp;gt; syntax. &lt;br /&gt;
&lt;br /&gt;
This is particularly useful when your table has many columns. &lt;br /&gt;
&lt;br /&gt;
Here is a table with six centered columns flanked by a single column on each side:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{l*{6}{c}r}&lt;br /&gt;
Team              &amp;amp; P &amp;amp; W &amp;amp; D &amp;amp; L &amp;amp; F  &amp;amp; A &amp;amp; Pts \\&lt;br /&gt;
\hline&lt;br /&gt;
Manchester United &amp;amp; 6 &amp;amp; 4 &amp;amp; 0 &amp;amp; 2 &amp;amp; 10 &amp;amp; 5 &amp;amp; 12  \\&lt;br /&gt;
Celtic            &amp;amp; 6 &amp;amp; 3 &amp;amp; 0 &amp;amp; 3 &amp;amp;  8 &amp;amp; 9 &amp;amp;  9  \\&lt;br /&gt;
Benfica           &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 3 &amp;amp;  7 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
FC Copenhagen     &amp;amp; 6 &amp;amp; 2 &amp;amp; 1 &amp;amp; 2 &amp;amp;  5 &amp;amp; 8 &amp;amp;  7  \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Latex example defining multiple columns.png|450px]]&lt;br /&gt;
&lt;br /&gt;
=== @-expressions ===&lt;br /&gt;
&lt;br /&gt;
The column separator can be specified with the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct. &lt;br /&gt;
&lt;br /&gt;
It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. This command kills the inter-column space and replaces it with whatever is between the curly braces. To add space, use &amp;lt;code&amp;gt;@{\hspace{''width''}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r@{.}l}&lt;br /&gt;
  3   &amp;amp; 14159 \\&lt;br /&gt;
  16  &amp;amp; 2     \\&lt;br /&gt;
  123 &amp;amp; 456   \\&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:align.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the approach outlined above won't work well if the column header is longer than any of the numbers. To center the column on the decimal separator, use the &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt; package, which provides a new column specifier for floating point data.&lt;br /&gt;
&lt;br /&gt;
The space suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\ \hline&lt;br /&gt;
  stuff &amp;amp; stuff \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|l|l|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier1.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier3.png]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{|@{}l@{}|@{}l@{}|}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:specifier4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Spanning ===&lt;br /&gt;
&lt;br /&gt;
To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.&lt;br /&gt;
&lt;br /&gt;
==== Rows spanning multiple columns ====&lt;br /&gt;
&lt;br /&gt;
The command for this looks like this: &amp;lt;code&amp;gt;\multicolumn{''num_cols''}{''alignment''}{''contents''}&amp;lt;/code&amp;gt;. ''num_cols'' is the number of subsequent columns to merge; ''alignment'' is, either l, c, r or to have text wrapping specifiy a width &amp;lt;code&amp;gt;p{5.0cm}&amp;lt;/code&amp;gt; . And ''contents'' is simply the actual data you want to be contained within that cell. A simple example:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
  \hline&lt;br /&gt;
  \multicolumn{2}{|c|}{Team sheet} \\&lt;br /&gt;
  \hline&lt;br /&gt;
  GK &amp;amp; Paul Robinson \\&lt;br /&gt;
  LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
  DC &amp;amp; Michael Duberry \\&lt;br /&gt;
  DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
  RB &amp;amp; Didier Domi \\&lt;br /&gt;
  MC &amp;amp; David Batty \\&lt;br /&gt;
  MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
  MC &amp;amp; Jody Morris \\&lt;br /&gt;
  FW &amp;amp; Jamie McMaster \\&lt;br /&gt;
  ST &amp;amp; Alan Smith \\&lt;br /&gt;
  ST &amp;amp; Mark Viduka \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multicolumn.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Columns spanning multiple rows ====&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is add &amp;lt;code&amp;gt;\usepackage{multirow}&amp;lt;/code&amp;gt; [http://www.ctan.org/tex-archive/macros/latex/contrib/multirow/] to the preamble. This then provides the command needed for spanning rows: &amp;lt;code&amp;gt;\multirow{''num_rows''}{''width''}{''contents''}&amp;lt;/code&amp;gt;. The arguments are pretty simple to deduce (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; for the ''width'' means the content's natural width).&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{|l|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{3}{|c|}{Team sheet} \\&lt;br /&gt;
\hline&lt;br /&gt;
Goalkeeper &amp;amp; GK &amp;amp; Paul Robinson \\ \hline&lt;br /&gt;
\multirow{4}{*}{Defenders} &amp;amp; LB &amp;amp; Lucus Radebe \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Michael Duberry \\&lt;br /&gt;
 &amp;amp; DC &amp;amp; Dominic Matteo \\&lt;br /&gt;
 &amp;amp; RB &amp;amp; Didier Domi \\ \hline&lt;br /&gt;
\multirow{3}{*}{Midfielders} &amp;amp; MC &amp;amp; David Batty \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Eirik Bakke \\&lt;br /&gt;
 &amp;amp; MC &amp;amp; Jody Morris \\ \hline&lt;br /&gt;
Forward &amp;amp; FW &amp;amp; Jamie McMaster \\ \hline&lt;br /&gt;
\multirow{2}{*}{Strikers} &amp;amp; ST &amp;amp; Alan Smith \\&lt;br /&gt;
 &amp;amp; ST &amp;amp; Mark Viduka \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirow.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The main thing to note when using &amp;lt;code&amp;gt;\multirow&amp;lt;/code&amp;gt; is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.&lt;br /&gt;
&lt;br /&gt;
If there is no data for a cell, just don't type anything, but you still need the &amp;quot;&amp;amp;&amp;quot; separating it from the next column's data. The astute reader will already have deduced that for a table of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; columns, there must always be &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; ampersands in each row. The exception to this is when &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\multirow&amp;lt;/tt&amp;gt; are used to create cells which span multiple columns or rows.&lt;br /&gt;
&lt;br /&gt;
==== Spanning in both directions simultaneously ====&lt;br /&gt;
&lt;br /&gt;
Here is a nontrivial example how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{multirow}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{cc|c|c|c|c|l}&lt;br /&gt;
\cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; \multicolumn{4}{|c|}{Primes} \\ \cline{3-6}&lt;br /&gt;
&amp;amp; &amp;amp; 2 &amp;amp; 3 &amp;amp; 5 &amp;amp; 7 \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{504} &amp;amp; 3 &amp;amp; 2 &amp;amp; 0 &amp;amp; 1 &amp;amp;     \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{540} &amp;amp; 2 &amp;amp; 3 &amp;amp; 1 &amp;amp; 0 &amp;amp;     \\ \cline{1-6}&lt;br /&gt;
\multicolumn{1}{|c|}{\multirow{2}{*}{Powers}} &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{gcd} &amp;amp; 2 &amp;amp; 2 &amp;amp; 0 &amp;amp; 0 &amp;amp; min \\ \cline{2-6}&lt;br /&gt;
\multicolumn{1}{|c|}{}                        &amp;amp;&lt;br /&gt;
\multicolumn{1}{|c|}{lcm} &amp;amp; 3 &amp;amp; 3 &amp;amp; 1 &amp;amp; 1 &amp;amp; max \\ \cline{1-6}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:multirowandcolumnexample.png|300px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with &amp;lt;code&amp;gt;\multirow{2}{*}{...}&amp;lt;/code&amp;gt;, it still draws vertical borders that only span the first row. To compensate for that, we add &amp;lt;code&amp;gt;\multicolumn{1}{|c|}{...}&amp;lt;/code&amp;gt; in the following rows spanned by the multirow. Note that we cannot just use &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command &amp;lt;code&amp;gt;\cline{2-6}&amp;lt;/code&amp;gt; and opt out the first column that contains the text &amp;quot;Powers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is another example exploiting the same ideas to make&lt;br /&gt;
the familiar and popular &amp;quot;2x2&amp;quot; or double dichotomy:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{r|c|c|}&lt;br /&gt;
\multicolumn{1}{r}{}&lt;br /&gt;
 &amp;amp;  \multicolumn{1}{c}{noninteractive}&lt;br /&gt;
 &amp;amp; \multicolumn{1}{c}{interactive} \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
massively multiple &amp;amp; Library &amp;amp; University \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
one-to-one &amp;amp; Book &amp;amp; Tutor \\&lt;br /&gt;
\cline{2-3}&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Latex-tables-double-dichotomy-example.png|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Resize tables ===&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;\resizebox{width}{height}{object}&amp;lt;/code&amp;gt; can be used with &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width/height ratio.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\resizebox{8cm}{!} {&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can use &amp;lt;code&amp;gt;\scalebox{ratio}{object}&amp;lt;/code&amp;gt; in the same way but with ratios rather than fixed sizes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\scalebox{0.7}{&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;code&amp;gt;\resizebox&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\scalebox&amp;lt;/code&amp;gt; require the graphicx package.&lt;br /&gt;
&lt;br /&gt;
To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: &amp;lt;code&amp;gt;\setlength{\tabcolsep}{5pt}&amp;lt;/code&amp;gt;.&lt;br /&gt;
The default value is 6pt.&lt;br /&gt;
&lt;br /&gt;
===Sideways tables ===&lt;br /&gt;
&lt;br /&gt;
Tables can also be put on their side within a document using the &amp;lt;code&amp;gt;rotating&amp;lt;/code&amp;gt; package and the &amp;lt;code&amp;gt;sidewaystable&amp;lt;/code&amp;gt; environments in place of the table environment. (NOTE: most DVI viewers do not support displaying rotated text. Convert your document to a PDF to see the result. Most, if not all, PDF viewers do support rotated text.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{rotating}&lt;br /&gt;
&lt;br /&gt;
\begin{sidewaystable}&lt;br /&gt;
  \begin{tabular}...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{sidewaystable}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it is desirable to place the rotated table at the exact location where it appears in the source (.tex) file, &amp;lt;code&amp;gt;rotfloat&amp;lt;/code&amp;gt; package may be used. Then one can use &amp;lt;code&amp;gt;\begin{sidewaystable}[H]&amp;lt;/code&amp;gt; just like for normal tables. The 'H' option can not be used without this package.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Row Colors in Tables ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package provides the necessary commands to produce tables with alternate row colors, when loaded with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; option.&lt;br /&gt;
The command &amp;lt;code&amp;gt;\rowcolors{&amp;lt;''starting row''&amp;gt;}{&amp;lt;''odd color''&amp;gt;}{&amp;lt;''even color''&amp;gt;}&amp;lt;/code&amp;gt; has to be specified right before the &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment starts.&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\documentclass{article}&lt;br /&gt;
&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
\begin{document}&lt;br /&gt;
&lt;br /&gt;
\begin{center}&lt;br /&gt;
\rowcolors{1}{green}{pink}&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{lll}&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
odd 	&amp;amp; odd 	&amp;amp; odd \\&lt;br /&gt;
even 	&amp;amp; even 	&amp;amp; even\\&lt;br /&gt;
\end{tabular}&lt;br /&gt;
\end{center}&lt;br /&gt;
&lt;br /&gt;
\end{document}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; | [[File:LaTeXAlternateRowTable.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
The command &amp;lt;code&amp;gt;\hiderowcolors&amp;lt;/code&amp;gt; is available to deactivate highlighting of a specified row.&lt;br /&gt;
Highlighting can be reactivated within the table via the &amp;lt;code&amp;gt;\showrowcolors&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Colors of individual Cells ===&lt;br /&gt;
&lt;br /&gt;
As above this uses the &amp;lt;code&amp;gt;xcolor&amp;lt;/code&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
% Include this somewhere in your document&lt;br /&gt;
\usepackage[table]{xcolor}&lt;br /&gt;
&lt;br /&gt;
% Enter this in the cell you wish to color a light grey.&lt;br /&gt;
% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. `0.9' denotes how dark the grey is.&lt;br /&gt;
\cellcolor[gray]{0.9}&lt;br /&gt;
% The following will color the cell red.&lt;br /&gt;
\cellcolor{red}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Partial Vertical Lines ===&lt;br /&gt;
&lt;br /&gt;
Adding a partial vertical line to an individual cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ l c r }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r|}{6}  \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-add.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Removing part of a vertical line in a particular cell:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{ | l | c | r | }&lt;br /&gt;
  1 &amp;amp; 2 &amp;amp; 3 \\ \hline&lt;br /&gt;
  4 &amp;amp; 5 &amp;amp; \multicolumn{1}{r}{6} \\ \hline&lt;br /&gt;
  7 &amp;amp; 8 &amp;amp; 9 \\ \hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| style=&amp;quot;vertical-align: middle;&amp;quot; |&lt;br /&gt;
[[Image:Partial-vertical-line-remove.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;table&amp;lt;/tt&amp;gt; environment - captioning etc ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment inside a &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do the two different environments exist? Think of it this way: The &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; environment is concerned with arranging elements in a tabular grid, while the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment represents the table more conceptually. This explains why it isn't &amp;lt;code&amp;gt;tabular&amp;lt;/code&amp;gt; but &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; that provides for captioning (because the caption isn't displayed in the grid-like layout).&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment has a lot of similarities with a &amp;lt;code&amp;gt;figure&amp;lt;/code&amp;gt; environment, in the way the &amp;quot;floating&amp;quot; is handled etc.&lt;br /&gt;
For instance you can specify its placement in the page with the option &amp;lt;code&amp;gt;[placement]&amp;lt;/code&amp;gt;, the valid values are any combination of (order is not important):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;h&amp;lt;/tt&amp;gt;&lt;br /&gt;
|where the table is declared ('''h'''ere)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;t&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''t'''op of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt;&lt;br /&gt;
|at the '''b'''ottom of the page&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&lt;br /&gt;
|on a dedicated '''p'''age of floats&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt;&lt;br /&gt;
|override the default float restrictions. E.g., the maximum size allowed of a &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; float is normally quite small; if you want a large one, you need this &amp;lt;tt&amp;gt;!&amp;lt;/tt&amp;gt; parameter as well.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;tt&amp;gt;[tbp]&amp;lt;/tt&amp;gt;. If you want to place a table in the place where it's declared, do not just write &amp;lt;tt&amp;gt;[h]&amp;lt;/tt&amp;gt;; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; float) which can be some distance away in the document. A good rule of thumb is to always use &amp;lt;tt&amp;gt;htbp&amp;lt;/tt&amp;gt; until the document is finished, at which stage the final float parameters can be fine-tuned.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; environment is also useful when you want to have a&lt;br /&gt;
list of tables at the beginning or end of your document with the command&lt;br /&gt;
&amp;lt;code&amp;gt;\listoftables&amp;lt;/code&amp;gt;;&lt;br /&gt;
it enables making cross-references to the table with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
You may refer to table~\ref{my_table} for an example.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}&lt;br /&gt;
     ...&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{An example of table}&lt;br /&gt;
  \label{my_table}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment - controlling table width ==&lt;br /&gt;
&lt;br /&gt;
This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabWidth1.png|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ''rubber lengths'', which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill}} | c | c | c | r | }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabular*}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:LaTeX TabWidth2.png|right]]&lt;br /&gt;
&lt;br /&gt;
You will notice the &amp;lt;code&amp;gt;@{...}&amp;lt;/code&amp;gt; construct added at the beginning of the column description. Within it is the &amp;lt;code&amp;gt;\extracolsep&amp;lt;/code&amp;gt; command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as &amp;lt;code&amp;gt;\fill&amp;lt;/code&amp;gt;, the columns are automatically spaced evenly.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; package - simple column stretching ==&lt;br /&gt;
&lt;br /&gt;
This package provides a table environment called &amp;lt;tt&amp;gt;tabularx&amp;lt;/tt&amp;gt; which is similar to the &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; environment, except that it has a new column specifier &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |X|X|X|X| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth1.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The content provided for the boxes is treated as for a &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; column, except that the width is calculated automatically. If you use the package &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;, you may also apply any &amp;lt;tt&amp;gt;&amp;amp;gt;{\cmd}&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;lt;{\cmd}&amp;lt;/tt&amp;gt; command to achieve specific behavior (like &amp;lt;tt&amp;gt;\centering&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;\raggedright\arraybackslash&amp;lt;/tt&amp;gt;) as described previously.&lt;br /&gt;
&lt;br /&gt;
Another option is the use of &amp;lt;tt&amp;gt;\newcolumntype&amp;lt;/tt&amp;gt; in order to get selected columns formatted in a different way. It defines a new column specifier, e.g. &amp;lt;tt&amp;gt;R&amp;lt;/tt&amp;gt; (in uppercase). In this example, the second and fourth column is adjusted in a different way (&amp;lt;tt&amp;gt;\raggedleft&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\newcolumntype{R}{&amp;gt;{\raggedleft\arraybackslash}X}%&lt;br /&gt;
\begin{tabularx}{\textwidth}{ |l|R|l|R| }&lt;br /&gt;
  \hline&lt;br /&gt;
  label 1 &amp;amp; label 2 &amp;amp; label 3 &amp;amp; label 4 \\&lt;br /&gt;
  \hline &lt;br /&gt;
  item 1  &amp;amp; item 2  &amp;amp; item 3  &amp;amp; item 4  \\&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX TabXWidth2.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
Tabularx with rows spanning multiple columns using &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt;. The two central columns are posing as one by using the &amp;lt;tt&amp;gt;X@{}&amp;lt;/tt&amp;gt; option. Note that the &amp;lt;tt&amp;gt;\multicolumn&amp;lt;/tt&amp;gt; width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{tabularx}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
\begin{tabularx}{1\textwidth}{|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|&amp;gt;{\setlength\hsize{1\hsize}\raggedleft}X@{} &amp;gt;{\setlength\hsize{1\hsize}\raggedright}X|&amp;gt;{\setlength\hsize{1\hsize}\centering}X|} &lt;br /&gt;
  \hline&lt;br /&gt;
Label 1 &amp;amp; \multicolumn{2}{&amp;gt;{\centering\setlength\hsize{2\hsize}}X|}{Label 2} &amp;amp; Label 3\tabularnewline&lt;br /&gt;
\hline &lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
  123  &amp;amp; 123  &amp;amp; 456  &amp;amp; 123  \tabularnewline&lt;br /&gt;
  \hline&lt;br /&gt;
\end{tabularx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:LaTeX tabularx_multi.png|450px|right]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Vertically centered images ==&lt;br /&gt;
&lt;br /&gt;
Inserting images into a table row will align it at the top of the cell.&lt;br /&gt;
By using the &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt; package this problem can be solved.&lt;br /&gt;
Defining a new columntype will keep the image vertically centered.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\newcolumntype{V}{&amp;gt;{\centering\arraybackslash} m{.4\linewidth} }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Or use a parbox to center the image.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\parbox[c]{1em}{\includegraphics{image.png}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Professional tables ==&lt;br /&gt;
&lt;br /&gt;
Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ''never'' use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;), and double-rules (using &amp;lt;code&amp;gt;\hline\hline&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&amp;quot;), which are regarded as unnecessary and distracting in a professionally published form.  The [http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/ booktabs] package is useful for easily providing this professionalism in LaTeX tables, and the [http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf documentation] also provides guidelines on what constitutes a &amp;quot;good&amp;quot; table.&lt;br /&gt;
&lt;br /&gt;
In brief, the package uses &amp;lt;code&amp;gt;\toprule&amp;lt;/code&amp;gt; for the uppermost rule (or line), &amp;lt;code&amp;gt;\midrule&amp;lt;/code&amp;gt; for the rules appearing in the middle of the table (such as under the header), and &amp;lt;code&amp;gt;\bottomrule&amp;lt;/code&amp;gt; for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, &amp;lt;code&amp;gt;\cmidrule&amp;lt;/code&amp;gt; can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and normal LaTeX implementations (the later example requires &amp;lt;code&amp;gt;\usepackage{booktabs}&amp;lt;/code&amp;gt; in the preamble).&lt;br /&gt;
{|&lt;br /&gt;
! Normal LaTeX&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;&lt;br /&gt;
! Using &amp;lt;tt&amp;gt;booktabs&amp;lt;/tt&amp;gt;&lt;br /&gt;
|- valign=bottom&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\firsthline&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\hline&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\lasthline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{booktabs}&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\toprule&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cmidrule(r){1-2}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\midrule&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\bottomrule&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-valign=top&lt;br /&gt;
| [[Image:LaTeX animal table.png]]&lt;br /&gt;
|&lt;br /&gt;
| [[Image:LaTeX animal table with booktabs.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the [http://www.ctan.org/tex-archive/macros/latex/contrib/ctable/ ctable] package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ctable package uses the booktabs package.&lt;br /&gt;
&lt;br /&gt;
== Adding rule spacing above or below &amp;lt;tt&amp;gt;\hline&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;\cline&amp;lt;/tt&amp;gt; commands ==&lt;br /&gt;
&lt;br /&gt;
An alternative way to adjust the rule spacing is to add &amp;lt;code&amp;gt;\noalign{\smallskip}&amp;lt;/code&amp;gt; before or after the &amp;lt;code&amp;gt;\hline&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;\cline{i-j}&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
'''Normal LaTeX'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{llr}&lt;br /&gt;
\hline\noalign{\smallskip}&lt;br /&gt;
\multicolumn{2}{c}{Item} \\&lt;br /&gt;
\cline{1-2}\noalign{\smallskip}&lt;br /&gt;
Animal &amp;amp; Description &amp;amp; Price (\$) \\&lt;br /&gt;
\noalign{\smallskip}\hline\noalign{\smallskip}&lt;br /&gt;
Gnat  &amp;amp; per gram &amp;amp; 13.65 \\&lt;br /&gt;
      &amp;amp; each     &amp;amp;  0.01 \\&lt;br /&gt;
Gnu   &amp;amp; stuffed  &amp;amp; 92.50 \\&lt;br /&gt;
Emu   &amp;amp; stuffed  &amp;amp; 33.33 \\&lt;br /&gt;
Armadillo &amp;amp; frozen &amp;amp; 8.99 \\&lt;br /&gt;
\noalign{\smallskip}\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also specify the skip after a line explicitly using glue after the line terminator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{tabular}{|l|l|}&lt;br /&gt;
\hline&lt;br /&gt;
Mineral &amp;amp; Color \\[1cm]&lt;br /&gt;
Ruby &amp;amp; red \\&lt;br /&gt;
Sapphire &amp;amp; blue \\&lt;br /&gt;
\hline&lt;br /&gt;
\end{tabular}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tables with different font size ==&lt;br /&gt;
&lt;br /&gt;
A table can be globally switched to a different font size by simply adding the desired size command (here: &amp;lt;code&amp;gt;\footnotesize&amp;lt;/code&amp;gt;) after the &amp;lt;code&amp;gt;\begin{table}...&amp;lt;/code&amp;gt; statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}[h]\footnotesize&lt;br /&gt;
  \caption{Performance at peak F-measure}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table caption font size is not affected.&lt;br /&gt;
&lt;br /&gt;
To control the caption font size, see [[LaTeX/Floats,_Figures_and_Captions#Caption_Styles|Caption Styles]].&lt;br /&gt;
&lt;br /&gt;
== Table with legend ==&lt;br /&gt;
To add a legend to a table the [http://www.ctan.org/tex-archive/macros/latex/contrib/caption/ caption] package can be used. With the caption package a &amp;lt;code&amp;gt;\caption*{...}&amp;lt;/code&amp;gt; statement can be added besides the &lt;br /&gt;
normal &amp;lt;code&amp;gt;\caption{...}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&lt;br /&gt;
\begin{table}&lt;br /&gt;
  \begin{tabular}{| r | r || c | c | c |}&lt;br /&gt;
&lt;br /&gt;
      ...&lt;br /&gt;
&lt;br /&gt;
  \end{tabular}&lt;br /&gt;
  \caption{A normal caption}&lt;br /&gt;
  \caption*{&lt;br /&gt;
    A legend, even a table can be used&lt;br /&gt;
    \begin{tabular}{l l}&lt;br /&gt;
      item 1 &amp;amp; explanation 1 \\&lt;br /&gt;
    \end{tabular}&lt;br /&gt;
  }&lt;br /&gt;
\end{table}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The normal caption is needed for labels and references.&lt;br /&gt;
&lt;br /&gt;
== Need more complicated features? ==&lt;br /&gt;
&lt;br /&gt;
Have a look at one of the following packages:&lt;br /&gt;
&lt;br /&gt;
* [http://tug.ctan.org/pkg/hhline &amp;lt;tt&amp;gt;hhline&amp;lt;/tt&amp;gt;]:   do whatever you want with horizontal lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/array &amp;lt;tt&amp;gt;array&amp;lt;/tt&amp;gt;]:    gives you more freedom on how to define columns&lt;br /&gt;
* [http://tug.ctan.org/pkg/colortbl &amp;lt;tt&amp;gt;colortbl&amp;lt;/tt&amp;gt;]: make your table more colorful&lt;br /&gt;
* [http://tug.ctan.org/pkg/supertabular &amp;lt;tt&amp;gt;supertabular&amp;lt;/tt&amp;gt;]: for tables that need to stretch over several pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/longtable &amp;lt;tt&amp;gt;longtable&amp;lt;/tt&amp;gt;]:  similar to &amp;lt;tt&amp;gt;supertab&amp;lt;/tt&amp;gt;.&lt;br /&gt;
**Note: footnotes do not work properly in a normal tabular environment. If you replace it with a longtable environment, footnotes work properly&lt;br /&gt;
* [http://tug.ctan.org/pkg/xtab &amp;lt;tt&amp;gt;xtab&amp;lt;/tt&amp;gt;]: Yet another package for tables that need to span many pages&lt;br /&gt;
* [http://tug.ctan.org/pkg/tabulary &amp;lt;tt&amp;gt;tabulary&amp;lt;/tt&amp;gt;]: modified &amp;lt;tt&amp;gt;tabular*&amp;lt;/tt&amp;gt; allowing width of columns set for equal heights&lt;br /&gt;
* [http://tug.ctan.org/pkg/arydshln &amp;lt;tt&amp;gt;arydshln&amp;lt;/tt&amp;gt;]: creates dashed horizontal and vertical lines&lt;br /&gt;
* [http://tug.ctan.org/pkg/ctable &amp;lt;tt&amp;gt;ctable&amp;lt;/tt&amp;gt;]: allows for footnotes under table and properly spaced caption above (incorporates booktabs package)&lt;br /&gt;
* [http://tug.ctan.org/pkg/slashbox &amp;lt;tt&amp;gt;slashbox&amp;lt;/tt&amp;gt;]: create 2D tables with the first cell containing a description for both axes&lt;br /&gt;
* [http://tug.ctan.org/pkg/dcolumn &amp;lt;tt&amp;gt;dcolumn&amp;lt;/tt&amp;gt;]: decimal point alignment of numeric cells&lt;br /&gt;
* [http://tug.ctan.org/pkg/rccol &amp;lt;tt&amp;gt;rccol&amp;lt;/tt&amp;gt;]: advanced decimal point alignment of numeric cells with rounding&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This concludes discussion of basic tables. Experimentation quickly leads to mastery. The table syntax in LaTeX can look rather messy, and seeing new examples can look confusing. But hopefully, enough has been covered here so that a user can create any table needed for your papers. Unsurprisingly, LaTeX has plenty more up its sleeve, so expect a follow up tutorial covering more advanced features in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Page Layout|}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=453</id>
		<title>LaTeX/Summary</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=453"/>
				<updated>2011-06-30T14:31:12Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : Page Layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[LaTeX/Installation|Installation for May 31 2011]]&lt;br /&gt;
* [[LaTeX/Introduction|Introduction]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Absolute Beginners|Absolute Beginners]]--&amp;gt;&lt;br /&gt;
* [[LaTeX/Basics|Basics]]&lt;br /&gt;
* [[LaTeX/Structured document and document structure|Structured document and document structure]]&lt;br /&gt;
* [[LaTeX/Errors and Warnings|Errors and Warnings]] &lt;br /&gt;
* [[LaTeX/List Structures|List Structures]]&lt;br /&gt;
* [[LaTeX/Importing Graphics|Importing Graphics and PDF pages]]&lt;br /&gt;
* [[LaTeX/Presentations|Presentations]]&lt;br /&gt;
* [[LaTeX/Bibliography Management|Bibliography Management]]&lt;br /&gt;
* [[LaTeX/Tables|Tables]]&lt;br /&gt;
* [[LaTeX/Page Layout|Page Layout]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Title Creation|Titles]]&lt;br /&gt;
* [[LaTeX/Formatting|Formatting]]&lt;br /&gt;
* [[LaTeX/Fonts|Fonts]]&lt;br /&gt;
* [[LaTeX/Mathematics|Mathematics]]&lt;br /&gt;
* [[LaTeX/Advanced Mathematics|Advanced Mathematics]]&lt;br /&gt;
* [[LaTeX/Theorems|Theorems]]&lt;br /&gt;
* [[LaTeX/Labels and Cross-referencing|Labels and Cross-referencing]]&lt;br /&gt;
* [[LaTeX/Indexing|Indexing]]&lt;br /&gt;
* [[LaTeX/Glossary|Glossary]]&lt;br /&gt;
* [[LaTeX/Algorithms and Pseudocode|Algorithms and Pseudocode]]&lt;br /&gt;
* [[LaTeX/Letters|Letters]]&lt;br /&gt;
* [[LaTeX/Teacher's_Corner|Teacher's Corner]]&lt;br /&gt;
* [[LaTeX/Creating Graphics|Creating Graphics]]&lt;br /&gt;
* [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]]&lt;br /&gt;
* [[LaTeX/Hyperlinks|Hyperlinks]]&lt;br /&gt;
* [[LaTeX/Colors|Colors]]&lt;br /&gt;
* [[LaTeX/Packages|Packages]]&lt;br /&gt;
* [[LaTeX/Advanced Topics|Advanced Topics]]&lt;br /&gt;
* [[LaTeX/Customizing LaTeX|Customizing LaTeX]]&lt;br /&gt;
* [[LaTeX/Multiple files|Multiple files]]&lt;br /&gt;
* [[LaTeX/Collaborative Writing of LaTeX Documents|Collaborative Writing]]&lt;br /&gt;
* [[LaTeX/Tips and Tricks|Tips / Tricks]]&lt;br /&gt;
* [[LaTeX/General Guidelines|General Guidelines]]&lt;br /&gt;
* [[LaTeX/Export To Other Formats|Export To Other Formats]]&lt;br /&gt;
* [[LaTeX/Internationalization|Internationalization]]&lt;br /&gt;
* [[LaTeX/Accents|Accents and Special Characters]]&lt;br /&gt;
* [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]]&lt;br /&gt;
* [[LaTeX/Index|Index]]&lt;br /&gt;
* [[LaTeX/Command Glossary|Command Glossary]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=452</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=452"/>
				<updated>2011-06-28T11:44:40Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. You can even keep your current headings (see example below). Be careful that it may not work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1, offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% You want to insert a scientific article in your thesis keeping &lt;br /&gt;
%  the current headings defined earlier in your text. Here the headings are&lt;br /&gt;
%  on top of pages and thus the scientific article is shifted downwards in&lt;br /&gt;
%  order to not overwrite the headings of the review:&lt;br /&gt;
\pagestyle{headings}&lt;br /&gt;
...&lt;br /&gt;
\includepdf[pages=1-, offset=+0in -1in, pagecommand={%&lt;br /&gt;
   \thispagestyle{headings}}{articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf}&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=451</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=451"/>
				<updated>2011-06-28T11:05:35Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. You can even keep your current headings (see example below). Be careful that it may not work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1, offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% You want to insert a scientific article in your thesis keeping &lt;br /&gt;
%  the current headings defined earlier in your text:&lt;br /&gt;
\pagestyle{headings}&lt;br /&gt;
...&lt;br /&gt;
\includepdf[pages=1-, offset=+1in -1in, pagecommand=&lt;br /&gt;
  {\thispagestyle{headings}}{articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf}&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=450</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=450"/>
				<updated>2011-06-24T11:45:35Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. Be careful that it may not work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1 offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=449</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=449"/>
				<updated>2011-06-24T11:22:27Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok. Be careful that it won't work with scanned PDF documents.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1 offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
\includepdfmerge[nup=1x3, landscape,linktodoc]{articles/Enquête_Cfar-Sfar-Ined_AFAR2002.pdf, 1,&lt;br /&gt;
  articles/Brouard-Pontone-Scherpereel-mathpop2007.pdf, 2,&lt;br /&gt;
  articles/Démographie_Pontone-Brouard2010_ANNFAR4425.pdf, 3}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=448</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=448"/>
				<updated>2011-06-24T09:47:03Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */ pdfmerge&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1 offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% You can frame your subpages as well reduce and give space between them&lt;br /&gt;
\includepdf[nup=2x2, pages=3-6, scale=.8, delta=8mm 11mm, frame]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
% With pdfmerge you can merge some specific pages from different documents&lt;br /&gt;
% Here are three document where the title page (of most interest) of the&lt;br /&gt;
% first document is on page 2, on first page for doc2 and third for doc3.&lt;br /&gt;
% &lt;br /&gt;
\includepdfmerge[nup=1x3, landscape, linktodoc] {doc1.pdf, 2, doc2.pdf, 1, doc3.pdf, 3}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=447</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=447"/>
				<updated>2011-06-24T09:29:32Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */ empty pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1 offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report in 3 different pages&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output a single page with an empty subpage and page 5 on top&lt;br /&gt;
%   and pages 6 and 7 on bottom&lt;br /&gt;
\includepdf[nup=2x2, pages={{},5-7}]{dummy.pdf}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=446</id>
		<title>LaTeX/Importing Graphics</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Importing_Graphics&amp;diff=446"/>
				<updated>2011-06-24T09:18:42Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : /* Including full PDF pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{LaTeX/Top}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
Strictly speaking, LaTeX cannot manage pictures directly: in order to introduce graphics within documents, LaTeX just creates a box with the same size as the image you want to include and embeds the picture, without any other processing. This means you will have to take care that the images you want to include are in the right format to be included. This is not such a hard task because LaTeX supports the most common picture formats around.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most mathematical/scientific graphics software allows you to save graphics (figures, diagrams, graphs) in PostScript form; this includes Mathematica, Maple, Matlab, IDL, and xfig (a marvelous X figure-drawing program). Even bitmap images like JPEG and PNG files can be converted to PostScript form with programs like ``xv'' or ``convert''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See http://www.ukonline.be/programmation/latex/tutoriel/chapitre11/page3.php as well as http://merkel.zoneo.net/Latex/index.php&lt;br /&gt;
&lt;br /&gt;
==The &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package==&lt;br /&gt;
&lt;br /&gt;
As stated before, LaTeX can't manage pictures directly, so we will need some extra help: we have to load the &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; package in the preamble of our document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This package accepts as an argument the external driver to be used to manage pictures; however, the latest version of this package takes care of everything by itself, changing the driver according to the compiler you are using, so you don't have to worry about this. Still, just in case you want to understand better how it works, here are the possible options you can pass to the package:&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvips&amp;lt;/tt&amp;gt; (default if compiling with ''latex''), if you are compiling with ''latex'' to get a DVI and you want to see your document with a DVI or PS viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;dvipdfm&amp;lt;/tt&amp;gt;, if you are compiling with ''latex'' to get a DVI that you want to convert to PDF using ''dvipdfm'', to see your document with any PDF viewer.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pdftex&amp;lt;/tt&amp;gt; (default if compiling with ''pdflatex''), if you are compiling with ''pdftex'' to get a PDF that you will see with any PDF viewer.&lt;br /&gt;
but, again, you don't need to pass any option to the package because the default settings are fine in most of the cases.&lt;br /&gt;
&lt;br /&gt;
In many respects, importing your images into your document using LaTeX is fairly simple... ''once'' you have your images in the right format that is! Therefore, I fear for many people the biggest effort will be the process of converting their graphics files. Now we will see which formats we can include and then we will see how to do it.&lt;br /&gt;
&lt;br /&gt;
===Document Options===&lt;br /&gt;
&lt;br /&gt;
The graphics and graphicx packages recognize the &amp;quot;draft&amp;quot; and &amp;quot;final&amp;quot; [[LaTeX/Basics#Document Class Options|options]] given in the &amp;lt;code&amp;gt;[[LaTeX/Basics#Document_Classes|\documentclass]][...]{...}&amp;lt;/code&amp;gt; command at the start of the file. Using &amp;quot;draft&amp;quot; as the option will suppress the inclusion of the image in the output file and will replace the contents with the name of the image file that would have been seen. Using &amp;quot;final&amp;quot; will result in the image being placed in the output file. The default is &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Supported image formats===&lt;br /&gt;
&lt;br /&gt;
As explained before, the image formats you can use depend on the driver that &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; is using but, since the driver is automatically chosen according to the compiler, then the allowed image formats will depend on the compiler you are using.&lt;br /&gt;
&lt;br /&gt;
====Compiling with ''latex'', the only way for including Encapsulated PostScript images====&lt;br /&gt;
&lt;br /&gt;
The only format you can include while compiling with ''latex'' is [[w:Encapsulated PostScript|Encapsulated PostScript]] ('''EPS''').&lt;br /&gt;
&lt;br /&gt;
The EPS format was defined by Adobe Systems for making it easy for applications to import postscript-based graphics into documents. Because an EPS file declares the size of the image, it makes it easy for systems like LaTeX to arrange the text and the graphics in the best way. EPS is a [[w:Vector graphics|vector format]]—this means that it can have very high quality if it is created properly, with programs that are able to manage vector graphics. It is also possible to store bit-map pictures within EPS, but they will need ''a lot'' of disk space.&lt;br /&gt;
&lt;br /&gt;
Many graphics software packages have the ability to save images in the EPS format (extension is normally &amp;lt;tt&amp;gt;.eps&amp;lt;/tt&amp;gt;). Here are some examples of software that can output EPS formats:&lt;br /&gt;
* Printing in an EPS file:&lt;br /&gt;
** Under Windows, [http://sourceforge.net/projects/pdfcreator/ PDFCreator] is an open source software that can create PDF as well as EPS files. It installs a virtual printer that can be accessed from other software having a &amp;quot;print...&amp;quot; entry in their menu (virtually any program).&lt;br /&gt;
* Creating and converting vector graphics:&lt;br /&gt;
** Commercial vector graphics software, such as Adobe Illustrator, CorelDRAW, and FreeHand are commonly used and can ''read'' and ''write'' EPS figures. However, these products are limited to Windows and Mac OS platforms.&lt;br /&gt;
** [http://www.inkscape.org Inkscape] can save in vector EPS format, and it can run on multiple platforms. Inkscape cannot open EPS figures directly; however, with the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility] one can convert EPS into PDF and Inkscape can import PDF. From version 0.48, Inkscape has a special PDF+LaTeX output option (and for EPS/PS too). See [http://wiki.inkscape.org/wiki/index.php/LaTeX Inkscape website].&lt;br /&gt;
** [http://live.gnome.org/Dia Dia] is a cross platform diagramming utility which can export eps.&lt;br /&gt;
* Creating and converting raster-only graphics to EPS:&lt;br /&gt;
** [http://www.gimp.org GIMP], has a graphical user interface, and it is multi-platform.&lt;br /&gt;
** For command-line:&lt;br /&gt;
***[http://pts.szit.bme.hu/sam2p/ Sam2p] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or &lt;br /&gt;
***[http://www.imagemagick.org/ ImageMagick] (&amp;lt;code&amp;gt;convert&amp;lt;/code&amp;gt;) or&lt;br /&gt;
***[http://www.graphicsmagick.org/ GraphicsMagick] (&amp;lt;code&amp;gt;gm convert&amp;lt;/code&amp;gt;).                &lt;br /&gt;
**These three programs operate much the same way, and can convert between most graphics formats. Sam2p however is the most recent of the three and seems to offer both the best quality and to result in the smallest files.&lt;br /&gt;
***[http://imgtops.sourceforge.net/ imgtops].  A lightweight graphics utility.&lt;br /&gt;
* Creating publication-quality vector-based plots and charts:&lt;br /&gt;
** [http://www.gnuplot.info Gnuplot], producing scientific graphics since 1986.&lt;br /&gt;
** [http://www.r-project.org/ R], statistical and scientific figures.&lt;br /&gt;
** [http://gmt.soest.hawaii.edu/ Generic Mapping Tools (GMT)], maps and a wide range of highly customisable plots.&lt;br /&gt;
** [http://projects.gnome.org/gnumeric/ Gnumeric], spreadsheets has SVG, EPS, PDF export&lt;br /&gt;
** [http://matplotlib.sourceforge.net/ matplotlib], plotting library written in python, with PDF and EPS export.&lt;br /&gt;
There are some tricks to be able to import formats other than EPS into your DVI document, but they're very complicated. On the other hand, converting any image to EPS is very simple, so it's not worth considering them.&lt;br /&gt;
&lt;br /&gt;
====Compiling with &amp;lt;tt&amp;gt;pdflatex&amp;lt;/tt&amp;gt; for inclusion of pdf, as well as jpg and png images====&lt;br /&gt;
&lt;br /&gt;
If you are compiling with &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; to produce a PDF, you have a wider choice. You can insert:&lt;br /&gt;
* '''JPG''', widely used on Internet, digital cameras, etc. They are the best choice if you want to insert photos&lt;br /&gt;
* '''PNG''', a very common format (even if not as much as JPG); it's a [[w:lossless|lossless]] format and it's the best choice for diagrams (if you were not able to generate a [[w:Vector graphics|vector]] version) and screenshots&lt;br /&gt;
* '''PDF''', it is widely used for documents but can be used to store images as well. It supports both vector and [[w:Raster graphics|bit-map]] images, but it's not recommended for the latter, as JPG or PNG will provide the same result using less disk space.&lt;br /&gt;
==== Vector formats ====&lt;br /&gt;
Vector formats can be used with the help of many softwares like, Inkscape, GeoGebra, IPE etc. &lt;br /&gt;
You could also create your graphics directly with Inkscape. If you want to make mathematical plots, then [http://www.gnuplot.info Gnuplot] can save in any format.  &lt;br /&gt;
&lt;br /&gt;
[http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf There are instructions] on how to save your vector images in a PDF format understood by LaTeX and have LaTeX manage the text styles and sizes in the image automatically.&lt;br /&gt;
* '''EPS''' can be used with the help of  the epstopdf package. Please see [http://dirkraffel.com/2007/11/19/include-eps-files-in-latex  these instructions].&lt;br /&gt;
==== Raster images====&lt;br /&gt;
&lt;br /&gt;
JPG and PNG are supported by any image processing program, so you just have to use the one you prefer. If you want to create high quality vector PDF to embed within your PDF document, you can use [http://www.inkscape.org Inkscape]: it supports many vector formats and so you can use it to convert from one to other. &lt;br /&gt;
&lt;br /&gt;
Note, that EPS files cannot be used with pdflatex, however they can be converted to PDF using the [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf utility], included in most LaTeX distributions. This can be called automatically by LaTeX using the [http://www.ctan.org/tex-archive/help/Catalogue/entries/epstopdf-pkg.html epstopdf package]. In Windows, multiple files can be converted by placing the following line in a [[w:Batch file|batch file]] (a text file with a .BAT extension) in the same directory as the images:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
for %%f in (*.eps) do epstopdf %%f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which can then be run from the command line.&lt;br /&gt;
If [http://www.ctan.org/tex-archive/support/epstopdf/ epstopdf] produces whole page with your small graphics somewhere on it, use &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf --gsopt=-dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
or try using [http://svn.ghostscript.com/ghostscript/trunk/gs/doc/Ps2pdf.htm ps2pdf] utility &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ps2pdf -dEPSCrop foo.eps&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
to crop final PDF.&lt;br /&gt;
&lt;br /&gt;
Images can be saved in multiple formats for different purposes. For example, a directory can have &amp;quot;&amp;lt;tt&amp;gt;diagram.pdf&amp;lt;/tt&amp;gt;&amp;quot; for high-resolution printing, while &amp;quot;&amp;lt;tt&amp;gt;diagram.png&amp;lt;/tt&amp;gt;&amp;quot; can be used for previewing on the monitor. You can specify which image file is to be used by &amp;lt;code&amp;gt;pdflatex&amp;lt;/code&amp;gt; through the preamble command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\DeclareGraphicsExtensions{.pdf,.png,.jpg}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which specifies the files to include in the document, if files with the same basename exist, but with different extensions.&lt;br /&gt;
&lt;br /&gt;
=== Including graphics ===&lt;br /&gt;
&lt;br /&gt;
Now that we have seen which formats we can include and how we could manage those formats, it's time to learn how to include them in our document.&lt;br /&gt;
After you have loaded the &amp;lt;tt&amp;gt;graphicx&amp;lt;/tt&amp;gt; package in your preamble, you can include images with &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt;, whose syntax is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[attr1=val1, attr2=val2, ..., attrn=valn]{imagename}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you should hopefully be aware by now, arguments in square brackets are optional, whereas arguments in curly braces are compulsory. The argument in the curly braces is the name of the image. Write it ''without'' the extension. This way the LaTeX compiler will look for any supported image format in that directory and will take the best one (EPS if the output is DVI; JPEG, PNG or PDF if the output is PDF). The variety of possible attributes that can be set is fairly large, so only the most common are covered below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &amp;lt;tt&amp;gt;width=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; | Specify the preferred width of the imported image to ''xx''.&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | ''NB. Only specifying either width or height will scale the image whilst maintaining the aspect ratio.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;height=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Specify the preferred height of the imported image to ''xx''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;keepaspectratio&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This can be set to either ''true'' or ''false''. When true, it will scale the image according to both height and width, but will not distort the image, so that neither width nor height are exceeded.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;scale=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Scales the image by the desired scale factor. e.g, 0.5 to reduce by half, or 2 to double.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;angle=xx&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option can rotate the image by ''xx'' degrees (anti-clockwise)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;trim=l b r t&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | This option will crop the imported image by ''l'' from the left, ''b'' from the bottom, ''r'' from the right, and ''t'' from the top. Where l, b, r and t are lengths.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;clip&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | For the &amp;lt;tt&amp;gt;trim&amp;lt;/tt&amp;gt; option to work, you must set &amp;lt;tt&amp;gt;clip=true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;page=x&amp;lt;/tt&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to use more than one option at a time, simply separate each with a comma. The order you give the options matters. E.g you should first rotate your graphic (with angle) and then specify its width. &lt;br /&gt;
&lt;br /&gt;
Included graphics will be inserted just ''there'', where you placed the code, and the compiler will handle them as &amp;quot;big boxes&amp;quot;. As we will see in the [[LaTeX/Floats, Figures and Captions|next section]], this may lead to a bad output so you'd better place graphics inside floating objects.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
OK, it's time to see graphicx in action. Here are some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simply imports the image, without any other processing. However, it is very large (so I won't display it here!). So, let's scale it down:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This has now reduced by half. If you wish to be more specific and give actual lengths of the image dimensions, this is how to go about it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=2.5cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
One can also specify the scale with respect to the width of a line in the local environment (&amp;lt;code&amp;gt;\linewidth&amp;lt;/code&amp;gt;), the width of the text on a page (&amp;lt;code&amp;gt;\textwidth&amp;lt;/code&amp;gt;) or the height of the text on a page (&amp;lt;code&amp;gt;\textheight&amp;lt;/code&amp;gt;) (pictures not shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[width=0.5\linewidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[width=0.75\textwidth]{chick}&lt;br /&gt;
&lt;br /&gt;
\includegraphics[height=0.75\textheight]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To rotate (I also scaled the image down):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\includegraphics[scale=0.5, angle=180]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick3.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
And finally, an example of how to crop an image should you wish to focus in one particular area of interest:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%trim option's parameter order: left bottom right top&lt;br /&gt;
\includegraphics[trim = 10mm 80mm 20mm 5mm, clip, width=3cm]{chick}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|[[Image:chick4.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the presence of &amp;lt;code&amp;gt;clip&amp;lt;/code&amp;gt;, as the trim operation will not work without it.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, the file name of the picture is always without the extensions: LaTeX will take care of getting the right version for us. Consider the following situation: you have added some pictures to your document in JPG and you have successfully compiled it in PDF. Now you want to compile it in DVI, you run ''latex'' and you get a lot of errors... because you forgot to provide the EPS versions of the pictures you want to insert. At the beginning of this book, we had stated that the same LaTeX source can be compiled in both DVI and PDF without any change. This is true, as long as you don't use particular packages, and &amp;lt;code&amp;gt;graphicx&amp;lt;/code&amp;gt; is one of those. In any case, you can still use both compilers with documents with pictures as well, as long as you always remember to provide the pictures in two formats (EPS and one of JPG, PNG and PDF).&lt;br /&gt;
&lt;br /&gt;
=== Borders ===&lt;br /&gt;
It is possible to have LaTeX create a border around your image by using &amp;lt;code&amp;gt;fbox&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\setlength\fboxsep{0pt}&lt;br /&gt;
\setlength\fboxrule{0.5pt}&lt;br /&gt;
\fbox{\includegraphics{chick}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can control the border padding with the &amp;lt;code&amp;gt;\setlength\fboxsep{0pt}&amp;lt;/code&amp;gt; command, in this case I set it to 0pt to avoid any padding, so the border will be placed tightly around the image. You can control the thickness of the border by adjusting the &amp;lt;code&amp;gt;\setlength\fboxrule{0.5pt}&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Graphics storage ===&lt;br /&gt;
&lt;br /&gt;
There is a way to tell LaTeX where to look for images: for example, it can be useful if you store images centrally for use in many different documents. The answer is in the command &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; which you supply with an argument giving the name of an additional directory path you want searched when a file uses the &amp;lt;tt&amp;gt;\includegraphics&amp;lt;/tt&amp;gt; command, here are some examples (trailing / is required):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\graphicspath{{c:\mypict~1\camera}}&lt;br /&gt;
\graphicspath{{c:/mypict~1/camera/}} *&lt;br /&gt;
\graphicspath{{/var/lib/images/}}&lt;br /&gt;
\graphicspath{{./images/}}&lt;br /&gt;
\graphicspath{{images_folder/}{other_folder/}{third_folder/}}&lt;br /&gt;
\graphicspath{{images//}}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; * &amp;lt;/nowiki&amp;gt; goes well in win XP&lt;br /&gt;
&lt;br /&gt;
please see http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf. The last command searches the files recursively because of the double slash &amp;quot;//&amp;quot;. In the example shown you would have a directory named &amp;quot;images&amp;quot; in the same directory as your man tex file, i.e. this is RELATIVE addressing. In this manner you can create a &amp;quot;human sensible&amp;quot; directory tree below this that could e.g. make it easier for you to sort/find/edit large numbers of image files. There is a caveat that using this recursive search may hog memory, please keep this in mind.&lt;br /&gt;
&lt;br /&gt;
As you may have noticed, in the first example I've used the &amp;quot;safe&amp;quot; (MS-DOS) form of the Windows ''MyPictures'' folder because it's a bad idea to use directory names containing spaces. Using absolute paths, &amp;lt;tt&amp;gt;\graphicspath&amp;lt;/tt&amp;gt; does make your file less portable, while using relative paths (like the last example), you shouldn't have any problem with portability, but remember not to use spaces in file-names.  Alternatively, if you are using PDFLaTeX, you can use the package &amp;lt;tt&amp;gt;grffile&amp;lt;/tt&amp;gt; which will then allow you to use spaces in file names.&lt;br /&gt;
&lt;br /&gt;
=== Images as Figures ===&lt;br /&gt;
&lt;br /&gt;
There are many scenarios where you might want to accompany an image with a caption and possibly a cross-reference. This is done using the figure environment. The following code sample shows the bare minimum required to use an image as a figure.&lt;br /&gt;
&lt;br /&gt;
==== png, eps ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{image.png}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gif to png ====&lt;br /&gt;
Because of the history of the license concerning the GIF format, a png format will be preferred. And the transformation to png can be done at least with &amp;lt;tt&amp;gt;giftopnm |pnmtopng &amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;convert&amp;lt;/tt&amp;gt;. If you are modifying the gif files frequently, you can have some benefit to let TeX doing the transformation at compilation time. Your TeX engine must be used with &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option in order to allow a sub shell process to be created temporarly.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\usepackage{graphicx}  % If you want to insert a graphic (pdf, eps)&lt;br /&gt;
\usepackage{epstopdf}&lt;br /&gt;
&lt;br /&gt;
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{ convert gif:#1 png:\OutputFile} % For gif -shell-escape must be added&lt;br /&gt;
\AppendGraphicsExtensions{.gif}&lt;br /&gt;
&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\includegraphics{ined.gif}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you can't get the image, it might be because the &amp;lt;tt&amp;gt;-shell-escape&amp;lt;/tt&amp;gt; option is not set in your editor/compiler or because the convert programme doesn't exist or is not in your path (WINDOWS).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above code extract is relatively trivial, and doesn't offer much functionality. The following code sample shows an extended use of the figure environment which is almost universally useful, offering a caption and label, centering the image and scaling it to 80% of the width of the text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}[htb]&lt;br /&gt;
\begin{center}&lt;br /&gt;
\leavevmode&lt;br /&gt;
\includegraphics[width=0.8\textwidth]{image.png}&lt;br /&gt;
\end{center}&lt;br /&gt;
\caption{Awesome Image}&lt;br /&gt;
\label{fig:awesome_image}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure environment is not exclusively used for images. More information on the figure environment and how to use it can be found in [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Text Wrapping around Images ===&lt;br /&gt;
&lt;br /&gt;
Text can also be wrapped around images. (This is especially useful if you include tall pictures.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
%import section&lt;br /&gt;
\usepackage{wrapfig}&lt;br /&gt;
&lt;br /&gt;
% content section&lt;br /&gt;
\begin{wrapfigure}{r}{8cm} % &amp;quot;l&amp;quot; or &amp;quot;r&amp;quot; for the side on the page. And the width parameter for the width of the image space.&lt;br /&gt;
\centering&lt;br /&gt;
\includegraphics[height=80mm]{Abb/bluesniper.jpg}&lt;br /&gt;
\caption{Selbstgebaute „Bluesniper“ um Bluetooth-Geräte aus über 1 km Entfernung anzugreifen. (Stand: 2004)}&lt;br /&gt;
\label{bluesniper}&lt;br /&gt;
\end{wrapfigure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Including full PDF pages ===&lt;br /&gt;
&lt;br /&gt;
There is a great package for including full pages of PDF files: [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages pdfpages] and its [http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf documentation]. It is capable of inserting full pages as is and more pages per one page in any layout (e.g. 2x3). Further pagination is ok.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=latex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% To insert a single page, even a big one like a poster.&lt;br /&gt;
\includepdf[pages=1]{myposter.pdf}&lt;br /&gt;
\includepdf[pages=1 offset=+1in -1in]{myposter.pdf} % If not centered&lt;br /&gt;
&lt;br /&gt;
% To insert pages 3 to 5 of report.&lt;br /&gt;
\includepdf[pages=3-5]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% Specific pages and ranges of pages can be selected on a single page&lt;br /&gt;
% and presented 1, 4, 5 on top half and  6, 8 and 10 on bottom half&lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% If you want to sort by column, you will get 1, 6 on top, &lt;br /&gt;
%   4, 8 in the middle and 5, 10 in the bottom &lt;br /&gt;
\includepdf[nup=3x2, pages={1,4-6,8,10}, column]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
% This will output two pages, forcing landscape for pages 1 (on top) &lt;br /&gt;
% and 2 on bottom for the first page&lt;br /&gt;
% and  3 (top) 4 (bottom) for the second page. &lt;br /&gt;
\includepdf[nup=1x2, pages=1-4]{myreport.pdf}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See more examples at [http://www-hep2.fzu.cz/tex/texmf-dist/doc/latex/pdfpages/pdf-ex.pdf ].&lt;br /&gt;
&lt;br /&gt;
== Graphics made with TeX macros or packages ==&lt;br /&gt;
=== LaTeX pictures ===&lt;br /&gt;
The LaTeX picture macros are very poor and is no more used.&lt;br /&gt;
&lt;br /&gt;
===TikZ/PGF===&lt;br /&gt;
&amp;lt;small&amp;gt;''More thorough introduction to TikZ is available at the [[LaTeX/Creating Graphics#TikZ.2FPGF|Creating Graphics]] chapter''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can draw graphics directly with TeX commands using the tikz package: http://ftp.dante.de/tex-archive/help/Catalogue/entries/pgf.html&lt;br /&gt;
It comes with very good documentation with many examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
% This needs \usepackage{tikz} in the preamble&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \begin{tikzpicture}&lt;br /&gt;
    \draw[thick,rounded corners=8pt] &lt;br /&gt;
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);&lt;br /&gt;
  \end{tikzpicture}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extensive collection of examples can be found here: http://www.texample.net/tikz/&lt;br /&gt;
&lt;br /&gt;
Other packages building on top of TikZ (e.g. for drawing electrical circuits) can be found here: http://ftp.dante.de/tex-archive/help/Catalogue/bytopic.html#pgftikzsection&lt;br /&gt;
&lt;br /&gt;
=== xy package ===&lt;br /&gt;
&lt;br /&gt;
==Creating Vector Graphics==&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Remember and type&amp;quot; softwares ===&lt;br /&gt;
==== Gnuplot ====&lt;br /&gt;
Gnuplot is a very powerful drawing language in 2D as in 3D. It is used internally by many other software like [[Wikipedia:en:Octave_software]]. At INED, [http://euroreves.ined.fr/imach imach]] as well as the book entitled African Population and AIDS has some dynamic [http://sauvy.ined.fr/popafsi/english/fig25-26e.html pages] using gnuplot at run time.&lt;br /&gt;
&lt;br /&gt;
Gnuplot works on Windows, MaC and Linux. Gnuplot can output various graphic formats, vector formats including svg, eps, pdf or raster formats like png or gif or even animated gifs (see [[Wikipedia:en:Foucault_Pendulum]] for example). &lt;br /&gt;
&lt;br /&gt;
Latest version of Gnuplot is able to output Tikz TeX sources.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Gnuplot]] too.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG softwares===&lt;br /&gt;
====Xfig====&lt;br /&gt;
&lt;br /&gt;
Vector graphics can be created using the vector painting program Xfig (see [[LaTeX/Installation#Xfig|Installation]]), and exported for LaTeX. In Xfig, once your graphic is saved as a file &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt;, you need to export it using the '''File &amp;gt; Export''' drop down menu from the main Xfig window and then select the &amp;quot;Combined PS/Latex (both parts)&amp;quot; in the language drop down list. If you don't change any other settings, two files will be created in the same directory as the &amp;lt;tt&amp;gt;test.fig&amp;lt;/tt&amp;gt; file, such as: &amp;lt;tt&amp;gt;test.pstex_t&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;test.pstex&amp;lt;/tt&amp;gt;. The figure can then be placed in a LaTeX document:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;latex&amp;quot;&amp;gt;&lt;br /&gt;
\begin{figure}&lt;br /&gt;
  \centering&lt;br /&gt;
  \input{./xfig/test.pstex_t}&lt;br /&gt;
  \caption{This is the caption of my figure}&lt;br /&gt;
  \label{fig:test}&lt;br /&gt;
\end{figure}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
see [[LaTeX/Xfig]] too.&lt;br /&gt;
&lt;br /&gt;
====Ipe 7====&lt;br /&gt;
&lt;br /&gt;
The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format.&lt;br /&gt;
Unlike Xfig, ipe represents [[LaTeX]] fonts in their correct size on the screen which makes it easier to place text labels at the right spot.&lt;br /&gt;
ipe also has various snapping modes (for example, snapping to points, lines, or intersections) that can be used to geometrically construct.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Ipe]] too.&lt;br /&gt;
&lt;br /&gt;
====Inkscape====&lt;br /&gt;
&lt;br /&gt;
Another program for creating vector graphics is [http://www.inkscape.org/ Inkscape]. It works with [http://www.w3.org/Graphics/SVG/ Scalable Vector Graphics (SVG)] files, although it can export to many formats that can be included in [[LaTeX]] files, such as EPS and PDF.&lt;br /&gt;
From version 0.48, there is a combined PDF/EPS/PS+LaTeX output option, like XFig has.&lt;br /&gt;
&lt;br /&gt;
See [[LaTeX/Inkscape]] too.&lt;br /&gt;
&lt;br /&gt;
===Editing EPS graphics===&lt;br /&gt;
&lt;br /&gt;
As described above, graphics content can be imported into [[LaTeX]] from outside programs as EPS files. But sometimes you want to edit or retouch these graphics files. An EPS file can be edited with any text editor since it is formatted as ASCII. In a text editor, you can achieve simple operations like replacing strings or moving items slightly, but anything further becomes cumbersome.&lt;br /&gt;
&lt;br /&gt;
To properly edit an EPS file, you can convert it to an ''editable'' format using [http://www.pstoedit.net/ pstoedit]. For instance, to get an Xfig-editable file, do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f fig input.eps output.fig&lt;br /&gt;
&amp;lt;/source&amp;gt;And to get an SVG file for Inkscape you can do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pstoedit -f plot-svg input.eps output.svg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes pstoedit fails to create the target format (for example when the EPS file contains clipping information). A more robust way to edit EPS files is achieved by converting it first to PDF and then importing the resulting PDF in Inkscape. Inkscape uses the Cairo library that achieves a high-quality transformation of the original EPS figure:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ epstopdf input.eps&lt;br /&gt;
$ inkscape input.pdf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When all of the above fails, one can simplify the EPS file before attempting other conversions, by using the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] tool (also see next section):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This will convert all the fonts to pre-drawn images, which is sometimes desirable when submitting manuscripts for publication. However, on the downside, the fonts are NOT converted to lines, but instead to bitmaps, which reduces the quality of the fonts.&lt;br /&gt;
&lt;br /&gt;
===Converting a color EPS to grayscale===&lt;br /&gt;
&lt;br /&gt;
Sometimes color EPS figures need to be converted to black-and-white or grayscale to meet publication requirements. This can be achieved with the [http://linuxcommand.org/man_pages/eps2eps1.html eps2eps] of the  [http://ghostscript.com/ Ghostscript] package and [http://www.mpch-mainz.mpg.de/~joeckel/pscol/index.html pscol] programs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ eps2eps input.eps input-e2.eps&lt;br /&gt;
$ pscol -0gray input-e2.eps input-gray.eps&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{LaTeX/Bottom|Tables|Floats, Figures and Captions}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	<entry>
		<id>https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=445</id>
		<title>LaTeX/Summary</title>
		<link rel="alternate" type="text/html" href="https://mse.ined.fr/LaTeX/w/index.php?title=LaTeX/Summary&amp;diff=445"/>
				<updated>2011-06-24T08:52:05Z</updated>
		
		<summary type="html">&lt;p&gt;Nicolas Brouard : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[LaTeX/Installation|Installation for May 31 2011]]&lt;br /&gt;
* [[LaTeX/Introduction|Introduction]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Absolute Beginners|Absolute Beginners]]--&amp;gt;&lt;br /&gt;
* [[LaTeX/Basics|Basics]]&lt;br /&gt;
* [[LaTeX/Structured document and document structure|Structured document and document structure]]&lt;br /&gt;
* [[LaTeX/Errors and Warnings|Errors and Warnings]] &lt;br /&gt;
* [[LaTeX/List Structures|List Structures]]&lt;br /&gt;
* [[LaTeX/Importing Graphics|Importing Graphics and PDF pages]]&lt;br /&gt;
* [[LaTeX/Presentations|Presentations]]&lt;br /&gt;
* [[LaTeX/Bibliography Management|Bibliography Management]]&lt;br /&gt;
* [[LaTeX/Tables|Tables]]&lt;br /&gt;
&amp;lt;!--* [[LaTeX/Title Creation|Titles]]&lt;br /&gt;
* [[LaTeX/Formatting|Formatting]]&lt;br /&gt;
* [[LaTeX/Fonts|Fonts]]&lt;br /&gt;
* [[LaTeX/Page Layout|Page Layout]]&lt;br /&gt;
* [[LaTeX/Mathematics|Mathematics]]&lt;br /&gt;
* [[LaTeX/Advanced Mathematics|Advanced Mathematics]]&lt;br /&gt;
* [[LaTeX/Theorems|Theorems]]&lt;br /&gt;
* [[LaTeX/Labels and Cross-referencing|Labels and Cross-referencing]]&lt;br /&gt;
* [[LaTeX/Indexing|Indexing]]&lt;br /&gt;
* [[LaTeX/Glossary|Glossary]]&lt;br /&gt;
* [[LaTeX/Algorithms and Pseudocode|Algorithms and Pseudocode]]&lt;br /&gt;
* [[LaTeX/Letters|Letters]]&lt;br /&gt;
* [[LaTeX/Teacher's_Corner|Teacher's Corner]]&lt;br /&gt;
* [[LaTeX/Creating Graphics|Creating Graphics]]&lt;br /&gt;
* [[LaTeX/Floats, Figures and Captions|Floats, Figures and Captions]]&lt;br /&gt;
* [[LaTeX/Hyperlinks|Hyperlinks]]&lt;br /&gt;
* [[LaTeX/Colors|Colors]]&lt;br /&gt;
* [[LaTeX/Packages|Packages]]&lt;br /&gt;
* [[LaTeX/Advanced Topics|Advanced Topics]]&lt;br /&gt;
* [[LaTeX/Customizing LaTeX|Customizing LaTeX]]&lt;br /&gt;
* [[LaTeX/Multiple files|Multiple files]]&lt;br /&gt;
* [[LaTeX/Collaborative Writing of LaTeX Documents|Collaborative Writing]]&lt;br /&gt;
* [[LaTeX/Tips and Tricks|Tips / Tricks]]&lt;br /&gt;
* [[LaTeX/General Guidelines|General Guidelines]]&lt;br /&gt;
* [[LaTeX/Export To Other Formats|Export To Other Formats]]&lt;br /&gt;
* [[LaTeX/Internationalization|Internationalization]]&lt;br /&gt;
* [[LaTeX/Accents|Accents and Special Characters]]&lt;br /&gt;
* [[LaTeX/Useful Measurement Macros|Useful Measurement Macros]]&lt;br /&gt;
* [[LaTeX/Index|Index]]&lt;br /&gt;
* [[LaTeX/Command Glossary|Command Glossary]]--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nicolas Brouard</name></author>	</entry>

	</feed>