> ## Documentation Index
> Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Start Learning LaTeX in 2026

> A companion guide for choosing the right tools, workflow, and next steps when you start learning LaTeX in 2026.

export const RenderedOutput = ({title = "Rendered output", ctaHref, ctaLabel = "Open LaTeX Cloud Studio", children}) => {
  const [isExpanded, setIsExpanded] = useState(false);
  const trackEditorCta = () => {
    const target = new URL(ctaHref, window.location.href);
    globalThis.posthog?.capture?.("docs_app_cta_clicked", {
      source_page: window.location.pathname,
      source_section: "rendered_output",
      cta_variant: "first_compiled_example",
      target_url: target.toString(),
      target_utm_source: target.searchParams.get("utm_source"),
      target_utm_medium: target.searchParams.get("utm_medium"),
      target_utm_campaign: target.searchParams.get("utm_campaign"),
      target_utm_content: target.searchParams.get("utm_content")
    }, {
      transport: "sendBeacon",
      send_instantly: true
    });
  };
  return <details className="rendered-output" onToggle={event => setIsExpanded(event.currentTarget.open)}>
      <summary className="rendered-output__summary">
        <span className="rendered-output__title">{title}</span>
        <span className="rendered-output__hint" aria-hidden="true">View compiled result</span>
      </summary>
      {isExpanded && <div className="rendered-output__content">
          {children}
          {ctaHref && <aside className="rendered-output__cta" aria-label="Continue in the LaTeX editor">
              <span>
                <strong>Ready to use this syntax?</strong>
                Continue in the browser editor when you want to adapt the example in a real project.
              </span>
              <a href={ctaHref} onClick={trackEditorCta}>{ctaLabel}<span aria-hidden="true"> →</span></a>
            </aside>}
        </div>}
    </details>;
};

export const LatexSource = ({filename, source}) => {
  const [copyStatus, setCopyStatus] = useState("Copy");
  const copySource = async () => {
    try {
      await navigator.clipboard.writeText(source);
      setCopyStatus("Copied");
    } catch {
      setCopyStatus("Select and copy");
    }
  };
  return <figure className="latex-source">
      <figcaption className="latex-source__header">
        <span className="latex-source__filename">{filename}</span>
        <button type="button" className="latex-source__copy" onClick={copySource} aria-live="polite">
          {copyStatus}
        </button>
      </figcaption>
      <pre className="latex-source__pre" aria-label={`LaTeX source: ${filename}`} tabIndex="0">
        <code className="language-latex">{source}</code>
      </pre>
    </figure>;
};

export const LatexPreview = ({src, alt, caption, width, height}) => {
  const minZoom = 1;
  const maxZoom = 3;
  const zoomStep = 0.5;
  const measureSvgContent = async (assetSrc, pageWidth, pageHeight) => {
    const cacheKey = "__latexCloudSvgContentBoxCache";
    const contentBoxCache = globalThis[cacheKey] ?? new Map();
    globalThis[cacheKey] = contentBoxCache;
    if (contentBoxCache.has(assetSrc)) return contentBoxCache.get(assetSrc);
    const measurement = (async () => {
      const assetUrl = new URL(assetSrc, window.location.href);
      if (assetUrl.origin !== window.location.origin) {
        throw new Error("Rendered output must use a same-origin SVG asset.");
      }
      const response = await fetch(assetUrl, {
        credentials: "same-origin"
      });
      if (!response.ok) throw new Error(`Rendered output request failed with ${response.status}.`);
      const source = await response.text();
      const documentNode = new DOMParser().parseFromString(source, "image/svg+xml");
      if (documentNode.querySelector("parsererror")) throw new Error("Rendered output is not valid SVG.");
      const sourceSvg = documentNode.documentElement;
      sourceSvg.querySelectorAll("script, foreignObject").forEach(node => node.remove());
      [sourceSvg, ...sourceSvg.querySelectorAll("*")].forEach(node => {
        [...node.attributes].forEach(attribute => {
          if ((/^on/i).test(attribute.name)) node.removeAttribute(attribute.name);
          if ((attribute.name === "href" || attribute.name === "xlink:href") && !attribute.value.startsWith("#")) {
            node.removeAttribute(attribute.name);
          }
        });
      });
      const measurementHost = document.createElement("div");
      measurementHost.className = "latex-preview__measurement-host";
      const measuredSvg = document.importNode(sourceSvg, true);
      measuredSvg.setAttribute("aria-hidden", "true");
      measurementHost.appendChild(measuredSvg);
      document.body.appendChild(measurementHost);
      try {
        const measuredElements = [...measuredSvg.children].filter(node => !["defs", "desc", "metadata", "style", "title"].includes(node.tagName.toLowerCase()));
        const elementBounds = measuredElements.map(node => node.getBBox()).filter(box => [box.x, box.y, box.width, box.height].every(Number.isFinite) && box.width > 0 && box.height > 0);
        if (elementBounds.length === 0) {
          throw new Error("Rendered output has no measurable visible content.");
        }
        const sortedBounds = [...elementBounds].sort((left, right) => left.y - right.y);
        const clusterGap = pageHeight * 0.045;
        const clusters = [];
        sortedBounds.forEach(box => {
          const current = clusters[clusters.length - 1];
          if (!current || box.y - current.bottom > clusterGap) {
            clusters.push({
              boxes: [box],
              bottom: box.y + box.height
            });
            return;
          }
          current.boxes.push(box);
          current.bottom = Math.max(current.bottom, box.y + box.height);
        });
        const contentClusters = clusters.filter(cluster => {
          const clusterBox = cluster.boxes.reduce((combined, box) => {
            const right = Math.max(combined.x + combined.width, box.x + box.width);
            const bottom = Math.max(combined.y + combined.height, box.y + box.height);
            const x = Math.min(combined.x, box.x);
            const y = Math.min(combined.y, box.y);
            return {
              x,
              y,
              width: right - x,
              height: bottom - y
            };
          });
          const centerY = clusterBox.y + clusterBox.height / 2;
          const isMarginFurniture = cluster.boxes.length <= 2 && clusterBox.width < pageWidth * 0.2 && clusterBox.height < pageHeight * 0.04 && (centerY < pageHeight * 0.08 || centerY > pageHeight * 0.8);
          return !isMarginFurniture;
        });
        const visibleBounds = (contentClusters.length > 0 ? contentClusters : clusters).flatMap(cluster => cluster.boxes);
        const bounds = visibleBounds.reduce((combined, box) => {
          const right = Math.max(combined.x + combined.width, box.x + box.width);
          const bottom = Math.max(combined.y + combined.height, box.y + box.height);
          const x = Math.min(combined.x, box.x);
          const y = Math.min(combined.y, box.y);
          return {
            x,
            y,
            width: right - x,
            height: bottom - y
          };
        });
        const clampValue = (value, minimum, maximum) => Math.min(maximum, Math.max(minimum, value));
        const padding = Math.max(8, Math.min(pageWidth, pageHeight) * 0.025);
        const x = clampValue(bounds.x - padding, 0, pageWidth);
        const y = clampValue(bounds.y - padding, 0, pageHeight);
        const right = clampValue(bounds.x + bounds.width + padding, 0, pageWidth);
        const bottom = clampValue(bounds.y + bounds.height + padding, 0, pageHeight);
        return {
          x,
          y,
          width: right - x,
          height: bottom - y
        };
      } finally {
        measurementHost.remove();
      }
    })();
    contentBoxCache.set(assetSrc, measurement);
    measurement.catch(() => contentBoxCache.delete(assetSrc));
    return measurement;
  };
  const renderPreviewAsset = ({contentBox: assetContentBox, loading}) => {
    if (!assetContentBox) {
      return <img className="latex-preview__asset" src={src} alt={alt} width={width} height={height} loading={loading} draggable="false" />;
    }
    return <svg className="latex-preview__asset" viewBox={`${assetContentBox.x} ${assetContentBox.y} ${assetContentBox.width} ${assetContentBox.height}`} preserveAspectRatio="xMidYMid meet" role="img" aria-label={alt}>
        <image href={src} x="0" y="0" width={width} height={height} />
      </svg>;
  };
  const [isOpen, setIsOpen] = useState(false);
  const [frameMode, setFrameMode] = useState("content");
  const [viewMode, setViewMode] = useState("fit");
  const [zoom, setZoom] = useState(minZoom);
  const [contentBox, setContentBox] = useState(null);
  const [measurementStatus, setMeasurementStatus] = useState("loading");
  const dialogRef = useRef(null);
  const closeButtonRef = useRef(null);
  const viewportRef = useRef(null);
  const previousFocusRef = useRef(null);
  const dragRef = useRef(null);
  useEffect(() => {
    let isCurrent = true;
    setMeasurementStatus("loading");
    measureSvgContent(src, width, height).then(box => {
      if (!isCurrent) return;
      setContentBox(box);
      setMeasurementStatus("ready");
    }).catch(() => {
      if (!isCurrent) return;
      setContentBox(null);
      setFrameMode("page");
      setMeasurementStatus("error");
    });
    return () => {
      isCurrent = false;
    };
  }, [height, src, width]);
  const closeViewer = useCallback(() => {
    setIsOpen(false);
  }, []);
  const openViewer = () => {
    previousFocusRef.current = document.activeElement;
    setFrameMode(contentBox ? "content" : "page");
    setViewMode("fit");
    setZoom(minZoom);
    setIsOpen(true);
  };
  const applyZoom = useCallback(nextZoom => {
    const boundedZoom = Math.min(maxZoom, Math.max(minZoom, nextZoom));
    setViewMode("custom");
    setZoom(boundedZoom);
  }, []);
  const zoomIn = useCallback(() => {
    applyZoom(viewMode === "fit" ? minZoom + zoomStep : zoom + zoomStep);
  }, [applyZoom, viewMode, zoom]);
  const zoomOut = useCallback(() => {
    applyZoom(viewMode === "fit" ? minZoom : zoom - zoomStep);
  }, [applyZoom, viewMode, zoom]);
  useEffect(() => {
    if (!isOpen) return undefined;
    const previousOverflow = document.body.style.overflow;
    document.body.style.overflow = "hidden";
    closeButtonRef.current?.focus();
    return () => {
      document.body.style.overflow = previousOverflow;
      previousFocusRef.current?.focus?.();
    };
  }, [isOpen]);
  useEffect(() => {
    if (!isOpen) return undefined;
    const handleKeyDown = event => {
      if (event.key === "Escape") {
        event.preventDefault();
        closeViewer();
        return;
      }
      if ((event.key === "+" || event.key === "=") && !event.metaKey && !event.ctrlKey) {
        event.preventDefault();
        zoomIn();
        return;
      }
      if (event.key === "-" && !event.metaKey && !event.ctrlKey) {
        event.preventDefault();
        zoomOut();
        return;
      }
      if (event.key !== "Tab" || !dialogRef.current) return;
      const focusable = [...dialogRef.current.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];
      if (focusable.length === 0) return;
      const first = focusable[0];
      const last = focusable[focusable.length - 1];
      if (event.shiftKey && document.activeElement === first) {
        event.preventDefault();
        last.focus();
      } else if (!event.shiftKey && document.activeElement === last) {
        event.preventDefault();
        first.focus();
      }
    };
    window.addEventListener("keydown", handleKeyDown);
    return () => {
      window.removeEventListener("keydown", handleKeyDown);
    };
  }, [closeViewer, isOpen, zoomIn, zoomOut]);
  const startDrag = event => {
    if (event.button !== 0 || !viewportRef.current) return;
    const viewport = viewportRef.current;
    dragRef.current = {
      pointerId: event.pointerId,
      x: event.clientX,
      y: event.clientY,
      scrollLeft: viewport.scrollLeft,
      scrollTop: viewport.scrollTop
    };
    viewport.setPointerCapture(event.pointerId);
    viewport.dataset.dragging = "true";
  };
  const continueDrag = event => {
    const drag = dragRef.current;
    const viewport = viewportRef.current;
    if (!drag || !viewport || drag.pointerId !== event.pointerId) return;
    viewport.scrollLeft = drag.scrollLeft - (event.clientX - drag.x);
    viewport.scrollTop = drag.scrollTop - (event.clientY - drag.y);
  };
  const stopDrag = event => {
    const viewport = viewportRef.current;
    if (viewport?.hasPointerCapture(event.pointerId)) viewport.releasePointerCapture(event.pointerId);
    if (viewport) delete viewport.dataset.dragging;
    dragRef.current = null;
  };
  const activeContentBox = frameMode === "content" ? contentBox : null;
  const activeWidth = activeContentBox?.width ?? width;
  const activeHeight = activeContentBox?.height ?? height;
  const activeRatio = activeWidth / activeHeight;
  const inlineContentBox = measurementStatus === "ready" ? contentBox : null;
  const inlineWidth = inlineContentBox?.width ?? width;
  const inlineHeight = inlineContentBox?.height ?? height;
  const inlineGeometry = {
    aspectRatio: `${inlineWidth} / ${inlineHeight}`,
    maxWidth: `${30 * inlineWidth / inlineHeight}rem`
  };
  const imageStyle = viewMode === "fit" ? {
    aspectRatio: `${activeWidth} / ${activeHeight}`,
    width: "100%",
    maxWidth: `${Math.max(16, activeRatio * 78)}dvh`
  } : {
    aspectRatio: `${activeWidth} / ${activeHeight}`,
    width: `${zoom * 100}%`,
    maxWidth: "none"
  };
  const zoomLabel = viewMode === "fit" ? frameMode === "content" ? "Fit content" : "Full page" : `${Math.round(zoom * 100)}%`;
  return <figure className="latex-preview">
      <button type="button" className="latex-preview__trigger" onClick={openViewer} aria-haspopup="dialog" aria-label={`Open zoomable preview: ${alt}`}>
        <span className="latex-preview__page" style={inlineGeometry}>
          {measurementStatus === "loading" ? <span className="latex-preview__loading" role="status">Preparing compiled output…</span> : renderPreviewAsset({
    src,
    alt,
    width,
    height,
    contentBox: inlineContentBox,
    loading: "lazy"
  })}
        </span>
        <span className="latex-preview__trigger-label" aria-hidden="true">
          <span className="latex-preview__trigger-icon">⌕</span>
          Open viewer
        </span>
      </button>
      <figcaption className="latex-preview__caption">
        <span>
          {caption}
          {measurementStatus === "error" && <span className="latex-preview__status" role="status"> Content fit is unavailable; the complete vector page is shown.</span>}
        </span>
        <a href={src} target="_blank" rel="noreferrer" className="latex-preview__source-link">Open SVG</a>
      </figcaption>

      {isOpen && <div className="latex-preview__backdrop" onMouseDown={event => {
    if (event.target === event.currentTarget) closeViewer();
  }}>
          <section ref={dialogRef} className="latex-preview__dialog" role="dialog" aria-modal="true" aria-label={`Rendered LaTeX viewer: ${alt}`}>
            <header className="latex-preview__toolbar">
              <div className="latex-preview__identity">
                <span className="latex-preview__eyebrow">Compiled LaTeX</span>
                <span className="latex-preview__filename">{alt}</span>
              </div>
              <div className="latex-preview__controls" aria-label="Preview controls">
                <button type="button" className={frameMode === "content" && viewMode === "fit" ? "is-active" : undefined} disabled={!contentBox} onClick={() => {
    setFrameMode("content");
    setViewMode("fit");
    setZoom(minZoom);
  }}>
                  Fit content
                </button>
                <button type="button" className={frameMode === "page" && viewMode === "fit" ? "is-active" : undefined} onClick={() => {
    setFrameMode("page");
    setViewMode("fit");
    setZoom(minZoom);
  }}>
                  Full page
                </button>
                <span className="latex-preview__zoom-group">
                  <button type="button" onClick={zoomOut} disabled={viewMode === "fit" || zoom <= minZoom} aria-label="Zoom out">−</button>
                  <output aria-live="polite" aria-label="Current zoom">{zoomLabel}</output>
                  <button type="button" onClick={zoomIn} disabled={viewMode !== "fit" && zoom >= maxZoom} aria-label="Zoom in">+</button>
                </span>
                <a href={src} target="_blank" rel="noreferrer">Open SVG</a>
                <button ref={closeButtonRef} type="button" className="latex-preview__close" onClick={closeViewer} aria-label="Close rendered LaTeX viewer">
                  Close
                </button>
              </div>
            </header>
            <div ref={viewportRef} className="latex-preview__viewport" data-view-mode={viewMode} onPointerDown={startDrag} onPointerMove={continueDrag} onPointerUp={stopDrag} onPointerCancel={stopDrag}>
              <span className="latex-preview__dialog-page" style={imageStyle}>
                {renderPreviewAsset({
    src,
    alt,
    width,
    height,
    contentBox: activeContentBox
  })}
              </span>
            </div>
            <footer className="latex-preview__viewer-note">
              Compiler-generated vector output · Use +/− to zoom · Drag to pan · Esc to close
            </footer>
          </section>
        </div>}
    </figure>;
};

<Info>
  If you want the fastest hands-on tutorial, start with [Learn LaTeX in 30 minutes](/learn/latex-in-30-minutes). This article is a companion guide for choosing tools, workflow, and next steps in 2026.
</Info>

LaTeX (pronounced "LAY-tech" or "LAH-tech") is the gold standard for creating professional documents, especially in academia and technical fields. This guide focuses on how to approach learning LaTeX in 2026, which tools to use, and how to get productive quickly.

## What is LaTeX and Why Should You Learn It?

LaTeX is a document preparation system that separates content from formatting. Instead of clicking buttons to style text, you write simple commands that LaTeX interprets to produce consistently formatted, publication-quality documents.

### Why LaTeX in 2026?

* **Professional Quality**: Output that matches professional publications
* **Mathematical Excellence**: The best system for equations and formulas
* **Automatic Formatting**: Consistent styling throughout your document
* **Reference Management**: Automatic numbering, cross-references, and citations
* **Version Control**: Works seamlessly with Git for collaboration
* **Universal Standard**: Required by most academic journals and conferences

<Tip>
  **Who uses LaTeX?**
  Researchers, academics, students, engineers, scientists, technical writers, and anyone who needs professional-quality documents with mathematical content.
</Tip>

## Your First LaTeX Document (5 Minutes)

Let's create your first document right now. Don't worry about understanding everything—we'll explain each part.

### The Minimal Document

<LatexSource filename="example.tex" source={"\\documentclass{article}\n\n\\begin{document}\n\nHello, LaTeX! This is my first document.\n\n\\end{document}"} />

<RenderedOutput title="Rendered output" ctaHref="https://app.latex-cloud-studio.com/?utm_source=resources&utm_medium=rendered_output&utm_campaign=docs_open_app&utm_content=blog_getting_started_latex_2026">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-01/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

That's it! This produces a PDF with your text properly formatted. Let's break it down:

| Line                      | Meaning                                                   |
| ------------------------- | --------------------------------------------------------- |
| `\documentclass{article}` | Specifies the document type (article, report, book, etc.) |
| `\begin{document}`        | Marks where your content begins                           |
| Your text                 | The actual content of your document                       |
| `\end{document}`          | Marks where your content ends                             |

### Try It Now

1. Open [LaTeX Cloud Studio](https://app.latex-cloud-studio.com/?utm_source=resources\&utm_medium=inline_link\&utm_campaign=docs_open_app\&utm_content=blog_getting_started_open_app)
2. Create a new project
3. Paste the code above
4. Click "Compile" or press `Ctrl+Enter`
5. See your first PDF!

## Building a Real Document (15 Minutes)

Now let's create something useful—a proper article with title, sections, and formatting.

### Step 1: Document Setup

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{article}\n\n% Packages add extra functionality\n\\usepackage[utf8]{inputenc}    % Support for special characters\n\\usepackage[margin=1in]{geometry}  % Set page margins\n\\usepackage{amsmath}           % Better math support\n\\usepackage{graphicx}          % Include images\n\\usepackage{hyperref}          % Clickable links\n\n\\begin{document}\n\n\\end{document}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This code performs setup or defines reusable behavior without producing visible page content on its own. It must be used inside a complete document to have a rendered result.
  </Info>
</RenderedOutput>

<Info>
  **What are packages?**
  Packages are extensions that add functionality to LaTeX. Think of them like apps for your document. The `\usepackage{}` command loads them.
</Info>

### Step 2: Add Title and Author

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{article}\n\n\\usepackage[utf8]{inputenc}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{amsmath}\n\\usepackage{graphicx}\n\\usepackage{hyperref}\n\n% Document information\n\\title{My First Research Paper}\n\\author{Your Name}\n\\date{\\today}  % Automatically inserts today's date\n\n\\begin{document}\n\n\\maketitle  % Creates the title block\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-03/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

### Step 3: Add Content Structure

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{article}\n\n\\usepackage[utf8]{inputenc}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{amsmath}\n\\usepackage{graphicx}\n\\usepackage{hyperref}\n\n\\title{My First Research Paper}\n\\author{Your Name}\n\\date{\\today}\n\n\\begin{document}\n\n\\maketitle\n\n\\begin{abstract}\nThis paper demonstrates basic LaTeX formatting including sections,\nlists, equations, and figures. We show how simple commands create\nprofessional documents.\n\\end{abstract}\n\n\\section{Introduction}\nLaTeX is a powerful document preparation system used by academics\nand professionals worldwide. This document serves as both a tutorial\nand a template for your own work.\n\n\\section{Methods}\nOur approach involves three main steps:\n\n\\subsection{Data Collection}\nWe gathered information from multiple sources to ensure accuracy.\n\n\\subsection{Analysis}\nThe data was processed using standard statistical methods.\n\n\\section{Results}\nOur findings demonstrate the effectiveness of LaTeX for document\npreparation.\n\n\\section{Conclusion}\nLaTeX provides an excellent foundation for professional documents.\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-04/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

## Essential Formatting Commands

### Text Formatting

<LatexSource filename="example.tex" source={"\\textbf{Bold text}\n\\textit{Italic text}\n\\underline{Underlined text}\n\\texttt{Monospace/code text}\n\n% Combining styles\n\\textbf{\\textit{Bold and italic}}\n\n% Size changes\n{\\large Larger text}\n{\\Large Even larger}\n{\\LARGE Much larger}\n{\\small Smaller text}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-05/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

**Output:**

| Command                  | Result            |
| ------------------------ | ----------------- |
| `\textbf{Bold}`          | **Bold**          |
| `\textit{Italic}`        | *Italic*          |
| `\underline{Underlined}` | <u>Underlined</u> |
| `\texttt{Code}`          | `Code`            |

### Lists

#### Bullet Points (Unordered)

<LatexSource filename="example.tex" source={"\\begin{itemize}\n    \\item First item\n    \\item Second item\n    \\item Third item with sub-items:\n    \\begin{itemize}\n        \\item Sub-item A\n        \\item Sub-item B\n    \\end{itemize}\n\\end{itemize}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-06/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

#### Numbered Lists (Ordered)

<LatexSource filename="example.tex" source={"\\begin{enumerate}\n    \\item First step\n    \\item Second step\n    \\item Third step\n\\end{enumerate}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-07/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

#### Description Lists

<LatexSource filename="example.tex" source={"\\begin{description}\n    \\item[LaTeX] A document preparation system\n    \\item[PDF] Portable Document Format\n    \\item[WYSIWYG] What You See Is What You Get\n\\end{description}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-08/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### Paragraphs and Spacing

<LatexSource filename="example.tex" source={"% New paragraph: leave a blank line\nFirst paragraph text here.\n\nSecond paragraph starts after blank line.\n\n% Line break within paragraph\nLine one\\\\\nLine two (same paragraph)\n\n% Prevent paragraph indent\n\\noindent This paragraph has no indent.\n\n% Add vertical space\n\\vspace{1cm}  % 1 centimeter of space"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-09/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

## Adding Mathematics

LaTeX's math capabilities are its crown jewel. Here's how to use them:

### Inline Math

Use `$...$` for math within text:

<LatexSource filename="example.tex" source={"The famous equation $E = mc^2$ changed physics forever.\n\nThe quadratic formula gives us $x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$."} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-10/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### Display Math (Centered Equations)

Use `\[...\]` or the `equation` environment:

<LatexSource filename="example.tex" source={"% Unnumbered equation\n\\[\n    \\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}\n\\]\n\n% Numbered equation\n\\begin{equation}\n    F = ma\n    \\label{eq:newton}\n\\end{equation}\n\n% Reference the equation\nAs shown in Equation~\\ref{eq:newton}..."} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-11/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### Common Math Symbols

<LatexSource filename="example.tex" source={"% Fractions\n$\\frac{a}{b}$\n\n% Square root\n$\\sqrt{x}$, $\\sqrt[3]{x}$\n\n% Powers and subscripts\n$x^2$, $x_i$, $x_i^2$\n\n% Greek letters\n$\\alpha$, $\\beta$, $\\gamma$, $\\delta$, $\\epsilon$\n$\\pi$, $\\sigma$, $\\theta$, $\\omega$, $\\phi$\n\n% Sums and products\n$\\sum_{i=1}^{n} x_i$\n$\\prod_{i=1}^{n} x_i$\n\n% Integrals\n$\\int_a^b f(x) dx$\n\n% Limits\n$\\lim_{x \\to \\infty} f(x)$"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-12/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### Multiple Aligned Equations

<LatexSource filename="example.tex" source={"\\begin{align}\n    y &= mx + b \\\\\n    y &= 2x + 3 \\\\\n    y &= 2(4) + 3 \\\\\n    y &= 11\n\\end{align}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-13/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

<Warning>
  **Don't forget the `amsmath` package!**
  Many math features require `\usepackage{amsmath}` in your preamble.
</Warning>

## Adding Images

### Basic Image Inclusion

<LatexSource filename="example.tex" source={"\\usepackage{graphicx}  % In preamble\n\n% In document\n\\begin{figure}[htbp]\n    \\centering\n    \\includegraphics[width=0.8\\textwidth]{image-filename}\n    \\caption{Description of your figure}\n    \\label{fig:myfigure}\n\\end{figure}\n\n% Reference the figure\nAs shown in Figure~\\ref{fig:myfigure}..."} />

<RenderedOutput title="Expected effect">
  <Info>
    This excerpt depends on project files such as images, bibliography data, or included TeX sources that are not part of this standalone code box. Its exact output is project-specific, so no fabricated preview is shown.
  </Info>
</RenderedOutput>

### Image Options

<LatexSource filename="example.tex" source={"% Control size\n\\includegraphics[width=5cm]{image}\n\\includegraphics[height=3cm]{image}\n\\includegraphics[scale=0.5]{image}\n\n% Rotation\n\\includegraphics[angle=90]{image}\n\n% Combined options\n\\includegraphics[width=0.5\\textwidth, angle=45]{image}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This excerpt depends on project files such as images, bibliography data, or included TeX sources that are not part of this standalone code box. Its exact output is project-specific, so no fabricated preview is shown.
  </Info>
</RenderedOutput>

### Figure Placement Options

| Option | Meaning                                 |
| ------ | --------------------------------------- |
| `h`    | Here (approximately)                    |
| `t`    | Top of page                             |
| `b`    | Bottom of page                          |
| `p`    | Separate page for floats                |
| `!`    | Override LaTeX's judgment               |
| `H`    | Exactly here (requires `float` package) |

## Creating Tables

### Basic Table

<LatexSource filename="example.tex" source={"\\begin{table}[htbp]\n    \\centering\n    \\begin{tabular}{|l|c|r|}\n        \\hline\n        Left & Center & Right \\\\\n        \\hline\n        Data 1 & Data 2 & Data 3 \\\\\n        Data 4 & Data 5 & Data 6 \\\\\n        \\hline\n    \\end{tabular}\n    \\caption{A simple table}\n    \\label{tab:simple}\n\\end{table}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-16/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### Column Alignment

| Specifier  | Alignment                             |               |
| ---------- | ------------------------------------- | ------------- |
| `l`        | Left-aligned                          |               |
| `c`        | Centered                              |               |
| `r`        | Right-aligned                         |               |
| `p{width}` | Paragraph column with specified width |               |
| \`         | \`                                    | Vertical line |

### Professional Table (with booktabs)

<LatexSource filename="example.tex" source={"\\usepackage{booktabs}  % In preamble\n\n\\begin{table}[htbp]\n    \\centering\n    \\begin{tabular}{lcc}\n        \\toprule\n        Method & Accuracy & Time (s) \\\\\n        \\midrule\n        Baseline & 78.3\\% & 1.2 \\\\\n        Proposed & 94.7\\% & 0.8 \\\\\n        \\bottomrule\n    \\end{tabular}\n    \\caption{Comparison of methods}\n    \\label{tab:comparison}\n\\end{table}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-17/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

## Cross-References

LaTeX's automatic referencing prevents "Figure ??" errors:

<LatexSource filename="example.tex" source={"% Create labels\n\\section{Introduction}\n\\label{sec:intro}\n\n\\begin{equation}\n    E = mc^2\n    \\label{eq:einstein}\n\\end{equation}\n\n\\begin{figure}[htbp]\n    \\centering\n    \\includegraphics[width=0.5\\textwidth]{diagram}\n    \\caption{System architecture}\n    \\label{fig:architecture}\n\\end{figure}\n\n% Reference them\nAs discussed in Section~\\ref{sec:intro}...\nEquation~\\ref{eq:einstein} shows that...\nFigure~\\ref{fig:architecture} illustrates..."} />

<RenderedOutput title="Expected effect">
  <Info>
    This excerpt depends on project files such as images, bibliography data, or included TeX sources that are not part of this standalone code box. Its exact output is project-specific, so no fabricated preview is shown.
  </Info>
</RenderedOutput>

<Tip>
  **Use the tilde (\~)**
  The `~` creates a non-breaking space, preventing awkward line breaks like:

  "Figure
  1" → "Figure 1"
</Tip>

## Complete Starter Template

Here's a complete template you can use for any project:

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{article}\n\n% Essential packages\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{amsmath, amssymb}\n\\usepackage{graphicx}\n\\usepackage{booktabs}\n\\usepackage{hyperref}\n\\usepackage[style=authoryear]{biblatex}\n\\addbibresource{references.bib}\n\n% Document info\n\\title{Your Document Title}\n\\author{Your Name\\\\\n    \\small Your Institution\\\\\n    \\small \\texttt{your.email@example.com}}\n\\date{\\today}\n\n\\begin{document}\n\n\\maketitle\n\n\\begin{abstract}\nYour abstract goes here. Summarize your work in 150-250 words.\n\\end{abstract}\n\n\\tableofcontents\n\\newpage\n\n\\section{Introduction}\n\\label{sec:intro}\n\nIntroduce your topic here. You can cite sources like this \\cite{example2024}.\n\n\\section{Background}\n\\label{sec:background}\n\nProvide relevant background information.\n\n\\subsection{Related Work}\nDiscuss previous research in this area.\n\n\\section{Methods}\n\\label{sec:methods}\n\nDescribe your methodology. Include equations if relevant:\n\n\\begin{equation}\n    y = mx + b\n    \\label{eq:linear}\n\\end{equation}\n\n\\section{Results}\n\\label{sec:results}\n\nPresent your findings. Add figures:\n\n\\begin{figure}[htbp]\n    \\centering\n    % \\includegraphics[width=0.8\\textwidth]{your-figure}\n    \\caption{Description of your figure}\n    \\label{fig:results}\n\\end{figure}\n\nAnd tables:\n\n\\begin{table}[htbp]\n    \\centering\n    \\begin{tabular}{lcc}\n        \\toprule\n        Category & Value 1 & Value 2 \\\\\n        \\midrule\n        A & 10 & 20 \\\\\n        B & 15 & 25 \\\\\n        \\bottomrule\n    \\end{tabular}\n    \\caption{Your table caption}\n    \\label{tab:data}\n\\end{table}\n\n\\section{Discussion}\n\\label{sec:discussion}\n\nInterpret your results. Refer back to Figure~\\ref{fig:results} and Table~\\ref{tab:data}.\n\n\\section{Conclusion}\n\\label{sec:conclusion}\n\nSummarize your findings and suggest future work.\n\n\\printbibliography\n\n\\end{document}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This excerpt depends on project files such as images, bibliography data, or included TeX sources that are not part of this standalone code box. Its exact output is project-specific, so no fabricated preview is shown.
  </Info>
</RenderedOutput>

## Common Beginner Mistakes (And How to Avoid Them)

### 1. Missing Closing Braces

<LatexSource filename="example.tex" source={"% Wrong\n\\textbf{bold text\n\\section{Title\n\n% Correct\n\\textbf{bold text}\n\\section{Title}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This code is a contextual or intentionally partial LaTeX excerpt, not a self-contained compilable document. Its visible result depends on the surrounding document, so the documentation shows the expected role without inventing a standalone preview.
  </Info>
</RenderedOutput>

### 2. Math Mode Errors

<LatexSource filename="example.tex" source={"% Wrong - special characters outside math mode\nx^2 + y^2 = z^2\n\n% Correct\n$x^2 + y^2 = z^2$"} />

<RenderedOutput title="Expected effect">
  <Info>
    This code is a contextual or intentionally partial LaTeX excerpt, not a self-contained compilable document. Its visible result depends on the surrounding document, so the documentation shows the expected role without inventing a standalone preview.
  </Info>
</RenderedOutput>

### 3. Special Characters

These characters have special meaning and need escaping:

<LatexSource filename="example.tex" source={"% To print these literally, escape them:\n\\%  % Percent sign\n\\$  % Dollar sign\n\\&  % Ampersand\n\\#  % Hash\n\\_  % Underscore\n\\{  % Left brace\n\\}  % Right brace"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-getting-started-latex-2026-22/page-1.svg" alt="Compiled PDF page 1 from example.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment. The visible fragment is compiled inside the documented minimal article wrapper." width={595.276} height={841.89} />
</RenderedOutput>

### 4. Image File Extensions

<LatexSource filename="example.tex" source={"% Don't include file extension (LaTeX finds it automatically)\n% Wrong\n\\includegraphics{image.png}\n\n% Correct\n\\includegraphics{image}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This excerpt depends on project files such as images, bibliography data, or included TeX sources that are not part of this standalone code box. Its exact output is project-specific, so no fabricated preview is shown.
  </Info>
</RenderedOutput>

## Next Steps

Now that you've mastered the basics, here's your learning path:

### Immediate Next Steps

1. **Practice**: Create a document for a real project
2. **Templates**: Explore our [template gallery](/templates)
3. **Math**: Learn more in our [math guide](/learn/latex/mathematics/mathematical-expressions)

### Intermediate Topics

* [Bibliography management with BibLaTeX](/learn/latex/bibliography-citations)
* [Working with figures and images](/learn/latex/figures/inserting-images)
* [Creating professional tables](/learn/latex/tables/creating-tables)

### Advanced Topics

* [Creating presentations with Beamer](/learn/latex/how-to/presentations)
* [TikZ diagrams](/blog/mastering-tikz-diagrams)
* [Advanced mathematics](/learn/latex/mathematics/advanced-math)

## Quick Reference Card

| Task          | Command                               |
| ------------- | ------------------------------------- |
| Bold          | `\textbf{text}`                       |
| Italic        | `\textit{text}`                       |
| Section       | `\section{Title}`                     |
| Subsection    | `\subsection{Title}`                  |
| Bullet list   | `\begin{itemize}...\end{itemize}`     |
| Numbered list | `\begin{enumerate}...\end{enumerate}` |
| Inline math   | `$equation$`                          |
| Display math  | `\[equation\]`                        |
| Figure        | `\begin{figure}...\end{figure}`       |
| Table         | `\begin{table}...\end{table}`         |
| Citation      | `\cite{key}`                          |
| Reference     | `\ref{label}`                         |
| Label         | `\label{name}`                        |

***

**Ready to start?** [Create your first document](/learn/latex/basics/creating-first-document) or browse our [article templates](/templates/article) to jumpstart your project.

<Info>
  Need help? Check our [FAQ](/faq) or join our community for support.
</Info>
