
The best Latex editor ▋
LaTeX Tutorial — Lesson 1
Introduction to LaTeX and Basic Syntax
Lesson 1: Introduction to LaTeX and Basic Syntax
Welcome to your first lesson in learning LaTeX with Crixet — your online editor for writing and compiling LaTeX documents with ease. In this lesson, we’ll introduce what LaTeX is, why it’s so widely used, and how to create your very first LaTeX document. We'll also walk through the basic syntax you'll use throughout the rest of the course.
What Is LaTeX?
LaTeX is a markup-based document preparation system. You can think of it like writing code for documents: you mix regular text with special commands (which start with a backslash \
) to define how that text should be formatted.
Instead of adjusting fonts and spacing manually, you simply focus on writing. LaTeX — and in our case, pdfLaTeX — takes care of the formatting when you compile the document. This results in a professional, consistent PDF output.
Why Use LaTeX?
Here are a few reasons why LaTeX stands out:
High-quality typesetting
Perfect for academic papers, resumes, books, and reports with a polished, professional look.Great for complex content
Handles math, tables, citations, and figures with ease — things that are cumbersome in traditional word processors.Automatic numbering and referencing
Sections, tables, and equations are numbered automatically and can be referenced anywhere in your document.Separation of content and style
You write once, and you can change the whole look later by swapping templates or adding a package.Extensibility
Thousands of packages are available to add new features — which we’ll explore in later lessons.
Your First LaTeX Document
Let’s start by writing a simple "Hello, World!" program in LaTeX.
Paste the following code into your Crixet editor and compile it:
What’s Happening Here?
Line | Purpose |
---|---|
\documentclass{article} | Sets the document type to |
\begin{document} | Marks the start of the document content. |
Hello, World! | This is your plain text content. |
\end{document} | Marks the end of the document. Everything after this is ignored. |
Once you compile this using pdfLaTeX on Crixet, you’ll see a clean PDF with “Hello, World!” typeset at the top of the page, complete with default margins and page numbers. LaTeX automatically takes care of spacing and layout, so you can focus purely on writing.
✅ Congratulations! You’ve written your first LaTeX document.
Basic LaTeX Syntax & Tips
Here are some important concepts to help you understand LaTeX better:
Commands
LaTeX commands begin with a backslash \
and often take arguments in curly braces {}
.
Example:
→ makes bold text.
Special Characters
Some characters have special meanings in LaTeX and must be escaped to display them:
Character | Use in LaTeX | How to display |
---|---|---|
| Comment line |
|
| Math mode |
|
| Column separator in tables |
|
| Used in macros |
|
| Subscript in math |
|
| Superscript in math |
|
| Grouping content |
|
| Non-breaking space |
|
| Starts a command |
|
Whitespace and Line Breaks
Multiple spaces or single line breaks in your code are treated as a single space in the output.
To start a new paragraph, leave a blank line.
To force a line break without starting a new paragraph, use
\\
(sparingly).
The Preamble
The area before \begin{document}
is called the preamble. It sets up your document, including:
Document class
Packages
Global settings (e.g., fonts, margins, metadata)
We’ll expand the preamble in future lessons.
Compiling with Crixet
Crixet automatically compiles your document using pdfLaTeX, the industry-standard LaTeX compiler. That means:
You don’t need to install anything.
You don’t have to choose a compiler — only pdfLaTeX is supported.
Your output is always a beautifully typeset PDF.
Just write, hit Compile, and enjoy your results.
Try This
Experiment by modifying your document:
Compile again and see how LaTeX formats the new content. Try adding your own lines, exploring how paragraphs and spacing behave.
What’s Next?
In the next lesson, we’ll look at how to structure your document with sections, lists, and paragraphs — the building blocks for writing full documents in LaTeX.
Ready to move on?
Let’s build out your document's structure in Lesson 2.