This package can be used in two main ways
- Enable all of features with the
defaultoption, then disable one by one- Best for new documents of class
article,book,report, oracmart
- Best for new documents of class
- Enable features one by one
- Best when integrating into an existing document
- Best when using a class other than
article,book,report, oracmart
- If no options are passed, the package should do (almost) nothing
- The "almost": loading [
kvoptions] and [etoolbox] and defining some private commands
- The "almost": loading [
Each of the features below can be enabled or disabled with an option
- The option always has the same name as the feature
- How to enable/disable a boolean feature
- Enable xyz: pass
xyzorxyz=trueto this package - Disable xyz: pass
xyz=falseto this package
- Enable xyz: pass
- How to enable/disable a non-boolean feature
- Enable xyz: pass
xyz=default, or pass another value- Can use
xyz=trueas alias forxyz=default, but this is discouraged
- Can use
- Disable xyz: pass
xyz=none- Can use
xyz=falseas alias forxyz=none, but this is discouraged
- Can use
- Enable xyz: pass
- How to enable/disable many features at once
- The default is set by an option
default, which can have one of two valuesdefault=minimal: everything disabled by defaultdefault=maximal: everything enabled by default
- Shortcuts
- Leaving the
defaultoption absent is equivalent todefault=minimal - Passing
defaultwith no value set is equivalent todefault=maximal
- Leaving the
- With
default=maximal, can still disable withxyz=falseorxyz=none
- The default is set by an option
- Some features have further options associated with them
- See details below
Full feature list, with non-boolean features marked:
ezlistezeqezrestatedelimitersnotationclevereftheoremsalgorithmmathicpackagesfont(non-boolean)number within(non-boolean)margin(non-boolean)headings(non-boolean)
Throughout, many packages are loaded with options
- There are two ways to change/disable options for a package
pkg- Load
pkgbefore this package - Call
\PassOptionsToPackage{options}{pkg}before this package\PassOptionsToPackage{}{pkg}will prevent options
- Load
- To clarify, the
\PassOptionsToPackagebehavior is specific to this package- Usually,
\PassOptionsToPackageadds additional options - But this package detects if
\PassOptionsToPackagehas been called already
- Usually,
- Random hack:
\PassOptionsToPackage{no ezlib}{pkg}preventspkgfrom loading
Boolean feature (enabled by default=maximal)
Provides a single macro, \*, for making lists
Example usage:
\* hello
\* world
\** use multiple * for sublists
\** like this
\* back to top level
\* use a / to end the list
\*/
Can also use an optional argument to use numbers/letters, e.g.
\*[(a)] labeled (a)
\* labeled (b)
\** no label in this sublist
\* labeled (c)
\**[(i)] labeled (i)
\** labeled (ii)
\*/
More generally, use [] to pass any options the enumitem package supports
Optional feature: explicit start/end:
- Explicit start: use
\*[...],\**[...], etc. with no text after.- Should be followed by another
\*,\**, etc. - This is useful if you want to pass options in a separate line
- Should be followed by another
- Explicit end: use
\**/,\***/, etc.- This lets you have a sublist in the middle of an item
Example:
\*[(a), afterheading]
\* this is the first item, labeled (a)
\** the list options got their own line
\** see below for more about the \texttt{afterheading} option
\* this one is (b), and there's a sublist
\** with
\** some
\** stuff
\**/ but now we resume item (b) from the outer list
\* before finally going to (c)
\* more details about explicit begin
\** you need to pass options with [] for an explicit begin
\***
\*** so the line immediately above this appears
\** but passing an empty list of options counts as passing options, so
\***[]
\*** so the line immediately above this is omitted
\** edge case: when an explicit begin is immediately followed by an explicit end\dots
\***[]
\***/ \dots\ the list has a single empty item
\*/
Additional notes:
- The environment
\*uses is calledezlist- Use this name to modify its options with
enumitem's\setlist, etc.
- Use this name to modify its options with
- This package loads
enumitemwith optionshortlabelsand does some other formatting- See top of guide for how to disable package options
- This package defines an
enumitemkeyafterheadingfor lists after inline headings- It ensures the list starts on a new line after the heading
- It prevents page breaks between the heading and the list
- Main use case is lists that appear at the start of a theorem/lemma/etc.
- If using the
theoremsfeature, tries to insertafterheadingautomatically if\*is the first thing in a theorem's text- But this is pretty brittle: ignores
\labels before the\*but nothing else
- But this is pretty brittle: ignores
Introduces enumitem key subenv for referencing parts of therems/lemmas/etc.
- Enabled by default if
ezlistfeature is enabled- Disable with
ezlist subenv=false
- Disable with
- Works with
ezlistlist environment, but unfortunately not other list types - Usage: use
\*[subenv]inside a theorem/lemma/etc., then use\labelwithin items- Result:
\creffor those labels yields asubtheoremreference, e.g. "Theorem 1.2(c)"
- Result:
- A few options to refer to just the part label, e.g. just "(c)"
\subref{lbl}, assumingsubcaptionpackage is loaded- The
subcaptionpackage's options might affect how it looks
- The
\ref{sub@lbl}, wherelblis the original label\crefand\Crefshould work, too
- Supported usage
- Should work with an
ezlistinside any environment whose name is a counter - But does not work with lists other than
ezlist - Should only be used with top-level lists
- Should work with an
Editing subenv label appearance:
- Redefine the
\subenvFormatLabelcommand to change the item labels- Should take one argument, which is the counter name
- Default is
(\alph{#1}), yielding (a), (b), (c)... - Example: changing to
(\roman{#1})would yield (i), (ii), (iii)...
- Redefine the
\subenvFormatRefcommand to change what the references look like- Should take one argument, which is the counter name
- Default is to do whatever
\subenvFormatLabeldoes
Boolean feature (enabled by default=maximal)
Makes \[ and \] a (slightly) smarter equation interface
- Automatically chooses between equation, align, and gather
- Conservative choice based on seeing whether
&or\\appears in the text
- Conservative choice based on seeing whether
- Automatically numbers only labeled equations, if desired
- If using
\tag, put it right after\label, as in\label{...} \tag{...}
- If using
- Enables
\allowdisplaybreaksinside the\[ \]- If it appears anywhere in the
\[ \], it applies to the whole thing - It is local to the
\[ \]in which it appears - The optional argument of
\allowdisplaybreaksis not supported - Remember that LaTeX provies
\\*for non-breakable newlines
- If it appears anywhere in the
Other configuration:
ezeq number labeled(default): only number labeled equations- Equivalent to
ezeq number labeled=trueorezeq number all=false
- Equivalent to
ezeq number all: number all equations- Equivalent to
ezeq number labeled=falseorezeq number all=true
- Equivalent to
Automatically inserts \qedhere if immediately before \end{proof}
- Enabled by default if
ezlistfeature is enabled- Disable with
ezlist auto qed=false
- Disable with
- When
ezlistis enabled, also inserts\qedherebefore\*/ \end{proof} - Won't do anything if there's already a
\qedhere - Put
\noAutoQedsomewhere in the equation to disable this for one equation\noAutoQedhas no other effect
Also slightly changes how \qedhere behaves
- The new version is simpler and a bit less buggy for equation numbers on the right
- But the new version is incompatible with equation numbers on the left
- If this package detects equation numbers are on the left, will use the old version
Boolean feature (enabled by default=maximal)
Simpler interface and some improvements to thmtools's restatable theorems
\restatablyor\restatably*: makes any theorem/lemma/etc. restatable- Usage:
\restatably \begin{theorem} \label{lbl} ... \end{theorem}- Spaces or newlines are okay
- The theorem/lemma/etc. must start with a
\label
- Usage:
restateor\restate*: restates a\restatablystated theorem/lemma/etc.- Usage:
\restate*{lbl}or\restate*\ref{lbl}- The
\refsyntax is for convenient autocomplete, e.g. on Overleaf
- The
- Can be used multiple times
- Usage:
Starred vs. not starred
- Both
\restatablyand\restatecan be starred (followed by*) or unstarred- Unstarred indicates the "main version", on which the numbering is based
- Starred indicates that numbers should be copied from the main version
- Each label should appear once unstarred, and otherwise starred
- Either the
\restatablyor a\restatecan be the starred one
- Either the
- The star always appears immediately after the macro
- E.g.
\restatably* \begin{...}or\restate*\ref{...}
- E.g.
Labels and links between theorems and their restatements
- Both
\restatablyand\restatecreate labels so that specific (re)statements can be referenced - If the theorem's label is
lbl, the created label is one of the following:statement@lblif it's the main version (i.e. the macro is not starred)restatement_n@lblif it's thenth restatement (i.e. the macro is starred)- Also creates
restatement@lblif it's the first restatement
- Also creates
- The labels live just before the relevant theorem environment, so they typically refer to a section or similar
- This is to enable usage like the following
- Example:
We revisit \cref{thm} in \cref{restatement@thm}becomes e.g. "We revisit Theorem 4 in Appendix C"
- But when used as link targets, the labels act nearly the same as links to the theorem (re)statement
- Example: the Appenix C above example links directly to the restatement of Theorem 4, not the start of Appendix C
- Details: the labels link to a
\phantomsectionthat's created right before the (re)statement
- The theorem titles of restated theorems are turned into links
- The main version links to the first restatement
- All restatements link to the main version
Boolean feature (enabled by default=maximal)
Provides different "group" macros for sizing parentheses and similar
\gp{x}: normal size\gp*{x}: automatically sized using\left/\right(but with better spacing)\gp[size]{x}: manually sized, wheresizeis one of\big,\Big,\bigg, or\Bigg
See the mathtools \DeclarePairedDelimiter documentation for more details
Variants of \gp:
\gpor\pgp:()\sqgpor\bgp:[]\curlgpor\Bgp:\{\}\pbgp:(]\bpgp:[)\vgp:||\Vgp:\|\|\agp:\langle\rangle\floor:\lfloor\rfloor\ceil:\lceil\rceil
Separators that automatically scale:
\mid:|\Mid:\|
Generic version:
\lr: like\gp, but after the optional*, takes the delimiters as input\lrStarAfter: like\lr, but takes the delimiters first, then checks for*- Limitation: neither
\lrnor\lrStarAftersupports manual sizing - Examples:
\lr(){...}is like\gp{...}\lr*(){...}is like\gp*{...}\lrStarAfter(){...}is like\gp{...}\lrStarAfter()*{...}is like\gp*{...}- Delimiters need not be the same, e.g.
\lr*[){...}is like\bpgp*{...}
- Intended usage
\lris for direct usage in equations\lrStarAfteris useful as the end of a macro definition- But the
\gpfamily is even better, because it supports manual sizing
- But the
Boolean feature (enabled by default=maximal)
Various math notation shortcuts and conventions
Provides \lr and \lrStarAfter from delimiters above (but not the others)
Probability (best with delimiters feture on, too):
\P,\E, and\Var: have interface like delimiters macros, e.g.\gp- But they also support subscripts/superscripts and primes
- If
delimitersfeature isn't on, then manual sizing doesn't work
\given: synonym for\mid- Example:
\E_{X \sim \pi}*{\frac{1}{2} X^2 \given X > 3} - Change appearance with the following two options
probability style(default:probability style=bf)- Also supported:
bb,rm,sf, and any X where a\mathXcommand exists
- Also supported:
probability delim(default:probability delim=sq)- Also supported:
p,curl, and any X where an\Xgpcommand exists- Without
delimiterson, supportsp,sq/b, andcurl/B
- Without
- Also supported:
[],(), and any valid followup to\lrStarAfter- Limitation: manual sizing won't work
- Also supported:
\DeclareProbabilityCommand: declare new commands that work like\P- Example:
\DeclareProbabilityCommand{\Cov}{Cov}
- Example:
Shortcuts for letters in different math fonts:
\bbA, ...,\bbZ: short for\mathbb{A}, ...,\mathbb{Z}(uppercase only)\calA, ...,\calZ: short for\mathcal{A}, ...,\mathcal{Z}(uppercase only)\bfA, ...,\bfz: short for\mathbf{A}, ...,\mathbf{z}(lowecase and uppercase)\sfA, ...,\sfz: short for\mathsf{A}, ...,\mathsf{z}(lowecase and uppercase)
Other:
\1: indicator function\mathbb{1}\d: differential symbol, use as\d xor\d{x}\epsilonand\phi: now refer to\varepsilonand\varphi- Use
\LaTeXepsilonand\LaTeXphifor old versions
- Use
\argmin,\argmax,\liminf,\limsup: math operators\widebar: like\widetilde, and a little nicer than\overline- Omitted if another package defines it first, e.g.
newtxmath
- Omitted if another package defines it first, e.g.
Boolean feature (enabled by default=maximal)
Loads the cleveref package and a bit more
- Uses
capitalizeoption by default- See top of guide for how to disable package options
\cCrefname: simultaneous\crefnameand\Crefname- Allows spaces in comma-separated list of labels in
\crefand\Cref - Tweaks default conjunctions: en-dashes for ranges, oxford comma, other tweaks
Mechanism for registering alternate versions of names:
\crefShortened: wrap around a\crefnameor similar to register a shortened version- Example:
\crefShortened{\cCrefname{theorem}{Thm.}{Thms.}} - To omit the final "and":
\crefShortened{\crefRemoveAnds}\crefRemoveAndsredefines conjunctions to be just commas and en-dashes
- Example:
\crefShorten: redefine all names using the shortened versions- This just executes all the code registered with
\crefShortened - Redefinitions are local to any enclosing group
- Unless you try to do otherwise, e.g. using
\gdefinside\crefShortened
- Unless you try to do otherwise, e.g. using
- This just executes all the code registered with
Boolean feature (enabled by default=maximal)
Declares a default set of theorem environments
Theorem style synonyms, with support for class-specific analogues:
\ezlibPlain:plainor class-specific analogue (e.g.acmplainforacmart)\ezlibDefinition:definitionor analogue\ezlibRemark:remarkor analogue- For some classes, e.g.
acmart, this is the same as\ezlibDefinition
- For some classes, e.g.
- If any of the above are already defined, they will not be redefined
- This allows for changing styles by redefining the commands
Other:
\begin{case}[...] ... \end{case}: cases in a proof\noqed: suppress the QED symbol at the end of a proof\cleartheorem: undefines a theorem environment and its counter
Boolean feature (enabled by default=maximal)
Loads the algorithm package and slightly tweaks its formatting
- Passes the value of
number withinas an option to thealgorithmpackage- See top of guide for how to disable package options
Boolean feature (enabled by default=maximal)
Corrects spacing around inline math in italic text
- Redefines
$in terms of\( \)and\[ \]$ $becomes\( \), possibly with an extra italic space tweak after (see below)$$ $$becomes\[ \]- Side effect: this makes
$$work withezeqfeatures
- Side effect: this makes
- This changes the character code of
$
- Attempts compatibility with
tikz- Specifically, restores the character code of
$withintikzpicture
- Specifically, restores the character code of
- Attempts to also correct spacing after, but it's kind of a hack
- Disable with
mathic after=false - In contrast, spacing before is handled by
mathtools - This applies only to
$ $, not\( \)
- Disable with
Boolean feature (enabled by default=maximal)
Loads various packages, some with options
booktabscalccaption, with optionsfont=small, labelfont=bf, labelsep=periodgraphicxmicrotypenatbib, with optionssquare, numbers, sort&compresssubcaption, with optionsfont=small, labelformat=simple- If it wasn't already loaded, also tweaks
\thesubfigureto include parentheses - If
ezlist subenvis enabled, uses\subenvFormatLabelin\thesubfigure
- If it wasn't already loaded, also tweaks
- Not a package, but also turns on
\frenchspacing
See top of guide for how to disable loading a package, or disable passing options to a package
Non-boolean feature (behavior under default=maximal described below)
Changes fonts used throughout the document
Possible values:
font=none: don't change any fontsfont=libertine: use font set based around Libertine and Biolinumfont=libertinus: use font set based around Libertinus (fork of Libertine and Biolinum)font=charter: use font set based around Charter and Vera Sansfont=palatino: use font set based around Palatino- Unless
font=none, also loadsfontencwith optionT1
Other configuration:
ttfont=inconsolata: use Inconsolata (default) for monospaced textttfont=sourcecodepro: use Source Code Pro for monospaced text
Behavior with default=maximal:
- If a known built-in LaTeX class is loaded, default to
font=libertine- These are:
article,report,book
- These are:
- Otherwise, conservatively default to
font=none- This avoids conflicts with journal/conference class files
- Either way, can be manually overridden by setting
fontexplicitly
Non-boolean feature (behavior under default=maximal described below)
Selects what level numbering of theorems/equations/figures/etc. occurs within
Valid options:
number within=none: use global numbering- Default under
default=minimal
- Default under
number within=default: number within chapters or sections- Uses
chapterif the document has chapters,sectionotherwise - Default under
default=maximal
- Uses
- Any other setting: number within the given environment
- E.g.
number within=section,number within=subsection, etc.
- E.g.
Non-boolean feature (behavior under default=maximal described below)
Sets the page margins using the geometry package
- If absent or set to
margin=none, has no effect - If set to any other value
v, loadsgeometrywithmargin=v- To set more complex margins, load
geometrybefore this package
- To set more complex margins, load
Behavior with default=maximal:
- If a known built-in LaTeX class is loaded, default to
margin=1.25in- These are:
article,report,book
- These are:
- Otherwise, conservatively default to
margin=none- This avoids conflicts with journal/conference class files
- Either way, can be manually overridden by setting
marginexplicitly
Non-boolean feature (behavior under default=maximal described below)
Formats section titles, headers, and more
Valid options:
headings=none: leave LaTeX defaults- Default under
default=minimal
- Default under
headings=default: choose betweenfancyandnone- If a known built-in LaTeX class is loaded, use
fancy - Otherwise, use
none - Default under
default=maximal
- If a known built-in LaTeX class is loaded, use
headings=fancy: reformat section titles and headers- Section titles are styled in sans if the font has a nice sans pairing
- Headers choose between two styles depending on if
\chapteris defined
headings=inline: use inline subsection titles- E.g. for short documents with a strict page limit
- Equivalent to
headings=fancy, headings inline=true, headings compact title=true(see below)
Other configuration:
headings sf(boolean): set to true to make headings sans- Defaults to true if the font has a nice sans pairing, false otherwise
headings inline(boolean): use inline subsection and lower-level headings- Defaults to false, but set to true by
headings=inline
- Defaults to false, but set to true by
headings compact title(boolean): use an alternative title style that's more compact- Defaults to false, but set to true by
headings=inline - Has no effect unless using
headings=fancy(possibly viaheadings=inlineorheadings=default)
- Defaults to false, but set to true by
headings inline period(boolean): if using inline headings, add period after heading- Defaults to true