📄

Introduction to LaTeX Typesetting

Aug 8, 2024

LaTeX Tutorial Notes

Introduction to LaTeX

  • LaTeX is a typesetting system used for creating professional-looking documents, particularly in academia and scientific publishing.
  • Focuses on content rather than appearance.
  • Instructor: Michelle Crummell, experienced teacher with multiple mathematics degrees.

Getting Started with LaTeX

  • LaTeX is a markup language for consistent document formatting, especially for mathematical notation.
  • Common uses include papers, tests, quizzes, homework assignments, slide presentations, and letters of recommendation.

Advantages of LaTeX

  • Cross-platform compatibility.
  • Backwards compatible.
  • Produces small PDF files that can be opened on any device.
  • Free, open-source, and highly customizable.

Working Online vs Offline

  • Online (e.g., Overleaf):
    • No software installation or updates needed.
    • Allows real-time collaboration.
  • Offline:
    • Full control over file organization.
    • No internet connection required.

Using Overleaf

  1. Create an account on Overleaf.
  2. Log in to create or manage projects.
  3. Click "Create New Project" > "Blank Project".
  4. Name your project (e.g., "Tutorial 1").

Basic Document Structure in Overleaf

  • The project structure consists of:
    • File Structure Panel: Displays your project files.
    • Code Editor Panel: Where you write your LaTeX code.
    • PDF Output Panel: Displays the compiled document.

Compiling Documents

  • To see changes, you must click "Recompile" after editing the code.
  • The output will not update automatically; you need to compile for changes to appear.

Basic LaTeX Code

  • Document Class: \documentclass[11pt]{article}
  • Beginning and Ending Document: \begin{document} and \end{document}.
  • Example: \documentclass[11pt]{article} \begin{document} Hello, this is my first LaTeX document. \end{document}

Essential Commands

  • Document Class:
    • \documentclass{type} (e.g., article, report).
  • Sections:
    • Use \section{Title} for sections and \subsection{Title} for subsections.

Math Mode

  • Enter Math Mode with $...$ for inline math, or \[...\] for display math.
  • Commands for common math symbols (e.g., \frac{...}{...}, \sqrt{...}, \int, \sum).

Formatting and Customization

  • Font Styles:
    • \textbf{...} for bold, \textit{...} for italics.
  • Font Sizes:
    • Use commands like \large, \small, \footnotesize.
  • Justification:
    • Use \begin{center}...\end{center}, \begin{flushleft}...\end{flushleft}, or \begin{flushright}...\end{flushright}.

Including Packages

  • Packages extend LaTeX capabilities. E.g., \usepackage{geometry} for margin adjustments.
  • Always load packages in the preamble before \begin{document}.

Debugging in LaTeX

  • Common errors include:
    • Missing $ for Math Mode.
    • Unmatched braces {} or parentheses ().
    • Ensure all \begin{...} commands have a matching \end{...}.
  • Use line numbers and error messages to troubleshoot.
  • Comment out sections of code to isolate errors.

Using Tech Maker vs. Overleaf

  • Tech Maker:
    • Local installation, integrates with local file system.
    • Use keyboard shortcuts (e.g., F1 to compile).
  • Overleaf:
    • Cloud-based, easy to share and collaborate.
    • Requires internet connection; use link sharing for collaboration.

Tips for Tech Maker User Interface

  • Use the structure panel to manage files.
  • Utilize the symbol menu for easy insertion of common symbols.
  • Adjust preferences for margin sizes and editor functions.
  • Use user tags for frequently used snippets of code.

Conclusion

  • LaTeX is a powerful tool for typesetting documents, especially in academic settings. Familiarize yourself with the basics, practice formatting, and utilize resources and packages to enhance your documents.