Skip to Content
🎉 TexSlide is released. Read more →
DocumentationGlobal Preamble

In TexSlide, all LaTeX content within the current file shares a unified preamble, ensuring consistent LaTeX styling throughout the document.

Operation Steps

  1. Click TexSlide → Preferences in the menu bar, then select TexSlide → Formula in the Options panel.
  2. As shown below, set the global preamble for the file in the LaTeX Preamble section on the right.

LaTex Preamble Setting

Preamble Content

TexSlide provides a default preamble with the following content:

\def\pgfsysdriver{pgfsys-dvisvgm.def} \usepackage{amsmath} \usepackage{amssymb} \usepackage{ifxetex} \ifxetex \usepackage{xeCJK} \fi

You can customize the global preamble according to your needs. Here is a structured example:

% ======================== % 1. Driver Setup (Highest Priority) % ======================== \def\pgfsysdriver{pgfsys-dvisvgm.def} % ======================== % 2. Base Toolkit % ======================== \usepackage{amsmath} \usepackage{amssymb} \usepackage{ifxetex} % ======================== % 3. Document Content Packages % ======================== \usepackage{algorithm} \usepackage{algpseudocode} \usepackage{booktabs} \usepackage{caption} % ======================== % 4. Domain-Specific Packages % ======================== \usepackage{chemfig} \usepackage{mhchem} % ======================== % 5. Graphics & Visualization Packages (Post-Driver) % ======================== \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.18} \usepgfplotslibrary{fillbetween} % ======================== % 6. Custom Macros % ======================== \definecolor{myBlue}{RGB}{18,125,230} \newcommand{\mbf}{\mathbf} % ======================== % 7. Conditional Loading (Lowest Priority) % ======================== \ifxetex \usepackage{xeCJK} \fi

\def\pgfsysdriver{pgfsys-dvisvgm.def} must be placed at the very beginning of the preamble to ensure proper SVG rendering.

Check Preamble

Click Check to validate the preamble syntax and verify package availability.

  • If successful, a message will appear: Preamble check has succeeded:

LaTex Preamble Check

  • If failed, an error message will appear: Preamble check has failed:

LaTex Preamble Check

Template Management

Operation Steps

  1. Click Save To Template to save the current preamble as the template.
  2. Click Import from Template to replace the current preamble with the saved template.

Video Demonstration

Last updated on