#LyX 1.6.5 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass scrartcl
\begin_preamble
%   eLyXer -- convert LyX source files to HTML output.
%
%   Copyright (C) 2009-2010 Alex Fernández
%
%   This program is free software: you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation, either version 3 of the License, or
%   (at your option) any later version.
%
%   This program is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You should have received a copy of the GNU General Public License
%   along with this program.  If not, see <http://www.gnu.org/licenses/>.

% DO NOT ALTER THIS PREAMBLE!!!
%
% This preamble is designed to ensure that the User's Guide prints
% out as advertised. If you mess with this preamble,
% parts of the User's Guide may not print out as expected.  If you
% have problems LaTeXing this file, please contact 
% the documentation team
% email: lyx-docs@lists.lyx.org

\usepackage{ifpdf} % part of the hyperref bundle
\ifpdf % if pdflatex is used

 % set fonts for nicer pdf view
 \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}

\fi % end if pdflatex is used

% for correct jump positions whe clicking on a link to a float
\usepackage[figure]{hypcap}

% the pages of the TOC is numbered roman
% and a pdf-bookmark for the TOC is added
\let\myTOC\tableofcontents
\renewcommand{\tableofcontents}{%
  \frontmatter
  \pdfbookmark[1]{\contentsname}{}
  \myTOC
  \mainmatter }

% redefine the \LyX macro for PDF bookmarks
\def\LyX{\texorpdfstring{%
  L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
  {LyX}}

% define a short command for \textvisiblespace
\newcommand{\spce}{\textvisiblespace}

% macro for italic page numbers in the index
\newcommand{\IndexDef}[1]{\textit{#1}}

% test macro with two arguments
\newcommand{\preambleroot}[2]{\sqrt[#1]{#2}}

% redefine the greyed out note

\usepackage{mathrsfs}
\end_preamble
\options intoc,bibtotoc,idxtotoc,BCOR7mm,tablecaptionabove
\use_default_options false
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\paperfontsize 12
\spacing single
\use_hyperref true
\pdf_title "Math Test"
\pdf_author "Alex Fernández"
\pdf_subject "Taken from Guía de Usuario de Lyx, Ignacio García"
\pdf_keywords "LyX"
\pdf_bookmarks true
\pdf_bookmarksnumbered true
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks true
\pdf_backref false
\pdf_pdfusetitle false
\pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true,pdfstartview=XYZ, plainpages=false, pdfpagelabels,pdftex"
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Title
Math Test
\end_layout

\begin_layout Section
Limit
\end_layout

\begin_layout Standard
A limit: 
\begin_inset Formula \[
\lim_{x\rightarrow\infty}\lyxlock f(x),\]

\end_inset

which should appear as 
\begin_inset Formula $x\rightarrow\infty$
\end_inset

 in italics, and 
\begin_inset Quotes fld
\end_inset

lim
\begin_inset Quotes frd
\end_inset

 in plain style.
 Inlined: 
\begin_inset Formula $\lim_{x\rightarrow\infty}\lyxlock f(x)$
\end_inset

.
\end_layout

\begin_layout Standard
And why not, a sum: 
\begin_inset Formula \[
\sum_{i=1}^{\infty}x,\]

\end_inset

where the sum's limits should appear below (
\begin_inset Formula $i=1$
\end_inset

) and above (
\begin_inset Formula $\infty$
\end_inset

) the 
\begin_inset Formula $\sum$
\end_inset

.
 Inlined: 
\begin_inset Formula $\sum_{i=1}^{\infty}x.$
\end_inset

 Integral: 
\begin_inset Formula $\intop_{i=1}^{\infty}x.$
\end_inset


\end_layout

\begin_layout Section
Numeration
\end_layout

\begin_layout Standard
Equations can be numbered, like 
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:first"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{equation}
y=x\label{eq:first}\end{equation}

\end_inset


\end_layout

\begin_layout Standard
And also like 
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:second"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{equation}
x=3\label{eq:second}\end{equation}

\end_inset


\end_layout

\begin_layout Standard
Notice that eq.
 
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:second"

\end_inset

 comes after eq.
 
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:first"

\end_inset

.
\end_layout

\begin_layout Standard
Some equations can also be numbered, even if they don't have a label.
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{equation}
x=2y\end{equation}

\end_inset


\end_layout

\begin_layout Standard
Other equations that contain * should not numbered, but perhaps aligned:
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{align*}
left &  & right\end{align*}

\end_inset


\end_layout

\begin_layout Standard
Some environments allow for multiple labels: 
\begin_inset Formula \begin{eqnarray}
a & = & b\times c\label{eq:third}\\
c\times d\times e & = & i.\label{eq:fourth}\end{eqnarray}

\end_inset


\end_layout

\begin_layout Standard
Now a random environment:
\begin_inset Formula $\begin{gathered}x\end{gathered}
y$
\end_inset

.
\end_layout

\begin_layout Section
Parentheses
\end_layout

\begin_layout Standard
Some delimiters also taken from the Spanish Lyx User's Guide.
 An array: 
\begin_inset Formula \[
\left[\begin{array}{lc}
12 & 2\\
3 & 4\times y^{x}\end{array}\right]\]

\end_inset

And an inline array 
\begin_inset Formula $\left[\begin{array}[t]{cc}
a & b\\
c & dio\end{array}\right]$
\end_inset

.
\end_layout

\begin_layout Standard
There are also big brackets: 
\begin_inset Formula $\left(a\right)$
\end_inset

 
\begin_inset Formula $\left[b\right]$
\end_inset

 
\begin_inset Formula $\left\{ c\right\} $
\end_inset

 
\begin_inset Formula $\left\langle d\right\rangle $
\end_inset

 
\begin_inset Formula $\left|e\right|$
\end_inset

 
\begin_inset Formula $\bigl\langle f\bigr\rangle$
\end_inset

.
\end_layout

\begin_layout Standard
Aligned brackets can be present: 
\begin_inset Formula $\left(toText\right)$
\end_inset

.
 One of them may be omitted: 
\begin_inset Formula $\left.toText\right)$
\end_inset

.
\end_layout

\begin_layout Section
Fraction
\end_layout

\begin_layout Standard
A big recursive fraction: 
\begin_inset Formula \[
\frac{1}{\left(1+\left(\frac{1}{1+\left(\frac{1}{1+2x}\lyxlock\right)}\lyxlock\right)\right)}\lyxlock\]

\end_inset


\end_layout

\begin_layout Standard
A nice fraction: 
\begin_inset Formula $\nicefrac{5}{6}$
\end_inset

.
\end_layout

\begin_layout Standard
A non-diminishing fraction containing alignments:
\begin_inset Formula \[
\cfrac{1}{1+\left(\cfrac[l]{1}{1+x}\times\cfrac[r]{1}{1+x}\right)}.\]

\end_inset


\end_layout

\begin_layout Standard
A similar concept is a binomial coefficient: 
\begin_inset Formula $\binom{A+1}{B}.$
\end_inset

 It can be prettily presented: 
\begin_inset Formula \[
\dbinom{A}{B+1}.\]

\end_inset


\end_layout

\begin_layout Section
Roots
\end_layout

\begin_layout Standard
A square root: 
\begin_inset Formula $\sqrt{3}.$
\end_inset

 A more complex square root in a fraction:
\begin_inset Formula \[
\frac{1}{\left(1+\sqrt{2}\left(\frac{1}{1+\sqrt{2}}\lyxlock\right)+\sqrt{\frac{1}{2}}\right)}\lyxlock.\]

\end_inset


\end_layout

\begin_layout Standard
Higher order roots: 
\begin_inset Formula $\sqrt[3]{x+y}$
\end_inset

, 
\begin_inset Formula $\sqrt[x+1]{Weight}$
\end_inset

.
 In a fraction:
\begin_inset Formula \[
\frac{\sqrt[\nicefrac{7}{8}]{\frac{8}{4}x}}{\sqrt[s+5]{\frac{(78x+45y)\times\sqrt{Height}}{\sin(x+1)}+5}}\lyxlock.\]

\end_inset


\end_layout

\begin_layout Section
Decorations
\end_layout

\begin_layout Subsection
Cases
\end_layout

\begin_layout Standard
Used to switch several values.
\end_layout

\begin_layout Standard
\begin_inset Formula $y=\begin{cases}
x & i=0,\\
x+1 & i<3\end{cases}$
\end_inset


\end_layout

\begin_layout Subsection
Braces
\end_layout

\begin_layout Standard
Values can be underbraced or overbraced.
\begin_inset Formula \[
\underbrace{a-b}=\overbrace{c+d+e}+f.\]

\end_inset


\end_layout

\begin_layout Standard
Underbraces and overbraces can contain text.
\begin_inset Formula \[
\overbrace{a-b}^{over}=\underbrace{c+\overbrace{d+e}^{over}+f}_{under}+g.\]

\end_inset

They can also be inlined: 
\begin_inset Formula $\overbrace{a+b}^{over}$
\end_inset

.
\end_layout

\begin_layout Section
Spacing
\end_layout

\begin_layout Standard
The command 
\family typewriter

\backslash
raisebox
\family default
 is useful to, surprisingly, raise a little box.
\end_layout

\begin_layout Standard
\begin_inset Formula $\raisebox{2mm}{raised}over\raisebox{-2mm}{lowered}\textrm{and back}.$
\end_inset


\end_layout

\begin_layout Standard
It can also be used just for spacing.
\end_layout

\begin_layout Standard
\begin_inset Formula $\raisebox{5mm}{}B^{V}$
\end_inset

.
\end_layout

\begin_layout Standard
There are other spacing commands, like 
\family typewriter

\backslash
hspace
\family default
: 
\begin_inset Formula $"\hspace{4mm}"$
\end_inset

, and 
\family typewriter

\backslash
vspace
\family default
: 
\begin_inset Formula $"\vspace{1cm}"$
\end_inset

.
\end_layout

\begin_layout Section
Fonts
\end_layout

\begin_layout Standard
Fonts can be switched on and off.
\end_layout

\begin_layout Standard
By default, text in formulae is shown italicized.
 Variable: 
\begin_inset Formula $meters$
\end_inset

.
\end_layout

\begin_layout Standard
Some font styles.
 Roman: 
\begin_inset Formula $1\mathrm{mathrm}$
\end_inset

.
 Sans serif: 
\begin_inset Formula $2\mathsf{mathsf}$
\end_inset

.
 Typewriter: 
\begin_inset Formula $3\mathtt{mathtt}$
\end_inset

.
 Bold: 
\begin_inset Formula $4\mathbf{mathbf}$
\end_inset

.
\end_layout

\begin_layout Standard
Regular text.
 Normal text: 
\begin_inset Formula $5\textrm{textfm}$
\end_inset

.
 Literal text: 
\begin_inset Formula $6\mbox{mbox text}$
\end_inset

.
 Phonetic alphabet: 
\begin_inset Formula $7\text{\textipa{abcde}}$
\end_inset

.
 Regular text can be embedded into formulae: 
\begin_inset Formula $\textrm{regular text \backslash command \backslash another command \backslash\backslash no spaces allowed}$
\end_inset

.
\end_layout

\begin_layout Standard
Units can be shown with or without a magnitude.
 Without: 
\begin_inset Formula $\unit{km}$
\end_inset

.
 With: 
\begin_inset Formula $\unit[57]{km}$
\end_inset

.
 Fractional units: 
\begin_inset Formula $\unitfrac[20]{km}{h}$
\end_inset

.
 With a fraction before the units: 
\begin_inset Formula $\unit[\nicefrac{3}{2}]{km}$
\end_inset

, 
\begin_inset Formula $\unit[\frac{7}{16}]{s}$
\end_inset

.
\end_layout

\begin_layout Standard
Some special fonts are supported: 
\begin_inset Formula $\mathscr{F}$
\end_inset

, 
\begin_inset Formula $\mathcal{F}$
\end_inset

, 
\begin_inset Formula $\mathbb{F}$
\end_inset

, 
\begin_inset Formula $\mathfrak{F}$
\end_inset

.
\end_layout

\begin_layout Section
Macros
\end_layout

\begin_layout Standard
Definitions can be added as macros
\begin_inset FormulaMacro
\renewcommand{\stupidroot}[2]{\sqrt[#1]{#2}}
{\sqrt[#1]{#2}}
\end_inset

.
 Then they can be used in formulae: 
\begin_inset Formula $\stupidroot 12$
\end_inset

.
 They can accept default parameters
\begin_inset FormulaMacro
\renewcommand{\defaultroot}[2][4][5]{\sqrt[#1]{#2}}
{#1\sqrt{#2}}
\end_inset

.
 Again, useful in formulae: 
\begin_inset Formula $\defaultroot$
\end_inset

.
\end_layout

\begin_layout Standard
Other definitions from the preamble can be used: 
\begin_inset Formula $\preambleroot{3}{4}$
\end_inset

.
\end_layout

\begin_layout Standard
Definitions on the fly are also possible: 
\begin_inset Formula $\newcommand{\ontheflyroot}[2]{\sqrt[#1]{#2}}\ontheflyroot{7}{8}$
\end_inset

, and used with different values: 
\begin_inset Formula $\ontheflyroot{a}{b}$
\end_inset

.
\end_layout

\begin_layout Section
Bye-bye
\end_layout

\begin_layout Standard
That's all folks!
\end_layout

\end_body
\end_document
