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

# Writing Articles in LaTeX

> Complete guide to writing professional articles in LaTeX. Learn document structure, formatting, citations, and best practices for academic papers.

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

Learn how to create professional articles and papers using LaTeX. This guide covers everything from basic document structure to advanced formatting for publication-ready documents.

<Info>
  **Quick start**: LaTeX Cloud Studio provides ready-to-use article templates. Click "New Project" and select "Article" to get started immediately.

  **Related topics**: [Bibliography management](/learn/latex/bibliography-citations) | [Cross-referencing](/learn/latex/cross-referencing) | [Mathematical typesetting](/learn/latex/mathematics/basics)
</Info>

## Basic Article Structure

### Minimal Article Document

<LatexSource filename="basic-article.tex" source={"\\documentclass[12pt,a4paper]{article}\n\n% Packages\n\\usepackage[utf8]{inputenc}\n\\usepackage[english]{babel}\n\\usepackage{amsmath}\n\\usepackage{graphicx}\n\\usepackage{hyperref}\n\n% Document information\n\\title{Your Article Title}\n\\author{Your Name}\n\\date{\\today}\n\n\\begin{document}\n\n\\maketitle\n\n\\begin{abstract}\nYour abstract goes here. This should be a brief summary of your article,\ntypically 150-250 words.\n\\end{abstract}\n\n\\section{Introduction}\nYour introduction text here.\n\n\\section{Methodology}\nDescribe your methods.\n\n\\section{Results}\nPresent your findings.\n\n\\section{Conclusion}\nSummarize your work.\n\n\\bibliographystyle{plain}\n\\bibliography{references}\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=learn_latex_how_to_articles">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-01/page-1.svg" alt="Compiled PDF page 1 from basic-article.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

### Document Class Options

<LatexSource filename="document-options.tex" source={"% Font sizes\n\\documentclass[10pt]{article}  % 10pt, 11pt, 12pt\n\n% Paper sizes\n\\documentclass[a4paper]{article}  % a4paper, letterpaper, legalpaper\n\\documentclass[letterpaper]{article}\n\n% Layout options\n\\documentclass[twocolumn]{article}  % Two-column layout\n\\documentclass[landscape]{article}  % Landscape orientation\n\\documentclass[draft]{article}      % Draft mode\n\n% Multiple options\n\\documentclass[11pt,a4paper,twocolumn,draft]{article}"} />

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

## Author and Title Information

### Single Author

<LatexSource filename="single-author.tex" source={"\\title{The Impact of Climate Change on Marine Ecosystems}\n\\author{Jane Smith\\\\\n  Department of Marine Biology\\\\\n  University of Example\\\\\n  \\texttt{j.smith&#64;example.edu}}\n\\date{March 2024}\n\n\\maketitle"} />

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

### Multiple Authors

<LatexSource filename="multiple-authors.tex" source={"\\documentclass{article}\n\\usepackage{authblk}\n\n\\title{Collaborative Research in Quantum Computing}\n\n\\author[1]{Alice Johnson}\n\\author[2]{Bob Chen}\n\\author[1,2]{Carol Williams}\n\n\\affil[1]{Department of Physics, University A}\n\\affil[2]{Computer Science Department, University B}\n\n\\date{\\today}\n\n\\begin{document}\n\\maketitle\n\n% Alternative without authblk package\n\\author{Alice Johnson$^1$, Bob Chen$^2$, and Carol Williams$^{1,2}$\\\\\n  $^1$Department of Physics, University A\\\\\n  $^2$Computer Science Department, University B\\\\\n  \\texttt{\\{ajohnson,cwilliams\\}&#64;unia.edu, bchen&#64;unib.edu}}\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>

## Abstract and Keywords

<LatexSource filename="abstract-keywords.tex" source={"\\documentclass{article}\n\\usepackage{abstract}\n\n\\begin{document}\n\n\\title{Machine Learning Applications in Healthcare}\n\\author{Research Team}\n\\date{\\today}\n\n\\maketitle\n\n\\begin{abstract}\n\\noindent\nThis paper presents a comprehensive review of machine learning applications\nin modern healthcare systems. We analyze various algorithms and their\neffectiveness in disease diagnosis, treatment planning, and patient outcome\nprediction. Our findings suggest that deep learning models achieve 95\\%\naccuracy in early cancer detection.\n\\end{abstract}\n\n\\textbf{Keywords:} machine learning, healthcare, deep learning,\nmedical diagnosis, artificial intelligence\n\n% Alternative abstract style\n\\renewcommand{\\abstractname}{Executive Summary}\n\\begin{abstract}\nYour executive summary here...\n\\end{abstract}\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-05/page-1.svg" alt="Compiled PDF page 1 from abstract-keywords.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

## Sections and Structure

### Section Hierarchy

<LatexSource filename="section-hierarchy.tex" source={"\\documentclass{article}\n\\setcounter{secnumdepth}{3} % Number subsubsections\n\\setcounter{tocdepth}{3}    % Include in table of contents\n\n\\begin{document}\n\n\\tableofcontents\n\\newpage\n\n\\section{Introduction}\nMain section text.\n\n\\subsection{Background}\nSubsection text.\n\n\\subsubsection{Historical Context}\nSubsubsection text.\n\n\\paragraph{Important Note}\nParagraph-level heading (usually unnumbered).\n\n\\subparagraph{Detail}\nSubparagraph-level heading.\n\n% Unnumbered sections\n\\section*{Acknowledgments}\nThanks to...\n\n% Custom numbering\n\\setcounter{section}{0}\n\\renewcommand{\\thesection}{\\Alph{section}}\n\\section{Appendix A}\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-06/page-1.svg" alt="Compiled PDF page 1 from section-hierarchy.tex" caption="Page 1 of 2. Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />

  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-06/page-2.svg" alt="Compiled PDF page 2 from section-hierarchy.tex" caption="Page 2 of 2. Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

### Cross-References

<LatexSource filename="cross-references.tex" source={"\\section{Introduction}\n\\label{sec:intro}\nAs we will discuss in Section~\\ref{sec:methods}, our approach...\n\n\\subsection{Problem Statement}\n\\label{subsec:problem}\nThe main equation is shown in Eq.~\\eqref{eq:main}.\n\n\\section{Methods}\n\\label{sec:methods}\nBuilding on the problem stated in Section~\\ref{subsec:problem}...\n\n\\begin{equation}\nE = mc^2\n\\label{eq:main}\n\\end{equation}\n\n% Using cleveref package for better references\n\\usepackage{cleveref}\n\\cref{sec:intro} shows...  % Automatically adds \"Section\"\n\\Cref{eq:main} demonstrates...  % Capital version"} />

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

## Figures and Tables

### Figure Placement

<LatexSource filename="article-figures.tex" source={"\\documentclass{article}\n\\usepackage{graphicx}\n\\usepackage{float}\n\n\\begin{document}\n\n\\section{Results}\n\nFigure~\\ref{fig:results} shows our experimental results.\n\n\\begin{figure}[htbp]\n  \\centering\n  \\includegraphics[width=0.8\\textwidth]{results.png}\n  \\caption{Experimental results showing the relationship between\n           temperature and reaction rate.}\n  \\label{fig:results}\n\\end{figure}\n\n% Two figures side by side\n\\begin{figure}[htbp]\n  \\centering\n  \\begin{minipage}{0.45\\textwidth}\n    \\centering\n    \\includegraphics[width=\\textwidth]{fig1.png}\n    \\caption{First result}\n    \\label{fig:first}\n  \\end{minipage}\n  \\hfill\n  \\begin{minipage}{0.45\\textwidth}\n    \\centering\n    \\includegraphics[width=\\textwidth]{fig2.png}\n    \\caption{Second result}\n    \\label{fig:second}\n  \\end{minipage}\n\\end{figure}\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>

### Professional Tables

<LatexSource filename="article-tables.tex" source={"\\documentclass{article}\n\\usepackage{booktabs}\n\\usepackage{siunitx}\n\n\\begin{document}\n\n\\section{Data Analysis}\n\nTable~\\ref{tab:results} summarizes our findings.\n\n\\begin{table}[htbp]\n  \\centering\n  \\caption{Comparison of algorithm performance}\n  \\label{tab:results}\n  \\begin{tabular}{lS[table-format=2.1]S[table-format=2.1]S[table-format=1.2]}\n    \\toprule\n    Algorithm & {Time (s)} & {Memory (MB)} & {Accuracy} \\\\\n    \\midrule\n    Method A & 12.3 & 45.6 & 0.92 \\\\\n    Method B & 8.7 & 67.8 & 0.95 \\\\\n    Method C & 15.2 & 23.4 & 0.89 \\\\\n    \\midrule\n    Baseline & 20.1 & 89.0 & 0.85 \\\\\n    \\bottomrule\n  \\end{tabular}\n\\end{table}\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-09/page-1.svg" alt="Compiled PDF page 1 from article-tables.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={612} height={792} />
</RenderedOutput>

## Citations and Bibliography

### Using BibTeX

<CodeGroup>
  ```latex bibtex-citations.tex theme={null}
  \documentclass{article}
  \usepackage{natbib} % or biblatex

  \begin{document}

  \section{Literature Review}

  % Citation styles
  According to \citet{smith2020}, climate change affects...
  Recent studies \citep{jones2021,brown2022} show...
  As demonstrated by \citeauthor{wilson2019}...
  In \citeyear{taylor2023}, researchers found...

  % Multiple citations
  Several works \citep{ref1,ref2,ref3} address this issue.

  \bibliographystyle{apalike} % or plain, abbrv, unsrt, alpha
  \bibliography{references} % references.bib file

  \end{document}
  ```

  ```bibtex references.bib theme={null}
  @article{smith2020,
    author = {Smith, John and Doe, Jane},
    title = {Climate Change Impacts on Marine Life},
    journal = {Nature Climate Change},
    year = {2020},
    volume = {10},
    number = {3},
    pages = {234--245},
    doi = {10.1038/s41558-020-0734-z}
  }

  @book{jones2021,
    author = {Jones, Alice B.},
    title = {Introduction to Environmental Science},
    publisher = {Academic Press},
    year = {2021},
    edition = {3rd},
    address = {New York}
  }

  @inproceedings{brown2022,
    author = {Brown, Charlie and Green, David},
    title = {Machine Learning for Climate Prediction},
    booktitle = {Proceedings of ICML 2022},
    year = {2022},
    pages = {1234--1245}
  }
  ```
</CodeGroup>

<RenderedOutput title="Expected effect">
  <Info>
    This code group documents a multi-step workflow across LaTeX and another file or command language. The blocks work together in a project, so there is no single standalone LaTeX page that would honestly represent the whole group.
  </Info>
</RenderedOutput>

### Using biblatex

<LatexSource filename="biblatex-citations.tex" source={"\\documentclass{article}\n\\usepackage[backend=biber,style=authoryear]{biblatex}\n\\addbibresource{references.bib}\n\n\\begin{document}\n\n% In-text citations\n\\textcite{smith2020} found that...\nThis was confirmed \\parencite{jones2021}.\n\\citeauthor{brown2022} argues...\n\n% Footnote citations\nSome claim this is true.\\footcite{wilson2019}\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>

## Mathematical Content

### Equations in Articles

<LatexSource filename="article-math.tex" source={"\\documentclass{article}\n\\usepackage{amsmath,amssymb,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}[theorem]{Remark}\n\n\\begin{document}\n\n\\section{Mathematical Framework}\n\n\\begin{definition}[Convergence]\nA sequence $(x_n)$ converges to $x$ if for every $\\epsilon > 0$,\nthere exists $N \\in \\mathbb{N}$ such that $|x_n - x| < \\epsilon$\nfor all $n > N$.\n\\end{definition}\n\n\\begin{theorem}[Fundamental Theorem]\n\\label{thm:fundamental}\nLet $f: [a,b] \\to \\mathbb{R}$ be continuous. Then\n\\begin{equation}\n\\int_a^b f'(x)\\,dx = f(b) - f(a)\n\\end{equation}\n\\end{theorem}\n\n\\begin{proof}\nThe proof follows from... \\qed\n\\end{proof}\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-11/page-1.svg" alt="Compiled PDF page 1 from article-math.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={595.276} height={841.89} />
</RenderedOutput>

## Page Layout and Formatting

### Custom Page Layout

<LatexSource filename="page-layout.tex" source={"\\documentclass[12pt,a4paper]{article}\n\\usepackage{geometry}\n\n% Adjust margins\n\\geometry{\n  left=25mm,\n  right=25mm,\n  top=30mm,\n  bottom=30mm,\n  headheight=15pt\n}\n\n% Headers and footers\n\\usepackage{fancyhdr}\n\\pagestyle{fancy}\n\\fancyhf{} % Clear all headers/footers\n\\fancyhead[L]{Article Title}\n\\fancyhead[R]{\\thepage}\n\\fancyfoot[C]{Journal Name, Vol. X, No. Y, 2024}\n\n% Line spacing\n\\usepackage{setspace}\n\\onehalfspacing % or \\doublespacing\n\n% Paragraph formatting\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1em}\n\n\\begin{document}\n% Content here\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>

### Journal-Specific Formatting

<LatexSource filename="journal-format.tex" source={"% IEEE format\n\\documentclass[journal]{IEEEtran}\n\n% ACM format\n\\documentclass[sigconf]{acmart}\n\n% Elsevier format\n\\documentclass[preprint,12pt]{elsarticle}\n\n% Springer format\n\\documentclass[smallextended]{svjour3}\n\n% Each journal class has specific requirements\n% Always check the journal's author guidelines"} />

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

## Advanced Features

### Code Listings

<LatexSource filename="code-listings.tex" source={"\\documentclass{article}\n\\usepackage{listings}\n\\usepackage{xcolor}\n\n\\lstset{\n  language=Python,\n  basicstyle=\\ttfamily\\small,\n  keywordstyle=\\color{blue},\n  commentstyle=\\color{green!60!black},\n  stringstyle=\\color{red},\n  numbers=left,\n  numberstyle=\\tiny\\color{gray},\n  breaklines=true,\n  frame=single,\n  captionpos=b\n}\n\n\\begin{document}\n\n\\section{Implementation}\n\n\\begin{lstlisting}[caption={Python implementation},label={lst:python}]\ndef calculate_mean(data):\n    \"\"\"Calculate the mean of a dataset.\"\"\"\n    return sum(data) / len(data)\n\n# Example usage\ndata = [1, 2, 3, 4, 5]\nmean = calculate_mean(data)\nprint(f\"Mean: {mean}\")\n\\end{lstlisting}\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-14/page-1.svg" alt="Compiled PDF page 1 from code-listings.tex" caption="Generated from the shown source with pdfLaTeX in the pinned LaTeXCloud TeX Live 2026 environment." width={612} height={792} />
</RenderedOutput>

### Appendices

<LatexSource filename="appendices.tex" source={"\\documentclass{article}\n\\usepackage{appendix}\n\n\\begin{document}\n\n\\section{Introduction}\nMain content...\n\n\\section{Results}\nMore content...\n\n\\appendix\n\\section{Detailed Calculations}\n\\label{app:calculations}\nExtended mathematical derivations...\n\n\\section{Additional Data}\n\\label{app:data}\nSupplementary tables and figures...\n\n% Alternative approach\n\\begin{appendices}\n\\section{First Appendix}\nContent...\n\\section{Second Appendix}\nMore content...\n\\end{appendices}\n\n\\end{document}"} />

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

## Best Practices

<Tip>
  **Article writing guidelines:**

  1. **Structure**: Follow the standard IMRaD format (Introduction, Methods, Results, and Discussion)
  2. **Clarity**: Write clear, concise sentences and paragraphs
  3. **Consistency**: Use consistent notation and terminology throughout
  4. **Citations**: Cite all sources properly and consistently
  5. **Figures**: Ensure all figures are high-quality and properly labeled
  6. **Proofreading**: Always compile and proofread the final PDF
  7. **Templates**: Use journal-specific templates when available
</Tip>

## Submission Checklist

<Warning>
  **Before submitting your article:**

  * [ ] Check journal formatting requirements
  * [ ] Verify all citations are included
  * [ ] Ensure figures are high resolution (300+ DPI)
  * [ ] Remove all draft/todo comments
  * [ ] Check page limits and word count
  * [ ] Include all required sections
  * [ ] Validate references format
  * [ ] Test compile on clean system
</Warning>

## Quick Templates

### Research Article Template

<LatexSource filename="example.tex" source={"\\documentclass[twocolumn]{article}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{times}\n\\usepackage{graphicx}\n\\usepackage{amsmath}\n\\usepackage{cite}\n\n\\title{Your Research Title}\n\\author{Author Name\\\\Institution}\n\\date{}\n\n\\begin{document}\n\\maketitle\n\n\\begin{abstract}\nAbstract text (150-250 words)\n\\end{abstract}\n\n\\section{Introduction}\n\\section{Related Work}\n\\section{Methodology}\n\\section{Results}\n\\section{Discussion}\n\\section{Conclusion}\n\n\\bibliographystyle{plain}\n\\bibliography{refs}\n\n\\end{document}"} />

<RenderedOutput title="Rendered output">
  <LatexPreview src="/images/rendered/learn-latex-how-to-articles-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." width={612} height={792} />
</RenderedOutput>

***

<Info>
  **Next**: Learn how to create [Professional presentations](/learn/latex/how-to/presentations) using LaTeX and Beamer.
</Info>
