This is a repository containing an up-to-date version of my LaTeX classes and style files, which I use for almost all my documents.
Currently, only the document styles are functional. The beamer style is extremely bare bones.
There are two main use cases. You can try out the document style for a single document, or you can install the styles for usage in all documents.
Clone the repository and copy all of the files into
the same directory as the .tex file being compiled.
The compiler should automatically detect the style files when compiling
the main .tex file.
Currently, the version of TeX on Overleaf (2021) does not support
tcolorbox v5.0.0, so use this commit.
Download the package .cls, .sty, and .tex files
and upload them into the document.
It is also possible to install the styles globally so that all documents have access to them. To do this, clone this repository into the corresponding location within the TEXMF root directory. Compiler-dependent instructions are below.
Clone the repository into ~/texmf/tex/latex,
so that the repository files are in ~/texmf/tex/latex/chez-sty.
You may need to create intermediate directories.
For Windows, the repository to put the files in can be found by
opening Windows Powershell (in the Win-X menu), and running
kpsewhich -var-value=TEXMFLOCAL or
kpsewhich -var-value=TEXMFHOME.
You can also modify the environment variable $TEXMFHOME
to declare another location for the local TEXMF directory.
In that case, the repository should be cloned into $TEXMFHOME/tex/latex.
Clone the repository into ~/Library/texmf/tex/latex,
so that the repository files are in ~/Library/texmf/tex/latex/chez-sty.
You may need to create intermediate directories.
Find the UserInstall directory corresponding to your system
here.
Clone the repository into <UserInstall>/tex/latex,
so that the repository files are in <UserInstall>/tex/latex/chez-sty.
You may need to create intermediate directories.
For example, on Windows, the repository should be cloned to
%USERPROFILE%\Roaming\MiKTeX\2.9\tex\latex\chez-sty,
where %USERPROFILE% is probably something like C:\Users\Jason
You can also register an additional TEXMF root directory, as described at the end of https://miktex.org/kb/texmf-roots.
Use the documentclass chezarticle or the documentclass chezreport
in place of the standard article and report classes respectively.
Here is an example document:
\documentclass{chezreport}
\title{Sample document}
\begin{document}
\maketitle
This is some content.
\end{document}There are many commands defined for convenience and code readability. Notable ones are:
-
\vocab{text}to bold and color text blue, to indicate an important term. -
\ol{text}and\ul{text}for overline and underline. -
\FF,\NN,\ZZ,\QQ,\RR,\CC, and\HHfor\mathbbversions of the corresponding letter. -
\intersectand\unionfor code-readable versions of\capand\cup
\bigintersectand\bigunionalso exist for\bigcapand\bigcup. -
\dv{y}{x}gives the derivative fraction\frac{dy}{dx}.
\ddv{y}{x}gives the derivative fraction\frac{d^2y}{dx^2}.
\dnv{y}{x}{n}gives the derivative fraction\frac{d^ny}{dx^n}.Similarly
\pdv{y}{x}gives the partial derivative fraction\frac{\partial y}{\partial x}.
\pddv{y}{x}gives the partial derivative fraction\frac{\partial^2 y}{\partial x^2}.
\pdnv{y}{x}{n}gives the partial derivative fraction\frac{\partial^n y}{\partial x^n}.There exists starred versions of all of these commands that produce inline versions.
In math mode, we often use \left and \right to get
correctly sized delimiters.
There are typically two approaches people take when doing so:
- typing
\left(\right), typing in between the delimiters, and then moving the cursor to the end; and - typing
\left(, then the content in between the delimiters, and then\right).
The first method is inconvenient as we have to move the cursor back and forth,
and the second method is error prone as we have to remember the \right,
which becomes increasingly easy to forget in the case of nested brackets.
In this package we present a solution to this.
We define commands for each delimiter pair, e.g. \parens*{content},
where the star indicates that the delimiters should be automatically sized.
Omitting the star will give the normal sized delimiters.
For manual sizing, you can use \parens[\big]{content}.
The delimiters provided are:
\braces\parens\brackets\angles\verts\Verts\floor\ceil
There are also semantically-named delimiters to allow for more readable code:
\abs(for\verts)\size(for\verts)\norm(for\Verts)\tuple(for\angles)\gen(for\angles; use in the context of generators)\fgen(for\braces; f here stands for free)\set(for\braces; this also smartly resizes a\midinside the set)
One main feature of the style is colored boxes environments for definitions, examples, and theorems. These can be used with, e.g.:
\begin{example}[Title]<label>
content
\end{example}The [Title] or <label> arguments can be, and often are, omitted.
The label can be used like \cref{ex:label} or \Cref{ex:label},
producing the text "example 1" or "Example 1" respectively.
The other prefixes (corresponding to ex:) are defined in chez.sty.
The environments for boxes provided are:
theoremlemmaclaimpropositioncorollaryconjecturealgorithmdefinitionexamplefactnote
The starred version of each environment indicates a non-numbered environment.
\begin{adhoctheorem}{Environment}[Title]
content
\end{adhoctheorem}There are many options that can be used in the documentclass, e.g.
\documentclass[nodate, serifs]{chezarticle}.
nodateremoves the date from\maketitlewhile maintaining nice spacing.serifschanges the title and header fonts to have serifs.headersplaces a header on each page, customized with\ihead,\chead, and\ohead.
Thei,candocorrespond to inner, center, and outer, where we interpret the page to be on the right side of a bound book (so that outer is on the right).graymakes the entire document grayscale. Useful for printing or previewing for print.noboxdisables boxes.adhoctheoremis not supported if this option is turned on.asyenables Asymptote support.algosenables algorithm typesetting with thealgpseudocodepackage.codeenables code snippet typesetting with themintedpackage.
This has a dependency of Pygments, and requires the document to be compiled with the option-shell-escape(so that TeX can externally run Pygments).compactsignificantly reduces the spacing everywhere. Useful for compact note sheets.nomarginnumdisables section numbers and box environment numbers from appearing in the left margin.numberwithinsectionbox environment numbers are now of the formsection.num, withnumresetting every sectionsepcounterscauses the problem, question, exercise, and remarks to use a different counter from the other boxed environments.
chezbase.stycontains the commands and basic packages that are intended to be used everywhere, both beamer presentations and documents. This should not be loaded directly.chez.stycontains the page setup and setup for environments in document-type TeX files.chezb.stycontains the page setup and setup for environments in beamer-type TeX files. This is currently not functional.chezglyphtounicode.texis a file containing mappings that allows selected text to have the correct characters.chezint.styis a wrapper around theesintfont, giving multivariable integral symbols, while not modifying the existing integral symbols, which theesintpackage modifies for some reason.
The class files are simple wrappers around these internal files
chezarticle.clsdefines the documentclass corresponding toarticle.chezreport.clsdefines the documentclass corresponding toreport.
If something is missing, feel free to fork and make a change yourself. Since these are my personal styles, I probably will accept few pull requests, and only those that I can see myself using.
Big thanks to Daniel Zhu for helping with the code for the boxed environments.



