> ## 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.

# LaTeX Academic Writing Guide for Students & Researchers

> Master LaTeX for academic papers, theses, and dissertations. Learn document structure, citations, formatting, and collaboration best practices.

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>;
};

LaTeX is the gold standard for academic writing, used by researchers, students, and institutions worldwide. This comprehensive guide covers everything you need to create professional academic documents—from course papers to PhD dissertations.

## Why Academics Choose LaTeX

Before diving into the how, let's understand the why:

### The Academic Advantage

| Feature                      | Benefit for Academics                                             |
| ---------------------------- | ----------------------------------------------------------------- |
| **Automatic numbering**      | Figures, tables, equations, sections—all numbered automatically   |
| **Cross-references**         | References update automatically when you reorganize               |
| **Bibliography management**  | Integrate with Zotero, Mendeley; switch citation styles instantly |
| **Mathematical typesetting** | Publication-quality equations                                     |
| **Long document handling**   | Stable performance for 300+ page dissertations                    |
| **Version control**          | Works with Git for tracking changes and collaboration             |
| **Journal templates**        | Most publishers provide LaTeX templates                           |

<Tip>
  **Real talk:** LaTeX has a learning curve. But for any document over 20 pages with references, figures, and equations, that investment pays off many times over.
</Tip>

## Choosing the Right Document Class

The document class determines your document's overall structure and formatting.

### For Research Papers and Articles

<LatexSource filename="example.tex" source={"% Standard article class - most versatile\n\\documentclass[12pt, a4paper]{article}\n\n% For two-column journal format\n\\documentclass[twocolumn]{article}\n\n% AMS article for mathematics\n\\documentclass{amsart}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is setup or structural LaTeX code. It changes available commands or document behavior, but it does not produce meaningful standalone page content by itself.
  </Info>
</RenderedOutput>

### For Theses and Dissertations

<LatexSource filename="example.tex" source={"% Report class - has chapters\n\\documentclass[12pt, a4paper]{report}\n\n% Book class - for extensive dissertations\n\\documentclass[12pt, openright]{book}\n\n% Check if your institution has a specific class\n\\documentclass{mythesis}  % Custom university class"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is setup or structural LaTeX code. It changes available commands or document behavior, but it does not produce meaningful standalone page content by itself.
  </Info>
</RenderedOutput>

### For Letters and Short Documents

<LatexSource filename="example.tex" source={"\\documentclass{letter}\n\\documentclass{scrlttr2}  % KOMA-Script letter"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is setup or structural LaTeX code. It changes available commands or document behavior, but it does not produce meaningful standalone page content by itself.
  </Info>
</RenderedOutput>

### Document Class Options

<LatexSource filename="example.tex" source={"\\documentclass[\n    12pt,       % Font size (10pt, 11pt, 12pt)\n    a4paper,    % Paper size (letterpaper, a4paper)\n    twoside,    % Different margins for odd/even pages\n    openright,  % Chapters start on right-hand pages\n    draft       % Shows overfull boxes, doesn't load images\n]{report}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is document setup or preamble code. It changes the behavior of a containing document but does not produce an honest standalone page by itself.
  </Info>
</RenderedOutput>

## Essential Packages for Academic Writing

Here's a recommended preamble for academic documents:

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{report}\n\n% === Encoding and Fonts ===\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{lmodern}  % Modern font\n\n% === Page Layout ===\n\\usepackage[\n    margin=1in,\n    bindingoffset=0.5cm  % Extra margin for binding\n]{geometry}\n\\usepackage{setspace}\n\\doublespacing  % Or \\onehalfspacing\n\n% === Mathematics ===\n\\usepackage{amsmath, amssymb, amsthm}\n\\usepackage{mathtools}\n\n% === Graphics and Figures ===\n\\usepackage{graphicx}\n\\usepackage{float}      % Better figure placement\n\\usepackage{subcaption} % Subfigures\n\n% === Tables ===\n\\usepackage{booktabs}   % Professional tables\n\\usepackage{longtable}  % Multi-page tables\n\\usepackage{multirow}   % Multi-row cells\n\n% === Bibliography ===\n\\usepackage[\n    style=authoryear,  % Or: numeric, apa, ieee, chicago\n    backend=biber,\n    natbib=true\n]{biblatex}\n\\addbibresource{references.bib}\n\n% === Cross-references and Links ===\n\\usepackage{hyperref}\n\\hypersetup{\n    colorlinks=true,\n    linkcolor=blue,\n    citecolor=blue,\n    urlcolor=blue\n}\n\\usepackage{cleveref}  % Smart references\n\n% === Code Listings ===\n\\usepackage{listings}\n\\lstset{\n    basicstyle=\\ttfamily\\small,\n    breaklines=true,\n    frame=single\n}\n\n% === Miscellaneous ===\n\\usepackage{appendix}\n\\usepackage{glossaries}  % For glossaries and acronyms"} />

<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>

## Structuring Your Academic Document

### Thesis/Dissertation Structure

<LatexSource filename="example.tex" source={"\\documentclass[12pt, a4paper]{report}\n\n% ... preamble packages ...\n\n\\begin{document}\n\n% === Front Matter ===\n\\frontmatter  % Roman numerals, no chapter numbers\n\\include{frontmatter/titlepage}\n\\include{frontmatter/abstract}\n\\include{frontmatter/acknowledgments}\n\\include{frontmatter/dedication}\n\n\\tableofcontents\n\\listoffigures\n\\listoftables\n\n% === Main Matter ===\n\\mainmatter  % Arabic numerals, chapter numbers\n\\include{chapters/introduction}\n\\include{chapters/literature-review}\n\\include{chapters/methodology}\n\\include{chapters/results}\n\\include{chapters/discussion}\n\\include{chapters/conclusion}\n\n% === Back Matter ===\n\\backmatter\n\\printbibliography[heading=bibintoc]\n\n\\begin{appendices}\n\\include{appendices/appendix-a}\n\\include{appendices/appendix-b}\n\\end{appendices}\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>

### Research Paper Structure

<LatexSource filename="example.tex" source={"\\documentclass[12pt]{article}\n\n\\begin{document}\n\n\\title{Your Paper Title: A Subtitle if Needed}\n\\author{\n    First Author\\thanks{Corresponding author: email@university.edu}\\\\\n    \\small Department, University\\\\\n    \\and\n    Second Author\\\\\n    \\small Department, University\n}\n\\date{\\today}\n\n\\maketitle\n\n\\begin{abstract}\nYour abstract goes here. 150-250 words summarizing the problem,\nmethods, key findings, and implications.\n\n\\textbf{Keywords:} keyword1, keyword2, keyword3\n\\end{abstract}\n\n\\section{Introduction}\n\\label{sec:intro}\n% Background, problem statement, research questions, contributions\n\n\\section{Related Work}\n\\label{sec:related}\n% Literature review and positioning\n\n\\section{Methodology}\n\\label{sec:methods}\n% Your approach, data, methods\n\n\\section{Results}\n\\label{sec:results}\n% Findings and analysis\n\n\\section{Discussion}\n\\label{sec:discussion}\n% Interpretation, implications, limitations\n\n\\section{Conclusion}\n\\label{sec:conclusion}\n% Summary and future work\n\n\\section*{Acknowledgments}\n% Funding, support, contributions\n\n\\printbibliography\n\n\\end{document}"} />

<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>

## Mastering Citations and Bibliography

### Setting Up Your Bibliography

Create a `references.bib` file:

```bibtex theme={null}
@article{smith2024,
    author  = {Smith, John and Johnson, Mary},
    title   = {A Study of Something Important},
    journal = {Journal of Important Studies},
    year    = {2024},
    volume  = {42},
    number  = {3},
    pages   = {123--145},
    doi     = {10.1234/example.2024.001}
}

@book{jones2023,
    author    = {Jones, Robert},
    title     = {The Comprehensive Guide},
    publisher = {Academic Press},
    year      = {2023},
    address   = {New York},
    edition   = {3rd}
}

@inproceedings{chen2024,
    author    = {Chen, Wei and Kumar, Anil},
    title     = {Conference Paper Title},
    booktitle = {Proceedings of the International Conference},
    year      = {2024},
    pages     = {100--110},
    publisher = {ACM}
}

@phdthesis{williams2023,
    author = {Williams, Sarah},
    title  = {Dissertation Title Here},
    school = {University Name},
    year   = {2023}
}

@misc{website2024,
    author       = {{Organization Name}},
    title        = {Web Page Title},
    howpublished = {\url{https://example.com/page}},
    year         = {2024},
    note         = {Accessed: 2024-01-15}
}
```

### Citation Commands

<LatexSource filename="example.tex" source={"% With biblatex + natbib=true option:\n\n% Parenthetical citation: (Smith, 2024)\n\\citep{smith2024}\n\n% Textual citation: Smith (2024)\n\\citet{smith2024}\n\n% Multiple citations: (Smith, 2024; Jones, 2023)\n\\citep{smith2024, jones2023}\n\n% With page numbers: (Smith, 2024, p. 45)\n\\citep[p.~45]{smith2024}\n\n% With prefix: (see Smith, 2024)\n\\citep[see][]{smith2024}\n\n% Just the year: (2024)\n\\citeyear{smith2024}\n\n% Just the author: Smith\n\\citeauthor{smith2024}"} />

<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>

### Popular Citation Styles

<LatexSource filename="example.tex" source={"% APA style (Psychology, Education, Social Sciences)\n\\usepackage[style=apa, backend=biber]{biblatex}\n\n% IEEE style (Engineering, Computer Science)\n\\usepackage[style=ieee, backend=biber]{biblatex}\n\n% Chicago style (Humanities)\n\\usepackage[style=chicago-authordate, backend=biber]{biblatex}\n\n% Numeric style (Sciences)\n\\usepackage[style=numeric-comp, backend=biber]{biblatex}\n\n% Harvard style\n\\usepackage[style=authoryear, backend=biber]{biblatex}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is setup or structural LaTeX code. It changes available commands or document behavior, but it does not produce meaningful standalone page content by itself.
  </Info>
</RenderedOutput>

<Info>
  **Reference Manager Integration:**
  Export your library from Zotero, Mendeley, or EndNote as a `.bib` file. Keep it updated with your document.
</Info>

## Academic Figures and Tables

### Figures with Proper Captioning

<LatexSource filename="example.tex" source={"\\begin{figure}[htbp]\n    \\centering\n    \\includegraphics[width=0.8\\textwidth]{figures/results-graph}\n    \\caption[Short caption for list]{\n        Long caption with detailed description of what the figure shows.\n        Data collected from \\cite{smith2024}. Error bars represent 95\\%\n        confidence intervals.\n    }\n    \\label{fig:results}\n\\end{figure}\n\n% Reference it\nAs shown in Figure~\\ref{fig:results}, the results demonstrate..."} />

<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>

### Subfigures

<LatexSource filename="example.tex" source={"\\usepackage{subcaption}\n\n\\begin{figure}[htbp]\n    \\centering\n    \\begin{subfigure}[b]{0.45\\textwidth}\n        \\includegraphics[width=\\textwidth]{figures/method-a}\n        \\caption{Method A results}\n        \\label{fig:method-a}\n    \\end{subfigure}\n    \\hfill\n    \\begin{subfigure}[b]{0.45\\textwidth}\n        \\includegraphics[width=\\textwidth]{figures/method-b}\n        \\caption{Method B results}\n        \\label{fig:method-b}\n    \\end{subfigure}\n    \\caption{Comparison of both methods showing (a) Method A and (b) Method B}\n    \\label{fig:comparison}\n\\end{figure}"} />

<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>

### Professional Tables

<LatexSource filename="example.tex" source={"\\usepackage{booktabs}\n\n\\begin{table}[htbp]\n    \\centering\n    \\caption{Experimental results comparing methods across metrics}\n    \\label{tab:results}\n    \\begin{tabular}{lccc}\n        \\toprule\n        \\textbf{Method} & \\textbf{Accuracy} & \\textbf{Precision} & \\textbf{Recall} \\\\\n        \\midrule\n        Baseline        & 78.3\\%            & 0.76               & 0.81 \\\\\n        Method A        & 85.7\\%            & 0.84               & 0.87 \\\\\n        Method B        & 89.2\\%            & 0.88               & 0.90 \\\\\n        \\textbf{Ours}   & \\textbf{94.1\\%}   & \\textbf{0.93}      & \\textbf{0.95} \\\\\n        \\bottomrule\n    \\end{tabular}\n\n    \\vspace{0.5em}\n    \\footnotesize\n    \\textit{Note:} Results averaged over 10 runs. Bold indicates best performance.\n\\end{table}"} />

<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_latex_academic_writing_guide">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-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>

### Tables Spanning Multiple Pages

<LatexSource filename="example.tex" source={"\\usepackage{longtable}\n\n\\begin{longtable}{lp{8cm}c}\n    \\caption{Summary of Literature Review} \\label{tab:literature} \\\\\n\n    \\toprule\n    \\textbf{Author} & \\textbf{Contribution} & \\textbf{Year} \\\\\n    \\midrule\n    \\endfirsthead\n\n    \\multicolumn{3}{c}{\\textit{Continued from previous page}} \\\\\n    \\toprule\n    \\textbf{Author} & \\textbf{Contribution} & \\textbf{Year} \\\\\n    \\midrule\n    \\endhead\n\n    \\midrule\n    \\multicolumn{3}{r}{\\textit{Continued on next page}} \\\\\n    \\endfoot\n\n    \\bottomrule\n    \\endlastfoot\n\n    Smith & Description of their work & 2020 \\\\\n    Jones & Another contribution & 2021 \\\\\n    % ... more rows ...\n\\end{longtable}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-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>

## Mathematics in Academic Papers

### Theorems and Proofs

<LatexSource filename="example.tex" source={"\\usepackage{amsthm}\n\n% Define theorem environments\n\\newtheorem{theorem}{Theorem}[section]\n\\newtheorem{lemma}[theorem]{Lemma}\n\\newtheorem{corollary}[theorem]{Corollary}\n\\newtheorem{proposition}[theorem]{Proposition}\n\n\\theoremstyle{definition}\n\\newtheorem{definition}[theorem]{Definition}\n\\newtheorem{example}[theorem]{Example}\n\n\\theoremstyle{remark}\n\\newtheorem*{remark}{Remark}\n\n% Usage\n\\begin{theorem}[Optional Name]\n\\label{thm:main}\nFor all $x \\in \\mathbb{R}$, we have $x^2 \\geq 0$.\n\\end{theorem}\n\n\\begin{proof}\nBy definition of real numbers... [your proof here].\n\\end{proof}\n\n\\begin{corollary}\n\\label{cor:consequence}\nAs a consequence of Theorem~\\ref{thm:main}, ...\n\\end{corollary}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-14/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>

### Aligned Equations

<LatexSource filename="example.tex" source={"\\begin{align}\n    f(x) &= ax^2 + bx + c \\label{eq:quadratic} \\\\\n    x &= \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a} \\label{eq:solution}\n\\end{align}\n\nEquation~\\eqref{eq:quadratic} gives the general form,\nand Equation~\\eqref{eq:solution} provides the solutions."} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-15/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>

### Matrices and Arrays

<LatexSource filename="example.tex" source={"% Matrix types\n\\begin{equation}\n    A = \\begin{pmatrix}  % parentheses\n        a_{11} & a_{12} \\\\\n        a_{21} & a_{22}\n    \\end{pmatrix}\n    \\quad\n    B = \\begin{bmatrix}  % brackets\n        1 & 2 \\\\\n        3 & 4\n    \\end{bmatrix}\n    \\quad\n    C = \\begin{vmatrix}  % determinant\n        x & y \\\\\n        z & w\n    \\end{vmatrix}\n\\end{equation}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-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>

## Cross-Referencing Best Practices

### Using cleveref for Smart References

<LatexSource filename="example.tex" source={"\\usepackage{cleveref}\n\n% In your document\n\\begin{figure}\n    ...\n    \\label{fig:results}\n\\end{figure}\n\n\\begin{table}\n    ...\n    \\label{tab:data}\n\\end{table}\n\n\\begin{equation}\n    E = mc^2\n    \\label{eq:einstein}\n\\end{equation}\n\n% Smart references - cleveref adds \"Figure\", \"Table\", etc.\n\\cref{fig:results}      % \"Figure 1\"\n\\cref{tab:data}         % \"Table 1\"\n\\cref{eq:einstein}      % \"Equation 1\"\n\\cref{sec:intro}        % \"Section 1\"\n\n% Multiple references\n\\cref{fig:results,tab:data}  % \"Figure 1 and Table 1\"\n\n% Range of references\n\\crefrange{eq:first}{eq:last}  % \"Equations 1 to 5\""} />

<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>

### Label Naming Conventions

<LatexSource filename="example.tex" source={"% Use prefixes for organization:\n\\label{sec:introduction}     % Sections\n\\label{subsec:background}    % Subsections\n\\label{ch:methodology}       % Chapters\n\\label{fig:architecture}     % Figures\n\\label{tab:results}          % Tables\n\\label{eq:model}             % Equations\n\\label{thm:convergence}      % Theorems\n\\label{alg:algorithm1}       % Algorithms\n\\label{lst:code}             % Listings\n\\label{app:proofs}           % Appendix"} />

<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>

## Academic Document Templates

### Title Page for Thesis

<LatexSource filename="example.tex" source={"\\begin{titlepage}\n    \\centering\n\n    \\vspace*{1cm}\n    {\\LARGE\\textbf{University Name}}\\\\[0.5cm]\n    {\\large Department of Subject}\n\n    \\vspace{2cm}\n    {\\huge\\bfseries Your Thesis Title:\\\\[0.3cm]\n    A Subtitle If Needed}\n\n    \\vspace{2cm}\n    {\\Large A thesis submitted in partial fulfillment\\\\\n    of the requirements for the degree of\\\\[0.5cm]\n    \\textbf{Doctor of Philosophy}}\n\n    \\vspace{2cm}\n    {\\large by\\\\[0.3cm]\n    \\textbf{Your Full Name}}\n\n    \\vfill\n\n    {\\large Supervisor: Prof. Supervisor Name}\\\\[1cm]\n    {\\large Month Year}\n\n\\end{titlepage}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/blog-latex-academic-writing-guide-19/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>

### Abstract Page

<LatexSource filename="example.tex" source={"\\chapter*{Abstract}\n\\addcontentsline{toc}{chapter}{Abstract}\n\n\\begin{center}\n    \\textbf{Title of Your Thesis}\\\\[0.5cm]\n    Your Name\\\\\n    University Name, Year\n\\end{center}\n\n\\vspace{1cm}\n\nYour abstract text goes here. This should be a concise summary\nof your research including:\n\\begin{itemize}\n    \\item The problem or research question\n    \\item Your methodology\n    \\item Key findings\n    \\item Main conclusions and contributions\n\\end{itemize}\n\n\\vspace{1cm}\n\\noindent\\textbf{Keywords:} keyword1, keyword2, keyword3, keyword4, keyword5"} />

<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>

## Collaboration with Co-Authors

### Using Git for Version Control

```bash theme={null}
# Initialize git in your LaTeX project
git init
git add .
git commit -m "Initial thesis draft"

# Create branch for revisions
git checkout -b chapter-2-revision

# After making changes
git add chapters/chapter2.tex
git commit -m "Address reviewer comments on methodology section"

# Merge back
git checkout main
git merge chapter-2-revision
```

### Track Changes with latexdiff

```bash theme={null}
# Generate a diff between versions
latexdiff old-version.tex new-version.tex > diff.tex
pdflatex diff.tex
```

### Comments and TODOs

<LatexSource filename="example.tex" source={"% For personal notes (won't appear in output)\n% TODO: Add more references here\n\n% For visible notes during drafting\n\\usepackage{todonotes}\n\\todo{Expand this section}\n\\todo[inline]{Need to verify these numbers}\n\\missingfigure{Add results graph here}\n\n% For collaborative comments\n\\usepackage{changes}\n\\added[id=JD]{This text was added by John}\n\\deleted[id=MS]{This text was deleted by Mary}\n\\replaced[id=JD]{new text}{old text}"} />

<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>

## Meeting Journal Requirements

### Common Journal Classes

<LatexSource filename="example.tex" source={"% IEEE\n\\documentclass[journal]{IEEEtran}\n\n% ACM\n\\documentclass[sigconf]{acmart}\n\n% Elsevier\n\\documentclass[preprint,12pt]{elsarticle}\n\n% Springer\n\\documentclass{svjour3}\n\n% Nature\n\\documentclass{nature}"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is setup or structural LaTeX code. It changes available commands or document behavior, but it does not produce meaningful standalone page content by itself.
  </Info>
</RenderedOutput>

### Preparing for Submission

<LatexSource filename="example.tex" source={"% Switch to final mode\n\\documentclass[final]{article}  % Remove 'draft' option\n\n% For double-blind review\n\\author{Anonymous}\n\\affiliation{Anonymous Institution}\n\n% Line numbers for review\n\\usepackage{lineno}\n\\linenumbers\n\n% Word count\n% Run: texcount yourfile.tex"} />

<RenderedOutput title="Expected effect">
  <Info>
    This is document setup or preamble code. It changes the behavior of a containing document but does not produce an honest standalone page by itself.
  </Info>
</RenderedOutput>

<Warning>
  **Always check specific journal requirements!** Each journal has unique formatting rules. Download their template and follow their author guidelines exactly.
</Warning>

## Complete Academic Template

Here's a ready-to-use template for academic papers:

<LatexSource filename="example.tex" source={"% academic-paper-template.tex\n\\documentclass[12pt, a4paper]{article}\n\n% === Packages ===\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{lmodern}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{setspace}\n\\usepackage{amsmath, amssymb, amsthm}\n\\usepackage{graphicx}\n\\usepackage{booktabs}\n\\usepackage{subcaption}\n\\usepackage[style=authoryear, backend=biber, natbib=true]{biblatex}\n\\usepackage{hyperref}\n\\usepackage{cleveref}\n\n% === Configuration ===\n\\addbibresource{references.bib}\n\\onehalfspacing\n\n\\hypersetup{\n    colorlinks=true,\n    linkcolor=blue,\n    citecolor=blue,\n    urlcolor=blue,\n    pdftitle={Your Paper Title},\n    pdfauthor={Your Name}\n}\n\n% === Theorem Environments ===\n\\newtheorem{theorem}{Theorem}[section]\n\\newtheorem{lemma}[theorem]{Lemma}\n\\theoremstyle{definition}\n\\newtheorem{definition}[theorem]{Definition}\n\n% === Document ===\n\\begin{document}\n\n\\title{Your Paper Title: With an Informative Subtitle}\n\\author{\n    First Author\\thanks{Corresponding author: first@university.edu}\\\\\n    \\small Department, University, Country\n    \\and\n    Second Author\\\\\n    \\small Department, University, Country\n}\n\\date{\\today}\n\n\\maketitle\n\n\\begin{abstract}\nYour abstract here (150-250 words). Summarize the problem, methods,\nkey findings, and implications.\n\n\\noindent\\textbf{Keywords:} keyword1, keyword2, keyword3\n\\end{abstract}\n\n\\section{Introduction}\n\\label{sec:intro}\n\nIntroduction text with citation \\citep{smith2024}.\n\n\\section{Related Work}\n\\label{sec:related}\n\nLiterature review content.\n\n\\section{Methodology}\n\\label{sec:methods}\n\nMethods description with equation:\n\\begin{equation}\n    y = f(x) + \\epsilon\n    \\label{eq:model}\n\\end{equation}\n\n\\section{Results}\n\\label{sec:results}\n\nResults with figure reference (\\cref{fig:results}).\n\n\\begin{figure}[htbp]\n    \\centering\n    % \\includegraphics[width=0.8\\textwidth]{figures/results}\n    \\caption{Description of results}\n    \\label{fig:results}\n\\end{figure}\n\n\\section{Discussion}\n\\label{sec:discussion}\n\nDiscussion of findings.\n\n\\section{Conclusion}\n\\label{sec:conclusion}\n\nConclusions and future work.\n\n\\section*{Acknowledgments}\nFunding acknowledgments here.\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>

***

## Next Steps

Ready to advance your academic LaTeX skills?

* **Templates**: Browse our [thesis templates](/templates/thesis) and [article templates](/templates/article)
* **Bibliography**: Deep dive into [BibLaTeX management](/learn/latex/bibliography-citations)
* **Collaboration**: Learn [collaboration workflows for LaTeX](/learn/latex/how-to/collaboration-workflow)
* **Math**: Master [mathematical expressions](/learn/latex/mathematics/mathematical-expressions)

<Info>
  **Need your institution's template?** Many universities provide official LaTeX thesis templates. Check with your graduate school or department.
</Info>
