Token导航 LogoToken导航TokenDH.com
待分类只读github未标认证来源可访问许可证需确认审计通过

latexlatex 文档

Agent Skill

latex 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

881

周安装

36

GitHub Stars

4

下载量

282
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:latex(latex 文档)
来源仓库:https://github.com/igbuend/grimbard
仓库路径:skills/latex
安装命令:
npx skills add https://github.com/igbuend/grimbard --skill latex
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/igbuend/grimbard --skill latex

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕仓库状态或代码变更进行整理。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装命令:npx skills add https://github.com/igbuend/grimbard --skill latex
  • 安装前建议确认权限范围和维护状态。

SKILL.md

LaTeX Skill

1. Overview

LaTeX is a markup language and typesetting system for producing high-quality documents. It excels at structured documents with complex formatting, mathematics, cross-references, and bibliographies.

When to use LaTeX:

  • Academic papers, journal submissions
  • Theses and dissertations
  • Technical documentation
  • CVs and résumés
  • Presentations (Beamer)
  • Books, reports, letters

Key concepts:

ConceptDescription
PreambleEverything before \begin{document} — class, packages, settings
Document bodyContent between \begin{document} and \end{document}
CommandsStart with \, e.g. \textbf{bold}. Optional args in [], required in {}
Environments\begin{name}...\end{name} blocks for scoped formatting
PackagesExtensions loaded with \usepackage{name} in the preamble

2. Document Structure

Document Classes

\documentclass[options]{class}
ClassUse case
articleShort documents, papers, assignments
reportLonger documents with chapters
bookBooks (front/back matter, chapters)
beamerPresentations/slides
letterFormal letters
memoirFlexible — replaces article/report/book

Common Class Options

\documentclass[12pt,a4paper,twocolumn,draft]{article}
OptionValues
Font size10pt, 11pt, 12pt
Papera4paper, letterpaper, a5paper
Columnsonecolumn, twocolumn
Sidesoneside, twoside
Draftdraft (shows overfull boxes, skips images)

Minimal Document

\documentclass[12pt,a4paper]{article}

% === PREAMBLE ===
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{hyperref}

\title{My Document}
\author{Author Name}
\date{\today}

% === BODY ===
\begin{document}
\maketitle
\tableofcontents

\section{Introduction}
Content here.

\end{document}

3. Text Formatting

Style Commands

CommandResult
\textbf{text}bold
\textit{text}*italic*
\underline{text}underlined
\emph{text}emphasis (italic, or upright if already italic)
\texttt{text}monospace
\textsc{text}SMALL CAPS
\textsf{text}sans-serif

Font Sizes

Smallest to largest:

\tiny  \scriptsize  \footnotesize  \small  \normalsize
\large  \Large  \LARGE  \huge  \Huge

Use as: {\large This text is large.} or as environment.

Font Families

CommandDeclarationFamily
\textrm{}\rmfamilySerif (Roman)
\textsf{}\sffamilySans-serif
\texttt{}\ttfamilyMonospace

Alignment

\begin{center}    Centered text.    \end{center}
\begin{flushleft} Left-aligned.     \end{flushleft}
\begin{flushright} Right-aligned.   \end{flushright}

Or inline: \centering, \raggedright, \raggedleft

Spacing

\vspace{1cm}          % vertical space
\hspace{2em}          % horizontal space
\vfill                % stretch vertical
\hfill                % stretch horizontal
\\[0.5cm]             % line break with extra space
\setlength{\parskip}{0.5em}   % paragraph spacing
\setlength{\parindent}{0pt}   % remove paragraph indent
\noindent             % suppress indent for one paragraph

Line spacing (requires setspace package):

\usepackage{setspace}
\onehalfspacing    % or \doublespacing, \singlespacing

Special Characters

These characters must be escaped:

CharacterLaTeXCharacterLaTeX
%\%$\$
&\&#\#
_\_{\{
}\}~\textasciitilde
^\textasciicircum\\textbackslash

4. Document Organization

Sectioning

\part{Part Title}           % only in report/book
\chapter{Chapter Title}     % only in report/book
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}
\paragraphsub{Subparagraph}

Starred versions (\section*{}) suppress numbering and TOC entry.

Table of Contents

\tableofcontents    % requires two compilations
\listoffigures
\listoftables

Lists

% Bulleted
\begin{itemize}
  \item First item
  \item Second item
\end{itemize}

% Numbered
\begin{enumerate}
  \item First
  \item Second
\end{enumerate}

% Labeled
\begin{description}
  \item[Term] Definition here.
\end{description}

Customize with enumitem package:

\usepackage{enumitem}
\begin{enumerate}[label=(\alph*), start=1]

Cross-References

\section{Methods}\label{sec:methods}
See Section~\ref{sec:methods} on page~\pageref{sec:methods}.

With hyperref, use \autoref{sec:methods} for automatic "Section 2" text.

Rule: Always place \label *after* \caption (in floats) or after the sectioning command.

Footnotes

This has a footnote.\footnote{Footnote text here.}

5. Mathematics

Inline vs Display

Inline: $E = mc^2$ or \(E = mc^2\)

Display:
\[ E = mc^2 \]

% Numbered equation:
\begin{equation}\label{eq:einstein}
  E = mc^2
\end{equation}

Essential Packages

\usepackage{amsmath}    % align, cases, matrices, etc.
\usepackage{amssymb}    % extra symbols (ℝ, ℤ, etc.)
\usepackage{mathtools}  % extends amsmath (dcases, coloneqq, etc.)

Common Constructs

% Fractions
\frac{a}{b}          \dfrac{a}{b}  (display-size)

% Roots
\sqrt{x}             \sqrt[3]{x}

% Sub/superscripts
x_{i}   x^{2}   x_{i}^{2}   a_{i,j}

% Sums, products, integrals
\sum_{i=1}^{n} x_i      \prod_{i=1}^{n} x_i
\int_{0}^{\infty} f(x)\,dx
\lim_{x \to \infty} f(x)

% Brackets (auto-sized)
\left( \frac{a}{b} \right)
\left[ ... \right]
\left\{ ... \right\}

Matrices

\begin{pmatrix} a & b \\ c & d \end{pmatrix}   % (a b; c d)
\begin{bmatrix} a & b \\ c & d \end{bmatrix}   % [a b; c d]
\begin{vmatrix} a & b \\ c & d \end{vmatrix}   % |a b; c d| (determinant)
\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}   % {a b; c d}

Aligned Equations

\begin{align}
  f(x) &= x^2 + 2x + 1 \label{eq:f} \\
  g(x) &= x^3 - 1       \label{eq:g}
\end{align}

% No numbering:
\begin{align*}
  a &= b + c \\
  d &= e + f
\end{align*}

Cases

f(x) = \begin{cases}
  x^2  & \text{if } x \geq 0 \\
  -x^2 & \text{if } x < 0
\end{cases}

Greek Letters

LowerCommandUpperCommand
α\alphaΑA
β\betaΒB
γ\gammaΓ\Gamma
δ\deltaΔ\Delta
ε\epsilon, \varepsilonΕE
θ\thetaΘ\Theta
λ\lambdaΛ\Lambda
μ\mu
π\piΠ\Pi
σ\sigmaΣ\Sigma
φ\phi, \varphiΦ\Phi
ω\omegaΩ\Omega

Common Math Symbols

SymbolCommandSymbolCommand
\leq\geq
\neq\approx
±\pm×\times
÷\div·\cdot
\in\notin
\subset\subseteq
\cup\cap
\infty\partial
\nabla\forall
\exists\to, \rightarrow
\Rightarrow\Leftrightarrow
\mathbb{R}\mathbb{Z}
\dots, \ldots, \cdots

6. Tables

Basic Table

\begin{table}[htbp]
  \centering
  \caption{Results summary}\label{tab:results}
  \begin{tabular}{lcrp{4cm}}
    \toprule
    Name & Count & Score & Description \\
    \midrule
    Alpha & 10 & 95.2 & First entry \\
    Beta  & 20 & 87.1 & Second entry \\
    \bottomrule
  \end{tabular}
\end{table}

Column Specifiers

SpecAlignment
lLeft
cCenter
rRight
p{width}Paragraph (top-aligned, fixed width)
m{width}Middle-aligned paragraph (requires array)
``

Key Packages

\usepackage{booktabs}   % \toprule, \midrule, \bottomrule (professional rules)
\usepackage{multirow}   % \multirow{nrows}{width}{text}
\usepackage{longtable}  % tables spanning multiple pages
\usepackage{tabularx}   % auto-width X columns

Multi-column/row

\multicolumn{3}{c}{Spanning header} \\
\multirow{2}{*}{Tall cell}

7. Figures and Images

\usepackage{graphicx}

\begin{figure}[htbp]
  \centering
  \includegraphics[width=0.8\textwidth]{images/photo.png}
  \caption{A descriptive caption.}\label{fig:photo}
\end{figure}

includegraphics Options

OptionExample
widthwidth=0.5\textwidth
heightheight=5cm
scalescale=0.75
angleangle=90
trimtrim=1cm 2cm 1cm 2cm, clip (left bottom right top)

Float Placement

SpecifierMeaning
hHere (approximately)
tTop of page
bBottom of page
pDedicated float page
!Override internal limits
HExactly here (requires float package)

Subfigures

\usepackage{subcaption}

\begin{figure}[htbp]
  \centering
  \begin{subfigure}[b]{0.48\textwidth}
    \includegraphics[width=\textwidth]{img1.png}
    \caption{First}\label{fig:sub1}
  \end{subfigure}
  \hfill
  \begin{subfigure}[b]{0.48\textwidth}
    \includegraphics[width=\textwidth]{img2.png}
    \caption{Second}\label{fig:sub2}
  \end{subfigure}
  \caption{Both images}\label{fig:both}
\end{figure}

8. Bibliographies and Citations

BibTeX Workflow

  1. Create references.bib:
@article{smith2023,
  author  = {Smith, John and Doe, Jane},
  title   = {An Important Paper},
  journal = {Journal of Examples},
  year    = {2023},
  volume  = {42},
  pages   = {1--15},
  doi     = {10.1234/example}
}

@book{knuth1984,
  author    = {Knuth, Donald E.},
  title     = {The {\TeX}book},
  publisher = {Addison-Wesley},
  year      = {1984}
}
  1. In document:
\usepackage{natbib}  % or use biblatex
\bibliographystyle{plainnat}

As shown by \citet{smith2023}...  % Smith and Doe (2023)
This is known \citep{smith2023}.  % (Smith and Doe, 2023)

\bibliography{references}
  1. Compile: pdflatex → bibtex → pdflatex → pdflatex

BibLaTeX Workflow (Modern)

\usepackage[backend=biber, style=authoryear]{biblatex}
\addbibresource{references.bib}

\textcite{smith2023}   % Smith and Doe (2023)
\parencite{smith2023}  % (Smith and Doe, 2023)

\printbibliography

Compile: pdflatex → biber → pdflatex → pdflatex

natbib vs biblatex

Featurenatbibbiblatex
BackendBibTeXBiber (recommended)
FlexibilityLimited stylesHighly customizable
UnicodePoorFull support
RecommendationLegacy projectsNew projects

9. Code Listings

verbatim

\begin{verbatim}
def hello():
    print("Hello, world!")
\end{verbatim}

Inline: \verb|some_code()|

listings Package

\usepackage{listings}
\usepackage{xcolor}

\lstdefinestyle{mystyle}{
  basicstyle=\ttfamily\small,
  keywordstyle=\color{blue},
  commentstyle=\color{gray},
  stringstyle=\color{red},
  numbers=left,
  numberstyle=\tiny,
  frame=single,
  breaklines=true
}

\begin{lstlisting}[language=Python, style=mystyle, caption={Example}]
def factorial(n):
    """Compute factorial."""
    if n <= 1:
        return 1
    return n * factorial(n - 1)
\end{lstlisting}

minted Package (Prettier, Requires Pygments)

\usepackage{minted}

\begin{minted}[linenos, frame=lines, fontsize=\small]{python}
def factorial(n):
    if n <= 1:
        return 1
    return n * factorial(n - 1)
\end{minted}

Compile with: pdflatex -shell-escape document.tex

10. Presentations (Beamer)

\documentclass{beamer}
\usetheme{Madrid}          % or: Berlin, Warsaw, Metropolis, etc.
\usecolortheme{default}    % or: beaver, crane, dolphin, etc.

\title{My Presentation}
\author{Author}
\date{\today}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\section{Introduction}
\begin{frame}{Introduction}
  \begin{itemize}
    \item<1-> First point (appears on slide 1+)
    \item<2-> Second point (appears on slide 2+)
    \item<3-> Third point
  \end{itemize}
\end{frame}

\begin{frame}{With Columns}
  \begin{columns}
    \begin{column}{0.5\textwidth}
      Left content
    \end{column}
    \begin{column}{0.5\textwidth}
      Right content
    \end{column}
  \end{columns}
\end{frame}

\end{document}

Popular themes: Madrid, Berlin, Metropolis (modern, clean), Warsaw, CambridgeUS

Overlay Commands

CommandEffect
\pauseShow content incrementally
\onslide<2>{text}Show on slide 2 only
\only<1>{text}Only on slide 1 (no space reserved)
\visible<2->{text}Visible from slide 2 onward
\alert<2>{text}Highlighted on slide 2

11. Page Layout

Margins (geometry)

\usepackage[margin=2.5cm]{geometry}
% or:
\usepackage[top=3cm, bottom=3cm, left=2cm, right=2cm]{geometry}

Headers and Footers (fancyhdr)

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}                          % clear all
\fancyhead[L]{Left Header}
\fancyhead[R]{\rightmark}          % current section
\fancyfoot[C]{\thepage}            % page number center
\renewcommand{\headrulewidth}{0.4pt}

Page Numbering

\pagenumbering{roman}   % i, ii, iii (for front matter)
\pagenumbering{arabic}  % 1, 2, 3 (for main content)
\thispagestyle{empty}   % no number on this page

Multi-Column

\usepackage{multicol}
\begin{multicols}{2}
  Content in two columns...
\end{multicols}

12. Common Packages Reference

PackagePurpose
amsmathEnhanced math environments
amssymbExtra math symbols (ℝ, ℤ, etc.)
mathtoolsExtensions to amsmath
graphicxImage inclusion
hyperrefClickable links, PDF metadata
geometryPage margins and dimensions
booktabsProfessional table rules
multirowMulti-row table cells
longtableMulti-page tables
tabularxAuto-width table columns
xcolorColor support
listingsCode listings
mintedSyntax-highlighted code (needs Pygments)
tikzProgrammatic graphics and diagrams
pgfplotsData plots (built on TikZ)
fancyhdrCustom headers/footers
setspaceLine spacing
enumitemCustomize list environments
subcaptionSubfigures and subtables
floatExtra float control ([H] placement)
babelLanguage/hyphenation support
inputencInput encoding (utf8)
fontencFont encoding (T1)
microtypeMicrotypographic enhancements
cleverefSmart cross-references (\cref)
siunitxSI units and number formatting
algorithm2eAlgorithm pseudocode
natbibCitation management
biblatexModern bibliography management
csquotesContext-sensitive quotation marks
urlTypeset URLs
captionCustomize caption formatting
appendixAppendix management

Load order tip: Load hyperref last (or near-last). Exceptions: cleveref goes after hyperref.

13. Compilation

Engines

EngineUse when
pdflatexDefault. Most compatible. ASCII/Latin input.
xelatexSystem fonts (TTF/OTF), full Unicode
lualatexSystem fonts + Lua scripting, full Unicode

Compilation Sequence

# Basic document
pdflatex document.tex

# With bibliography (BibTeX)
pdflatex document.tex
bibtex document
pdflatex document.tex
pdflatex document.tex

# With bibliography (Biber/BibLaTeX)
pdflatex document.tex
biber document
pdflatex document.tex
pdflatex document.tex

# Automated (recommended)
latexmk -pdf document.tex           # pdflatex
latexmk -xelatex document.tex       # xelatex
latexmk -lualatex document.tex      # lualatex
latexmk -pdf -pvc document.tex      # continuous preview

Common Errors and Fixes

ErrorCauseFix
Undefined control sequenceTypo or missing packageCheck spelling; add \usepackage
Missing $ insertedMath symbol outside math modeWrap in $...$
Missing \begin{document}Error in preambleCheck preamble for typos
File not foundWrong path or missing fileCheck filename/path, check extension
Overfull \hboxLine too wideRephrase, add \allowbreak, or use \sloppy
Undefined citationMissing bib entry or no bibtex runRun bibtex/biber, check.bib keys
Too many unprocessed floatsToo many figures queuedAdd \clearpage or use [H]
Dimension too largeImage scaling issueCheck width/height values
Package clashTwo packages conflictLoad one, check docs for compatibility

Reading Log Files

  • Look at the .log file for full error context
  • Errors show as ! lines
  • Warnings show as LaTeX Warning: or Package xyz Warning:
  • Rerun to get cross-references right → compile again

14. Tips and Best Practices

  1. Multi-file projects: Use \input{chapters/intro} (inserts inline) or \include{chapters/intro} (adds \clearpage, enables \includeonly)
  2. Custom preamble: Move package loading to preamble.sty or preamble.tex, then \input{preamble}
  3. Label after caption: \caption{...}\label{fig:x} — never the reverse
  4. Non-breaking spaces: Figure~\ref{fig:x}, Section~\ref{sec:y} — prevents linebreak before number
  5. Draft mode: \documentclass[draft]{article} — speeds compilation, shows overfull boxes
  6. Use \centering not center inside floats (avoids extra vertical spacing)
  7. Avoid \\ for paragraph breaks — use blank lines instead
  8. Use booktabs — never \hline and vertical lines for professional tables
  9. Use microtype — improves typography with zero effort
  10. Use cleveref\cref{fig:x} auto-generates "Figure 1" text
  11. Version control: LaTeX is plain text — use Git
  12. One sentence per line — makes diffs cleaner in version control

15. Quick Reference

Most Common Commands

TaskCommand
Bold\textbf{text}
Italic\textit{text}
Monospace\texttt{text}
Section\section{Title}
Reference\ref{label}
Citation\cite{key}
Footnote\footnote{text}
Image\includegraphics[width=\textwidth]{file}
URL\url{https://...} or \href{url}{text}
List item\item
New page\newpage or \clearpage
Comment% comment
Math inline$E=mc^2$
Math display\[E=mc^2 \]
Fraction\frac{a}{b}

Math Operators

CommandSymbolCommandSymbol
\sinsin\coscos
\tantan\loglog
\lnln\expexp
\minmin\maxmax
\limlim\sumΣ
\prodΠ\int

Arrows

CommandSymbol
\rightarrow, \to
\leftarrow
\leftrightarrow
\Rightarrow
\Leftarrow
\Leftrightarrow
\mapsto
\uparrow
\downarrow

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.54%
按下载量换算97

Claude

32.89%
按下载量换算93

Cursor

19.83%
按下载量换算56

Gemini CLI

9.05%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills