LaTeX Beginners Guide

Book description

When there’s a scientific or technical paper to write, the versatility of LaTeX is very attractive. But where can you learn about the software? The answer is this superb beginner’s guide, packed with examples and explanations.

  • Use LaTeX's powerful features to produce professionally designed texts
  • Install LaTeX; download, set up, and use additional styles, templates, and tools
  • Typeset math formulas and scientific expressions to the highest standards
  • Include graphics and work with figures and tables
  • Benefit from professional fonts and modern PDF features

In Detail

LaTeX is high-quality Open Source typesetting software that produces professional prints and PDF files. However, as LaTeX is a powerful and complex tool, getting started can be intimidating. There is no official support and certain aspects such as layout modifications can seem rather complicated. It may seem more straightforward to use Word or other WYSIWG programs, but once you've become acquainted, LaTeX's capabilities far outweigh any initial difficulties. This book guides you through these challenges and makes beginning with LaTeX easy. If you are writing Mathematical, Scientific, or Business papers, or have a thesis to write, then this is the perfect book for you.

LaTeX Beginner's Guide offers you a practical introduction to LaTeX with plenty of step-by-step examples. Beginning with the installation and basic usage, you will learn to typeset documents containing tables, figures, formulas, and common book elements like bibliographies, glossaries, and indexes and go on to managing complex documents and using modern PDF features. It's easy to use LaTeX, when you have LaTeX Beginner's Guide to hand.

This practical book will guide you through the essential steps of LaTeX, from installing LaTeX, formatting, and justification to page design. Right from the beginning, you will learn to use macros and styles to maintain a consistent document structure while saving typing work. You will learn to fine-tune text and page layout, create professional looking tables as well as include figures and write complex mathematical formulas. You will see how to generate bibliographies and indexes with ease. Finally you will learn how to manage complex documents and how to benefit from modern PDF features. Detailed information about online resources like software archives, web forums, and online compilers completes this introductory guide. It's easy to use LaTeX, when you have LaTeX Beginner's Guide to hand.

Create professional-looking texts, articles, and books for Business and Science

Table of contents

  1. LaTeX
    1. Table of Contents
    2. LaTeX
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Time for action - heading
        1. What just happened?
        2. Pop quiz
        3. Have a go hero - heading
      6. Reader feedback
      7. Customer support
      8. Downloading the example code
        1. Errata
        2. Piracy
        3. Questions
    8. 1. Getting Started with LaTeX
      1. What is LaTeX?
        1. How we can benefit
        2. The virtues of open source
        3. Separation of form and content
        4. Portability
        5. Protection for your work
        6. Comparing it to word processor software
        7. What are the challenges?
      2. Installing LaTeX
      3. Time for action – installing TeX Live using the net installer wizard
        1. What just happened?
      4. Time for action – installing TeX Live offline
        1. What just happened?
        2. Installation on other operating systems
      5. Creating our first document
      6. Time for action – writing our first document with TeXworks
        1. What just happened?
        2. Have a go hero – checking out advanced LaTeX editors
      7. Summary
    9. 2. Formatting Words, Lines, and Paragraphs
      1. Understanding logical formatting
      2. Time for action – titling your document
        1. What just happened?
        2. Exploring the document structure
        3. Understanding LaTeX commands
      3. How LaTeX reads your input
      4. Time for action – trying out the effect of spaces, line breaks, and empty lines
        1. What just happened?
        2. Commenting your source text
        3. Printing out special symbols
      5. Time for action – writing special characters in our text
        1. What just happened?
      6. Formatting text – fonts, shapes, and styles
      7. Time for action – tuning the font shape
        1. What just happened?
        2. Choosing the font family
      8. Time for action – switching to sans-serif and to typewriter fonts
        1. What just happened?
        2. Switching fonts
      9. Time for action – switching the font family
        1. What just happened?
        2. Summarizing font commands and declarations
        3. Delimiting the effect of commands
      10. Time for action – exploring grouping by braces
        1. What just happened?
      11. Time for action – exploring font sizes
        1. What just happened?
        2. Using environments
      12. Time for action – using an environment to adjust the font size
        1. What just happened?
      13. Saving time and effort – creating your own commands
      14. Time for action – creating our first command using it as anabbreviation
        1. What just happened?
        2. Gentle spacing after commands
      15. Time for action – adding intelligent spacing to command output
        1. What just happened?
        2. Creating more universal commands – using arguments
      16. Time for action – creating a macro for formatting keywords
        1. What just happened?
        2. Using optional arguments
      17. Time for action – marking keywords with optional formatting
        1. What just happened?
        2. Pop quiz – commands
        3. Have a go hero – saving effort using optional arguments
      18. Using boxes to limit the width of paragraphs
      19. Time for action – creating a narrow text column
        1. What just happened?
        2. Common paragraph boxes
        3. Have a go hero – exploring further features of \parbox
        4. Boxes containing more text
      20. Time for action – using the minipage environment
        1. What just happened?
        2. Have a go hero – creating a footnote inside a minipage
        3. Understanding environments
      21. Breaking lines and paragraphs
        1. Improving hyphenation
      22. Time for action – stating division points for words
        1. What just happened?
        2. Have a go hero – exploiting the hyphenat package
        3. Improving the justification further
      23. Time for action – using microtype
        1. What just happened?
        2. Breaking lines manually
      24. Time for action – using line breaks
        1. What just happened?
        2. Have a go hero – exploring line breaking options
        3. Preventing line breaks
        4. Managing line breaks wisely
      25. Exploring the fine details
      26. Time for action – exploring ligatures
        1. What just happened?
        2. Understanding ligatures
        3. Choosing the right dash
        4. Setting dots
      27. Time for action – using differently spaced dots
        1. What just happened?
      28. Time for action – comparing dots to ellipsis
        1. What just happened?
        2. Setting accents
      29. Time for action – experimenting with accents
        1. What just happened?
        2. Using special characters directly in the editor
      30. Time for action – using accents directly
        1. What just happened?
      31. Turning off full justification
      32. Time for action – justifying a paragraph to the left
        1. What just happened?
        2. Creating ragged-left text
      33. Time for action – centering a title
        1. What just happened?
        2. Using environments for justification
      34. Time for action – centering verses
        1. What just happened?
      35. Displaying quotes
      36. Time for action – quoting a scientist
        1. What just happened?
        2. Quoting longer text
      37. Time for action – quoting TeX's benefits
        1. What just happened?
      38. Time for action – spacing between paragraphs instead of indentation
        1. What just happened?
        2. Pop quiz – lines and paragraphs
      39. Summary
    10. 3. Designing Pages
      1. Defining the overall layout
      2. Time for action – writing a book with chapters
        1. What just happened?
        2. Reviewing LaTeX's default page layout
        3. Defining the margins yourself
      3. Time for action – specifying margins
        1. What just happened?
        2. Using the geometry package
          1. Choosing the paper size
          2. Specifying the text area
          3. Setting the margins
        3. Obtaining package documentation
      4. Time for action – finding the geometry package manual
        1. What just happened?
        2. Have a go hero – constructing the page layout with typearea
        3. Changing the line spacing
      5. Time for action – increasing line spacing
        1. What just happened?
        2. Have a go hero – examining a package source file
      6. Using class options to configure the document style
      7. Time for action – creating a two-column landscape document
        1. What just happened?
        2. Have a go hero – trying KOMA-Script classes
      8. Creating a table of contents
      9. Time for action – adding a table of contents
        1. What just happened?
        2. Sectioning and the contents
      10. Time for action – shortening the table of content entries
        1. What just happened?
      11. Designing headers and footers
      12. Time for action – customizing headers with the fancyhdr package
        1. What just happened?
        2. Understanding page styles
        3. Customizing header and footer
        4. Using decorative lines in header or footer
        5. Changing LaTeX's header marks
      13. Breaking pages
      14. Time for action – inserting page breaks
        1. What just happened?
        2. Have a go hero – exploring page breaking options
      15. Enlarging a page
      16. Time for action – sparing an almost empty page
        1. What just happened?
      17. Using footnotes
      18. Time for action – using footnotes in text and in headings
        1. What just happened?
        2. Modifying the dividing line
      19. Time for action – redefining the footnote line
        1. What just happened?
        2. Using packages to expand footnote styles
        3. Pop quiz
      20. Summary
    11. 4. Creating Lists
      1. Building a bulleted list
      2. Time for action – listing LaTeX packages
        1. What just happened?
        2. Nesting lists
      3. Time for action – listing packages by topic
        1. What just happened?
      4. Creating a numbered list
      5. Time for action – writing a step-by-step tutorial
        1. What just happened?
      6. Customizing lists
        1. Saving space with compact lists
      7. Time for action – shrinking our tutorial
        1. What just happened?
        2. Choosing bullets and numbering format
      8. Time for action – modifying lists using enumitem
        1. What just happened?
        2. Suspending and continuing lists
      9. Producing a definition list
      10. Time for action – explaining capabilities of packages
        1. What just happened?
        2. Have a go hero – adjusting the dimensions of lists
        3. Pop quiz
      11. Summary
    12. 5. Creating Tables and Inserting Pictures
      1. Writing in columns
      2. Time for action – lining up information using the tabbing environment
        1. What just happened?
      3. Time for action – lining up font commands
        1. What just happened?
      4. Typesetting tables
      5. Time for action – building a table of font family commands
        1. What just happened?
        2. Drawing lines in tables
        3. Understanding formatting arguments
        4. Increasing the row height
        5. Beautifying tables
      6. Time for action – adding nicer horizontal lines with the booktabs package
        1. What just happened?
        2. Have a go hero – adjusting lengths
        3. Spanning entries over multiple columns
      7. Time for action – merging cells
        1. What just happened?
        2. Inserting code column-wise
      8. Time for action – using the array package
        1. What just happened?
        2. Spanning entries over multiple rows
      9. Time for action – merging cells using the multirow package
        1. What just happened?
        2. Adding captions to tables
      10. Time for action – adding a caption to our font table
        1. What just happened?
        2. Placing captions above
        3. Have a go hero – customizing captions
        4. Auto-fitting columns to the table width
        5. Generating multi-page tables
        6. Coloring tables
        7. Using landscape orientation
        8. Aligning columns at the decimal point
        9. Handling narrow columns
        10. Pop quiz – tables
      11. Inserting pictures
      12. Time for action – including a picture
        1. What just happened?
        2. Scaling pictures
        3. Choosing the optimal file type
        4. Including whole pages
        5. Putting images behind the text
      13. Managing floating environments
      14. Time for action – letting a figure float
        1. What just happened?
        2. Understanding float placement options
        3. Forcing the output of floats
        4. Limiting floating
        5. Avoiding floating at all
        6. Spanning figures and tables over text columns
        7. Letting text flow around figures
      15. Time for action – embedding a picture within text
        1. What just happened?
        2. Breaking figures and tables into pieces
        3. Pop quiz – pictures and floats
      16. Summary
    13. 6. Cross-Referencing
      1. Setting labels and referencing
      2. Time for action – referencing items of a top list
        1. What just happened?
        2. Assigning a key
        3. Referring to a key
        4. Referring to a page
      3. Producing intelligent page references
      4. Time for action – introducing variable references
        1. What just happened?
        2. Fine-tuning page references
        3. Referring to page ranges
        4. Using automatic reference names
      5. Time for action – referring cleverly
        1. What just happened?
        2. Combing cleveref and varioref
        3. Referring to labels in other documents
        4. Have a go hero – turning references into hyperlinks
        5. Pop quiz
      6. Summary
    14. 7. Listing Content and References
      1. Customizing the table of contents
      2. Time for action – refining an extensive table of contents
        1. What just happened?
        2. Adjusting the depth of the TOC
        3. Shortening entries
        4. Adding entries manually
      3. Creating and customizing lists of figures
      4. Time for action – creating a list of diagrams
        1. What just happened?
      5. Creating a list of tables
      6. Using packages for customization
      7. Generating an index
      8. Time for action – marking words and building the index
        1. What just happened?
        2. Defining index entries and subentries
        3. Specifying page ranges
        4. Using symbols and macros in the index
        5. Referring to other index entries
        6. Fine-tuning page numbers
        7. Designing the index layout
      9. Creating a bibliography
      10. Time for action – citing texts and listing the references
        1. What just happened?
        2. Using the standard bibliography environment
        3. Using bibliography databases with BibTeX
      11. Time for action – creating and using a BibTeX database
        1. What just happened?
        2. Looking at the BibTeX entry fields
        3. Understanding BibTeX entry types
        4. Choosing the bibliography style
        5. Listing references without citing
      12. Changing the headings
        1. Have a go hero – using natbib
        2. Pop quiz
      13. Summary
    15. 8. Typing Math Formulas
      1. Writing basic formulas
      2. Time for action – discussing quadratic equations and roots
        1. What just happened?
        2. Embedding math expressions within text
        3. Displaying formulas
        4. Numbering equations
        5. Adding subscripts and superscripts
        6. Extracting roots
        7. Writing fractions
        8. Greek letters
        9. Script letters
        10. Producing an ellipsis
        11. Comparing in-line formulas to displayed formulas
        12. Changing the font, style, and size
      3. Customizing displayed formulas
      4. Time for action – typesetting multi-line formulas
        1. What just happened?
        2. Aligning multi-line equations
        3. Numbering rows in multi-line formulas
        4. Inserting text into formulas
      5. Fine-tuning formulas
        1. Using operators
        2. Exploring the wealth of math symbols
          1. Binary operation symbols
          2. Binary relation symbols
          3. Inequality relation symbols
          4. Subset and superset symbols
          5. Variable sized operators
          6. Arrows
          7. Harpoons
          8. Symbols derived from letters
          9. Variable sized delimiters
          10. Miscellaneous symbols
        3. Writing units
      6. Building math structures
        1. Creating arrays
        2. Writing binomial coefficients:
        3. Typesetting matrices
      7. Stacking expressions
        1. Underlining and overlining
        2. Setting accents
        3. Putting a symbol above another
      8. Writing theorems and definitions
        1. Have a go hero – checking out the mathtools package
        2. Pop quiz
      9. Summary
    16. 9. Using Fonts
      1. Preparing the encoding
      2. Time for action – directly using special characters
        1. What just happened?
      3. Installing additional fonts
      4. Choosing the main font
      5. Time for action – comparing Computer Modern to Latin Modern
        1. What just happened?
        2. Loading font packages
          1. Latin Modern – a replacement for the standard font
          2. Kp-fonts – a full set of fonts
        3. Serif fonts
          1. Times Roman
          2. Charter
          3. Palatino
          4. Bookman
          5. New Century Schoolbook
          6. Concrete Roman
        4. Sans-serif fonts
          1. Helvetica
          2. Bera Sans
          3. Computer Modern Bright
          4. Kurier
        5. Typewriter fonts
          1. Courier
          2. Inconsolata
          3. Bera Mono
      6. Exploring the world of LaTeX fonts
        1. Pop quiz
      7. Summary
    17. 10. Developing Large Documents
      1. Splitting the input
      2. Time for action – swapping out preamble and chapter contents
        1. What just happened?
        2. Including small pieces of code
        3. Including bigger parts of a document
        4. Compiling parts of a document
      3. Creating front and back matter
      4. Time for action – adding a dedication and an appendix
        1. What just happened?
      5. Designing a title page
      6. Time for action – creating a title page
        1. What just happened?
      7. Working with templates
      8. Time for action – starting with a template
        1. What just happened?
        2. Have a go hero – evaluating and enhancing templates
        3. Pop quiz
      9. Summary
    18. 11. Enhancing Your Documents Further
      1. Using hyperlinks and bookmarks
      2. Time for action – adding hyperlinks
        1. What just happened?
      3. Time for action – customizing the hyperlink appearance
        1. What just happened?
      4. Time for action – editing PDF metadata
        1. What just happened?
        2. Creating hyperlinks manually
        3. Creating bookmarks manually
          1. Math formulas and special symbols in bookmarks
      5. Benefitting from other packages
      6. Time for action – visiting the TeX Catalogue Online
        1. What just happened?
      7. Time for action – installing a LaTeX package
        1. What just happened?
      8. Designing headings
      9. Time for action – designing chapter and section headings
        1. What just happened?
      10. Coloring your document
        1. Have a go hero – creating colorful tables
        2. Pop quiz
      11. Summary
    19. 12. Troubleshooting
      1. Understanding and fixing errors
      2. Time for action – interpreting and fixing an error
        1. What just happened?
        2. Using commands and environments
        3. Writing math formulas
        4. Handling the preamble and document body
        5. Working with files
        6. Creating tables and arrays
        7. Working with lists
        8. Working with floating figures and tables
        9. General syntax errors
      3. Handling warnings
      4. Time for action – emphasizing on a sans-serif font
        1. What just happened?
        2. Justifying text
        3. Referencing
        4. Choosing fonts
        5. Placing figures and tables
        6. Customizing the document class
      5. Avoiding obsolete classes and packages
      6. General troubleshooting
        1. Have a go hero – examining LaTeX's log files
        2. Pop quiz – troubleshooting
      7. Summary
    20. 13. Using Online Resources
      1. Web forums, discussion boards, and Q&A sites
        1. Usenet groups
          1. comp.text.tex
          2. Newsgroups in other languages
        2. Web forums
          1. LaTeX-Community.org
          2. TeX and LaTeX on Stack Exchange
      2. Time for action – asking a question online
        1. What just happened?
      3. Frequently Asked Questions
        1. UK TeX FAQ
        2. Visual LaTeX FAQ
        3. MacTeX FAQ
        4. AMS-Math FAQ
        5. LaTeX Picture FAQ
      4. Mailing lists
        1. texhax
        2. tex-live
        3. texworks
        4. List collections
      5. TeX user group sites
        1. TUG – the TeX users group
        2. The LaTeX project
        3. UK TUG – TeX in the United Kingdom
        4. Local user groups
      6. Homepages of LaTeX software and editors
        1. LaTeX distributions
        2. LaTeX editors
          1. Cross-platform
          2. Windows
          3. Linux
          4. Mac OS X
      7. LaTeX archives and catalogs
        1. CTAN – the Comprehensive TeX Archive Network
        2. The TeX Catalogue Online
        3. The LaTeX Font Catalogue
        4. TeX Resources on the Web
      8. Friends of LaTeX
        1. XeTeX
        2. LuaTeX
        3. ConTeXt
        4. LyX
      9. LaTeX blogs
        1. The TeXblog
        2. Some TeX Developments
        3. LaTeX Alive
        4. LaTeX for Humans
        5. The TeX community aggregator
      10. Summary
    21. A. Pop Quiz Answers
      1. Chapter 2: Formatting Words, Lines, and Paragraphs
        1. Commands
        2. Lines and paragraphs
      2. Chapter 3: Designing Pages
      3. Chapter 4: Creating Lists
      4. Chapter 5: Creating Tables and Inserting Pictures
        1. Tables
        2. Pictures and floats
      5. Chapter 6: Cross-Referencing
      6. Chapter 7: Listing Content and References
      7. Chapter 8: Typing Math Formulas
      8. Chapter 9: Using Fonts
      9. Chapter 10: Developing Large Documents
      10. Chapter 11: Enhancing Your Documents Further
      11. Chapter 12: Troubleshooting
    22. Index

Product information

  • Title: LaTeX Beginners Guide
  • Author(s): Stefan Kottwitz
  • Release date: March 2011
  • Publisher(s): Packt Publishing
  • ISBN: 9781847199867