SlideShare a Scribd company logo
Editing documents
     with L TEX
           A

  Laura M. Castro Souto




          Master on Free Software
List of topics
1 Introduction


2 Creating documents


3 Formatting documents


4 Editting documents


5 Conclusions


                   Master on Free Software
Introduction: what is LaTeX?
Software system to produce high-quality digital
documents




                    Master on Free Software
Introduction: what is LaTeX?
Software system to produce high-quality digital
documents . . . oh, yet another text processor?




                    Master on Free Software
Introduction: what is LaTeX?
Software system to produce high-quality digital
documents . . . oh, yet another text processor?
Not really:
  ā€¢ Not a WYSIWYG tool
  ā€¢ Any text editor can be used for editing
  ā€¢ Together with the text content, some
    commands are written
  ā€¢ Commands specify how the text is turned
    into the digital document

                    Master on Free Software
Introduction: what is LaTeX?

Input file                       Document


   Text
    +
Commands
                LATEX




                Master on Free Software
Introduction: what is LaTeX?

Input file                          Document


   Text
    +
Commands
                  LATEX


             Actually, this is L TEX too.
                               A




                   Master on Free Software
Introduction: what for?
 Text typesetting = Text processing


ā€¢ Page numbering
ā€¢ Context-sensitive headings
ā€¢ Chapters, sections, ļ¬gures. . . numbering
ā€¢ Management of indexes, notes, refs. . .




                   Master on Free Software
Introduction: what for?
 Text typesetting = Text processing


ā€¢ Page numbering
ā€¢ Context-sensitive headings
ā€¢ Chapters, sections, ļ¬gures. . . numbering
ā€¢ Management of indexes, notes, refs. . .


  L TEX automatizes text processing
   A




                   Master on Free Software
Introduction: what for?
   Text typesetting = Text processing


 ā€¢ Page numbering
 ā€¢ Context-sensitive headings
 ā€¢ Chapters, sections, ļ¬gures. . . numbering
 ā€¢ Management of indexes, notes, refs. . .


      L TEX automatizes text processing
       A

. . . so that you can focus on text typesetting.

                     Master on Free Software
Introduction: what for?

ā€¢ Articles, reports
ā€¢ Dissertations, manuals, books




                      Master on Free Software
Introduction: what for?

ā€¢ Articles, reports
ā€¢ Dissertations, manuals, books


  also,
    ā€¢ letters
    ā€¢ presentations
    ā€¢ web content
    ā€¢ ...




                      Master on Free Software
Introduction: how?
1   Source text edition
      ā€¢   Input ļ¬le (plain text, .tex)
      ā€¢   Embedded L TEX commands
                       A

2   Compilation
      ā€¢   L TEX compiler processes source code,
          A

          applying commands to text content to
          produce ļ¬nal document
3   Visualization/printing
      ā€¢   L TEXā€™s compiler DVI output is usually
           A

          transformed into Postscript or PDF



                         Master on Free Software
Introduction: how?

               document.aux
                document.log
                     ...                              document.ps
                                            dvips
                                                       pdf2ps
                 LA T E X            document.dvi
document.tex
                                                                   ps2pdf
                                         dvipdfm

               P D F LA T E X                       document.pdf




                                Master on Free Software
Introduction: how?

               document.aux
                document.log
                     ...                              document.ps
                                            dvips
                                                       pdf2ps
                 LA T E X            document.dvi
document.tex
                                                                   ps2pdf
                                         dvipdfm

               P D F LA T E X                       document.pdf




                                Master on Free Software
Introduction: how?

ā€¢ Linux:
    ā€¢   texlive; kile, texmaker; evince, okular. . .
ā€¢ Windows:
    ā€¢   MikTEX; TEXnicCenter
ā€¢ Mac:
    ā€¢   MacTEX; TEXShop, iTEXMac




                        Master on Free Software
Creating documents:
       basic structure

L TEX source ļ¬les are logically divided in two
A

parts:
Preamble At the beginning of the document,
       includes general settings
   Body After the preamble, includes text
        content together with embedded
        commands with limited scope



                      Master on Free Software
Creating documents:
         basic structure

 documentclass{ a r t i c l e }

 begin{document}

This i s my f i r s t LaTeX document .

 end{document}




                             Master on Free Software
Creating documents:
         basic structure
                                          Preamble
 documentclass{ a r t i c l e }

 begin{document}

This i s my f i r s t LaTeX document .

 end{document}




                             Master on Free Software
Creating documents:
         basic structure
                                          Preamble
 documentclass{ a r t i c l e }

 begin{document}

This i s my f i r s t LaTeX document .

 end{document}
                                            Body



                             Master on Free Software
Creating documents:
         basic structure

 documentclass{ a r t i c l e }           command

 begin{document}

This i s my f i r s t LaTeX document .

 end{document}




                             Master on Free Software
Creating documents:
         basic structure

 documentclass{ a r t i c l e }           command

 begin{document}

This i s my f i r s t LaTeX document .

 end{document}

                           environment


                             Master on Free Software
Creating documents:
       document types
Every document begins with the command:
 documentclass [ options ]{documentāˆ’classāˆ’name}


Basic L TEX document classes:
      A


article, proc Suitable for short documents
book, report Suitable for long documents
letter, slides Speciļ¬c purpose documents


                      Master on Free Software
Creating documents:
      document types

Document class options:
Base font size: 10pt, 11pt, 12pt
Paper format: letterpaper, a4paper. . .
Page format: oneside, twoside ā‡’
        openright/openany
Column format: onecolumn, twocolumn
Title page: titlepage, notitlepage


                   Master on Free Software
Creating documents:
        global settings

L TEX assumes English language, but:
A

 usepackage [ spanish ]{babel}
 usepackage [ utf8 ]{ inputenc}

  ā€¢ Command usepackage loads modules
  ā€¢ Placed always in the preamble
  ā€¢ May receive options (spanish, utf8. . . )




                        Master on Free Software
Formatting documents:
       front (title) page

L TEX generates simple title pages if we provide
A

some information in the preamble:
 t i t l e {Document t i t l e }
 author{Author or authors of the document}
 date{Document date}

To actually display the title page, in the body:
 maketitle




                      Master on Free Software
Formatting documents:
         divisions
Syntax:
  section [ Short t i t l e ]{Long t i t l e of d i v i s i o n}


L TEX divisions: part, chapter, section,
A

subsection, subsubsection, paragraph,
subparagraph

Related commands: tableofcontents, appendix


                             Master on Free Software
Formatting documents:
       styles
There are 3 basic headings/footers styles:
 empty empty headers and footers
   plain empty header, centered page
         number in footer
headings page number and current division
        title in header
Used/changed adding to the preamble:
 pagestyle{style āˆ’name}


                       Master on Free Software
Editting documents:
          basic elements
An environment is a document portion
between a pair of begin-end commands:
 begin{environmentāˆ’name}
...
 end{environmentāˆ’name}

Similarly, a block is a document portion
between two brackets:
{   ...   }



                     Master on Free Software
Editting documents:
      basic elements

Environments and blocks:
 ā€¢ affect the portion of the document inside
 ā€¢ can be nested
 ā€¢ when nested, their effects are combined




                   Master on Free Software
Editting documents: fonts
L TEX font families:
A

  1   roman (default)
  2   sanserif
  3   typewriter
   textrm{Short text}            {  rmfamily Text }
   t e x t s f{Short text}       {  sffamily Text }
   t e x t t t{Short text}       {  t t f a m i l y Text }
   begin{rmfamily} Long text  end{rmfamily}
   begin{sffamily} Long text  end{sffamily}
   begin{t t f a m i l y} Long text  end{t t f a m i l y}


                           Master on Free Software
Editting documents: fonts
L TEX font shapes:
A

  1   up (default)               3   slanted
  2   italics                    4   small caps
   textup{Short text}           {  upshape Text }
   t e x t i t {Short text}     {  itshape Text }
   t e x t s l{Short text}      {  slshape Text }
   textsc{Short text}           {  scshape Text }
   begin{upshape} Long        text  end{upshape}
   begin{itshape} Long        text  end{itshape}
   begin{slshape} Long        text  end{slshape}
   begin{scshape} Long        text  end{scshape}

                         Master on Free Software
Editting documents: fonts
L TEX font faces:
A

  1   medium (default)
  2   bold
   textmd{Short text}     {  mdseries Text }
   textbf{Short text}     {  bfseries Text }
   begin{mdseries} Long text  end{mdseries}
   begin{bfseries} Long text  end{bfseries}

Different font families, shapes and fonts can be
combined, but not every combination exists. . .

                     Master on Free Software
Editting documents: fonts




         Master on Free Software
Editting documents: fonts
{tiny         Text }
{scriptsize    Text }
{footnotesize Text }                      L TEX font sizes
                                           A
{small                 Text }
{normalsize Text }
{large                    Text }
{Large                      Text }
{LARGE                          Text }
{huge                            Text }
{Huge Text }
                                 Master on Free Software
Editting documents: fonts
Context-sensitive emphasis:
emph{Text}

Underline:
 underline{Text}

Unprocessed text:
 begin{verbatim}
  Verbatim environment
 end{verbatim}



                         Master on Free Software
Editting documents: lists
There are three kinds of lists in L TEX:
                                  A

  ā€¢ this is one of them
  ā€¢ a list of items
  ā€¢ the most widely used

 begin{itemize}
 item t h i s i s one of them
 item a l i s t of items
 item the most widely used
 end{itemize}



                        Master on Free Software
Editting documents: lists

  1   This is another kind of list,
  2   a list of items with a numbered label,
  3   presents ordered items.

 begin{enumerate}
 item This i s another kind of l i s t ,
 item a l i s t of items with a numbered label ,
 item presents ordered items .
 end{enumerate}



                        Master on Free Software
Editting documents: lists

      last this is the third kind of lists
keyword a description after the highlighted
       term

 begin{description}
 item [ l a s t ] t h i s i s the t h i r d kind of l i s t s
 item [keyword] a description a f t e r the
                         highlighted term
 end{description}



                             Master on Free Software
Editting documents: lists
  1   Of course:
        ā€¢   different kinds of lists
        ā€¢   can be combined
  2   as needed.

 begin{enumerate}
 item Of course :  begin{itemize}
                    item d i f f e r e n t kinds of l i s t s
                    item can be combined
                    end{itemize}
 item as needed .
 end{enumerate}

                            Master on Free Software
Editting documents:
         text alignment

L TEX always aligns text in both margins.
A



 begin{ f l u s h l e f t }
Leftāˆ’only aligned text
 end{ f l u s h l e f t }

 l e f t l i n e {Leftāˆ’only aligned l i n e }




                             Master on Free Software
Editting documents:
         text alignment

                            But we can customize it. . .

 begin{f l u s h r i g h t}
Rightāˆ’only aligned text
 end{ f l u s h l e f t }

 r i g h t l i n e {Rightāˆ’only aligned l i n e }




                             Master on Free Software
Editting documents:
        text alignment

                . . . to ļ¬t our needs.

 begin{center}
Centered text
 end{center}

 centerline{Centered l i n e }




                         Master on Free Software
Editting documents:
           citations and notes

Side notes and footnotes1 :
 footnote{Footnote text}
 marginpar{Side note text}

Text in a quote or quotation environment:
       Wider margins and emphasized font,
       so that it stands out among the rest.


 1
     Are very easy to include.
                                 Master on Free Software
Editting documents:
      ļ¬‚oating elements

Text can be rearranged; some elements canā€™t:
ļ¬‚oating elements
  ā€¢ position of a ļ¬‚oating element will be
    determined depending on its context
  ā€¢ dimensions and placement of the ļ¬‚oating
    element are as important as its content
Typical ļ¬‚oating elements: tables and ļ¬gures


                     Master on Free Software
Editting documents: tables
Text can be arranged as a table using the
tabular environment:
               this is just a simple
           example          of a table

 begin{tabular}{ r c l }
this     & i s j u s t & a simple   
example &              & of a table  
 end{tabular}



                         Master on Free Software
Editting documents: tables
There are several commands to draw lines
alongside rows and columns:

               this is just a simple
           example          of a table

 begin{tabular }{| r | c | l |}         hline
this     & i s j u s t & a simple      hline
example &              & of a table    hline
 end{tabular}



                        Master on Free Software
Editting documents: tables
There are several commands to draw lines
alongside rows and columns:

                this is just a simple
            example          of a table

 begin{tabular }{| rc | l |}    hline  hline
this     & i s j u s t & a simple        c l i n e{1āˆ’2}
example &              & of a table    hline  hline
 end{tabular}


                          Master on Free Software
Editting documents: tables
Same-row/-column cells can be combined:

                 this is just
                                table
            a simple example of

 begin{tabular }{| r | c | l |}              hline
 multicolumn{2}{c}{t h i s i s j u s t}
           &  multirow{2}{*}{table }    c l i n e{1āˆ’2}
a simple & example of &                     c l i n e{1āˆ’2}
 end{tabular}




                           Master on Free Software
Editting documents: tables
Same-row/-column cells can be combined:

                 this is just
                                table
            a simple example of

 begin{tabular }{| r | c | l |}              hline
 multicolumn{2}{c}{t h i s i s j u s t}
           &  multirow{2}{*}{table }    c l i n e{1āˆ’2}
a simple & example of &                     c l i n e{1āˆ’2}
 end{tabular}


                                usepackage{multirow}
                           Master on Free Software
Editting documents: tables
Tabular is not a ļ¬‚oating environment, we use
table to wrap it as such:

              this is just
                             table
         a simple example of
                Table: Sample table

 begin{table }[hp ! ]
TABLE DEFINITION HERE
 caption{Sample table}
 end{table}


                      Master on Free Software
Editting documents: tables
Floating elements placement preference
options:
        h preferred location is here
        b preferred location is page bottom
        t preferred location is page top
        p preferred location is exclusive page
         ! demands ļ¬‚exibility
Table index: listoftables


                        Master on Free Software
Editting documents: images

Images can be inserted using command
includegraphics from package graphicx:




 includegraphics [ width=2cm]{ figures / sample . png}




                        Master on Free Software
Editting documents: images
Includegraphics options:
  width = integer/decimal + unit
 height = integer/decimal + unit
  scale = scale factor (decimal)
  angle = rotate factor (0 ā‰„ |integer| ā‰„ 360)

Useful commands:
    textheight    textwidth    columnwidth



                      Master on Free Software
Editting documents: images
Includegraphics does not turn an image into a
ļ¬‚oating element, ļ¬gure environment does:

                              begin{figure }[hp ! ]
                            IMAGE DEFINITION HERE
                              caption{Sample image}
                              end{figure}

  Figure: Sample image      Image index:
                             listofļ¬gures



                         Master on Free Software
Editting documents: images

Image formats supported by
includegraphics depend on the tool
we use to produce the ļ¬nal document!

  dvips eps, ps
 dvipdf eps, jpg, pdf, png, ps
pdļ¬‚atex jpg, png, pdf, tiff



              Master on Free Software
Editting documents:
        references
To include references in a L TEX document:
                           A

  1   Mark referrable elements with a label:
         label{label āˆ’name}
        ā€¢ enumerate items
        ā€¢ ļ¬‚oating elements with caption
        ā€¢ document sections
        ā€¢ (and pretty much anything with a number)

  2   Refer to a label:
        ā€¢   element number      ref{labelāˆ’name}
        ā€¢   element page number pageref{labelāˆ’name}

                          Master on Free Software
Editting documents:
         bibliographic references
 begin{thebibliography}{ZZ}
 bibitem{libroLaTeX}
   Bernardo Cascales Salinas .  
   { itshape El l i b r o de  LaTeX{}}.  
   Prentice Hall , 2004.
 bibitem{iniciacionLaTeX}
   J a v i e r Sanguino Botella .  
   { itshape I n i c i a c i o n a  LaTeX{}}.  
   Addisonāˆ’Wesley , 1997.
 end{thebibliography}

References are made using cite{bibitemāˆ’label}
                            Master on Free Software
Editting documents:
        bibliographic references
BibTEX is a complementary tool to L TEX which
                                  A

  ā€¢ allows an easier management of
    bibliographic reference sets
  ā€¢ integrates with L T X and automatically
                    A
                       E
      generates thebibliography environment

  1   Create bibliographic references ļ¬le (.bib)
  2   Include .bib ļ¬le usage in L TEX source ļ¬le
                                A




                       Master on Free Software
Editting documents:
       bibliographic references
Bibliographic references ļ¬le (.bib) format:
@BOOK{libroLatex ,
  author    = {Cascales Salinas , Bernardo} ,
  publisher = {Prentice Hall } ,
  title     = {El l i b r o de  LaTeX{}},
  year      = {2004}}
@ARTICLE{iniciacionLaTeX ,
  author = {Sanguino Botella , J a v i e r } ,
  title   = {I n i c i a c i o n a  LaTeX{}},
  journal = {Addisonāˆ’Wesley Series } ,
  year    = {1997}}

                      Master on Free Software
Editting documents:
       bibliographic references
BibTEX ļ¬le (sample.bib) usage in L TEX source:
                                 A

 bibliography{sample}
 bibliographystyle{bibliographyāˆ’style āˆ’name}

   plain numbered refs, alphabetic order
  unsrt numbered refs, citation order
  alpha alphanumeric refs, alphabetic order
  abbrv shortened version of plain


                     Master on Free Software
Editting documents:
     bibliographic references
            latex document . tex
            bibtex document . aux
            latex document . tex

ā€¢ BibT X uses cites information in .aux
      E
ā€¢ Only cited references will be part of the
  generated bibliography
ā€¢ We can use nocite{bibitemāˆ’label}, to
  consider uncited references (or nocite*)


                   Master on Free Software
Conclusions
L TEX is a very powerful tool which
A

  ā€¢ automatizes many of the formatting
    tasks involved in producing a digital
    document
  ā€¢ generates high-quality results
  ā€¢ requires very lightweight source ļ¬les
  ā€¢ produces consistent output regardless of
    editor or platform


                     Master on Free Software
Conclusions
We have learned to create a L TEX document,
                            A

  ā€¢ choose the appropriate document class
    and/or modify its basic appearance,
  ā€¢ generate basic title pages,
  ā€¢ select font families, shapes, faces, sizes,
    alignment. . . ,
  ā€¢ insert lists, notes, tables, images,
    references, bibliography,
and deliver a standard, safe version (PS/PDF).

                       Master on Free Software
L TEX references
    A

El libro de L TEX.
            A

Bernardo Cascales Salinas et al.
Prentice Hall, 2004.
IniciaciĆ³n a L TEX 2Īµ .
             A

Un sistema para preparar documentos.
Javier Sanguino Botella.
Addison-Wesley, 1997.
Una descripciĆ³n de L TEX 2Īµ .
                     A

Toms Bautista et al.
www.lsi.upc.es/~eipec/pdf/ldesc2e.pdf

                  Master on Free Software
L TEX references
   A


The Comprehensive TEX Archive Network
(CTAN)
www.ctan.org
L TEX ā€“ A document preparation system
A

www.latex-project.org
CervanTEX: Grupo de usuarios
hispanohablantes de TEX
www.cervantex.es


                Master on Free Software
Advanced topics:
        what do you want to know?

How do I. . . ?
  ā€¢ structure a document in different ļ¬les?
  ā€¢ set up my own customized title page?
  ā€¢ arrange text into columns?
  ā€¢ change the headings of a document?
  ā€¢ customize the margins in a document?




                    Master on Free Software
Advanced topics:
     what do you want to know?

ā€¢ adjust spacing?
ā€¢ personalize an itemize list?
ā€¢ use color in text or tables?
ā€¢ write a letter?
ā€¢ create a slide presentation?




                    Master on Free Software
How to:
          structure a ļ¬le (physically)

 input{ f i l e . tex}
 include{ f i l e }

Diferences:
  ā€¢ include assumes .tex ļ¬le extension
  ā€¢ include starts over in a new page
  ā€¢ include cannot be nested
  ā€¢ for each included ļ¬le, a .aux is generated



                          Master on Free Software
How to:
       create your title page

To create a customized front/title page:

 begin{titlepage}

TITLE PAGE DEFINITION HERE

 end{titlepage}




                     Master on Free Software
How to:
       set up columns
Whole document: documentclass[twocolumn]{...}
Document portion: usepackage{multicol}
 begin{multicols}{3}
This text i s automatically rearranged into a
many columns as stated in the argument of
the multicols environment .
 end{multicols}

This text is    into as many      argument of
automatically   columns as        the multicols
rearranged      stated in the     environment.

                     Master on Free Software
How to:
        change headings
Customizable page style myheadings,
enables use of
 markright{right āˆ’header}
 markboth{ l e f t āˆ’header}{right āˆ’header}

in preamble (default values match headings).
Useful commands: thesection,  sectionname
For more complex customization:
usepackage{fancyhdr}, usepackage{titleref}


                         Master on Free Software
How to:
        customize margins

Easiest way:
 usepackage{anysize}

enables use of
 marginsize{ l e f t }{r i g h t}{top}{bottom}

in preamble.




                          Master on Free Software
How to:
       mess with spacing
Change line spacing:
 usepackage{setspace}
 singlespacing  onehalfspacing         doublespacing

Introduce page changes:
newpage            clearpage        cleardoublepage

Introduce blank spaces:
        hspace{length}           vspace{length}

To ļ¬ll in space:
     hfill    dotfill       hrulefill      vfill


                          Master on Free Software
How to:
       personalize lists
Customizable list environment: list
 ā™£ list
 ā™£ with customized
 ā™£ symbol
      begin{ l i s t }{$  clubsuit$}{}
      item l i s t
      item with customized
      item symbol
      end{ l i s t }


                         Master on Free Software
How to:
       use color
Using package color we can:
text                 textcolor{green}{text}
 background          colorbox{green}{background}

Predeļ¬ned colors: white, black, red, blue, green,
cyan, magenta, yellow

Deļ¬ne colors:
deļ¬necolor{colorāˆ’name}{schema}{speciļ¬cation}



                       Master on Free Software
How to:
       use color
Using package color we can:
text                textcolor{green}{text}
 background         colorbox{green}{background}

Predeļ¬ned colors: white, black, red, blue, green,
cyan, magenta, yellow
                       gray|rgb|RGB|HTML|cmyk
Deļ¬ne colors:
deļ¬necolor{colorāˆ’name}{schema}{speciļ¬cation}



                     Master on Free Software
How to:
        use color
               this is just a simple
           example          of a table


 begin{tabular }{| rc |>{columncolor{green}} l |}
 hline  hline
 rowcolor{green} t h i s & i s j u s t & a simple   
    c l i n e{1āˆ’2} example &           & of a table  
 hline  hline
 end{tabular}


                         Master on Free Software
How to:
        use color
               this is just a simple
           example          of a table


 begin{tabular }{| rc |>{columncolor{green}} l |}
 hline  hline
 rowcolor{green} t h i s & i s j u s t & a simple   
    c l i n e{1āˆ’2} example &           & of a table  
 hline  hline
 end{tabular}


                         Master on Free Software
How to:
        create letters
 documentclass{ l e t t e r }
 begin{document}
 begin{ l e t t e r }{Chalmers University}
 opening{To Whom i t May Concern:}

Please consider the following . . .

 signature{Laura M. Castro}
 closing{Sincerely ,}
 end{ l e t t e r }
 end{document}


                         Master on Free Software
How to:
    create slides
ā€¢ First L T X document class aimed for slide
        A
           E
  presentations: slides
ā€¢ Each slide:
     begin{s l i d e}{ T i t l e }
      SLIDE CONTENTS
     end{s l i d e}

ā€¢ Poor results
ā€¢ No ļ¬‚exibility, no customizability


                          Master on Free Software
How to:
     create slides
ā€¢ One of the ļ¬rst alternatives: Prosper
ā€¢ Best result/effort ration
ā€¢ documentclass{prosper}, environment slides
ā€¢ Predeļ¬ned designs (document option):
    alienglow autumn      azure    contemporain
    darkblue   frames lignesbleues  nuancegris
   troispoints  gyom       rico
ā€¢ Still low customization level, no dynamism



                   Master on Free Software
How to:
          create slides
   ā€¢ 3rd tool generation: Beamer
   ā€¢ The most ļ¬‚exible, powerful, popular
   ā€¢ Class beamer, environment frame

 begin{frame}{ T i t l e }{S u b t i t l e}
    begin{itemize}
    item One
    item Two
    item Three
    end{itemize}
 end{frame}

                              Master on Free Software

More Related Content

What's hot

Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
Dr. Krishna Mohbey
Ā 

What's hot (20)

Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
Ā 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
Ā 
Latex for beginner
Latex for beginnerLatex for beginner
Latex for beginner
Ā 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
Ā 
Training basic latex
Training basic latexTraining basic latex
Training basic latex
Ā 
Advanced latex
Advanced latexAdvanced latex
Advanced latex
Ā 
Latex workshop
Latex workshopLatex workshop
Latex workshop
Ā 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
Ā 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
Ā 
Latex Notes
Latex NotesLatex Notes
Latex Notes
Ā 
Latex slides
Latex slidesLatex slides
Latex slides
Ā 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
Ā 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
Ā 
LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners LATEX and BEAMER for Beginners
LATEX and BEAMER for Beginners
Ā 
Research 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeXResearch 101 - Paper Writing with LaTeX
Research 101 - Paper Writing with LaTeX
Ā 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
Ā 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginners
Ā 
Python If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | EdurekaPython If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | Edureka
Ā 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
Ā 
Merge sort algorithm
Merge sort algorithmMerge sort algorithm
Merge sort algorithm
Ā 

Similar to Editing documents with LaTeX

Document typesetting using LateX
Document typesetting using LateXDocument typesetting using LateX
Document typesetting using LateX
Dr Anjan Krishnamurthy
Ā 
Latex intro s_dutta_v2
Latex intro s_dutta_v2Latex intro s_dutta_v2
Latex intro s_dutta_v2
SoumyoDutta
Ā 
LaTeX for B.Sc. Mathematics,an introduction
LaTeX for B.Sc. Mathematics,an introductionLaTeX for B.Sc. Mathematics,an introduction
LaTeX for B.Sc. Mathematics,an introduction
jayakumarc9
Ā 
sample test file to download scribd file
sample test file to download scribd filesample test file to download scribd file
sample test file to download scribd file
Dhwanee Desai
Ā 
Sample pdf
Sample pdfSample pdf
Sample pdf
Chris
Ā 

Similar to Editing documents with LaTeX (20)

latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
Ā 
Latex ppt copy
Latex ppt   copyLatex ppt   copy
Latex ppt copy
Ā 
Document typesetting using LateX
Document typesetting using LateXDocument typesetting using LateX
Document typesetting using LateX
Ā 
LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
Ā 
Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLE
Ā 
Words in Code
Words in CodeWords in Code
Words in Code
Ā 
LaTeX Part 1
LaTeX Part 1LaTeX Part 1
LaTeX Part 1
Ā 
Inroduction to Latex
Inroduction to LatexInroduction to Latex
Inroduction to Latex
Ā 
latex document for IT workshop Lab . B.Tech
latex document for IT workshop Lab . B.Techlatex document for IT workshop Lab . B.Tech
latex document for IT workshop Lab . B.Tech
Ā 
Latex intro s_dutta_v2
Latex intro s_dutta_v2Latex intro s_dutta_v2
Latex intro s_dutta_v2
Ā 
LaTeXė”œ ė¬øģ„œ ģž‘ģ„±ķ•˜ģž
LaTeXė”œ ė¬øģ„œ ģž‘ģ„±ķ•˜ģžLaTeXė”œ ė¬øģ„œ ģž‘ģ„±ķ•˜ģž
LaTeXė”œ ė¬øģ„œ ģž‘ģ„±ķ•˜ģž
Ā 
LatexTutorial
LatexTutorialLatexTutorial
LatexTutorial
Ā 
LatexTutorial
LatexTutorialLatexTutorial
LatexTutorial
Ā 
14 Late X
14 Late X14 Late X
14 Late X
Ā 
The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
Ā 
LaTeX for B.Sc. Mathematics,an introduction
LaTeX for B.Sc. Mathematics,an introductionLaTeX for B.Sc. Mathematics,an introduction
LaTeX for B.Sc. Mathematics,an introduction
Ā 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
Ā 
sample test file to download scribd file
sample test file to download scribd filesample test file to download scribd file
sample test file to download scribd file
Ā 
Sample pdf
Sample pdfSample pdf
Sample pdf
Ā 
123
123123
123
Ā 

More from Laura M. Castro

More from Laura M. Castro (20)

Ola, ChatGPT... que carreira serĆ­a boa para min?
Ola, ChatGPT... que carreira serĆ­a boa para min?Ola, ChatGPT... que carreira serĆ­a boa para min?
Ola, ChatGPT... que carreira serĆ­a boa para min?
Ā 
IAs xerativas e nesgos de xƩnero
IAs xerativas e nesgos de xƩneroIAs xerativas e nesgos de xƩnero
IAs xerativas e nesgos de xƩnero
Ā 
As intelixencias artificiais como xeradoras de cultura: exploraciĆ³n dos nesgo...
As intelixencias artificiais como xeradoras de cultura: exploraciĆ³n dos nesgo...As intelixencias artificiais como xeradoras de cultura: exploraciĆ³n dos nesgo...
As intelixencias artificiais como xeradoras de cultura: exploraciĆ³n dos nesgo...
Ā 
David vs. Goliat: lecciones aprendidas de una experiencia fallida de adopciĆ³n...
David vs. Goliat: lecciones aprendidas de una experiencia fallida de adopciĆ³n...David vs. Goliat: lecciones aprendidas de una experiencia fallida de adopciĆ³n...
David vs. Goliat: lecciones aprendidas de una experiencia fallida de adopciĆ³n...
Ā 
Why on Earth would I test if I have to just "Let it crash"?
Why on Earth would I test if I have to just "Let it crash"?Why on Earth would I test if I have to just "Let it crash"?
Why on Earth would I test if I have to just "Let it crash"?
Ā 
How the BEAM will change your mind
How the BEAM will change your mindHow the BEAM will change your mind
How the BEAM will change your mind
Ā 
Elixir vs Java
Elixir vs JavaElixir vs Java
Elixir vs Java
Ā 
So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?
Ā 
Elixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to ErlangElixir: the not-so-hidden path to Erlang
Elixir: the not-so-hidden path to Erlang
Ā 
Automatic generation of UML sequence diagrams from test counterexamples
Automatic generation of UML sequence diagrams from test counterexamplesAutomatic generation of UML sequence diagrams from test counterexamples
Automatic generation of UML sequence diagrams from test counterexamples
Ā 
Making property-based testing easier to read for humans
Making property-based testing easier to read for humansMaking property-based testing easier to read for humans
Making property-based testing easier to read for humans
Ā 
Erlang as a supporting technology for teaching Software Architecture
Erlang as a supporting technology for teaching Software ArchitectureErlang as a supporting technology for teaching Software Architecture
Erlang as a supporting technology for teaching Software Architecture
Ā 
A Backpack to go the Extra-Functional Mile (a hitched hike by the PROWESS pro...
A Backpack to go the Extra-Functional Mile (a hitched hike by the PROWESS pro...A Backpack to go the Extra-Functional Mile (a hitched hike by the PROWESS pro...
A Backpack to go the Extra-Functional Mile (a hitched hike by the PROWESS pro...
Ā 
Experiencias Industriales con ProgramaciĆ³n Declarativa
Experiencias Industriales con ProgramaciĆ³n DeclarativaExperiencias Industriales con ProgramaciĆ³n Declarativa
Experiencias Industriales con ProgramaciĆ³n Declarativa
Ā 
Functional programming goes to Hollywood... and around the world!
Functional programming goes to Hollywood... and around the world!Functional programming goes to Hollywood... and around the world!
Functional programming goes to Hollywood... and around the world!
Ā 
Failover and takeover contingency mechanisms for network partition and node f...
Failover and takeover contingency mechanisms for network partition and node f...Failover and takeover contingency mechanisms for network partition and node f...
Failover and takeover contingency mechanisms for network partition and node f...
Ā 
IntroduciĆ³n Ć” ediciĆ³n de textos con LaTeX
IntroduciĆ³n Ć” ediciĆ³n de textos con LaTeXIntroduciĆ³n Ć” ediciĆ³n de textos con LaTeX
IntroduciĆ³n Ć” ediciĆ³n de textos con LaTeX
Ā 
EdiciĆ³n de textos con LaTeX
EdiciĆ³n de textos con LaTeXEdiciĆ³n de textos con LaTeX
EdiciĆ³n de textos con LaTeX
Ā 
EdiciĆ³n de textos con LaTeX
EdiciĆ³n de textos con LaTeXEdiciĆ³n de textos con LaTeX
EdiciĆ³n de textos con LaTeX
Ā 
Improving software development using Erlang/OTP
Improving software development using Erlang/OTPImproving software development using Erlang/OTP
Improving software development using Erlang/OTP
Ā 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
Ā 

Recently uploaded (20)

10 Differences between Sales Cloud and CPQ, Blanka DoktorovĆ”
10 Differences between Sales Cloud and CPQ, Blanka DoktorovƔ10 Differences between Sales Cloud and CPQ, Blanka DoktorovƔ
10 Differences between Sales Cloud and CPQ, Blanka DoktorovĆ”
Ā 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
Ā 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Ā 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
Ā 
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Ā 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Ā 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Ā 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
Ā 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
Ā 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Ā 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
Ā 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Ā 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Ā 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Ā 
SOQL 201 for Admins & Developers: Slice & Dice Your Orgā€™s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Orgā€™s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Orgā€™s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Orgā€™s Data With Aggregate...
Ā 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Ā 
Salesforce Adoption ā€“ Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption ā€“ Metrics, Methods, and Motivation, Antone KomSalesforce Adoption ā€“ Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption ā€“ Metrics, Methods, and Motivation, Antone Kom
Ā 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
Ā 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Ā 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Ā 

Editing documents with LaTeX

  • 1. Editing documents with L TEX A Laura M. Castro Souto Master on Free Software
  • 2. List of topics 1 Introduction 2 Creating documents 3 Formatting documents 4 Editting documents 5 Conclusions Master on Free Software
  • 3. Introduction: what is LaTeX? Software system to produce high-quality digital documents Master on Free Software
  • 4. Introduction: what is LaTeX? Software system to produce high-quality digital documents . . . oh, yet another text processor? Master on Free Software
  • 5. Introduction: what is LaTeX? Software system to produce high-quality digital documents . . . oh, yet another text processor? Not really: ā€¢ Not a WYSIWYG tool ā€¢ Any text editor can be used for editing ā€¢ Together with the text content, some commands are written ā€¢ Commands specify how the text is turned into the digital document Master on Free Software
  • 6. Introduction: what is LaTeX? Input file Document Text + Commands LATEX Master on Free Software
  • 7. Introduction: what is LaTeX? Input file Document Text + Commands LATEX Actually, this is L TEX too. A Master on Free Software
  • 8. Introduction: what for? Text typesetting = Text processing ā€¢ Page numbering ā€¢ Context-sensitive headings ā€¢ Chapters, sections, ļ¬gures. . . numbering ā€¢ Management of indexes, notes, refs. . . Master on Free Software
  • 9. Introduction: what for? Text typesetting = Text processing ā€¢ Page numbering ā€¢ Context-sensitive headings ā€¢ Chapters, sections, ļ¬gures. . . numbering ā€¢ Management of indexes, notes, refs. . . L TEX automatizes text processing A Master on Free Software
  • 10. Introduction: what for? Text typesetting = Text processing ā€¢ Page numbering ā€¢ Context-sensitive headings ā€¢ Chapters, sections, ļ¬gures. . . numbering ā€¢ Management of indexes, notes, refs. . . L TEX automatizes text processing A . . . so that you can focus on text typesetting. Master on Free Software
  • 11. Introduction: what for? ā€¢ Articles, reports ā€¢ Dissertations, manuals, books Master on Free Software
  • 12. Introduction: what for? ā€¢ Articles, reports ā€¢ Dissertations, manuals, books also, ā€¢ letters ā€¢ presentations ā€¢ web content ā€¢ ... Master on Free Software
  • 13. Introduction: how? 1 Source text edition ā€¢ Input ļ¬le (plain text, .tex) ā€¢ Embedded L TEX commands A 2 Compilation ā€¢ L TEX compiler processes source code, A applying commands to text content to produce ļ¬nal document 3 Visualization/printing ā€¢ L TEXā€™s compiler DVI output is usually A transformed into Postscript or PDF Master on Free Software
  • 14. Introduction: how? document.aux document.log ... document.ps dvips pdf2ps LA T E X document.dvi document.tex ps2pdf dvipdfm P D F LA T E X document.pdf Master on Free Software
  • 15. Introduction: how? document.aux document.log ... document.ps dvips pdf2ps LA T E X document.dvi document.tex ps2pdf dvipdfm P D F LA T E X document.pdf Master on Free Software
  • 16. Introduction: how? ā€¢ Linux: ā€¢ texlive; kile, texmaker; evince, okular. . . ā€¢ Windows: ā€¢ MikTEX; TEXnicCenter ā€¢ Mac: ā€¢ MacTEX; TEXShop, iTEXMac Master on Free Software
  • 17. Creating documents: basic structure L TEX source ļ¬les are logically divided in two A parts: Preamble At the beginning of the document, includes general settings Body After the preamble, includes text content together with embedded commands with limited scope Master on Free Software
  • 18. Creating documents: basic structure documentclass{ a r t i c l e } begin{document} This i s my f i r s t LaTeX document . end{document} Master on Free Software
  • 19. Creating documents: basic structure Preamble documentclass{ a r t i c l e } begin{document} This i s my f i r s t LaTeX document . end{document} Master on Free Software
  • 20. Creating documents: basic structure Preamble documentclass{ a r t i c l e } begin{document} This i s my f i r s t LaTeX document . end{document} Body Master on Free Software
  • 21. Creating documents: basic structure documentclass{ a r t i c l e } command begin{document} This i s my f i r s t LaTeX document . end{document} Master on Free Software
  • 22. Creating documents: basic structure documentclass{ a r t i c l e } command begin{document} This i s my f i r s t LaTeX document . end{document} environment Master on Free Software
  • 23. Creating documents: document types Every document begins with the command: documentclass [ options ]{documentāˆ’classāˆ’name} Basic L TEX document classes: A article, proc Suitable for short documents book, report Suitable for long documents letter, slides Speciļ¬c purpose documents Master on Free Software
  • 24. Creating documents: document types Document class options: Base font size: 10pt, 11pt, 12pt Paper format: letterpaper, a4paper. . . Page format: oneside, twoside ā‡’ openright/openany Column format: onecolumn, twocolumn Title page: titlepage, notitlepage Master on Free Software
  • 25. Creating documents: global settings L TEX assumes English language, but: A usepackage [ spanish ]{babel} usepackage [ utf8 ]{ inputenc} ā€¢ Command usepackage loads modules ā€¢ Placed always in the preamble ā€¢ May receive options (spanish, utf8. . . ) Master on Free Software
  • 26. Formatting documents: front (title) page L TEX generates simple title pages if we provide A some information in the preamble: t i t l e {Document t i t l e } author{Author or authors of the document} date{Document date} To actually display the title page, in the body: maketitle Master on Free Software
  • 27. Formatting documents: divisions Syntax: section [ Short t i t l e ]{Long t i t l e of d i v i s i o n} L TEX divisions: part, chapter, section, A subsection, subsubsection, paragraph, subparagraph Related commands: tableofcontents, appendix Master on Free Software
  • 28. Formatting documents: styles There are 3 basic headings/footers styles: empty empty headers and footers plain empty header, centered page number in footer headings page number and current division title in header Used/changed adding to the preamble: pagestyle{style āˆ’name} Master on Free Software
  • 29. Editting documents: basic elements An environment is a document portion between a pair of begin-end commands: begin{environmentāˆ’name} ... end{environmentāˆ’name} Similarly, a block is a document portion between two brackets: { ... } Master on Free Software
  • 30. Editting documents: basic elements Environments and blocks: ā€¢ affect the portion of the document inside ā€¢ can be nested ā€¢ when nested, their effects are combined Master on Free Software
  • 31. Editting documents: fonts L TEX font families: A 1 roman (default) 2 sanserif 3 typewriter textrm{Short text} { rmfamily Text } t e x t s f{Short text} { sffamily Text } t e x t t t{Short text} { t t f a m i l y Text } begin{rmfamily} Long text end{rmfamily} begin{sffamily} Long text end{sffamily} begin{t t f a m i l y} Long text end{t t f a m i l y} Master on Free Software
  • 32. Editting documents: fonts L TEX font shapes: A 1 up (default) 3 slanted 2 italics 4 small caps textup{Short text} { upshape Text } t e x t i t {Short text} { itshape Text } t e x t s l{Short text} { slshape Text } textsc{Short text} { scshape Text } begin{upshape} Long text end{upshape} begin{itshape} Long text end{itshape} begin{slshape} Long text end{slshape} begin{scshape} Long text end{scshape} Master on Free Software
  • 33. Editting documents: fonts L TEX font faces: A 1 medium (default) 2 bold textmd{Short text} { mdseries Text } textbf{Short text} { bfseries Text } begin{mdseries} Long text end{mdseries} begin{bfseries} Long text end{bfseries} Different font families, shapes and fonts can be combined, but not every combination exists. . . Master on Free Software
  • 34. Editting documents: fonts Master on Free Software
  • 35. Editting documents: fonts {tiny Text } {scriptsize Text } {footnotesize Text } L TEX font sizes A {small Text } {normalsize Text } {large Text } {Large Text } {LARGE Text } {huge Text } {Huge Text } Master on Free Software
  • 36. Editting documents: fonts Context-sensitive emphasis: emph{Text} Underline: underline{Text} Unprocessed text: begin{verbatim} Verbatim environment end{verbatim} Master on Free Software
  • 37. Editting documents: lists There are three kinds of lists in L TEX: A ā€¢ this is one of them ā€¢ a list of items ā€¢ the most widely used begin{itemize} item t h i s i s one of them item a l i s t of items item the most widely used end{itemize} Master on Free Software
  • 38. Editting documents: lists 1 This is another kind of list, 2 a list of items with a numbered label, 3 presents ordered items. begin{enumerate} item This i s another kind of l i s t , item a l i s t of items with a numbered label , item presents ordered items . end{enumerate} Master on Free Software
  • 39. Editting documents: lists last this is the third kind of lists keyword a description after the highlighted term begin{description} item [ l a s t ] t h i s i s the t h i r d kind of l i s t s item [keyword] a description a f t e r the highlighted term end{description} Master on Free Software
  • 40. Editting documents: lists 1 Of course: ā€¢ different kinds of lists ā€¢ can be combined 2 as needed. begin{enumerate} item Of course : begin{itemize} item d i f f e r e n t kinds of l i s t s item can be combined end{itemize} item as needed . end{enumerate} Master on Free Software
  • 41. Editting documents: text alignment L TEX always aligns text in both margins. A begin{ f l u s h l e f t } Leftāˆ’only aligned text end{ f l u s h l e f t } l e f t l i n e {Leftāˆ’only aligned l i n e } Master on Free Software
  • 42. Editting documents: text alignment But we can customize it. . . begin{f l u s h r i g h t} Rightāˆ’only aligned text end{ f l u s h l e f t } r i g h t l i n e {Rightāˆ’only aligned l i n e } Master on Free Software
  • 43. Editting documents: text alignment . . . to ļ¬t our needs. begin{center} Centered text end{center} centerline{Centered l i n e } Master on Free Software
  • 44. Editting documents: citations and notes Side notes and footnotes1 : footnote{Footnote text} marginpar{Side note text} Text in a quote or quotation environment: Wider margins and emphasized font, so that it stands out among the rest. 1 Are very easy to include. Master on Free Software
  • 45. Editting documents: ļ¬‚oating elements Text can be rearranged; some elements canā€™t: ļ¬‚oating elements ā€¢ position of a ļ¬‚oating element will be determined depending on its context ā€¢ dimensions and placement of the ļ¬‚oating element are as important as its content Typical ļ¬‚oating elements: tables and ļ¬gures Master on Free Software
  • 46. Editting documents: tables Text can be arranged as a table using the tabular environment: this is just a simple example of a table begin{tabular}{ r c l } this & i s j u s t & a simple example & & of a table end{tabular} Master on Free Software
  • 47. Editting documents: tables There are several commands to draw lines alongside rows and columns: this is just a simple example of a table begin{tabular }{| r | c | l |} hline this & i s j u s t & a simple hline example & & of a table hline end{tabular} Master on Free Software
  • 48. Editting documents: tables There are several commands to draw lines alongside rows and columns: this is just a simple example of a table begin{tabular }{| rc | l |} hline hline this & i s j u s t & a simple c l i n e{1āˆ’2} example & & of a table hline hline end{tabular} Master on Free Software
  • 49. Editting documents: tables Same-row/-column cells can be combined: this is just table a simple example of begin{tabular }{| r | c | l |} hline multicolumn{2}{c}{t h i s i s j u s t} & multirow{2}{*}{table } c l i n e{1āˆ’2} a simple & example of & c l i n e{1āˆ’2} end{tabular} Master on Free Software
  • 50. Editting documents: tables Same-row/-column cells can be combined: this is just table a simple example of begin{tabular }{| r | c | l |} hline multicolumn{2}{c}{t h i s i s j u s t} & multirow{2}{*}{table } c l i n e{1āˆ’2} a simple & example of & c l i n e{1āˆ’2} end{tabular} usepackage{multirow} Master on Free Software
  • 51. Editting documents: tables Tabular is not a ļ¬‚oating environment, we use table to wrap it as such: this is just table a simple example of Table: Sample table begin{table }[hp ! ] TABLE DEFINITION HERE caption{Sample table} end{table} Master on Free Software
  • 52. Editting documents: tables Floating elements placement preference options: h preferred location is here b preferred location is page bottom t preferred location is page top p preferred location is exclusive page ! demands ļ¬‚exibility Table index: listoftables Master on Free Software
  • 53. Editting documents: images Images can be inserted using command includegraphics from package graphicx: includegraphics [ width=2cm]{ figures / sample . png} Master on Free Software
  • 54. Editting documents: images Includegraphics options: width = integer/decimal + unit height = integer/decimal + unit scale = scale factor (decimal) angle = rotate factor (0 ā‰„ |integer| ā‰„ 360) Useful commands: textheight textwidth columnwidth Master on Free Software
  • 55. Editting documents: images Includegraphics does not turn an image into a ļ¬‚oating element, ļ¬gure environment does: begin{figure }[hp ! ] IMAGE DEFINITION HERE caption{Sample image} end{figure} Figure: Sample image Image index: listofļ¬gures Master on Free Software
  • 56. Editting documents: images Image formats supported by includegraphics depend on the tool we use to produce the ļ¬nal document! dvips eps, ps dvipdf eps, jpg, pdf, png, ps pdļ¬‚atex jpg, png, pdf, tiff Master on Free Software
  • 57. Editting documents: references To include references in a L TEX document: A 1 Mark referrable elements with a label: label{label āˆ’name} ā€¢ enumerate items ā€¢ ļ¬‚oating elements with caption ā€¢ document sections ā€¢ (and pretty much anything with a number) 2 Refer to a label: ā€¢ element number ref{labelāˆ’name} ā€¢ element page number pageref{labelāˆ’name} Master on Free Software
  • 58. Editting documents: bibliographic references begin{thebibliography}{ZZ} bibitem{libroLaTeX} Bernardo Cascales Salinas . { itshape El l i b r o de LaTeX{}}. Prentice Hall , 2004. bibitem{iniciacionLaTeX} J a v i e r Sanguino Botella . { itshape I n i c i a c i o n a LaTeX{}}. Addisonāˆ’Wesley , 1997. end{thebibliography} References are made using cite{bibitemāˆ’label} Master on Free Software
  • 59. Editting documents: bibliographic references BibTEX is a complementary tool to L TEX which A ā€¢ allows an easier management of bibliographic reference sets ā€¢ integrates with L T X and automatically A E generates thebibliography environment 1 Create bibliographic references ļ¬le (.bib) 2 Include .bib ļ¬le usage in L TEX source ļ¬le A Master on Free Software
  • 60. Editting documents: bibliographic references Bibliographic references ļ¬le (.bib) format: @BOOK{libroLatex , author = {Cascales Salinas , Bernardo} , publisher = {Prentice Hall } , title = {El l i b r o de LaTeX{}}, year = {2004}} @ARTICLE{iniciacionLaTeX , author = {Sanguino Botella , J a v i e r } , title = {I n i c i a c i o n a LaTeX{}}, journal = {Addisonāˆ’Wesley Series } , year = {1997}} Master on Free Software
  • 61. Editting documents: bibliographic references BibTEX ļ¬le (sample.bib) usage in L TEX source: A bibliography{sample} bibliographystyle{bibliographyāˆ’style āˆ’name} plain numbered refs, alphabetic order unsrt numbered refs, citation order alpha alphanumeric refs, alphabetic order abbrv shortened version of plain Master on Free Software
  • 62. Editting documents: bibliographic references latex document . tex bibtex document . aux latex document . tex ā€¢ BibT X uses cites information in .aux E ā€¢ Only cited references will be part of the generated bibliography ā€¢ We can use nocite{bibitemāˆ’label}, to consider uncited references (or nocite*) Master on Free Software
  • 63. Conclusions L TEX is a very powerful tool which A ā€¢ automatizes many of the formatting tasks involved in producing a digital document ā€¢ generates high-quality results ā€¢ requires very lightweight source ļ¬les ā€¢ produces consistent output regardless of editor or platform Master on Free Software
  • 64. Conclusions We have learned to create a L TEX document, A ā€¢ choose the appropriate document class and/or modify its basic appearance, ā€¢ generate basic title pages, ā€¢ select font families, shapes, faces, sizes, alignment. . . , ā€¢ insert lists, notes, tables, images, references, bibliography, and deliver a standard, safe version (PS/PDF). Master on Free Software
  • 65. L TEX references A El libro de L TEX. A Bernardo Cascales Salinas et al. Prentice Hall, 2004. IniciaciĆ³n a L TEX 2Īµ . A Un sistema para preparar documentos. Javier Sanguino Botella. Addison-Wesley, 1997. Una descripciĆ³n de L TEX 2Īµ . A Toms Bautista et al. www.lsi.upc.es/~eipec/pdf/ldesc2e.pdf Master on Free Software
  • 66. L TEX references A The Comprehensive TEX Archive Network (CTAN) www.ctan.org L TEX ā€“ A document preparation system A www.latex-project.org CervanTEX: Grupo de usuarios hispanohablantes de TEX www.cervantex.es Master on Free Software
  • 67. Advanced topics: what do you want to know? How do I. . . ? ā€¢ structure a document in different ļ¬les? ā€¢ set up my own customized title page? ā€¢ arrange text into columns? ā€¢ change the headings of a document? ā€¢ customize the margins in a document? Master on Free Software
  • 68. Advanced topics: what do you want to know? ā€¢ adjust spacing? ā€¢ personalize an itemize list? ā€¢ use color in text or tables? ā€¢ write a letter? ā€¢ create a slide presentation? Master on Free Software
  • 69. How to: structure a ļ¬le (physically) input{ f i l e . tex} include{ f i l e } Diferences: ā€¢ include assumes .tex ļ¬le extension ā€¢ include starts over in a new page ā€¢ include cannot be nested ā€¢ for each included ļ¬le, a .aux is generated Master on Free Software
  • 70. How to: create your title page To create a customized front/title page: begin{titlepage} TITLE PAGE DEFINITION HERE end{titlepage} Master on Free Software
  • 71. How to: set up columns Whole document: documentclass[twocolumn]{...} Document portion: usepackage{multicol} begin{multicols}{3} This text i s automatically rearranged into a many columns as stated in the argument of the multicols environment . end{multicols} This text is into as many argument of automatically columns as the multicols rearranged stated in the environment. Master on Free Software
  • 72. How to: change headings Customizable page style myheadings, enables use of markright{right āˆ’header} markboth{ l e f t āˆ’header}{right āˆ’header} in preamble (default values match headings). Useful commands: thesection, sectionname For more complex customization: usepackage{fancyhdr}, usepackage{titleref} Master on Free Software
  • 73. How to: customize margins Easiest way: usepackage{anysize} enables use of marginsize{ l e f t }{r i g h t}{top}{bottom} in preamble. Master on Free Software
  • 74. How to: mess with spacing Change line spacing: usepackage{setspace} singlespacing onehalfspacing doublespacing Introduce page changes: newpage clearpage cleardoublepage Introduce blank spaces: hspace{length} vspace{length} To ļ¬ll in space: hfill dotfill hrulefill vfill Master on Free Software
  • 75. How to: personalize lists Customizable list environment: list ā™£ list ā™£ with customized ā™£ symbol begin{ l i s t }{$ clubsuit$}{} item l i s t item with customized item symbol end{ l i s t } Master on Free Software
  • 76. How to: use color Using package color we can: text textcolor{green}{text} background colorbox{green}{background} Predeļ¬ned colors: white, black, red, blue, green, cyan, magenta, yellow Deļ¬ne colors: deļ¬necolor{colorāˆ’name}{schema}{speciļ¬cation} Master on Free Software
  • 77. How to: use color Using package color we can: text textcolor{green}{text} background colorbox{green}{background} Predeļ¬ned colors: white, black, red, blue, green, cyan, magenta, yellow gray|rgb|RGB|HTML|cmyk Deļ¬ne colors: deļ¬necolor{colorāˆ’name}{schema}{speciļ¬cation} Master on Free Software
  • 78. How to: use color this is just a simple example of a table begin{tabular }{| rc |>{columncolor{green}} l |} hline hline rowcolor{green} t h i s & i s j u s t & a simple c l i n e{1āˆ’2} example & & of a table hline hline end{tabular} Master on Free Software
  • 79. How to: use color this is just a simple example of a table begin{tabular }{| rc |>{columncolor{green}} l |} hline hline rowcolor{green} t h i s & i s j u s t & a simple c l i n e{1āˆ’2} example & & of a table hline hline end{tabular} Master on Free Software
  • 80. How to: create letters documentclass{ l e t t e r } begin{document} begin{ l e t t e r }{Chalmers University} opening{To Whom i t May Concern:} Please consider the following . . . signature{Laura M. Castro} closing{Sincerely ,} end{ l e t t e r } end{document} Master on Free Software
  • 81. How to: create slides ā€¢ First L T X document class aimed for slide A E presentations: slides ā€¢ Each slide: begin{s l i d e}{ T i t l e } SLIDE CONTENTS end{s l i d e} ā€¢ Poor results ā€¢ No ļ¬‚exibility, no customizability Master on Free Software
  • 82. How to: create slides ā€¢ One of the ļ¬rst alternatives: Prosper ā€¢ Best result/effort ration ā€¢ documentclass{prosper}, environment slides ā€¢ Predeļ¬ned designs (document option): alienglow autumn azure contemporain darkblue frames lignesbleues nuancegris troispoints gyom rico ā€¢ Still low customization level, no dynamism Master on Free Software
  • 83. How to: create slides ā€¢ 3rd tool generation: Beamer ā€¢ The most ļ¬‚exible, powerful, popular ā€¢ Class beamer, environment frame begin{frame}{ T i t l e }{S u b t i t l e} begin{itemize} item One item Two item Three end{itemize} end{frame} Master on Free Software