Scissor LaTeX 的 LaTeX 宏包参考
大多数文档加载宏包时都不会出错。数学(amsmath、amssymb、bm)、pgfplots 和 TikZ、图形、表格、引用和代码清单完全可用或大部分可用;geometry 和 fancyhdr 等版面宏包、siunitx 和 physics 目前还不可用。每个宏包页面都会准确说明哪些功能可用。
如何阅读这些页面
每个页面介绍一个宏包(或几个相关的宏包),顺序都相同:宏包的作用,一张列出其命令及其在这里效果的表格,渲染好的示例,以及在 Scissor LaTeX 和 TeX 发行版之间迁移文档时会遇到什么。表格中的用词含义如下:
| 用词 | 含义 |
|---|---|
| 可用 | 按宏包手册的描述工作,可能有细微的视觉差异。 |
| 部分可用 | 其中一部分可用;说明列会指出是哪部分。 |
| 忽略 | 不会报错,但不起作用。 |
| 不支持 | 在“问题”标签页中报告;文本通常会保留,但没有格式。 |
Scissor LaTeX 不运行宏包代码。它用自己的引擎读取你的文档,所以支持与否是按命令逐个决定的,而不是按宏包。文档即使加载了不受支持的宏包,也照样能排版。
宏包一览
| 领域 | 宏包 | 支持情况 |
|---|---|---|
| 数学 | amsmath | 可用 |
| 数学 | amssymb, amsfonts | 可用,少数符号除外 |
| 数学 | amsthm | 部分可用 |
| 数学 | mathtools | 可用 |
| 数学 | bm | 可用 |
| 数学 | mathrsfs, bbm, nicefrac | 可用 |
| 数学 | cancel | 基本可用 |
| 数学 | physics | 不可用 |
| 数学 | siunitx | 不可用 |
| 表格 | booktabs | 部分可用 |
| 表格 | multirow | 部分可用 |
| 表格 | array, tabularx, longtable | 部分可用 |
| 图 | graphicx | 部分可用 |
| 图 | caption, subcaption | 部分可用 |
| 图 | float, wrapfig, rotating | 部分可用 |
| 颜色和链接 | xcolor | 部分可用 |
| 颜色和链接 | hyperref, url | 基本可用 |
| 颜色和链接 | cleveref | 基本可用 |
| 版面 | geometry | 不可用 |
| 版面 | multicol | 部分可用 |
| 版面 | enumitem, paralist | 部分可用 |
| 引用 | natbib | 基本可用 |
| 引用 | biblatex | 部分可用 |
| 代码 | listings | 部分可用 |
| 代码 | minted | 部分可用 |
| 代码 | algorithm, algpseudocode, algorithm2e | 部分可用 |
| 绘图 | pgfplots | 可用,适用于大多数二维图 |
| 绘图 | TikZ | 可用,适用于常用子集 |
| 语言和字体 | babel, polyglossia | 部分可用 |
| 语言和字体 | fontenc, inputenc, fontspec | 部分可用 |
| 其他所有宏包 | 不可用的宏包 |
典型的导言区
包含许多常用宏包的导言区可以原样排版。在这里不起作用的宏包只是被接受下来,文档在 TeX 发行版中无需修改即可编译:
原样接受的典型导言区
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,bm}
\usepackage{graphicx,booktabs}
\usepackage[margin=2.5cm]{geometry}
\usepackage{xcolor,hyperref}
\usepackage{microtype}
\begin{document}
\section{Results}
Erika Mustermann measured 44 samples. The mean
$\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i$ and the vector
$\bm{v} \in \mathbb{R}^3$ are typeset as usual.
\end{document}所有宏包页面
- Scissor LaTeX 中的 amsmathamsmath 宏包在 Scissor LaTeX 中可用:
align和gather为每一行编号,\tag、\intertext、subequations、\numberwithin、\genfrac、split、cases、各种矩阵环境和\DeclareMathOperator都与 LaTeX 中一样可用。 - Scissor LaTeX 中的 amssymb 和 amsfontsamssymb 和 amsfonts 宏包在 Scissor LaTeX 中可用,只有一个例外:
\mathbb、\mathfrak以及额外的关系符、箭头、圆圈运算符和形状都可用;只有\Bbbk会让公式显示为红色,请改写为\mathbb{k}。 - Scissor LaTeX 中的 amsthmamsthm 宏包在 Scissor LaTeX 中部分可用:
\newtheorem、带星号的\newtheorem*、[Mustermann]这样的可选附注以及proof环境都可用,而\theoremstyle、共享计数器或按节编号的计数器、证明标题和\qedhere不会生效。 - Scissor LaTeX 中的 mathtoolsmathtools 宏包在 Scissor LaTeX 中可用:
\DeclarePairedDelimiter、\coloneqq等冒号关系符、dcases、cases*、带星号的矩阵、\prescript和\shortintertext都可用;\splitfrac、multlined和少数较少用的命令会让公式显示为红色。 - Scissor LaTeX 中的 bm(粗体数学)bm 宏包可以在 Scissor LaTeX 中使用:
\bm{...}能把拉丁字母、希腊字母以及\nabla等符号设为粗体,amsmath 的\boldsymbol效果相同。 - Scissor LaTeX 中的 cancelcancel 宏包在 Scissor LaTeX 中基本可用:
\cancel、\bcancel和\xcancel可以在公式中使用,而\cancelto不受支持,会让公式显示为红色。 - Scissor LaTeX 中的 mathrsfs、bbm 和 nicefrac可以。
\mathscr(mathrsfs)给出花体大写字母,\mathbbm(bbm)和\mathds(dsfont)给出双线字母,例如指示函数 𝟙,\nicefrac(nicefrac)和\sfrac(xfrac)给出斜分数,在公式和正文中都可用。 - Scissor LaTeX 中的 physics 宏包physics 宏包在 Scissor LaTeX 中不可用:
\abs、\norm、\dv、\pdv、\qty、\vb和\grad等physics命令无法识别,所以用到它们的公式都会显示为红色;请用\newcommand定义你需要的几个命令,或者直接写出完整形式。 - Scissor LaTeX 中的 siunitxsiunitx 宏包在 Scissor LaTeX 中不可用。
\SI、\si、\qty、\unit和\num无法识别:在文本中数字会保留,但单位会消失(并在“问题”标签页中注明);在公式中整个公式会变红。请改用\mathrm和细空格\,书写单位。 - textcomp, gensymb, eurosym and latexsym in Scissor LaTeXMostly. The common textcomp symbols such as
\textdegree,\texteuro,\textcelsius,\textmuand\textonehalfwork, along with\euroand\EURfrom eurosym and the latexsym math symbols except\Box; gensymb's\degreeworks only in formulas, and rarer symbols such as\textohmor\textnumeroare skipped, so type the Unicode character instead. - Scissor LaTeX 中的 booktabsbooktabs 宏包在 Scissor LaTeX 中部分可用:
\toprule、\midrule和\bottomrule可用,而\cmidrule和\addlinespace会被接受但不起作用,并且所有横线粗细相同。 - Scissor LaTeX 中的 multirowmultirow 宏包在 Scissor LaTeX 中部分可用。
\multirow{2}{*}{text}会被接受,文本也会显示,但单元格不会跨越多行:文本位于第一行,下面各行保留各自的空单元格。 - Scissor LaTeX 中的 array、tabularx、longtable 和 tabularyarray 和 tabularx 宏包及其相关宏包在 Scissor LaTeX 中部分可用:
tabularx、tabulary、longtable和xltabular表格按tabular排版,当表格宽于行宽时长单元格会自动换行;列宽(p{3cm}、X、表格宽度)和>{...}/<{...}代码会被忽略,\newcolumntype无法识别,longtable的表头不会重复。 - Scissor LaTeX 中的 graphicx 和 \includegraphicsgraphicx 宏包在 Scissor LaTeX 中部分可用:
\includegraphics可以显示项目中的 PNG、JPG、SVG 和 PDF 文件,并读取width=;height、scale、angle、trim和clip会被忽略,\rotatebox不会旋转,\scalebox和\resizebox只能缩放 TikZ 图形。 - Scissor LaTeX 中的 caption 和 subcaptioncaption 和 subcaption 宏包在 Scissor LaTeX 中部分可用:
figure和table中的\caption可用,\captionsetup会被忽略,\captionof输出不带编号的文本,\caption*仍会带编号,subfigure/subtable会被当作单独的图计数,导致编号出错;请改为把所有部分放在同一个图中,只用一个标题。 - Scissor LaTeX 中的 float、wrapfig 和 rotatingfloat、wrapfig 和 rotating 宏包在 Scissor LaTeX 中部分可用:
float的[H]能让图准确地留在你写下它的位置,而wrapfigure和wraptable会变成普通的居中浮动体,文字不会环绕它们,sidewaysfigure和sidewaystable不会旋转,\newfloat和\restylefloat无法识别。 - placeins, afterpage and endfloat in Scissor LaTeXplaceins is accepted and
\FloatBarrierdoes nothing, which is fine in ordinary documents because Scissor LaTeX keeps every figure and table where you write it.\afterpageis skipped with a note and its content runs at once, so\afterpage{\clearpage}breaks the page right there, and endfloat does not move floats to the end. - Scissor LaTeX 中的 xcolorxcolor 宏包在 Scissor LaTeX 中部分可用:颜色在 TikZ 和 pgfplots 图形中可用(所有基本颜色名、
dvipsnames、red!50!blue这样的混合色、\definecolor和\colorlet),在公式中也可用(17 个基本颜色名),但\textcolor、\color和\colorbox会让正文文字保持黑色。 - Scissor LaTeX 中的 hyperref 和 urlhyperref 和 url 宏包在 Scissor LaTeX 中基本可用:
\href、\url、\hyperref[label]{text}、\autoref和\nameref都可用,而链接颜色、PDF 元数据等\hypersetup选项会被忽略,\nolinkurl无法识别。 - Scissor LaTeX 中的 cleveref、nameref 和 variorefcleveref 宏包在 Scissor LaTeX 中基本可用:
\cref和\Cref支持单个标签、多个标签和范围,\cpageref、\namecref、capitalise、noabbrev和nameinlink选项以及\crefname也都可用;\nameref输出编号而不是标题,\vref不给出页码提示。 - url, xurl and breakurl in Scissor LaTeXMostly.
\url{...}prints a clickable address that breaks at the end of a line, after/and similar characters or, when there is no such place, between letters, which is what xurl adds;\path{...}prints a monospaced path.\urlstyleis ignored, and\url|...|,\urldef,\nolinkurland breakurl's\burlare not supported. - ulem and soul in Scissor LaTeXPartly. ulem's
\uline,\soutand\xoutand soul's\stwork, and underlined text breaks across lines;\uulinegives a single line,\uwaveand soul's\hlkeep the text without the effect, and soul's\ul,\soand\capsare skipped with a note while the text stays. - xspace in Scissor LaTeXNot yet.
\usepackage{xspace}is accepted and\xspacecauses no error, but it adds no space, so a command such as\tooldefined with\xspaceruns into the next word; write\tool{}or\tool\before a space, which works here and in every TeX installation. - Scissor LaTeX 中的 geometry 和页边距geometry 宏包在 Scissor LaTeX 中可用:导言区中的
\usepackage[...]{geometry}和\geometry{...}会设置纸张(a0paper到a6paper、letterpaper...,或paperwidth和paperheight)、landscape以及页边距和版心(margin、left、textwidth、includehead...)。\newgeometry会被忽略,未被应用的选项会在一条提示中列出。 - Scissor LaTeX 中的 multicolmulticol 宏包在 Scissor LaTeX 中基本可用:
\begin{multicols}{3}会把其中的文本排成三栏(支持两到六栏),可选的标题横跨各栏,\columnbreak会开始下一栏。各栏依次填满而不做平衡,因此请在需要的位置用\columnbreak结束一栏。 - setspace and line spacing in Scissor LaTeXNot yet. setspace loads without errors, but line spacing cannot be changed:
\onehalfspacing,\doublespacing,\singlespacingand\linespreadare ignored, thedoublespaceandonehalfspaceenvironments keep their text at normal spacing, and\begin{spacing}{1.5}prints "1.5" before the text, so leave that environment out. - Scissor LaTeX 中的 enumitem 和 paralistenumitem 和 paralist 宏包在 Scissor LaTeX 中部分可用:enumitem 写在方括号中的选项(
label=、start=、resume、noitemsep)会被接受但不起作用,\newlist和行内列表不受支持;paralist 的compactitem、compactenum和compactdesc与标准列表的效果相同。 - Appendices and the appendix package in Scissor LaTeX
\appendixworks: the sections after it are lettered A, B, C, their subsections A.1, and references and\crefprint the letters. The appendix package'sappendicesenvironment is not supported, since its sections keep ordinary numbers, and\appendixpageand\addappheadtotocare skipped; a reference written before\appendixalso shows a number instead of the letter. - Scissor LaTeX 中的 natbibnatbib 宏包在 Scissor LaTeX 中基本可用:
\citet、\citep、\citeyear及其首字母大写形式都可用,\bibliographystyle{plainnat}或unsrtnat能给出作者-年份引用;numbers、round等宏包选项和\setcitestyle会被忽略,所以样式始终由\bibliographystyle决定。 - Scissor LaTeX 中的 biblatexbiblatex 宏包在 Scissor LaTeX 中部分可用:
\addbibresource、\cite、\parencite、\textcite、\autocite和\printbibliography都可用,但style=authoryear等宏包选项会被忽略(除非你加上\bibliographystyle,否则引用都是数字编号),\footcite留在行内,\fullcite和\citetitle不受支持。 - Scissor LaTeX 中的 listingslistings 宏包在 Scissor LaTeX 中部分可用:
lstlisting会完全按照输入保留代码,在环境上指定language=时还会着色,\lstinline也可用;\lstset、行号、边框、标题和标签会被忽略,\lstinputlisting会被跳过。 - Scissor LaTeX 中的 mintedminted 宏包在 Scissor LaTeX 中部分可用:
\begin{minted}{python}和\mintinline无需 Python 或-shell-escape即可使用,并按固定配色方案进行语法着色;linenos等选项、\setminted、\usemintedstyle、listing标题、\mint和\inputminted不受支持。 - Scissor LaTeX 中的算法宏包算法宏包在 Scissor LaTeX 中部分可用:
algorithm环境可用,支持带编号的标题和\label;algorithmic 的大写命令(\STATE、\FOR)只在会议版式中会被读取;algpseudocode(\State、\For)和 algorithm2e(\KwIn、\For{}{})不受支持,所以请改为把步骤写在verbatim块中。 - verbatim, comment and fancyvrb in Scissor LaTeXMostly. The
verbatimenvironment,\verb, fancyvrb'sVerbatimandBVerbatimprint text exactly as typed in a monospaced font, and thecommentenvironment hides its content; fancyvrb's options are ignored, and\verbatiminput,\VerbatimInput,\Verb,\excludecomment,allttandspverbatimdo not work as in a TeX installation. - Scissor LaTeX 中的 pgfplotspgfplots 宏包在 Scissor LaTeX 中可用于大多数二维图,由它自己的渲染器绘制:坐标轴、折线图、散点图和柱状图、公式、表格和 CSV 文件、对数坐标轴、误差棒、图例、groupplots、fill between 以及俯视的热图;三维视角、
axis equal和 pgfplotstable 的表格暂不支持。 - Scissor LaTeX 中的 TikZTikZ 宏包在 Scissor LaTeX 中可用于一个常用子集,由它自己绘制:线条、形状、圆弧、曲线、网格、带名称和锚点的节点、箭头、positioning 库、
\foreach、scope 和颜色;\matrix、\pic、装饰、填充图案、矩形和圆形以外的节点形状,以及 tikz-cd、circuitikz 和 forest 图形暂不支持。 - lipsum, blindtext and kantlipsum in Scissor LaTeXYes.
\lipsumand\kantprint the same paragraphs as the lipsum and kantlipsum packages, with paragraph and sentence ranges, the star and thenoparoption;\blindtext,\Blindtext,\blinddocumentand the blind lists work too, but with English placeholder text of their own. - Scissor LaTeX 中的 babel 和 polyglossiababel 和 polyglossia 宏包在 Scissor LaTeX 中部分可用:两者加载时都不会出错,任何语言和文字系统的 UTF-8 文本都能排版,但语言设置不会生效:断词规则仍是英语的,“Figure”和“References”等名称仍是英语,
\today不输出任何内容,"a这样的简写也不会被读取。 - fontenc、inputenc、fontspec 和字体宏包这里不需要
inputenc和fontenc,它们会被接受但不起作用,因为源文件始终按 UTF-8 读取。在普通文档中,字体固定为 Latin Modern 和 New Computer Modern Math:fontspec的\setmainfont以及times、libertine等宏包都会被忽略,只有用\familydefault切换到无衬线字体(可配合helvet)才有效。 - Sans-serif fonts in Scissor LaTeXWrite
\renewcommand{\familydefault}{\sfdefault}in the preamble, or start the body with\sffamily; the text is then set in Latin Modern Sans, or in TeX Gyre Heros, a Helvetica look-alike, whenhelvetortgherosis loaded.sfmath,sansmath,cmbrightandarevput formulas in sans serif too, and KOMA-Script classes set headings in sans serif. - Packages that need no action in Scissor LaTeXPackages that only matter to a TeX engine, such as
inputenc,fontenc,lmodern,fix-cm,bookmark,epstopdf,flafterorshowframe, are accepted without a message and need nothing here, because Scissor LaTeX always reads UTF-8, uses OpenType fonts and writes the PDF itself.microtypeand font packages such astimesare accepted too, but their effect is not applied. - Scissor LaTeX 中不可用的宏包文档照样能排版。Scissor LaTeX 完全不认识的宏包会在“问题”标签页中注明;它认识但没有实现的知名宏包,例如 fancyhdr、titlesec 或 tcolorbox,会被静默接受且不起作用;无法识别的命令会被跳过并显示提示,而它们的文本通常会保留。
每个宏包的完整手册都在 CTAN(Comprehensive TeX Archive Network,综合 TeX 存档网络)上,这里的每个页面都链接到它。
常见问题
能在 Scissor LaTeX 中使用任意 LaTeX 宏包吗?
你可以加载任何宏包,而不会让文档出错。它的命令是否起作用取决于宏包本身:上面的页面说明了哪些命令可用,“问题”标签页会列出被跳过的命令。
为什么我加载的宏包没有列在这里?
这些页面介绍的是最常用的宏包。对于其他宏包,不支持的宏包页面解释了会发生什么,“问题”标签页会注明它不认识的命令。
本页的每个示例都在构建网站时由 Scissor LaTeX 排版。 最后更新:2026-11-07