latex-notes

A LaTeX document class for notes 📝 and textbooks 📚

MIT License

Stars
8
Committers
1

LaTeX class for notes and textbooks

Author: Matthew A. Nazari

Current release: v1.1

Description: A LaTeX document class built lecture notes and textbooks.

Download: Simply download the latest release 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:

\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:

\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:
% 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 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 to see the final product. I highly encourage looking at theorems.pdf to see how each of the 5 theorem style presets look compared to one another:

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
  1. 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 title
  1. 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 document

  1. Create a figure with \begin{fig}[optional caption] or \begin{fig*}[optional caption]:
\begin{fig}[an optional caption]
  \includegraphics{graph}
\end{marginfig}
  1. Place a figure in the margin with \begin{marginfig}[optional caption] or \begin{marginfig*}[an optional caption]:
\begin{marginfig}[the caption]
  \begin{tikzpicture}[main/.style = {draw, circle}]
    \node[main] (1) {$x_1$};
  \end{tikzpicture}
\end{marginfig}
  1. Create a custom theorem environment with \begin{theoremname}[optional term name]:
\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:
\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.}
  1. There are also many math shortcuts. Not all are specified here, so taking a peak inside the .cls file might be useful.
  1. Place somethin in the margin with \marginpar[optional vspace]{...}:
This is a paragraph.
\marginpar[1in]{\italics This is a side note placed 1in above the end the paragraph.}
  1. Create a new theorem with \newtheorem{name}{Display name}[options][counter]:
\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 file for details.

Acknowledgments

Thanks to V.H. Belvadi for inspiration for this README.md.

Badges
Extracted from project README's
Open Source Love forthebadge
Related Projects