Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattynaz/latex-notes
A LaTeX document class for notes 📝 and textbooks 📚
https://github.com/mattynaz/latex-notes
latex latex-class latex-document latex-template pdf
Last synced: 3 months ago
JSON representation
A LaTeX document class for notes 📝 and textbooks 📚
- Host: GitHub
- URL: https://github.com/mattynaz/latex-notes
- Owner: mattynaz
- License: mit
- Created: 2021-06-30T23:21:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-14T14:58:32.000Z (over 3 years ago)
- Last Synced: 2024-09-28T04:41:23.800Z (3 months ago)
- Topics: latex, latex-class, latex-document, latex-template, pdf
- Language: TeX
- Homepage: http://latex.nazari.io
- Size: 533 KB
- Stars: 8
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LaTeX class for notes and textbooks
[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/ellerbrock/open-source-badge/)
[![forthebadge](https://forthebadge.com/images/badges/gluten-free.svg)](http://forthebadge.com)
**Author:** Matthew A. Nazari
**Description:** A LaTeX document class built lecture notes and textbooks.
**Download**: Simply [download the latest release](https://github.com/mattynaz/latex-notes/releases/latest) and manually extract the required `.cls` file.
## Installing the class
Drag the `.cls` file into your the folder of your current LaTeX project. If you want the class to be available for all projects on your system, drag the `.cls` file into your LaTeX document tree (your `texmf` folder). Note that this might be different depending on different versions of TeX. On Mac, find your `texmf` folder by running `kpsewhich -var-value=TEXMFHOME`. Then, directory `.../texmf/tex/latex/notes` to a `notes` folder which will hold the `.cls` file.## Working with the class
Your documents based on this lecture class must adhere to the following blueprint:```LaTeX
\documentclass[...]{notes}\begin{document}
...
\end{document}
```There are several optional commands to put in the preamble (before `\begin{document}`) to customize the title of the document:
```LaTeX
\documentclass[...]{notes}% Title of document.
\title{}% Subtitle goes under title text.
\subtitle{}% Title of course will be the document title if title not given.
\coursetitle{}% Course code to display above title text.
\coursecode{}% Optional description to display at bottom of title.
\flag{}\season{}
\year{}
\date{dd}{mm}{yyyy}
\authors{}
\professor{}
\scribe{}
\place{}\begin{document}
...
\end{document}
```Formatting the person commands, `\authors`, `\professor`, `scribe`, can be done with
- `\and`,
- `\thanks`,
- and `\titlehref`:
```LaTeX
% Seperate people with `\and` and add footnotes with `\thanks`.
\authors{First Person \and Second Person\thanks{a footnote}}% Add an href with `\titlehref{url}`...
\professor{Jane Doe\titlehref{https://janedoe.com/}}% ... or specify display text with `\titlehref[url]{display text}[optional display tag]`.
\scirbe{John Doe\titlehref[mailto:[email protected]]{john@doe}[personal email]}
```### Examples
Refer to the [example.tex](docs/examples/example.tex) file for an example on how to use some of the environments, commands, and shortcuts available in your document. Take a look at [example.pdf](docs/examples/example.pdf) to see the final product.
I highly encourage looking at [theorems.pdf](docs/examples/theorems.pdf) to see how each of the 5 theorem style presets look compared to one another:![theorem presets](https://i.imgur.com/tg16Mae.png)
### Options
You can include options for your document by passing them like so: `\documentclass[options, go, here]{notes}`. All of the options available are below:1. Specify any theorem presets by style:
- `notheorems`
- `plain`
- `boxed`
- `colorbox`
- `graybox` or `greybox` **(default)**
- `flashcard`2. Tune the formatting of your document:
- `plainnums` for plain numeral styles versus the default old style numerals
- `twoside` for printing
- `centertitle` centers the title text
- `titlepage` have the title be on its own page
- `nomargin` for symmetric margins
- `noheader` for no header
- `notablecontents` for no table of contents
- `notitle` for no title3. Date formats
- `isodate` *YYYY-MM-DD*
- `usdate` *Month DD, YYYY*
- `usdateshort` *MM-DD-YYYY*
- `eurodate` *DD Month YYYY* **(default)**### Environments
There are custom environments already defined which you can use in your document1. Create a figure with `\begin{fig}[optional caption]` or `\begin{fig*}[optional caption]`:
```LaTeX
\begin{fig}[an optional caption]
\includegraphics{graph}
\end{marginfig}
```2. Place a figure in the margin with `\begin{marginfig}[optional caption]` or `\begin{marginfig*}[an optional caption]`:
```LaTeX
\begin{marginfig}[the caption]
\begin{tikzpicture}[main/.style = {draw, circle}]
\node[main] (1) {$x_1$};
\end{tikzpicture}
\end{marginfig}
```3. Create a custom theorem environment with `\begin{theoremname}[optional term name]`:
```LaTeX
\begin{proposition}[A basic proposition]
If $x = 10$, then 2 divides $y = \frac{x}{2}$.
\end{proposition}
```### Commands and Shortcuts
There are some additional commands you can use _inside your document_, i.e. within `\begin{document}` and `\end{document}`, besides those which are already part of the blueprint given above:1. Fonts are specified with `\bold`, `\italics`, `\normalfont`, `\smallcaps`, and `\spacedletters`. These also have command forms that won't override eachother. Note that `\normalfont` overrides any font styling:
```LaTeX
\bf{This text is bold.}
{\bold That is equivalent to this.}\it{This text is bold.}
{\italics That is \bf{exactly} equivalent to this.}\sc{This text is in smallcaps.}
{\smallcaps That is \bf{exactly} equivalent to this.}\spaced{This text is spaced out.}
{\spacedletters That is \bf{exactly} equivalent to this.}\bf{\normalfont This text is normal since it was normalized.}
```2. There are also many math shortcuts. Not all are specified here, so taking a peak inside the `.cls` file might be useful.
3. Place somethin in the margin with `\marginpar[optional vspace]{...}`:
```LaTeX
This is a paragraph.
\marginpar[1in]{\italics This is a side note placed 1in above the end the paragraph.}
```4. Create a new theorem with `\newtheorem{name}{Display name}[options][counter]`:
```LaTeX
\newtheorem{thm}{Theorem}[
style = {boxed}, % only one of: plain/boxed/colorbox/flashcard
nocounter = {false}, % only either: true/false
big = {false}, % only either: true/false
titlefont = {\bold},
termfont = {\bold\italics},
bodyfont = {\normalfont\small},
backcolor = black!6,
framecolor = cyan!80!white,
][section]\begin{thm}[Example Theorem]
...
\end{thm}
```### Dependencies
`amsmath` `amssymb` `caption` `changepage` `environ` `fancyhdr` `float` `hyperref` `geometry` `keyval` `microtype` `newpxmath` `newpxtext` `setspace` `tcolorbox` `tikz` `tocloft` `titlesec` `xcolor` `xparse`## Version history
### 1.1
- Added theorem preset examples to `README.MD`.
- Added `notitle` and `noheader` options.
### 1.0
Initial release.## End notes
### License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.### Acknowledgments
Thanks to [V.H. Belvadi](https://vhbelvadi.com/latex-lecture-notes-class/) for inspiration for this `README.md`.