SlideShare una empresa de Scribd logo
1 de 35
Curso de Latex
CINVESTAV-IPN
Enero 2011
Que es Latex?
• Latex es un sistema genérico de tipografía
que utiliza Tex como su motor de formato.
• Es un sistema de composición de textos,
orientado especialmente a la creación de
libros, documentos científicos y técnicos.
• Es un compendio de macros de Tex.
Ventajas de Latex
• Es gratis
• Es flexible
• Calidad tipográfica profesional
• Esta presente en casi todas las áreas de
las ciencias y humanidades.
• No es restrictivo a una arquitectura de
computadora o sistema operativo.
• En el contexto de nuestra área de trabajo,
las principales editoriales científicas
proveen plantillas en Látex, las cuales al
utilizarlas aseguramos que cumplimos con
las restricciones de la publicación.
– IEEE
– Elsevier
Cosas necesarias para empezar a
utilizar Latex
• Tener instalado:
– Miktex.
– Editor de código.
– Ghostscript y Ghostview .
– Adobe Reader.
Procedimiento de instalación
1.- Instalar Miktex
2.- Instalar Ghostscript
3.- Instalar Ghostview
4.- Instalar Adobe Reader
5.- Instalar editor de código (se sugiere
LED)
Antes de empezar
• Podemos ver a Latex como un lenguaje de
programación, el cual posee comandos, símbolos
reservados, se rige por una estructura.
• Algunos de los caracteres reservados son:
– $ sirve para poner ecuaciones en el texto.
–  sirve para introducir comandos
– % sirve para poner comentarios
– {} sirve para poner argumentos de los comandos
– & en las tablas implica un salto de columna
– _ ^ sirve en el ambiente de ecuaciones
– ~ #
• Si se desea utilizar estos símbolos en el texto se les
antepone “” excepto para “”, ya que “” significa un
salto de línea
Estructura de documento en latex
• Generalmente se compone de:
– Preambulo. En esta sección se pone las
librerías a utilizar y las configuraciones del
documento de ser necesario.
– Cuerpo. En esta sección se pone todo lo que
queremos escribir.
Clases de documentos
• documentclass[parametros]{clase de documento}
• Clases de documentos
– Book
– Report
– Article
– Letter
• Parametros
– 10pt|11pt|12pt
– letterpaper|legalpaper|executivepaper|a4paper|a5paper|b5paper
– Landscape
– final|draft
– oneside|twoside
– openright|openany
– onecolumn|twocolumn
– notitlepage|titlepage
– Openbib
– Leqno
– fleqn
Paquetes
• usepackage[opciones]{paquete}
• Paquetes importantes
– graphicx [pdftex, dvips]
– amsmath
– latexsym
– babel [spanish]
Preámbulo de artículos de ieee
• documentclass[11pt,draftcls,onecolumn]{IEEEtran/IEEEtran}
• documentclass[9pt,twocolumn,twoside]{IEEEtran/IEEEtran}
ifCLASSINFOpdf
usepackage[pdftex]{graphicx}
else usepackage[dvips]{graphicx}
fi
usepackage{stfloats}
usepackage{stmaryrd}
usepackage{textcomp}
usepackage{verbatim}
usepackage{latexsym}
usepackage{bbm}
usepackage{amssymb}
usepackage{eufrak}
usepackage{amsbsy}
usepackage{multirow}
usepackage{dsfont}
usepackage[cmex10]{amsmath}
interdisplaylinepenalty=2500
Cuerpo del documento
• Siempre se comienza con:
– begin{document}
• Y se finaliza con:
– end{document}
• Dentro del cuerpo puede haber texto,
ambientes (ecuaciones, tablas, imágenes,
teoremas, etc)
Estructura dentro del cuerpo
Comando Nivel Comentario
part -1 No en letter
chapter 0 Solo en book y report
section 1 No en letter
subsection 2 No en letter
subsubsection 3 No en letter
paragraph 4 No en letter
subparagraph 5 No en letter
Sintaxis: chapter*[nom_alternativo]{nombre} el asterisco indica que no se va a
numerar en el indice
Ambientes
• Los ambientes son estructuras definidas
en latex los cuales nos permiten introducir
en nuestro documento ecuaciones,
imágenes, tablas, etc
• Su sintaxis es
– begin{ambiente}
– end{ambiente}
Ambientes
• Principales ambientes
– equation
– tabular
– table
– figure
– itemize
Ecuaciones
• Sintaxis
– Si es en la misma línea donde estamos poniendo
texto, entonces se usa “$”:
• bla bla bla $3x=y$ bla bla bla
– Si lo queremos poner como una ecuacion a parte del
texto, entonces:
• Bla bla bla bla:
begin{equation}
3x=y
end{equation}
Bla bla bla bla
ecuaciones
El comando label{etiqueta} nos permite etiquetar la ecuacion para
poder hacer posterior referencia a ella en el texto mediante el uso
de ref{etiqueta}.
• Para poner:
– Subindice _
– Superindice ^
– Negritas mathbf, boldsymbol
– Fraccion frac{numerador}{denominador}
– Sumatoria sum_{a}^{b}
– Integral int
– Adornos hat{}, tilde{}
• Para mayor referencia consultar:
Short math guide for latex
ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
Múltiples líneas de ecuaciones
Ecuaciones con múltiples casos
Figuras
• Latex acepta diverso formatos de figuras
dependiendo del parámetro que le pasemos al
paquete graphicx
– Pdftex - Acepta figuras en formato pdf, png, jpg
– Dvips - Acepta figuras en formato eps
• Es recomendable que utilicemos figuras
vectoriales (eps o pdf) ya que no perdemos
resolución.
Figura
• Se empieza definiendo un ambiente de figura
begin{figure}[]…..end{figure}
El cual es un objeto flotante en el documento de latex, en
otras palabras es un objeto que no se puede dividir en
dos paginas y latex trata de ubicarlo en la mejor
posición.
• Entre los corchetes podemos poner un especificador de
posición:
– h lo trata de poner aproximadamente en el mismo lugar donde
ocurre en el texto
– t lo pone al inicio de una pagina
– b lo pone al final de una pagina
– p lo pone en una pagina especial para objetos flotantes
– ! Ignora lo parametros del compilador que calcula la mejor
posicion
– H=h!
• El siguiente comando que se debe poner
es:
includegraphics[parametros]{ruta/nombre}
Donde la ruta es relativa a la carpeta donde
se esta compilando y el nombre puede o
no ir con la extensión de la imagen.
• scale= number; enters the number by which the figure size should be magnified over its natural size;
• width= length; specifies the width to which the figure should be scaled to; if height not given, it is scaled with the
same factor as the width;
• height= length; specifies the height to which the figure should be scaled to; if width is not given, it is scaled with
the same factor as the height;
• totalheight= length; like height but specifies the height plus depth of the figure; should always be used in place
of height if the figure has been rotated;
• keepaspectratio(= true/false); if both height and width are specified, this flag ensures that the original
height/width ratio remains unchanged; the figure will not exceed either of the given dimensions;
• angle= number; the angle by which the figure is to be rotated counterclockwise, in degrees; any height or width
specifications coming before this key are also rotated, so that the height becomes the width, while the width
becomes either the height (positive angle) or depth (negative angle);
• origin= loc; determines the point about which the rotation occurs; default is bl for bottom left corner; also possible
are c for center, t for top, r for right, and B for baseline; any sensible combination, such as tr, is allowed;
• draft(= true/false); like the draft package option but applied to the one graphics file; the figure is not imported, but
rather a framed box of the correct size is printed containing the name of the file;
• clip (= true/false); suppresses the printing of any graphic outside the bounding box;
• bb= llx lly urx ury; enters the coordinates of the bounding box manually, if they are missing or incorrect in the
graphics file, or to be deliberately altered; the specifications are four lengths separated by blanks; units may be
given, but if omitted, big points (bp) are assumed;
• viewport= llx lly urx ury; specifies the bounding box but relative to the lower left corner of the existing one; useful
for correcting the bounding box, or (with clip) to select only a portion of the whole figure;
• trim= dllx dlly durx dury; reduces the existing bounding box by the amounts specified;
• hiresbb (= true/false); like the hiresbb package option but applied to the one graphics file; reads bounding box
information from the %%HiResBoundingBox line in the graphics file.
Múltiples imágenes en una figura
• Para eso debemos utilizar el paquete
– usepackage{subfig}
begin{figure}[!ht]
centering
subfloat[]{label{fig5a}includegraphics[width=1.6in]{figures/Fig5a}%}
subfloat[]{label{fig5b}includegraphics[width=1.6in]{figures/Fig5b}%}
hfil
subfloat[]{label{fig5c}includegraphics[width=1.6in]{figures/Fig5c}%}
subfloat[]{label{fig5d}includegraphics[width=1.6in]{figures/Fig5d}%}
caption{The proved validity of the xGM by simulation for (a) Non-separable
xPAS, (b) xSCF obtained from xPAS through $text{xAMV}_{text{C}}$,
(c) xWNS obtained from xPAS through xGM and (d) xSCF obtained
from xWNS via 2IFT.}
label{fig5}
end{figure}
Tablas
• Es necesario crear un ambiente flotante
– begin{table}….end{table}
• Y dentro de ese flotante se crea la tabla
mediante el ambiente
– begin{tabular}…….end{tabular}
• Es posible que se necesite incluir las
librerias:
– usepackage{multirow}
– usepackage{multicolumn}
Tablas
• Para cambiar de columna usamos &
• Para cambiar de renglón usamos 
• Para dibujar una linea horizontal usamos
– hline
Bibliografía
• Existen 2 formas
– Escribir la bibliografía en el mismo documento
– Insertar un archivo bibtex
• Forma 1
– begin{thebibliography}{99}
bibitem{papertec:1}A.~G. Orozco-Lugo, R.~Parra-Michel,
D.~McLernon, and V.~Kontorovitch, ``Enhancing the
performance of the cr blind channel estimation algorithm using
the Karhunen-Lo`{e}ve expansion,'' in emph{Proc. {IEEE}
International Conference on Acustics, Speech, and Signal
Processing ({ICASSP}’02)}, Orlando, USA, May 2002,
pp.~III2653-III2656.
end{thebibliography}
Bibliografía
• El 99 en el ambiente thebibliography le es
para indicarle al compilador que la
etiqueta mas ancha que esperamos sea
del ancho del texto 99.
• Cada entrada en la bibliografía se hace
utilizando el comando
– bibtem
Bibliografía
• Forma 2
– En esta se le indica al compilador donde se
encuentra un archivo bibtex.
– Al tener este archivo, es necesario compilarlo
primero para que nos entregue un archivo
con las entradas bibtem.
• bibliography{biblio/IEEEabrv,biblio/biblio}
• Dirección relativa a la carpeta de trabajo
Bibliografía
• El compilador solo nos pondrá en la
bibliografía las referencias que utilizamos
en el texto.
• Podemos tener diferentes estilos de
bibliografía, estos se definen de la
siguiente manera:
– bibliographystyle{estilo}
– donde los estilos son:
• IEEEtran
• abbrv
• acm
• alpha
• plain
• siam
• unsrt
• Referencia
• http://en.wikibooks.org/wiki/LaTex/Bibliography_Management
Bibliografía y Links
• http://www.elsevier.com/wps/find/authorsview.
• http://www.ieee.org/publications_standards/pu
• M. Goossens, F. Mittelbach, A. Samarin,
“The Latex companion”, Addison-Wesley,
1999.

Más contenido relacionado

Similar a Curso de latex (20)

Unidad 7. Arreglos Sullin Santaella
Unidad 7. Arreglos Sullin SantaellaUnidad 7. Arreglos Sullin Santaella
Unidad 7. Arreglos Sullin Santaella
 
TutorialLatex.pdf
TutorialLatex.pdfTutorialLatex.pdf
TutorialLatex.pdf
 
Presentación1
Presentación1Presentación1
Presentación1
 
Latex- Parte 2
Latex- Parte 2Latex- Parte 2
Latex- Parte 2
 
Tutorial preprensa illustrator
Tutorial preprensa illustratorTutorial preprensa illustrator
Tutorial preprensa illustrator
 
Mejorar documento en LaTeX
Mejorar documento en LaTeXMejorar documento en LaTeX
Mejorar documento en LaTeX
 
Computación distribuida usando Python
Computación distribuida usando PythonComputación distribuida usando Python
Computación distribuida usando Python
 
Atributos tablas
Atributos tablasAtributos tablas
Atributos tablas
 
Computacion ii cap i
Computacion ii cap iComputacion ii cap i
Computacion ii cap i
 
computacion
computacioncomputacion
computacion
 
Estructura básica de pascal
Estructura básica de pascalEstructura básica de pascal
Estructura básica de pascal
 
Graficas especiales
Graficas especialesGraficas especiales
Graficas especiales
 
Revista digital
Revista digitalRevista digital
Revista digital
 
Diagrama de flujo y algoritmo
Diagrama de flujo y algoritmoDiagrama de flujo y algoritmo
Diagrama de flujo y algoritmo
 
C curso intr
C curso intr C curso intr
C curso intr
 
Unidad5
Unidad5Unidad5
Unidad5
 
Clarainskape
ClarainskapeClarainskape
Clarainskape
 
inskapeSI
inskapeSIinskapeSI
inskapeSI
 
Clase1
Clase1Clase1
Clase1
 
Manual del programa diagrama .dia
Manual del programa diagrama .diaManual del programa diagrama .dia
Manual del programa diagrama .dia
 

Último

Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...
Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...
Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...Francisco Javier Mora Serrano
 
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdf
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdfCAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdf
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdfReneBellido1
 
Flujo potencial, conceptos básicos y ejemplos resueltos.
Flujo potencial, conceptos básicos y ejemplos resueltos.Flujo potencial, conceptos básicos y ejemplos resueltos.
Flujo potencial, conceptos básicos y ejemplos resueltos.ALEJANDROLEONGALICIA
 
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdf
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdfCENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdf
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdfpaola110264
 
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESA
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESAIPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESA
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESAJAMESDIAZ55
 
Edificio residencial Becrux en Madrid. Fachada de GRC
Edificio residencial Becrux en Madrid. Fachada de GRCEdificio residencial Becrux en Madrid. Fachada de GRC
Edificio residencial Becrux en Madrid. Fachada de GRCANDECE
 
Unidad 3 Administracion de inventarios.pptx
Unidad 3 Administracion de inventarios.pptxUnidad 3 Administracion de inventarios.pptx
Unidad 3 Administracion de inventarios.pptxEverardoRuiz8
 
Tiempos Predeterminados MOST para Estudio del Trabajo II
Tiempos Predeterminados MOST para Estudio del Trabajo IITiempos Predeterminados MOST para Estudio del Trabajo II
Tiempos Predeterminados MOST para Estudio del Trabajo IILauraFernandaValdovi
 
Fe_C_Tratamientos termicos_uap _3_.ppt
Fe_C_Tratamientos termicos_uap   _3_.pptFe_C_Tratamientos termicos_uap   _3_.ppt
Fe_C_Tratamientos termicos_uap _3_.pptVitobailon
 
CLASE 2 MUROS CARAVISTA EN CONCRETO Y UNIDAD DE ALBAÑILERIA
CLASE 2 MUROS CARAVISTA EN CONCRETO  Y UNIDAD DE ALBAÑILERIACLASE 2 MUROS CARAVISTA EN CONCRETO  Y UNIDAD DE ALBAÑILERIA
CLASE 2 MUROS CARAVISTA EN CONCRETO Y UNIDAD DE ALBAÑILERIAMayraOchoa35
 
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASTEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASfranzEmersonMAMANIOC
 
Curso intensivo de soldadura electrónica en pdf
Curso intensivo de soldadura electrónica  en pdfCurso intensivo de soldadura electrónica  en pdf
Curso intensivo de soldadura electrónica en pdfFernandaGarca788912
 
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.ariannytrading
 
Diapositiva de Topografía Nivelación simple y compuesta
Diapositiva de Topografía Nivelación simple y compuestaDiapositiva de Topografía Nivelación simple y compuesta
Diapositiva de Topografía Nivelación simple y compuestajeffsalazarpuente
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaXimenaFallaLecca1
 
Seleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSeleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSaulSantiago25
 
Normas para los aceros basados en ASTM y AISI
Normas para los aceros basados en ASTM y AISINormas para los aceros basados en ASTM y AISI
Normas para los aceros basados en ASTM y AISIfimumsnhoficial
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfedsonzav8
 
Residente de obra y sus funciones que realiza .pdf
Residente de obra y sus funciones que realiza  .pdfResidente de obra y sus funciones que realiza  .pdf
Residente de obra y sus funciones que realiza .pdfevin1703e
 

Último (20)

Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...
Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...
Hanns Recabarren Diaz (2024), Implementación de una herramienta de realidad v...
 
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdf
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdfCAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdf
CAP4-TEORIA EVALUACION DE CAUDALES - HIDROGRAMAS.pdf
 
Flujo potencial, conceptos básicos y ejemplos resueltos.
Flujo potencial, conceptos básicos y ejemplos resueltos.Flujo potencial, conceptos básicos y ejemplos resueltos.
Flujo potencial, conceptos básicos y ejemplos resueltos.
 
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdf
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdfCENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdf
CENTROIDES Y MOMENTOS DE INERCIA DE AREAS PLANAS.pdf
 
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESA
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESAIPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESA
IPERC Y ATS - SEGURIDAD INDUSTRIAL PARA TODA EMPRESA
 
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdfVALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
 
Edificio residencial Becrux en Madrid. Fachada de GRC
Edificio residencial Becrux en Madrid. Fachada de GRCEdificio residencial Becrux en Madrid. Fachada de GRC
Edificio residencial Becrux en Madrid. Fachada de GRC
 
Unidad 3 Administracion de inventarios.pptx
Unidad 3 Administracion de inventarios.pptxUnidad 3 Administracion de inventarios.pptx
Unidad 3 Administracion de inventarios.pptx
 
Tiempos Predeterminados MOST para Estudio del Trabajo II
Tiempos Predeterminados MOST para Estudio del Trabajo IITiempos Predeterminados MOST para Estudio del Trabajo II
Tiempos Predeterminados MOST para Estudio del Trabajo II
 
Fe_C_Tratamientos termicos_uap _3_.ppt
Fe_C_Tratamientos termicos_uap   _3_.pptFe_C_Tratamientos termicos_uap   _3_.ppt
Fe_C_Tratamientos termicos_uap _3_.ppt
 
CLASE 2 MUROS CARAVISTA EN CONCRETO Y UNIDAD DE ALBAÑILERIA
CLASE 2 MUROS CARAVISTA EN CONCRETO  Y UNIDAD DE ALBAÑILERIACLASE 2 MUROS CARAVISTA EN CONCRETO  Y UNIDAD DE ALBAÑILERIA
CLASE 2 MUROS CARAVISTA EN CONCRETO Y UNIDAD DE ALBAÑILERIA
 
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASTEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
 
Curso intensivo de soldadura electrónica en pdf
Curso intensivo de soldadura electrónica  en pdfCurso intensivo de soldadura electrónica  en pdf
Curso intensivo de soldadura electrónica en pdf
 
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.
SOLICITUD-PARA-LOS-EGRESADOS-UNEFA-2022.
 
Diapositiva de Topografía Nivelación simple y compuesta
Diapositiva de Topografía Nivelación simple y compuestaDiapositiva de Topografía Nivelación simple y compuesta
Diapositiva de Topografía Nivelación simple y compuesta
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
 
Seleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSeleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusibles
 
Normas para los aceros basados en ASTM y AISI
Normas para los aceros basados en ASTM y AISINormas para los aceros basados en ASTM y AISI
Normas para los aceros basados en ASTM y AISI
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdf
 
Residente de obra y sus funciones que realiza .pdf
Residente de obra y sus funciones que realiza  .pdfResidente de obra y sus funciones que realiza  .pdf
Residente de obra y sus funciones que realiza .pdf
 

Curso de latex

  • 2. Que es Latex? • Latex es un sistema genérico de tipografía que utiliza Tex como su motor de formato. • Es un sistema de composición de textos, orientado especialmente a la creación de libros, documentos científicos y técnicos. • Es un compendio de macros de Tex.
  • 3. Ventajas de Latex • Es gratis • Es flexible • Calidad tipográfica profesional • Esta presente en casi todas las áreas de las ciencias y humanidades. • No es restrictivo a una arquitectura de computadora o sistema operativo.
  • 4. • En el contexto de nuestra área de trabajo, las principales editoriales científicas proveen plantillas en Látex, las cuales al utilizarlas aseguramos que cumplimos con las restricciones de la publicación. – IEEE – Elsevier
  • 5. Cosas necesarias para empezar a utilizar Latex • Tener instalado: – Miktex. – Editor de código. – Ghostscript y Ghostview . – Adobe Reader.
  • 6. Procedimiento de instalación 1.- Instalar Miktex 2.- Instalar Ghostscript 3.- Instalar Ghostview 4.- Instalar Adobe Reader 5.- Instalar editor de código (se sugiere LED)
  • 7. Antes de empezar • Podemos ver a Latex como un lenguaje de programación, el cual posee comandos, símbolos reservados, se rige por una estructura. • Algunos de los caracteres reservados son: – $ sirve para poner ecuaciones en el texto. – sirve para introducir comandos – % sirve para poner comentarios – {} sirve para poner argumentos de los comandos – & en las tablas implica un salto de columna – _ ^ sirve en el ambiente de ecuaciones – ~ # • Si se desea utilizar estos símbolos en el texto se les antepone “” excepto para “”, ya que “” significa un salto de línea
  • 8. Estructura de documento en latex • Generalmente se compone de: – Preambulo. En esta sección se pone las librerías a utilizar y las configuraciones del documento de ser necesario. – Cuerpo. En esta sección se pone todo lo que queremos escribir.
  • 9.
  • 10. Clases de documentos • documentclass[parametros]{clase de documento} • Clases de documentos – Book – Report – Article – Letter • Parametros – 10pt|11pt|12pt – letterpaper|legalpaper|executivepaper|a4paper|a5paper|b5paper – Landscape – final|draft – oneside|twoside – openright|openany – onecolumn|twocolumn – notitlepage|titlepage – Openbib – Leqno – fleqn
  • 11. Paquetes • usepackage[opciones]{paquete} • Paquetes importantes – graphicx [pdftex, dvips] – amsmath – latexsym – babel [spanish]
  • 12. Preámbulo de artículos de ieee • documentclass[11pt,draftcls,onecolumn]{IEEEtran/IEEEtran} • documentclass[9pt,twocolumn,twoside]{IEEEtran/IEEEtran} ifCLASSINFOpdf usepackage[pdftex]{graphicx} else usepackage[dvips]{graphicx} fi usepackage{stfloats} usepackage{stmaryrd} usepackage{textcomp} usepackage{verbatim} usepackage{latexsym} usepackage{bbm} usepackage{amssymb} usepackage{eufrak} usepackage{amsbsy} usepackage{multirow} usepackage{dsfont} usepackage[cmex10]{amsmath} interdisplaylinepenalty=2500
  • 13. Cuerpo del documento • Siempre se comienza con: – begin{document} • Y se finaliza con: – end{document} • Dentro del cuerpo puede haber texto, ambientes (ecuaciones, tablas, imágenes, teoremas, etc)
  • 14. Estructura dentro del cuerpo Comando Nivel Comentario part -1 No en letter chapter 0 Solo en book y report section 1 No en letter subsection 2 No en letter subsubsection 3 No en letter paragraph 4 No en letter subparagraph 5 No en letter Sintaxis: chapter*[nom_alternativo]{nombre} el asterisco indica que no se va a numerar en el indice
  • 15. Ambientes • Los ambientes son estructuras definidas en latex los cuales nos permiten introducir en nuestro documento ecuaciones, imágenes, tablas, etc • Su sintaxis es – begin{ambiente} – end{ambiente}
  • 16. Ambientes • Principales ambientes – equation – tabular – table – figure – itemize
  • 17. Ecuaciones • Sintaxis – Si es en la misma línea donde estamos poniendo texto, entonces se usa “$”: • bla bla bla $3x=y$ bla bla bla – Si lo queremos poner como una ecuacion a parte del texto, entonces: • Bla bla bla bla: begin{equation} 3x=y end{equation} Bla bla bla bla
  • 18. ecuaciones El comando label{etiqueta} nos permite etiquetar la ecuacion para poder hacer posterior referencia a ella en el texto mediante el uso de ref{etiqueta}.
  • 19. • Para poner: – Subindice _ – Superindice ^ – Negritas mathbf, boldsymbol – Fraccion frac{numerador}{denominador} – Sumatoria sum_{a}^{b} – Integral int – Adornos hat{}, tilde{} • Para mayor referencia consultar: Short math guide for latex ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
  • 20. Múltiples líneas de ecuaciones
  • 22. Figuras • Latex acepta diverso formatos de figuras dependiendo del parámetro que le pasemos al paquete graphicx – Pdftex - Acepta figuras en formato pdf, png, jpg – Dvips - Acepta figuras en formato eps • Es recomendable que utilicemos figuras vectoriales (eps o pdf) ya que no perdemos resolución.
  • 24. • Se empieza definiendo un ambiente de figura begin{figure}[]…..end{figure} El cual es un objeto flotante en el documento de latex, en otras palabras es un objeto que no se puede dividir en dos paginas y latex trata de ubicarlo en la mejor posición. • Entre los corchetes podemos poner un especificador de posición: – h lo trata de poner aproximadamente en el mismo lugar donde ocurre en el texto – t lo pone al inicio de una pagina – b lo pone al final de una pagina – p lo pone en una pagina especial para objetos flotantes – ! Ignora lo parametros del compilador que calcula la mejor posicion – H=h!
  • 25. • El siguiente comando que se debe poner es: includegraphics[parametros]{ruta/nombre} Donde la ruta es relativa a la carpeta donde se esta compilando y el nombre puede o no ir con la extensión de la imagen.
  • 26. • scale= number; enters the number by which the figure size should be magnified over its natural size; • width= length; specifies the width to which the figure should be scaled to; if height not given, it is scaled with the same factor as the width; • height= length; specifies the height to which the figure should be scaled to; if width is not given, it is scaled with the same factor as the height; • totalheight= length; like height but specifies the height plus depth of the figure; should always be used in place of height if the figure has been rotated; • keepaspectratio(= true/false); if both height and width are specified, this flag ensures that the original height/width ratio remains unchanged; the figure will not exceed either of the given dimensions; • angle= number; the angle by which the figure is to be rotated counterclockwise, in degrees; any height or width specifications coming before this key are also rotated, so that the height becomes the width, while the width becomes either the height (positive angle) or depth (negative angle); • origin= loc; determines the point about which the rotation occurs; default is bl for bottom left corner; also possible are c for center, t for top, r for right, and B for baseline; any sensible combination, such as tr, is allowed; • draft(= true/false); like the draft package option but applied to the one graphics file; the figure is not imported, but rather a framed box of the correct size is printed containing the name of the file; • clip (= true/false); suppresses the printing of any graphic outside the bounding box; • bb= llx lly urx ury; enters the coordinates of the bounding box manually, if they are missing or incorrect in the graphics file, or to be deliberately altered; the specifications are four lengths separated by blanks; units may be given, but if omitted, big points (bp) are assumed; • viewport= llx lly urx ury; specifies the bounding box but relative to the lower left corner of the existing one; useful for correcting the bounding box, or (with clip) to select only a portion of the whole figure; • trim= dllx dlly durx dury; reduces the existing bounding box by the amounts specified; • hiresbb (= true/false); like the hiresbb package option but applied to the one graphics file; reads bounding box information from the %%HiResBoundingBox line in the graphics file.
  • 27. Múltiples imágenes en una figura • Para eso debemos utilizar el paquete – usepackage{subfig} begin{figure}[!ht] centering subfloat[]{label{fig5a}includegraphics[width=1.6in]{figures/Fig5a}%} subfloat[]{label{fig5b}includegraphics[width=1.6in]{figures/Fig5b}%} hfil subfloat[]{label{fig5c}includegraphics[width=1.6in]{figures/Fig5c}%} subfloat[]{label{fig5d}includegraphics[width=1.6in]{figures/Fig5d}%} caption{The proved validity of the xGM by simulation for (a) Non-separable xPAS, (b) xSCF obtained from xPAS through $text{xAMV}_{text{C}}$, (c) xWNS obtained from xPAS through xGM and (d) xSCF obtained from xWNS via 2IFT.} label{fig5} end{figure}
  • 28. Tablas • Es necesario crear un ambiente flotante – begin{table}….end{table} • Y dentro de ese flotante se crea la tabla mediante el ambiente – begin{tabular}…….end{tabular} • Es posible que se necesite incluir las librerias: – usepackage{multirow} – usepackage{multicolumn}
  • 29. Tablas • Para cambiar de columna usamos & • Para cambiar de renglón usamos • Para dibujar una linea horizontal usamos – hline
  • 30. Bibliografía • Existen 2 formas – Escribir la bibliografía en el mismo documento – Insertar un archivo bibtex • Forma 1 – begin{thebibliography}{99} bibitem{papertec:1}A.~G. Orozco-Lugo, R.~Parra-Michel, D.~McLernon, and V.~Kontorovitch, ``Enhancing the performance of the cr blind channel estimation algorithm using the Karhunen-Lo`{e}ve expansion,'' in emph{Proc. {IEEE} International Conference on Acustics, Speech, and Signal Processing ({ICASSP}’02)}, Orlando, USA, May 2002, pp.~III2653-III2656. end{thebibliography}
  • 31. Bibliografía • El 99 en el ambiente thebibliography le es para indicarle al compilador que la etiqueta mas ancha que esperamos sea del ancho del texto 99. • Cada entrada en la bibliografía se hace utilizando el comando – bibtem
  • 32. Bibliografía • Forma 2 – En esta se le indica al compilador donde se encuentra un archivo bibtex. – Al tener este archivo, es necesario compilarlo primero para que nos entregue un archivo con las entradas bibtem. • bibliography{biblio/IEEEabrv,biblio/biblio} • Dirección relativa a la carpeta de trabajo
  • 33. Bibliografía • El compilador solo nos pondrá en la bibliografía las referencias que utilizamos en el texto. • Podemos tener diferentes estilos de bibliografía, estos se definen de la siguiente manera: – bibliographystyle{estilo} – donde los estilos son:
  • 34. • IEEEtran • abbrv • acm • alpha • plain • siam • unsrt • Referencia • http://en.wikibooks.org/wiki/LaTex/Bibliography_Management
  • 35. Bibliografía y Links • http://www.elsevier.com/wps/find/authorsview. • http://www.ieee.org/publications_standards/pu • M. Goossens, F. Mittelbach, A. Samarin, “The Latex companion”, Addison-Wesley, 1999.

Notas del editor

  1. Aquí explicar que siempre empieza el docuemnto con \documentclass{} y luego se ponen los paquetes a usar, tambien explicar para que sirve hyphenation