Professional Documents
Culture Documents
1/36
TALLER
CREACIÓN DE DOCUMENTOS CON LATEX
2
3
L2
3M
33
22
M.C. JAVIER HORACIO PÉREZ RICÁRDEZ i
?
jahoperi@hotmail.com P
1. MANUAL DE LATEX
2/36
Latex es un procesador de texto, de gran potencialidad en el manejo de fórmulas
matemáticas, cuadros y tablas.
i ?
P
2. Un encabezado tı́pico
\documentclass[12pt, spanish]{article}}
3/36
\oddsidemargin 0in
\textwidth 6.75in
\topmargin 0in
2 \textheight8.5in
3
L2 \parindent 0em
3M
33 \parskip 2ex
22
\begin{document}
i ?
. . .
P
. . .
\end{document}
4/36
2
3
L2
3M
33
22
i ?
P
3. Estilo del documento
\documentstyle[12pt,double]{article};
5/36
report
i ?
P
4. Márgenes del Texto
Este estilo es sugerido para documentos largos. Aquı́ cuentas con un
7/36
nivel más de encabezados (Chapter) que en el estilo Article y además
las tablas, figuras y ecuaciones son numeradas según los capı́tulos y
no consecutivamente a través del documento como en el estilo article.
i ?
\textheight 8.5in P
El comando \oddsidemargin dice al compilador de Latex que el mar-
gen izquierdo será de 1+0 pulgadas desde el borde izquierdo de la hoja
( el argumento 0in también puede ser negativo).
8/36
2
El comando \headheight define el largo del texto excluyendo el en-
3
cabezado y el pie de página.
L2
3M
33
Indentación y salto entre párrafos 22
i ?
P
5. Insertando espacios verticales
LaTeX te provee de tres sencillos comandos para insertar espacios
10/36
predefinidos entre lı́neas, estos son:
\smallskip
\medskip
\bigskip
Estos comandos generan espacios dependiendo del estilo del documen-
to. Si se desea decidir el tamaño exacto del espacio, existe el comando
2 \vspace*{tamaño}
3 Donde tamaño es el argumento y consiste en un número seguido de
L2 una unidad de medida que puede ser
3M
33
22 1in = 1 pulgada
2.34cm = 2.34 centı́metro
i ? -0.7mm = -0.7 milı́metro.
P El signo negativo significa que el salto será hacia arriba en vez de hacia
11/36
el final de la página.
2 \hspace*{tamaño}
3
El uso de este comando es idéntico al de inserción de espacios verticales
L2
y sus unidades de medida son las mismas.
3M
33
22
i ?
P
6. Centrando texto
\begin{center}
12/36
{\bf UNIVERSIDAD POLIT\’{E}CNICA DEL GOLFO DE M\’{E}XICO}
\end{center}
\begin{flushleft}
{\bf UNIVERSIDAD POLIT\’{E}CNICA DEL GOLFO DE M\’{E}XICO}
\end{flushleft} 2
3
UNIVERSIDAD POLITÉCNICA DEL GOLFO DE MÉXICO
L2
Alinear texto a la derecha 3M
33
\begin{flushright} 22
{\bf UNIVERSIDAD POLIT\’{E}CNICA DEL GOLFO DE M\’{E}XICO}
\end{flushright} i ?
UNIVERSIDAD POLITÉCNICA DEL GOLFO DE MÉXICO P
7. Cambiando el estilo y tamaño de las letras
Cambiando el tipo de letra
13/36
\rm roman
\em italic
\bf boldface
2 \sl slanted
3
L2 \sf sans serif
3M
33 \sc small caps
22
\end{em}
Se requirieron cinco meses para informar a la reina Isabel de los resultados del viaje de
Colón, dos semanas para que Europa se enterara del asesinato de Lincoln y sólo 1.3
2
3 segundos para escuchar las palabras de Neil Armstrong confirmando que el hombre
L2 puede caminar en la luna.
3M
33
22
i ?
P
8. Cambiando el tamaño de la letra
\tiny universidad polit\’{e}cnica del golfo de m\’{e}xico
16/36
universidad politécnica del golfo de méxico
i ?
P
18/36
9. Subrayar texto
\underline{universidad polit\’{e}cnica del golfo de m\’{e}xico}
i ?
P
Acentos y la ñ
\’{a} á 19/36
\’{e} é
\’{\i} ı́
\’{o} ó
\’{u} ú
\˜n ñ
2
3
Subı́ndice y superı́ndice
L2
3M
$xˆ{2}$ x2 33
$x {2}$ x2
22
El teorema de Pitágoras.
\begin{math}
x^{2} + y^{2} = h^{2}.
\end{math}
x2 + y 2 = h2 .
2
3
L2
Los ambientes displaymath, equation y eqnarray 3M
33
22
\begin{displaymath}
23/36
\begin{equation}
x^{2}+y^{2}=h^{2}
\end{equation}
x2 + y 2 = h2 (1)
2
\begin{eqnarray} 3
x^{2}+y^{2}=h^{2} L2
\end{eqnarray} 3M
33
22
x2 + y 2 = h2 (2) i ?
P
\begin{eqnarray*}
x^{2}+y^{2}=h^{2}
\end{eqnarray*}
24/36
x2 + y 2 = h2
i ?
p
b2 − 4ac P
√
3
x+y
25/36
Sumatorias, productos e integrales
\begin{eqnarray*}
\sum_{i=1}^{n} x_{i} \prod_{i=1}^{n} x_{i} \int_{a}^{b} x dx
\end{eqnarray*}
n
2
X
xi 3
i=1 L2
n
Y
3M
xi 33
i=1 22
Z b
x dx i ?
a
P
Creando fórmulas y ecuaciones y complejas
\begin{eqnarray*}
26/36
x = \frac{y + \frac{z}{2}}{y^{2} + 1}
\frac{e^{xy}}{1+\frac{y}{x+1}}
\end{eqnarray*}
y + z2
x= 2
y +1
2
exy 3
y
1+ x+1 L2
3M
33
22
i ?
Paréntesis, corchetes, llaves y otros delimitadores
P
\begin{eqnarray*}
Y & = & 1 + \left( \frac{x+3}{2 x^{2} + 4x - 5} \right )
27/36
x+3
2
Y = 1+
2x2 + 4x − 5 3
L2
x+3
Y = 1+ 3M
2x2 + 4x − 5 33
x+3
22
Y = 1+
2x2 + 4x − 5
i ?
P
12. Tablas
\begin{center}
28/36
\begin{tabular}{cols}
\hline (text) & (texto) & (texto) & ... \\
\end{tabular}
\end{center}
2 El primer argumento del ambiente tabular (cols) especifica la forma de
3 las columnas. Consiste en una serie de los siguientes especificadores:
L2
l (coloca el texto en el borde izquierdo)
3M
33 c (texto centrado)
22 r (coloca el texto en el borde derecho)
Una fila de la tabla consiste en columnas separadas por &, seguida por
\\.
2
3
L2
3M
33
22
i ?
P
Ejemplo
30/36
\begin{center}
\begin{tabular}{|l|c|c|r|}
\hline
x & f(x) = $x^{2}$ & x & g(x) = $x^{2}$ - 1 \\
\hline -1 & 1 & -1 & 0 \\
\hline
2 0 & 0 & 0 & -1 \\
3 \hline
L2 1 & 1 & 1 & 0 \\
3M \hline
33 \end{tabular}
22 \end{center}
i ?
P
x f(x) = x2 x g(x) = x2 - 1
-1 1 -1 0
31/36
0 0 0 -1
1 1 1 0
El ambiente Table
\begin{table}[h!]
\begin{center}
2
\begin{tabular}{|c|c|}
3
L2 \hline x & f(x) = $x^{2}$ \\
3M \hline -2 & 4 \\
33 \hline -1 & 1 \\
22 \hline 0 & 0 \\
\hline 1 & 1 \\ \hline
i ? \end{tabular}
P \caption{Par\’{a}bola que pasa por el origen}
32/36
\end{center}
\end{table}
x f(x) = x2
-2 4
-1 1
0 0
2
3
L2 1 1
3M
Cuadro 1: Parábola que pasa por el origen
33
22
i ?
P
Ejemplo de documento en LaTex
\documentclass[a4paper]{article}
33/36
\oddsidemargin -.1cm
\textwidth=17.3cm
\textheight=26.8cm
2
\topmargin - 1.0cm
3
L2
3M
\begin{document} 33
\pagestyle{empty} 22
i ?
\begin{flushleft} P
{\small UNIVERSIDAD POLIT\’{E}CNICA DEL GOLFO DE M\’{E}XICO \\
\vspace{.5cm}
TALLER : CREACI\’{O}N DE DOCUMENTOS CON LATEX} \\
34/36
\end{flushleft}
\bigskip
\begin{center}
{\bf \small M.C. JAVIER HORACIO P\’{E}REZ RIC\’{A}RDEZ \\
\bigskip
ACTIVIDADES : MAYO DEL 2008} \\ 2
\end{center} 3
L2
\bigskip 3M
33
\begin{flushleft} 22
{\bf \small ACTIVIDAD : UN PRIMER ACERCAMIENTO AL TEMA DE LOS
ESTILOS DE APRENDIZAJE} i ?
\end{flushleft} P
\vspace{3cm}
35/36
2
\vspace{1cm}
3
L2
\begin{table}[h!]
\begin{center} 3M
\begin{tabular}[t]{|c|c|c|}
\hline \tiny {\bf 1} & \tiny {\bf SOY EQUILIBRADO} & \tiny {\bf SOY EXTREMISTA} \\ 33
\hline \tiny \bf 2 & \tiny \bf SOY PRECAVIDO & \tiny \bf SOY IMPULSIVO \\
\hline \tiny \bf 3 & \tiny \bf SOY ORGANIZADO & \tiny \bf SOY DESORDENADO \\ 22
\hline \tiny \bf 4 & \tiny \bf SOY SILENCIOSO & \tiny \bf SOY RUIDOSO \\
\hline \tiny \bf 5 & \tiny \bf SOY SOCIABLE & \tiny \bf SOY RESERVADO \\
\hline \tiny \bf 6 & \tiny \bf TENGO FACILIDAD DE PALABRA & \tiny \bf TROPIEZO AL HABLAR \\
\hline \tiny \bf 7 & \tiny \bf SOY TENSO & \tiny \bf SOY RELAJADO \\
i ?
\hline \tiny \bf 8 & \tiny \bf SOY RAPIDO & \tiny \bf SOY LENTO \\ P
\hline \tiny \bf 9 & \tiny \bf RECUERDO MEJOR LAS IMAGENES & \tiny \bf RECUERDO MEJOR LAS PALABRAS \\
36/36
\hline \tiny \bf 10 & \tiny \bf SOY GLOBAL & \tiny \bf SOY ANALITICO \\
\hline
\end{tabular}
\end{center}
\end{table}
\vspace{5cm}
\begin{center}
{\bf Atentamente \\
\vspace{.5cm}
2
--------------------------------------------------------------- \\
Nombre y firma del Profesor}
3
\end{center} L2
3M
33
22
i ?
P