├── .gitignore
├── LICENSE
├── README.md
├── doc
├── lecturenotes-doc.pdf
└── lecturenotes-doc.tex
├── lecturenotes.cls
└── sample
├── lecturenotes-sample.pdf
└── lecturenotes-sample.tex
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in directory
2 | /*
3 | .DS_Store
4 |
5 | # except ..
6 | !.gitignore
7 | !sample/
8 | !lecturenotes.cls
9 | !Icon
10 | !LICENSE
11 | !README.md
12 | !doc/
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017--2025 V.H. Belvadi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # The `lecturenotes` class
LaTeX class for lectures, seminars, courses or brief talks
2 |
3 | [](https://github.com/ellerbrock/open-source-badge/)
4 | [](https://github.com/ellerbrock/open-source-badge/)
5 |
6 | [](http://forthebadge.com)
7 |
8 | **Author:** V.H. Belvadi
9 |
10 | **Webpage:** [http://vhbelvadi.com/latex-lecture-notes-class/](http://vhbelvadi.com/latex-lecture-notes-class)
11 |
12 | **Current release:** v3.2
13 |
14 | **Legacy release:** For `pdfLaTeX` support please [use v2](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/tag/v2.6).
15 |
16 | **Description:** A LaTeX document class built for lecture notes for classes/seminars, entire courses or brief talks.
17 | A detailed article about this class can be found on [the author's website](http://vhbelvadi.com/latex-lecture-notes-class/).
18 | The same data condensed into brief notes about working with this class, for those who are familiar with this sort of thing, can be found below.
19 |
20 | **Download**: To work with this class the absolute minimum requirements are the .cls and .sty files, but this repository has several other files too. The easiest approach is to [download the latest release](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/latest) and manually extract the two required files. Alternately, you can use svn or git sparse checkouts.
21 |
22 | ## Installing the class
23 |
24 | Simply drop the `.cls` and `.sty` files into your LaTeX document tree.
25 | On UNIX systems this is usually `~/texmf/` and is `C:\Users\user_name\texmf\` on Windows.
26 |
27 | Although not necessary, it is highly recommended that you place these files inside their own folder with the tree `.../texmf/tex/latex/folder_name` for better package management.
28 |
29 | MikTex does things differently: `C:\Users\user_name\Appdata\Local\MikTex\###\tex\latex\local\`.
30 | On a Mac navigate to `~/Library/texmf/` using the option key once you are in the Go menu on any Finder window.
31 |
32 | There are several resources online that can help you in greater detail when it comes to installing .cls and .sty files.
33 | Once you figure out where they should be placed in your TEXMFHOME tree, just make sure the two files reside together in the same folder.
34 |
35 | ## Working with the class
36 |
37 | Your documents based on this lecture class must adhere to the following blueprint:
38 |
39 | ```
40 | \documentclass[options]{lecturenotes}
41 |
42 | \title{}
43 | \subtitle{}
44 | \shorttitle{}
45 | \ccode{}
46 | \subject{}
47 | \speaker{}
48 | \spemail{}
49 | \author{}
50 | \email{}
51 | \flag{}
52 | \season{}
53 | \date{}{}{}
54 | \dateend{}{}{}
55 | \conference{}
56 | \place{}
57 | \attn{}
58 | \morelink{}
59 |
60 | \begin{document}
61 | \end{document}
62 | ```
63 |
64 | ### Overview
65 |
66 | The document class `lecture` calls this class file. Options for the class are as outlined below.
67 |
68 | Only setting a title is compulsory. All other data (e.g. subtitle, course code, speaker, dates, seasons, author etc. are optional.)
69 | Some of these are used to set up the head of your document (e.g. season), headers of your pages (e.g. short title) and pdf attributes (e.g. subject data is only for the pdf metadata).
70 |
71 | Take a look at the [lecturenotes-sample.tex](sample/lecturenotes-sample.tex) file for an example of how these lines are used in a source file and for details of exactly what each command does.
72 | Also look at the [lecturenotes-sample.pdf](sample/lecturenotes-sample.pdf) output file to see how (great) things will look in the end.
73 |
74 | **NB** Not all commands are shown in the sample files though most are.
75 |
76 | **NB** The season command and the dates (single date or start and end dates) are mutually exclusive with the season taking precedence. You can set either Summer 2017 (season) or 24th June, 2017 (single date) or 24th June 2017--25th June 2017 (start and end dates).
77 |
78 | ### Options
79 |
80 | #### Compulsory
81 |
82 | The following are primary options that must compulsorily be included. Pick one from each set below:
83 |
84 | 1. The **language** of your document:
85 | - `english`
86 | - `french`
87 | - `italian` (see *acknowledgements* and *the road ahead*)
88 | - `usenglish` (same as english except for the mm/dd/yyyy format)
89 | - `russian` (this automatically loads Cyrillic support)
90 | - `german`
91 | - `swedish`
92 |
93 | 2. The **type** of your lecture notes:
94 | - `seminar` usually for single class/session/seminar/lecture period
95 | - `course` for a collection of lectures (over a semester or over a few days)
96 | - `talk` for brief notes for speakers (or any other use you can think of for condensed, two-column layouts)
97 |
98 | **NB** Please delete all aux files and then compile if you decide to change languages halfway through. Compile twice to update TOC in case of `course` type documents.
99 |
100 | #### Optional
101 |
102 | You can also include secondary options for your document. Again, pick one from each set below:
103 |
104 | 1. Customise page headers as needed (default: current/next sections and subsections):
105 | - `headertitle` to display the main title/short alternative title
106 | - `headersection` to display the current/next section as appropriate
107 | - `headersubsection` to display the current/next subsection as appropriate
108 | - `headerno` for a blank header (footers still display page numbers)
109 |
110 | 2. Customise theorem numbering as needed:
111 | - `theoremnosection`
112 | - `theoremsection`
113 | - `theoremsubsection`
114 |
115 | 3. Choose if you want to start every new section on a new page/new right-hand page:
116 | - `cleardoublepage`
117 | - `nocleardoublepage`
118 |
119 | 4. Optimise your document for printing:
120 | - `oneside`
121 | - `twoside`
122 |
123 | 5. Choose between one- and two-column layouts:
124 | - `onecolumn`
125 | - `twocolumn`
126 |
127 | ### Commands
128 |
129 | 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:
130 |
131 | 1. `\lecture[duration]{dd}{mm}{yyyy}` for use in `course` type documents for providing information about lectures in the margin
132 | 2. `\separator` for use in `talk` type documents to draw a visually helpful horizontal separator line
133 | 3. `\tosay{message}` for use in `talk` type documents to print messages inside a box to help recall important data
134 | 4. `\margintext{message}` to make useful notes in the margin
135 | 5. `\\` at the start of a paragraph to give it a line break and remove any indentation
136 | 6. `\nl ` at the start of a paragraph without either a line break or an indent (note the space following the command)
137 | 7. `\runin{}` as a handy approach to print texts in small caps (especially useful to start new sections/chapters/parts of a document)
138 | 8. `\morelink{}` to add a _For more visit `_______`._ link in the footer of the first page.
139 |
140 | ### Dependencies
141 |
142 | `hyperref` `mathtools` `csquotes` `microtype` `amsmath` `booktabs` `multirow` `unicode-math` `kpfonts-otf` `fancyhdr` `mparhack` `tikz` `mathdots` `xfrac` `faktor` `cancel` `babel`
143 |
144 | ### Version history
145 |
146 | ### 3.2
147 | - Style file merged into class: the package now functions as a single `.cls` file
148 | - Minor changes in repo structure for CTAN
149 | - Documentation updated to reflect new structure using just one `.cls` file
150 |
151 | ### 3.1
152 | **NB** Minor breaking change.
153 | - In preparation for CTAN this package is now called `lecturenotes` instead of `lecture` (I was informed by CTAN maintainers that the latter could cause confusion with existing `lectures` and `lecturer` classes and I am inclined to agree). **The only change you will need to make in existing documents** is to invoke the `lecturenotes` class instead of `lecture` as follows:
154 | ```
155 | \documentclass[options]{lecture} ===(becomes)===>> \documentclass[options]{lecturenotes}
156 | ```
157 | Ideally this should mean editing just the very first line of your document(s).
158 |
159 | ### 3.0
160 | **NB** This update modernises this class with LuaLaTeX support. While this change is highly recommended and in line with the development of LaTeX3 itself, for older packages that need pdflatex support [continue using v2 instead](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/tag/v2.6).
161 | - LuaLaTeX support (highly recommended for opentype and native unicode support introduced in this version)
162 | - Breaks pdflatex support (for older documents use v2 but for everything else LuaLaTeX is recommended)
163 | - Switched to OTF support with [`kpfonts-otf`](https://gb.mirrors.cicku.me/ctan/fonts/kpfonts-otf/doc/Kpfonts-OTF-Doc-English.pdf) replacing [`kpfonts`](https://www.tug.org/TUGboat/tb31-3/tb99caignaert.pdf) (also addresses #9)
164 | - `pdfinfo` incorporated into `hyperref` (addresses #10)
165 | - Removed support for `inputenc` and `fontenc` due to LuaLaTeX (also addresses #10)
166 | - Bug fixes (issue #5 persists but using `\cleardoublepage` manually works)
167 |
168 | ### 2.6
169 | [View here](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/tree/v2.6)
170 | - Legacy version with `pdfLaTeX` support
171 | - Bug fix, addresses #8
172 |
173 | ### 2.5
174 | - German translations courtesy of Jan Heilund.
175 | - Swedish translations courtesy of @eastlunder.
176 |
177 | #### 2.4
178 | **NB** This version may introduce a breaking change if you use the `\Proj` command. Use `\Projection` instead.
179 | - Russian translations courtesy of Aleksei Kozharin.
180 | - `\Proj` command changed to `\Projection` to prevent conflict with Russian Babel.
181 | - Fontenc T1, T2A support (being loaded conditionally only when the document language is russian ).
182 |
183 | #### 2.3.1
184 | - Fixed a major bug that would prevent compilation while using `english` as the language option.
185 |
186 | #### 2.3
187 | - A new command to add a more link in the footer of the first page
188 | - Both `course` and `seminar` type documents now support up to subsections. (Because of their nature `talk` type documents do not support such layering.)
189 |
190 | #### 2.2
191 | - Title data footnotes will no longer mention '(speaker)' unless the author's email is also specified
192 | - Added spacing around the em dash between the course code and title at the head of the document
193 | - Improved styling for the explicit line break character
194 | - Improved caption style
195 | - **New command** The `\\` command provided by this class adds a new paragraph with a line break and without an indent. Use this to mark the _start_ of a new paragraph rather than the end of the previous one:
196 |
197 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur porttitor et lectus.
198 |
199 | \\Nam orci leo, tincidunt id convallis eu, luctus id nisi...
200 |
201 | - **New command** The `\nl` command provided by this class adds a new paragraph without indent or a line break. Use this same as the previous command but with a space after the command itself.
202 | - **New command** The `\runin{}` command provided by this class adds small caps. This can be done manually but is a handy approach that is especially useful to start new sections/chapters/parts of a document.
203 |
204 | #### 2.1
205 | - All options except title are now optional
206 | - New season data added (especially for a `course` that stretches across weeks/months)
207 | - Support for the US date format mm/dd/yyyy
208 | - French translation improvements
209 |
210 | #### 2.0
211 | - Blank header (`headerno`) bug fixed
212 | - Improved default headers
213 |
214 | #### 1.2
215 | - French language support
216 |
217 | #### 1.1
218 | - Improved default headers
219 |
220 | #### 1.0
221 | - Initial release
222 |
223 | ## The road ahead
224 |
225 | ### Contributions
226 |
227 | 1. Translations are welcome and appreciated.
228 | 2. General suggestions for improvement are welcome as well.
229 |
230 | Either fork this project and submit a pull request or, *only in case of translations*, drop me an e-mail with the relavant translations and specify how you wish to be credited.
231 |
232 | ### Known errors
233 |
234 | 1. Not specifying a custom page header results in ugly defaults.
235 | 2. Using the `headerno` option messes up page header text dimensions.
236 | 3. Flag text, speaker's name and e-mail are *not* optional (yikes).
237 | 4. The `\lecture[duration]{dd}{mm}{yyyy}` command does not work for the `russian` language option. However, `\margintext{message}` can be used instead to achieve a similar output.
238 |
239 | ### Improvements/roadmap
240 |
241 | 1. The `headerno` and a couple of other options with minor errors will be corrected over time.
242 | 2. Not having a speaker, i.e. if the author == speaker, there is no need to mention '(scribe)' in the footer.
243 | 3. A .gitignore will be added at some point just to make it simpler to clone this repo.
244 | 4. An option system that lets users specify if they prefer to use various packages regardless of pdfTeX support and then loads certain packages accordingly.
245 | 5. Errors that crop up from time to time will be set right (since I use this class myself to teach at University) and this will go on so long as I keep using it.
246 | 6. Package dependencies will not reduce. This type of collaboration is what LaTeX packages are for and they're free. When (and if) some package drops support we can think of bridging the code.
247 |
248 | ## End notes
249 |
250 | ### License
251 |
252 | This project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for details.
253 |
254 | ### Acknowledgments
255 |
256 | Thanks to [Stefano Maggiolo](http://blog.poormansmath.net/) for initially helping me kickstart this and for his Italian translations. Thanks to [Aleksei Kozharin](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/2/commits/34301290ff554b446fc755fa4cc813b701f63a2c) for Russian translations, [Jan Heilund](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/6) for German translations and [@eastlunder](https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/7) for Swedish translations.
257 |
258 | See the [release article](http://vhbelvadi.com/latex-lecture-notes-class/) for more.
259 |
--------------------------------------------------------------------------------
/doc/lecturenotes-doc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vhbelvadi/LaTeX-lecture-notes-class/790d027bca646e16e1b13a4dac55c8ec0f8ead76/doc/lecturenotes-doc.pdf
--------------------------------------------------------------------------------
/doc/lecturenotes-doc.tex:
--------------------------------------------------------------------------------
1 | \documentclass[a4paper,margin=1in]{article}
2 | \title{The \texttt{Lecturenotes} class}
3 | \author{V.H. Belvadi\thanks{hello@vhbelvadi.com}}
4 |
5 | \usepackage{hyperref}
6 | \usepackage{multicol}
7 | \usepackage{fancyvrb}
8 |
9 | \begin{document}
10 | \maketitle
11 | \tableofcontents
12 |
13 | \section{Introduction}
14 |
15 | A LaTeX document class built for lecture notes for classes/seminars, entire courses or brief talks. A detailed article about this class can be found on the author's website (\url{http://vhbelvadi.com/latex-lecture-notes-class/}). The same data condensed into brief notes about working with this class, for those who are familiar with this sort of thing, can be found below.
16 |
17 | To work with this class the absolute minimum requirement is the \texttt{.cls} file, but this repository has several other files too. The easiest approach is to download the latest release from \url{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/latest} and manually extract the required file to your \LaTeX\ path. Alternately, you can use svn or git sparse checkouts.
18 |
19 | A legacy version is available outside CTAN for use with pdf\LaTeX\ here: \url{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/tag/v2.6}
20 |
21 | Please check the repository on Github for an up-to-date version history.
22 |
23 | \section{Installation}
24 |
25 | Simply copy the \texttt{.cls} file included in this package into your \LaTeX\ document tree. On UNIX systems this is usually \texttt{~/texmf/}. If using apps like Texifier, simply tell the app where to look for these files.
26 |
27 | Although not necessary, it is highly recommended that you place these files inside their own folder with the tree \texttt{.../texmf/tex/latex/folder-name} for better package management.
28 |
29 | There are several resources online that can help you in greater detail when it comes to installing a \texttt{.cls} file. Once you figure out where they should be placed in your \texttt{TEXMFHOME} tree, just make sure the two files reside together in the same folder.
30 |
31 | \section{Using the class}
32 |
33 | \subsection{Skeletal structure}
34 |
35 | Your documents based on this lecture class must adhere to the following blueprint:
36 |
37 | \begin{verbatim}
38 | \documentclass[options]{lecture}
39 |
40 | \title{}
41 | \subtitle{}
42 | \shorttitle{}
43 | \ccode{}
44 | \subject{}
45 | \speaker{}
46 | \spemail{}
47 | \author{}
48 | \email{}
49 | \flag{}
50 | \season{}
51 | \date{}{}{}
52 | \dateend{}{}{}
53 | \conference{}
54 | \place{}
55 | \attn{}
56 | \morelink{}
57 |
58 | \begin{document}
59 | \end{document}
60 | \end{verbatim}
61 |
62 | This is simply a list of \textit{possible} commands, not \textit{necessary} commands. In fact most of these commands are \textit{not} necessary and some work exclusively with others. A detailed explanation follows.
63 |
64 | \subsection{Overview}
65 |
66 | The document class \texttt{lecture} calls this class file. Options for the class are as outlined below.
67 |
68 | Only setting a title is compulsory. All other data (e.g. subtitle, course code, speaker, dates, seasons, author etc. are optional.) Some of these are used to set up the head of your document (e.g. season), headers of your pages (e.g. short title) and pdf attributes (e.g. subject data is only for the pdf metadata).
69 |
70 | Take a look at the \texttt{Sample.tex} file for an example of how these lines are used in a source file and for details of exactly what each command does. Also look at the \texttt{Sample.pdf} output file to see how (great) things will look in the end. Sample files are available in the repository: \url{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/releases/latest}
71 |
72 | \textbf{NB} The \texttt{season} command and the dates (start date only or both start and end dates) are mutually exclusive with the season taking precedence. You can set either Summer 2017 (the season) or 24th June, 2017 (the start date) or 24th June 2017--25th June 2017 (both start and end dates).
73 |
74 | \subsection{Options}
75 |
76 | \subsubsection{Compulsory}
77 |
78 | The following are primary options that must compulsorily be included. Pick one from each set below:
79 |
80 | \begin{enumerate}
81 | \item The \textbf{language} of your document: \texttt{english}, \texttt{french}, \texttt{italian}, \texttt{usenglish} (same as english except for the mm/dd/yyyy format), \texttt{russian} (this automatically loads Cyrillic support), \texttt{german}, \texttt{swedish}
82 | \item The \textbf{type} of your lecture notes: \texttt{seminar} usually for single class, session, seminar, lecture period; \texttt{course} for a collection of lectures (over a semester or over a few days); \texttt{talk} for brief notes for speakers (or any other use you can think of for condensed, two-column layouts)
83 | \end{enumerate}
84 |
85 | \textbf{NB} Please delete all aux files and then compile if you decide to change languages halfway through. Compile twice to update TOC in case of \texttt{course} type documents.
86 |
87 | \subsubsection{Optional}
88 |
89 | You can also include secondary options for your document. Again, pick one from each set below:
90 |
91 | \begin{enumerate}
92 | \item Customise page headers as needed (default: current/next sections and subsections): \texttt{headertitle} to display the main title/short alternative title, \texttt{headersection} to display the current/next section as appropriate, \texttt{headersubsection} to display the current/next subsection as appropriate, \texttt{headerno} for a blank header (footers still display page numbers)
93 | \item Customise theorem numbering as needed: \texttt{theoremnosection}, \texttt{theoremsection}, \texttt{theoremsubsection}
94 | \item Choose if you want to start every new section on a new page/new right-hand page: \texttt{cleardoublepage}, \texttt{nocleardoublepage}
95 | \item Optimise your document for printing: \texttt{oneside}, \texttt{twoside}
96 | \item Choose between one- and two-column layouts: \texttt{onecolumn}, \texttt{twocolumn}
97 | \end{enumerate}
98 |
99 | \subsection{Additional commands}
100 |
101 | There are some additional commands you can use \textit{inside your document}, i.e. within \texttt{\\begin ... \\end} document, besides those which are already part of the blueprint given above:
102 |
103 | \begin{enumerate}
104 | \item \verb+\lecture[duration]{dd}{mm}{yyyy}+ for use in \texttt{course} type documents for providing information about lectures in the margin
105 | \item \verb+\separator+ for use in \texttt{talk} type documents to draw a visually helpful horizontal separator line
106 | \item \verb+\tosay{message}+ for use in \texttt{talk} type documents to print messages inside a box to help recall important data
107 | \item \verb+\margintext{message}+ to make useful notes in the margin
108 | \item \texttt{\\} at the start of a paragraph to give it a line break and remove any indentation
109 | \item \verb+\nl + at the start of a paragraph without either a line break or an indent (note the space following the command)
110 | \item \verb+\runin{}+ as a handy approach to print texts in small caps (especially useful to start new sections/chapters/parts of a document)
111 | \item \verb+\morelink{}+ to add a \verb+For more visit \texttt{_______}.+ link in the footer of the first page.
112 | \end{enumerate}
113 |
114 | \section{Miscellaneous}
115 |
116 | \subsection{Dependencies}
117 | \begin{multicols}{3}
118 | \begin{itemize}
119 | \item \texttt{hyperref}
120 | \item \texttt{mathtools}
121 | \item \texttt{csquotes}
122 | \item \texttt{microtype}
123 | \item \texttt{amsmath}
124 | \item \texttt{booktabs}
125 | \item \texttt{multirow}
126 | \item \texttt{unicode-math}
127 | \item \texttt{kpfonts-otf}
128 | \item \texttt{fancyhdr}
129 | \item \texttt{mparhack}
130 | \item \texttt{tikz}
131 | \item \texttt{mathdots}
132 | \item \texttt{xfrac}
133 | \item \texttt{faktor}
134 | \item \texttt{cancel}
135 | \item \texttt{babel}
136 | \end{itemize}
137 | \end{multicols}
138 |
139 | \subsection{Contributions}
140 |
141 | Translations are welcome and appreciated. General suggestions for improvement are welcome as well.
142 |
143 | Either fork this project and submit a pull request or, \textit{only in case of translations}, drop me an e-mail (\url{hello@vhbelvadi.com}) with the relevant translations and specify how you wish to be credited.
144 |
145 | \subsection{Even more}
146 |
147 | For up-to-date information about development of this class, star and/or watch and/or follow the repository on Github: \url{https://github.com/vhbelvadi/LaTeX-lecture-notes-class}
148 |
149 | \subsection{Acknowledgments}
150 |
151 | Thanks to \href{http://blog.poormansmath.net/}{Stefano Maggiolo} for initially helping me kickstart this and for his Italian translations. Thanks to \href{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/2/commits/34301290ff554b446fc755fa4cc813b701f63a2c}{Aleksei Kozharin} for Russian translations, \href{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/6}{Jan Heilund} for German translations and \href{https://github.com/vhbelvadi/LaTeX-lecture-notes-class/pull/7}{@eastlunder} for Swedish translations.
152 |
153 | Original release article: \url{http://vhbelvadi.com/latex-lecture-notes-class/}
154 |
155 |
156 | \end{document}
--------------------------------------------------------------------------------
/lecturenotes.cls:
--------------------------------------------------------------------------------
1 | \NeedsTeXFormat{LaTeX2e}
2 | \ProvidesClass{lecturenotes}[2025-03-18 v3.2 lecturenotes]
3 | \RequirePackage{ifthen}
4 | \RequirePackage[nodayofweek]{datetime}
5 |
6 | %%% Options
7 | % Language (english, usenglish, italian, french, russian, swedish)
8 | \DeclareOption{english}{
9 | \newcommand{\notes@lang}{english}
10 | \newdateformat{gbdate}{\ordinal{DAY} \monthname[\THEMONTH] \THEYEAR}
11 | \gbdate
12 | \newcommand{\notes@lecturename}{Lecture}
13 | \newcommand{\notes@theoremname}{theorem}
14 | \newcommand{\notes@propositionname}{proposition}
15 | \newcommand{\notes@lemmaname}{lemma}
16 | \newcommand{\notes@corollaryname}{corollary}
17 | \newcommand{\notes@definitionname}{definition}
18 | \newcommand{\notes@examplename}{example}
19 | \newcommand{\notes@exercisename}{exercise}
20 | \newcommand{\notes@remarkname}{remark}
21 | \newcommand{\notes@factname}{fact}
22 | \newcommand{\notes@problemname}{problem}
23 | \newcommand{\notes@conjecturename}{conjecture}
24 | \newcommand{\notes@claimname}{claim}
25 | \newcommand{\notes@notationname}{notation}
26 | \newcommand{\notes@morelinkname}{For more visit}}
27 | %
28 | \DeclareOption{usenglish}{
29 | \newcommand{\notes@lang}{english}
30 | \newdateformat{usvardate}{\monthname[\THEMONTH] \ordinal{DAY}, \THEYEAR}
31 | \usvardate
32 | \newcommand{\notes@lecturename}{Lecture}
33 | \newcommand{\notes@theoremname}{theorem}
34 | \newcommand{\notes@propositionname}{proposition}
35 | \newcommand{\notes@lemmaname}{lemma}
36 | \newcommand{\notes@corollaryname}{corollary}
37 | \newcommand{\notes@definitionname}{definition}
38 | \newcommand{\notes@examplename}{example}
39 | \newcommand{\notes@exercisename}{exercise}
40 | \newcommand{\notes@remarkname}{remark}
41 | \newcommand{\notes@factname}{fact}
42 | \newcommand{\notes@problemname}{problem}
43 | \newcommand{\notes@conjecturename}{conjecture}
44 | \newcommand{\notes@claimname}{claim}
45 | \newcommand{\notes@notationname}{notation}
46 | \newcommand{\notes@morelinkname}{For more visit}}
47 | %
48 | \DeclareOption{italian}{
49 | \newcommand{\notes@lang}{italian}
50 | \dateitalian
51 | \newcommand{\notes@lecturename}{Lezione}
52 | \newcommand{\notes@theoremname}{teorema}
53 | \newcommand{\notes@propositionname}{proposizione}
54 | \newcommand{\notes@lemmaname}{lemma}
55 | \newcommand{\notes@corollaryname}{corollario}
56 | \newcommand{\notes@definitionname}{definizione}
57 | \newcommand{\notes@examplename}{esempio}
58 | \newcommand{\notes@exercisename}{esercizio}
59 | \newcommand{\notes@remarkname}{osservazione}
60 | \newcommand{\notes@factname}{fatto}
61 | \newcommand{\notes@problemname}{problema}
62 | \newcommand{\notes@conjecturename}{congettura}
63 | \newcommand{\notes@claimname}{ipotesi}
64 | \newcommand{\notes@notationname}{notazione}
65 | \newcommand{\notes@morelinkname}{Per ulteriori informazioni visita}}
66 | %
67 | \DeclareOption{german}{
68 | \newcommand{\notes@lang}{german}
69 | \newcommand{\notes@lecturename}{Vorlesung}
70 | \newcommand{\notes@theoremname}{Theorem}
71 | \newcommand{\notes@propositionname}{Proposition}
72 | \newcommand{\notes@lemmaname}{Lemma}
73 | \newcommand{\notes@corollaryname}{Korollar}
74 | \newcommand{\notes@definitionname}{Definition}
75 | \newcommand{\notes@examplename}{Beispiel}
76 | \newcommand{\notes@exercisename}{\"Ubung}
77 | \newcommand{\notes@remarkname}{Bemerkung}
78 | \newcommand{\notes@factname}{Fakt}
79 | \newcommand{\notes@problemname}{Problem}
80 | \newcommand{\notes@conjecturename}{Vermutung}
81 | \newcommand{\notes@claimname}{Behauptung}
82 | \newcommand{\notes@notationname}{Notation}
83 | \newcommand{\notes@morelinkname}{F\"ur mehr Information siehe}}
84 | %
85 | \DeclareOption{french}{
86 | \newcommand{\notes@lang}{french}
87 | \datefrench
88 | \newcommand{\notes@lecturename}{Conf\'{e}rence}
89 | \newcommand{\notes@theoremname}{th\'{e}or\`{e}m}
90 | \newcommand{\notes@propositionname}{proposition}
91 | \newcommand{\notes@lemmaname}{lemme}
92 | \newcommand{\notes@corollaryname}{corollaire}
93 | \newcommand{\notes@definitionname}{d\'{e}finition}
94 | \newcommand{\notes@examplename}{exemple}
95 | \newcommand{\notes@exercisename}{exercise}
96 | \newcommand{\notes@remarkname}{remarque}
97 | \newcommand{\notes@factname}{fait}
98 | \newcommand{\notes@problemname}{probl\`{e}me}
99 | \newcommand{\notes@conjecturename}{conjecture}
100 | \newcommand{\notes@claimname}{d\'{e}claration}
101 | \newcommand{\notes@notationname}{notation}
102 | \newcommand{\notes@morelinkname}{Pour plus d'informations visitez}}
103 | %
104 | \DeclareOption{russian}{
105 | \newcommand{\notes@lang}{russian}
106 | \newcommand{\notes@lecturename}{Лекция}
107 | \newcommand{\notes@theoremname}{Теорема}
108 | \newcommand{\notes@propositionname}{Предложение}
109 | \newcommand{\notes@lemmaname}{Лемма}
110 | \newcommand{\notes@corollaryname}{Следствие}
111 | \newcommand{\notes@definitionname}{Определение}
112 | \newcommand{\notes@examplename}{Пример}
113 | \newcommand{\notes@exercisename}{Упражнение}
114 | \newcommand{\notes@remarkname}{Замечание}
115 | \newcommand{\notes@factname}{Факт}
116 | \newcommand{\notes@problemname}{Задача}
117 | \newcommand{\notes@conjecturename}{Догадка}
118 | \newcommand{\notes@claimname}{Утверждение}
119 | \newcommand{\notes@notationname}{Обозначение}
120 | \newcommand{\notes@morelinkname}{Подробности здесь}}
121 | %
122 | \DeclareOption{swedish}{
123 | \newcommand{\notes@lang}{swedish}
124 | \newcommand{\notes@lecturename}{F\"{o}reläsning}
125 | \newcommand{\notes@theoremname}{teorem}
126 | \newcommand{\notes@propositionname}{sats}
127 | \newcommand{\notes@lemmaname}{lemma}
128 | \newcommand{\notes@corollaryname}{korollarium}
129 | \newcommand{\notes@definitionname}{definition}
130 | \newcommand{\notes@examplename}{exempel}
131 | \newcommand{\notes@exercisename}{\"{o}vning}
132 | \newcommand{\notes@remarkname}{anm\"{a}rkning}
133 | \newcommand{\notes@factname}{faktum}
134 | \newcommand{\notes@problemname}{uppgift}
135 | \newcommand{\notes@conjecturename}{konjektur}
136 | \newcommand{\notes@claimname}{p\r{a}st\r{a}ende}
137 | \newcommand{\notes@notationname}{notation}
138 | \newcommand{\notes@morelinkname}{F\"{o}r mer information bes\"{o}k}}
139 | %
140 | % Header (headertitle,headersection,headersubsection, headerno)
141 | % headertitle displays speaker on left and title on right.
142 | % headersection displays section on left and right
143 | % headersubsection displays section on left and subsection on right
144 | % headerno does not display headers
145 | \DeclareOption{headertitle}{\newcommand{\notes@header}{title}}
146 | \DeclareOption{headersection}{\newcommand{\notes@header}{section}}
147 | \DeclareOption{headersubsection}{\newcommand{\notes@header}{subsection}}
148 | \DeclareOption{headerno}{\newcommand{\notes@header}{no}}
149 | % Theorem (theoremnosection,theoremsection,theoremsubsection)
150 | % theoremnosection numbers theorem continuously in the document
151 | % theoremsection reset theorem numbering on section changes
152 | % theoremsubsection reset theorem numbering on subsection changes
153 | \DeclareOption{theoremnosection}{\newcommand{\notes@theorem}{nosection}}
154 | \DeclareOption{theoremsection}{\newcommand{\notes@theorem}{section}}
155 | \DeclareOption{theoremsubsection}{\newcommand{\notes@theorem}{subsection}}
156 | % Clear double page before sections (cleardoublepage,nocleardoublepage)
157 | \DeclareOption{cleardoublepage}{\newcommand{\notes@cleardoublepage}{true}}
158 | \DeclareOption{nocleardoublepage}{\newcommand{\notes@cleardoublepage}{false}}
159 | % Number of sides (oneside,twoside)
160 | \DeclareOption{oneside}{\newcommand{\notes@side}{oneside}}
161 | \DeclareOption{twoside}{\newcommand{\notes@side}{twoside}}
162 | % Number of columns (onecolumn,twocolumn)
163 | \DeclareOption{onecolumn}{\newcommand{\notes@columns}{onecolumn}}
164 | \DeclareOption{twocolumn}{\newcommand{\notes@columns}{twocolumn}}
165 | % Type (course, seminar, talk)
166 | % Course is a medium-length document (tens of pages)
167 | % structured in sections, subsections and optionally paragraphs;
168 | % if subsections are short, one can ask for headersection not to display
169 | % subsections in headers; if subsections are long, one can ask for
170 | % theoremsubsection to number theorems inside subsection. It has lectures
171 | % number as a margin note.
172 | % Seminar is a short unstructured document (maybe with paragraph or small
173 | % subsections).
174 | % Talk is to prepare a speech - with the same structure as seminar, but is
175 | % designed to write only the things one will write at the blackboard.
176 | \DeclareOption{course}{%
177 | \newcommand{\notes@type}{course}%
178 | \ifthenelse{\isundefined{\notes@header}}{\ExecuteOptions{headersubsection}}{}%
179 | \ifthenelse{\isundefined{\notes@theorem}}{\ExecuteOptions{theoremsection}}{}%
180 | \ifthenelse{\isundefined{\notes@cleardoublepage}}{\ExecuteOptions{nocleardoublepage}}{}%
181 | \ifthenelse{\isundefined{\notes@columns}}{\ExecuteOptions{onecolumn}}{}%
182 | \ifthenelse{\isundefined{\notes@side}}{\ExecuteOptions{twoside}}{}%
183 | }
184 | \DeclareOption{seminar}{%
185 | \newcommand{\notes@type}{seminar}%
186 | \ifthenelse{\isundefined{\notes@header}}{\ExecuteOptions{headertitle}}{}%
187 | \ifthenelse{\isundefined{\notes@theorem}}{\ExecuteOptions{theoremnosection}}{}%
188 | \ifthenelse{\isundefined{\notes@cleardoublepage}}{\ExecuteOptions{nocleardoublepage}}{}%
189 | \ifthenelse{\isundefined{\notes@columns}}{\ExecuteOptions{onecolumn}}{}%
190 | \ifthenelse{\isundefined{\notes@side}}{\ExecuteOptions{twoside}}{}%
191 | }
192 | \DeclareOption{talk}{%
193 | \newcommand{\notes@type}{talk}%
194 | \ifthenelse{\isundefined{\notes@header}}{\ExecuteOptions{headerno}}{}%
195 | \ifthenelse{\isundefined{\notes@theorem}}{\ExecuteOptions{theoremnosection}}{}%
196 | \ifthenelse{\isundefined{\notes@cleardoublepage}}{\ExecuteOptions{nocleardoublepage}}{}
197 | \ifthenelse{\isundefined{\notes@columns}}{\ExecuteOptions{twocolumn}}{}%
198 | \ifthenelse{\isundefined{\notes@side}}{\ExecuteOptions{oneside}}{}%
199 | \hbadness=10000%
200 | \vbadness=10000%
201 | \tolerance=10000%
202 | }
203 |
204 | \ProcessOptions
205 | %%% Load default class
206 | \LoadClass[a4paper,11pt,\notes@columns,\notes@side]{article}%
207 |
208 | %%% Load default arguments if empty
209 | \ifthenelse{\isundefined{\notes@type}}{\ExecuteOptions{course}}{}
210 | \ifthenelse{\isundefined{\notes@lang}}{\ExecuteOptions{english}}{}
211 | \ifthenelse{\isundefined{\notes@columns}}{\ExecuteOptions{onecolumn}}{}
212 | \ifthenelse{\isundefined{\notes@side}}{\ExecuteOptions{oneside}}{}
213 |
214 | %%% Common macroes
215 | \RequirePackage[\notes@lang]{babel}
216 | \RequirePackage[colorlinks,linkcolor=black,urlcolor=black,citecolor=black]{hyperref}
217 | \RequirePackage{fancyhdr}
218 | \RequirePackage{tikz}
219 | \usetikzlibrary{arrows}
220 | \usetikzlibrary{patterns}
221 | \usetikzlibrary{shapes}
222 | % \RequirePackage[utf8]{inputenc} % Removed as pdflatex is no longer recommended for this package, use lualatex instead
223 | \RequirePackage[intlimits]{amsmath}
224 | % \ifthenelse{\equal{\notes@lang}{russian}}{\RequirePackage[T1,T2A]{fontenc}}{} % Required for Cyrillic support % Removed for LuaLaTeX support, not required per Lua docs
225 | \RequirePackage{amsfonts}
226 | \RequirePackage{amsxtra}
227 | \RequirePackage{amssymb}
228 | \RequirePackage{amsthm}
229 | \RequirePackage{unicode-math}
230 | \RequirePackage{mathdots}
231 | \RequirePackage{mathrsfs}
232 | \RequirePackage{microtype}
233 | \RequirePackage{stmaryrd}
234 | \RequirePackage{titlesec}
235 | \newcommand{\contentsfinish}{}
236 | \RequirePackage[titles]{tocloft}
237 | \RequirePackage{textcase}
238 | \RequirePackage{setspace}
239 | \RequirePackage{xfrac}
240 | \RequirePackage{mathtools}
241 | \RequirePackage{faktor}
242 | \RequirePackage{cancel}
243 | \RequirePackage{mparhack}
244 | \RequirePackage{booktabs}
245 | \RequirePackage{multirow}
246 | \RequirePackage[fixlanguage]{babelbib}
247 | % \RequirePackage{lecturenotes-styles} % Merged into this class below
248 |
249 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
250 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251 | % Merged from lecturenotes-styles.sty
252 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
253 |
254 | %%%%%%%%%%%%%%%%%%%% ABBREVIATIONS %%%%%%%%%%%%%%%%%%%%
255 | \newcommand{\pha}{{}_\bullet}
256 | \newcommand{\phb}{{}_\blacktriangle}
257 | \newcommand{\phc}{\blacktriangle}
258 |
259 | \newcommand{\dotleq}{\mathrel{\raisebox{1.2ex}{$⋅$}\mkern-13.5mu \leq}}
260 | \renewcommand{\projlim}{\varprojlim}
261 | \renewcommand{\injlim}{\varinjlim}
262 | \newcommand{\dottimes}{\stackrel[\cdot]{\times}}
263 |
264 | %\newcommand{\xra}[1]{\xrightarrow{#1}}
265 | \newcommand{\xra}[1]{\, \tikz[baseline] \draw (0pt,3.5pt) -- (7pt,3.5pt); {\raisebox{1.5pt}{\ensuremath{\scriptstyle #1}}} \tikz[baseline] \draw [->] (0pt,3.5pt) -- (7pt,3.5pt); \, }
266 |
267 | \let\tempCaption=\caption
268 | \renewcommand{\caption}[1]{\itshape \tempCaption{#1}}
269 |
270 | \renewcommand{\obar}[1]{\overline{#1}}
271 | \newcommand{\ubar}[1]{\underline{#1}}
272 |
273 | \newcommand{\set}[1]{\left\{#1\right\}}
274 | \newcommand{\pa}[1]{\left(#1\right)}
275 | \newcommand{\ang}[1]{\left<#1\right>}
276 | \newcommand{\bra}[1]{\left[#1\right]}
277 | \newcommand{\abs}[1]{\left|#1\right|}
278 | \newcommand{\norm}[1]{\left\|#1\right\|}
279 |
280 | \newcommand{\mat}[1]{\begin{matrix}#1\end{matrix}}
281 | \newcommand{\pmat}[1]{\pa{\mat{#1}}}
282 | \newcommand{\bmat}[1]{\bra{\mat{#1}}}
283 | \newcommand{\sismat}[1]{\left\{\mat{#1}\right.}
284 | \newcommand{\sm}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
285 | \newcommand{\psm}[1]{\pa{\sm{#1}}}
286 | \newcommand{\bsm}[1]{\bra{\sm{#1}}}
287 | \newcommand{\tci}[2]{\set{\,#1 \mid{} #2\,}}
288 | \newcommand{\tcia}[2]{\ang{\,#1 \mid{} #2\,}}
289 | \newcommand{\pfrac}[2]{\pa{\frac{#1}{#2}}}
290 | \newcommand{\bfrac}[2]{\bra{\frac{#1}{#2}}}
291 | \newcommand{\psfrac}[2]{\pa{\sfrac{#1}{#2}}}
292 | \newcommand{\bsfrac}[2]{\bra{\sfrac{#1}{#2}}}
293 | \newcommand{\der}[2]{\frac{\partial #1}{\partial #2}}
294 | \newcommand{\pder}[2]{\pfrac{\partial #1}{\partial #2}}
295 | \newcommand{\sder}[2]{\sfrac{\partial #1}{\partial #2}}
296 | \newcommand{\psder}[2]{\psfrac{\partial #1}{\partial #2}}
297 |
298 | \newcommand{\leg}[2]{\pfrac{#1}{#2}}
299 | \newcommand{\estdim}[2]{\left[#1 : #2\right]}
300 | \newcommand{\abel}[2]{\left[#1, #2\right]}
301 | \newcommand{\brk}[2]{\left[#1,#2\right]}
302 |
303 | %%%%%%%%%%%%%%%%%%%% OPERATORS %%%%%%%%%%%%%%%%%%%%
304 | \DeclareMathOperator{\Schemes}{\mathfrak{Sch}}
305 | \DeclareMathOperator{\AffineSchemes}{\mathfrak{AffSch}}
306 | \DeclareMathOperator{\Sets}{\mathfrak{Sets}}
307 | \DeclareMathOperator{\Groupoids}{\mathfrak{Groupoids}}
308 | \DeclareMathOperator{\TopologicalSpaces}{\mathfrak{Top}}
309 |
310 | \DeclareMathOperator{\Alb}{Alb}
311 | \DeclareMathOperator{\Aut}{Aut}
312 | \DeclareMathOperator{\B}{B}
313 | \DeclareMathOperator{\cod}{cod}
314 | \DeclareMathOperator{\de}{d}
315 | \DeclareMathOperator{\diag}{diag}
316 | \DeclareMathOperator{\Div}{Div}
317 | \DeclareMathOperator{\Ext}{Ext}
318 | \DeclareMathOperator{\Fix}{Fix}
319 | \DeclareMathOperator{\gen}{g}
320 | \DeclareMathOperator{\GL}{GL}
321 | \DeclareMathOperator{\Hilb}{Hilb}
322 | \DeclareMathOperator{\Ho}{H}
323 | \DeclareMathOperator{\ho}{h}
324 | \DeclareMathOperator{\Hom}{Hom}
325 | \DeclareMathOperator{\id}{id}
326 | \DeclareMathOperator{\Image}{Im}
327 | \DeclareMathOperator{\Isom}{Isom}
328 | \DeclareMathOperator{\Mod}{Mod}
329 | \DeclareMathOperator{\Mor}{Mor}
330 | \DeclareMathOperator{\argen}{p_a}
331 | \DeclareMathOperator{\geomgen}{p_g}
332 | \DeclareMathOperator{\Pic}{Pic}
333 | \DeclareMathOperator{\Projection}{Proj}
334 | \DeclareMathOperator{\irr}{q}
335 | \DeclareMathOperator{\res}{res}
336 | \DeclareMathOperator{\sgn}{sgn}
337 | \DeclareMathOperator{\Sing}{Sing}
338 | \DeclareMathOperator{\Spec}{Spec}
339 | \DeclareMathOperator{\Stab}{Stab}
340 | \DeclareMathOperator{\tr}{tr}
341 | \DeclareMathOperator{\Tors}{Tors}
342 | \DeclareMathOperator{\vp}{v.p.}
343 |
344 | %%%%%%%%%%%%%%%%%%%% LETTERS %%%%%%%%%%%%%%%%%%%%
345 | \newcommand{\frakM}{\mathfrak{M}}
346 | \newcommand{\frakm}{\mathfrak{m}}
347 |
348 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
349 | % End of lecturenotes-styles.sty
350 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
351 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352 |
353 | \RequirePackage{csquotes}
354 | \addtolength{\jot}{0.5em} %Add row spacing to align environment
355 | \RequirePackage[frenchstyle,narrowiints,largesmallcaps]{kpfonts-otf} % Comment out and uncomment the line two above for Palatino % fullsumlimits,fullintlimits not supported by kpfonts-otf
356 | \linespread{1.05}
357 | \RequirePackage[verbose,a4paper,top=1.45in,bottom=1.35in,left=1.15in,right=2in,asymmetric,twoside]{geometry}
358 | \setlength\headheight{14pt}
359 |
360 | %\SetUnicodeOption{mathletters}
361 | %\SetUnicodeOption{autogenerated}
362 |
363 | \delimitershortfall=5pt
364 |
365 | \frenchspacing
366 | \DeclareRobustCommand{\smallcaps}[1]{\scshape{#1}}%\MakeTextLowercase{#1}}
367 | \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
368 | \hbox{}
369 | \vspace*{\fill}
370 | \vspace{\fill}
371 | \thispagestyle{empty}
372 | \newpage
373 | \if@twocolumn\hbox{}\newpage\fi\fi\fi}
374 | \newcommand{\margintext}[1]{\marginpar{\setstretch{0.7}\itshape{\footnotesize{#1}}}}
375 | \newcommand{\separator}{\begin{center}\rule{\columnwidth}{\arrayrulewidth}\end{center}}
376 | \newcommand{\tosay}[1]{\begin{center}\text{\fbox{\scriptsize{#1}}}\end{center}}
377 | \newcounter{notes@lecture}
378 | \newcommand{\lecture}[4][]{%
379 | \addtocounter{notes@lecture}{1}%
380 | \newdate{@datelecture#2#3#4}{#2}{#3}{#4}%
381 | \margintext{\notes@lecturename{}\ \arabic{notes@lecture} \ifthenelse{\equal{#1}{}}{}{\ (#1)}\\ \displaydate{@datelecture#2#3#4}}%
382 | }
383 | \newcommand{\TODO}{\margintext{TODO}}%
384 |
385 | %%% Theorems and sections style
386 | \swapnumbers
387 | \newtheoremstyle{plainsc}{10pt}{10pt}{\normalfont\itshape}{}{\normalfont\smallcaps}{.}{.5em}{}
388 | \newtheoremstyle{definitionsc}{10pt}{10pt}{\normalfont}{}{\normalfont\smallcaps}{.}{.5em}{}
389 | \newtheoremstyle{remarksc}{10pt}{10pt}{\normalfont}{}{\normalfont\smallcaps}{.}{.5em}{}
390 |
391 | \theoremstyle{plainsc}
392 | \ifthenelse{\equal{\notes@theorem}{nosection}}{\newtheorem{theorem}{\notes@theoremname}}{}
393 | \ifthenelse{\equal{\notes@theorem}{section}}{\newtheorem{theorem}{\notes@theoremname}[section]}{}
394 | \ifthenelse{\equal{\notes@theorem}{subsection}}{\newtheorem{theorem}{\notes@theoremname}[subsection]}{}
395 | \newtheorem{proposition}[theorem]{\notes@propositionname}
396 | \newtheorem{lemma}[theorem]{\notes@lemmaname}
397 | \newtheorem{corollary}[theorem]{\notes@corollaryname}
398 | \newtheorem{conjecture}[theorem]{\notes@conjecturename}
399 | \newtheorem{claim}[theorem]{\notes@claimname}
400 | \theoremstyle{definitionsc}
401 | \newtheorem{definition}[theorem]{\notes@definitionname}
402 | \theoremstyle{remarksc}
403 | \newtheorem{example}[theorem]{\notes@examplename}
404 | \newtheorem{exercise}[theorem]{\notes@exercisename}
405 | \newtheorem{remark}[theorem]{\notes@remarkname}
406 | \newtheorem{fact}[theorem]{\notes@factname}
407 | \newtheorem{problem}[theorem]{\notes@problemname}
408 | \newtheorem{notation}[theorem]{\notes@notationname}
409 |
410 | \newcommand{\notes@opensection}{}
411 | \ifthenelse{\equal{\notes@cleardoublepage}{true}}{\renewcommand{\notes@opensection}{\cleardoublepage\thispagestyle{plain}}}{}
412 | \titleformat{\subsection}{\relax\centering}{\thesubsection}{1em}{\large\itshape}
413 | \titleformat{\subsubsection}{\relax\centering}{\thesubsubsection}{1em}{\normalsize}
414 | \titleformat{\paragraph}[runin]{}{}{}{\normalsize\smallcaps}
415 | \PassOptionsToPackage{letterspace=1000}{microtype}
416 | \titleformat{\section}{\relax\centering\large\lsstyle}{\small{\thesection}}{0.5em}{\scshape\MakeLowercase}
417 | \PassOptionsToPackage{letterspace=0}{microtype}
418 |
419 | \renewcommand{\cftsecfont}{\normalfont}%
420 | \renewcommand{\cftsecpagefont}{\normalfont}%
421 | \setcounter{secnumdepth}{3}
422 | \setcounter{tocdepth}{3}
423 | %\ifthenelse{\equal{\notes@type}{seminar}}{\renewcommand{\thesubsection}{\arabic{subsection}}}{}
424 | \ifthenelse{\equal{\notes@type}{talk}}{\renewcommand{\thesubsection}{\arabic{subsection}}}{}
425 |
426 | \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\smallcaps{#1}}
427 |
428 |
429 | %%% Preamble commands (as title, author, ...)
430 | \renewcommand{\date}[3]{\newcommand{\notes@datestartdef}{}\newdate{@date}{#1}{#2}{#3}}
431 | \newcommand{\dateend}[3]{\newcommand{\notes@dateenddef}{}\newdate{@dateend}{#1}{#2}{#3}}
432 | \newcommand{\season}[1]{\newcommand{\notes@season}{#1}}
433 | \newcommand{\ccode}[1]{\newcommand{\notes@ccode}{#1}}
434 | \newcommand{\email}[1]{\newcommand{\notes@email}{#1}}
435 | \newcommand{\spemail}[1]{\newcommand{\notes@spemail}{#1}}
436 | \newcommand{\speaker}[1]{\newcommand{\notes@speaker}{#1}}
437 | \newcommand{\subtitle}[1]{\newcommand{\notes@subtitle}{#1}}
438 | \newcommand{\shorttitle}[1]{\newcommand{\notes@shorttitle}{#1}}
439 | \newcommand{\flag}[1]{\newcommand{\notes@flag}{#1}}
440 | \newcommand{\place}[1]{\newcommand{\notes@place}{#1}}
441 | \newcommand{\conference}[1]{\newcommand{\notes@conference}{#1}}
442 | \newcommand{\subject}[1]{\newcommand{\notes@subject}{#1}}
443 | \newcommand{\attn}[1]{\newcommand{\notes@attn}{#1}}
444 | \newcommand{\morelink}[1]{\newcommand{\notes@morelink}{#1}}
445 |
446 | \AtBeginDocument{%
447 | % Better spacing for the equation environment
448 | \let\oldequation=\equation%
449 | \let\endoldequation=\endequation%
450 | \renewenvironment{equation}{\vspace{0ex}\begin{oldequation}}{\vspace{2ex}\end{oldequation}}%
451 | % Better spacing for $$ ... $$ and align* environments
452 | \setlength{\abovedisplayskip}{2ex}%
453 | \setlength{\abovedisplayshortskip}{0ex}%
454 | \setlength{\belowdisplayskip}{2ex}%
455 | \setlength{\belowdisplayshortskip}{2ex}%
456 | % Redefine line break command, add newline and begin commands
457 | \renewcommand{\\}{\par\vspace{1.5ex}\noindent}%
458 | \newcommand{\nl}{\par\noindent}%
459 | \newcommand{\runin}[1]{\textls[50]{\scshape #1}}
460 | % Setting up the two-column talk style
461 | \ifthenelse{\equal{\notes@columns}{twocolumn}}
462 | {%
463 | \setlength{\abovedisplayskip}{0mm}%
464 | \setlength{\belowdisplayskip}{0mm}%
465 | \setlength{\parskip}{0mm}%
466 | \setlength{\topsep}{0mm}%
467 | }{}%
468 | \pagestyle{fancy}
469 | \ifthenelse{\equal{\notes@header}{title}}%
470 | {%
471 | \renewcommand{\sectionmark}[1]{}%
472 | \renewcommand{\subsectionmark}[1]{}%
473 | }{}
474 | \ifthenelse{\equal{\notes@header}{section}}%
475 | {%
476 | \renewcommand{\sectionmark}[1]{\markboth{{\footnotesize\thesection}.\ \smallcaps{#1}}{\thesection.\ \smallcaps{#1}}}%
477 | \renewcommand{\subsectionmark}[1]{}%
478 | }{}
479 | \ifthenelse{\equal{\notes@header}{subsection}}%
480 | {
481 | \renewcommand{\sectionmark}[1]{\markboth{{\scriptsize\thesection}.\ \smallcaps{#1}}{}}%\thesection.\ \smallcaps{#1}}}
482 | \renewcommand{\subsectionmark}[1]{\markright{{\scriptsize\thesubsection}.\ \smallcaps{#1}}}%
483 | }{}
484 | \fancyhf{}
485 | \ifthenelse{\equal{\notes@header}{title}}{%
486 | \ifthenelse{\isundefined{\notes@ccode}}{}{%
487 | \fancyhead[RE]{\protect\MakeUppercase{\footnotesize\textls[50]{\notes@ccode}}}
488 | }%
489 | \ifthenelse{\isundefined{\notes@shorttitle}}{%
490 | \fancyhead[LE]{\smallcaps\@title}}{%
491 | \fancyhead[LE]{\smallcaps\protect\MakeLowercase{\protect\textls[70]{\notes@shorttitle}}}}
492 | \ifthenelse{\isundefined{\notes@speaker}}{%
493 | \fancyhead[RO]{\smallcaps\protect\MakeLowercase{\protect\textls[70]{\@author}}}}{%
494 | \fancyhead[RO]{\smallcaps\protect\MakeLowercase{\protect\textls[70]{\notes@speaker}}}}
495 | }
496 | {
497 | \fancyhead[LE]{\smallcaps\protect\MakeLowercase{\protect\textls[70]{\leftmark}}}
498 | \fancyhead[RO]{\smallcaps\protect\MakeLowercase{\protect\textls[70]{\rightmark}}}
499 | }
500 | \fancyfoot[RO,LE]{\smallcaps\thepage}
501 | \ifthenelse{\equal{\notes@header}{no}}%
502 | {\renewcommand{\headrulewidth}{0pt}%
503 | \fancyhead[LE]{}%
504 | \fancyhead[RO]{}%
505 | }%
506 | {\renewcommand{\headrulewidth}{0.5pt}}
507 |
508 | \ifthenelse{\isundefined{\notes@subtitle}}{\subtitle{}}{}
509 | \ifthenelse{\isundefined{\notes@subject}}{\subject{}}{}
510 | \ifthenelse{\isundefined{\notes@email}}{\email{}}{}
511 | \ifthenelse{\isundefined{\notes@speaker}}{\speaker{}}{}
512 | \ifthenelse{\isundefined{\notes@speaker}}{\speaker{}}{}
513 | \ifthenelse{\isundefined{\notes@spemail}}{\spemail{}}{}
514 | %\ifthenelse{\isundefined{\notes@season}}{\season{}}{} % Commented to fix Issue #8
515 | \ifthenelse{\isundefined{\notes@flag}}{\flag{}}{}
516 | %\ifthenelse{\isundefined{\notes@morelink}}{\morelink{}}{}
517 | \ifthenelse{\isundefined{\notes@conference}}{\conference{}}{}
518 | \ifthenelse{\isundefined{\notes@place}}{\place{}}{}
519 |
520 | \hypersetup{
521 | pdftitle={\@title},
522 | pdfsubject={\notes@subject},
523 | pdfauthor={\@author},
524 | pdfkeywords={\notes@speaker{}:\notes@conference{}:\notes@place{}},
525 | pdfinfo={
526 | Author={\@author},
527 | Title={\@title},
528 | CreationDate={D:\pdfdate},
529 | Keywords={\notes@speaker{};\notes@conference{};\notes@place{}},
530 | }
531 | }
532 | \maketitle
533 | \ifthenelse{\equal{\notes@type}{course}}{\tableofcontents}{}
534 | }
535 |
536 | %%% Common structures
537 |
538 | \renewcommand\maketitle{\par
539 | \begingroup
540 | \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
541 | \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
542 | \long\def\@makefntext##1{\parindent 1em\noindent
543 | \hb@xt@1.8em{%
544 | \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
545 | \@maketitle
546 | \thispagestyle{plain}\@thanks
547 | \endgroup
548 | \setcounter{footnote}{0}%
549 | }
550 |
551 | \renewcommand{\@maketitle}{
552 | \newpage
553 | \null
554 | \vskip 4ex%
555 | \begin{center}%
556 | \let \footnote \thanks
557 | \ifthenelse{\isundefined{\notes@ccode}}{}{%
558 | \protect\textls[100]{\protect\MakeUppercase{\notes@ccode}} --- %
559 | }%
560 | {\large\smallcaps\protect\textls[100]{\protect\MakeUppercase{\@title}}}%
561 | \ifthenelse{\isundefined{\notes@subtitle}}{}{%
562 | {\vskip 1.5ex\large\smallcaps\protect\textls[100]{\protect\MakeLowercase{\protect\scshape{\notes@subtitle}}}}%
563 | }%
564 | {\ifthenelse{\isundefined{\notes@speaker}}{}{%
565 | \ifthenelse{\equal{\notes@spemail}{}}{%
566 | {\vskip 1.5ex\normalsize\protect\MakeLowercase{\smallcaps\protect\textls[75]{\protect\scshape{\notes@speaker}}}}%
567 | }{%
568 | \ifthenelse{\equal{\notes@email}{}}{%
569 | {\vskip 1.5ex\normalsize\protect\MakeLowercase{\smallcaps\protect\textls[75]{\protect\scshape{\notes@speaker}}}}\footnote{\protect\href{mailto:\notes@spemail}{\notes@spemail}}%
570 | }{%
571 | {\vskip 1.5ex\normalsize\protect\MakeLowercase{\smallcaps\protect\textls[75]{\protect\scshape{\notes@speaker}}}}\footnote{\protect\href{mailto:\notes@spemail}{\notes@spemail} (speaker)}%
572 | }}%
573 | \par}}%
574 | \vskip 1.5em%
575 | {\large
576 | \begin{tabular}[t]{c}%
577 | \ifthenelse{\equal{\notes@email}{}}{%
578 | {\small\itshape\@author}%
579 | }{%
580 | \ifthenelse{\equal{\notes@speaker}{}}{%
581 | {\small\itshape\@author}\footnote{\href{mailto:\notes@email}{\notes@email}}%
582 | }{%
583 | {\small\itshape\@author}\footnote{\href{mailto:\notes@email}{\notes@email} (scribe)}%
584 | }}%
585 | \end{tabular}\par}%
586 | \vskip 2ex%
587 | \ifthenelse{\equal{\notes@flag}{}}{}%
588 | {%
589 | {\small\itshape\notes@flag}%
590 | \vskip 1ex%
591 | }%
592 | \ifthenelse{\equal{\notes@conference}{}}%
593 | {%
594 | \ifthenelse{\equal{\notes@place}{}}{}%
595 | {%
596 | {\small\itshape\notes@place}%
597 | \vskip 1ex%
598 | }%
599 | }%
600 | {%
601 | \ifthenelse{\equal{\notes@place}{}}%
602 | {%
603 | {\small\itshape\notes@conference}%
604 | \vskip 1ex%
605 | }%
606 | {%
607 | {\small\itshape\notes@conference, \notes@place}%
608 | \vskip 1ex%
609 | }%
610 | }
611 | \ifthenelse{\isundefined{\notes@season}}{% If season not defined
612 | \ifthenelse{\isundefined{\notes@dateenddef}}{% If end date not defined
613 | \ifthenelse{\isundefined{\notes@datestartdef}}{}{% If start date not defined do nothing else
614 | {\small\itshape\displaydate{@date}}% Display start date
615 | }%
616 | }{%
617 | {\small\itshape\displaydate{@date} -- \displaydate{@dateend}}% Do this if end date and start date are defined
618 | }%
619 | }%
620 | {% If season is defined
621 | {\itshape\notes@season}%
622 | }%
623 | \ifthenelse{\isundefined{\notes@attn}}{}{\vskip 3ex%
624 | {\itshape\notes@attn}%
625 | }%
626 | \ifthenelse{\isundefined{\notes@morelink}}{}{%
627 | \let\thefootnote\relax%
628 | \footnotetext{%
629 | \notes@morelinkname \ \url{\notes@morelink}.
630 | }%
631 | \addtocounter{footnote}{-1}\let\thefootnote\svthefootnote%
632 | }%
633 | \vskip 3ex\noindent\rule{1.5cm}{0.4pt}%
634 | \end{center}%
635 | \par
636 | \vskip 2ex
637 | }
638 |
639 | \newcommand{\makedefaultsection}[2][true]{
640 | \ifthenelse{\equal{\notes@type}{course}}{
641 | \ifthenelse{\equal{#1}{true}}{\addcontentsline{toc}{section}{#2}}{}
642 | \section*{#2}
643 | \ifthenelse{\equal{\notes@header}{section}}{\markboth{\smallcaps{#2}}{\smallcaps{#2}}}{}
644 | \ifthenelse{\equal{\notes@header}{subsection}}{\markboth{\smallcaps{#2}}{}}{}}{}
645 | \ifthenelse{\equal{\notes@type}{seminar}}{
646 | \ifthenelse{\equal{#1}{true}}{\addcontentsline{toc}{subsection}{#2}}{}
647 | \subsection*{#2}
648 | \ifthenelse{\equal{\notes@header}{subsection}}{\markright{\smallcaps{#2}}}{}}{}
649 | \ifthenelse{\equal{\notes@type}{talk}}{
650 | \ifthenelse{\equal{#1}{true}}{\addcontentsline{toc}{subsection}{#2}}{}
651 | \subsection*{#2}
652 | \ifthenelse{\equal{\notes@header}{subsection}}{\markright{\smallcaps{#2}}}{}}{}
653 | }
654 |
655 | \renewcommand{\tableofcontents}{%
656 | \makedefaultsection[false]{\contentsname}
657 | \@starttoc{toc}\vskip 7ex%
658 | }
659 |
660 | \renewenvironment{thebibliography}[1]{
661 | \makedefaultsection{\refname}
662 | \list{\@biblabel{\@arabic\c@enumiv}}%
663 | {\settowidth\labelwidth{\@biblabel{#1}}%
664 | \leftmargin\labelwidth
665 | \advance\leftmargin\labelsep
666 | \@openbib@code
667 | \usecounter{enumiv}%
668 | \let\p@enumiv\@empty
669 | \renewcommand\theenumiv{\@arabic\c@enumiv}}%
670 | \sloppy
671 | \clubpenalty4000
672 | \@clubpenalty \clubpenalty
673 | \widowpenalty4000%
674 | \sfcode`\.\@m%
675 | }{
676 | \def\@noitemerr
677 | {\@latex@warning{Empty `thebibliography' environment}}%
678 | \endlist}
679 |
--------------------------------------------------------------------------------
/sample/lecturenotes-sample.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vhbelvadi/LaTeX-lecture-notes-class/790d027bca646e16e1b13a4dac55c8ec0f8ead76/sample/lecturenotes-sample.pdf
--------------------------------------------------------------------------------
/sample/lecturenotes-sample.tex:
--------------------------------------------------------------------------------
1 | \documentclass[english,course]{lecturenotes}
2 | \usepackage{lipsum} % Only needed to generate dummy text for sample.tex
3 | %
4 | % First, provide some data about this document
5 | \title{Main title of the lecture}
6 | \subtitle{Subtitle of the lecture}
7 | \shorttitle{Shortened title} % For headers; if undefined, the usual title will be used
8 | \ccode{Code 7.25} % Most of these data are not compulsory
9 | \subject{Subject of the Talk}
10 | \author{Author's name}
11 | \spemail{speaker@email.com}
12 | \email{email@email.com}
13 | \speaker{Speaker's name}
14 | \date{02}{11}{2134}
15 | \dateend{07}{11}{2134}
16 | \conference{Lecture hall 7}
17 | \place{University of Physics}
18 | \flag{Sample \texttt{lecturenotes.cls} v3}
19 | \attn{Place anything here to gather your readers' attention. This could be a warning, a disclaimer, a license, or, more likely, some helpful suggestions for your readers.}
20 | \morelink{vhbelvadi.com}
21 | %
22 | % And then begin your document
23 | \begin{document}
24 | \section{Example section}
25 | Pick between \texttt{seminar}, \texttt{talk} or \texttt{course} (this document) \lecture[1 hour]{12}{06}{2017} to get appropriately different layouts. Seminars being shorter, for example, will not carry the contents section you see above but are otherwise mostly similar to courses. Talks are two-column layouts, which means you cannot have lecture numbers (on your right) or margin notes (see below). Use appropriate options. For more consult \url{http://vhbelvadi.com/latex-lecture-notes-class}.
26 |
27 | \lipsum[1-2]
28 | %
29 | \section{Another section by itself}
30 | \lipsum[3] Here, for example, is an \texttt{equation} environment:
31 | \begin{equation}
32 | \mathbf{v} = { \mathbf{s} \over t } \label{eq:velocity}
33 | \end{equation}%
34 | Nam nulla erat, elementum nec magna sit amet, vestibulum rhoncus augue. Praesent non fermentum nulla, quis blandit tortor.\margintext{This is some margin text and you can include such text anywhere in your notes.} Maecenas ut nisi condimentum nisi iaculis porttitor eu sed metus. Proin faucibus aliquet odio, ac lobortis tortor. Mauris porta molestie tortor blandit pretium. Nulla pulvinar id mauris ut efficitur. Donec posuere tortor a odio pellentesque tincidunt. Nulla mi nunc, accumsan nec lectus ut, euismod vulputate libero.
35 | %
36 | Maecenas eu hendrerit metus. Aenean consequat, ex a semper tristique, leo ipsum blandit dui, pharetra consectetur magna enim ac lectus. Pellentesque vel purus malesuada metus scelerisque aliquam. Sed finibus ex sit amet eros faucibus congue. Nulla ut dui egestas, dignissim neque ut, fringilla massa.
37 | %
38 | \subsection{This is a subsection by itself}
39 | \lipsum[11]
40 | %
41 | And this is a nice \texttt{\$\$...\$\$} display environment:
42 | $$
43 | \Delta v = \int\displaylimits_{t_0}^{t_1} a \, \textrm{d}t
44 | $$
45 | Maecenas ut nisi condimentum nisi iaculis porttitor eu sed metus. Proin faucibus aliquet odio, ac lobortis tortor. Mauris porta molestie tortor blandit pretium. Nulla pulvinar id mauris ut efficitur. Donec posuere tortor a odio pellentesque tincidunt. Nulla mi nunc, accumsan nec lectus ut, euismod vulputate libero.
46 | %
47 | And finally we have the \texttt{align/align*} environment:
48 | \begin{align}
49 | x_f - x_i &= \bar{v}t \nonumber\\
50 | \Rightarrow s &= \bar{v}t
51 | \end{align}
52 | \lipsum[6]
53 | %
54 | \section{Yet another section}
55 | \subsection{And a subsection beneath it}
56 | \lecture[1 hour]{13}{06}{2017}
57 | \lipsum[7]
58 | %
59 | \subsection{And now a subsection}
60 | \subsubsection{With a subsubsection following it}
61 | %
62 | Integer pharetra nulla scelerisque purus luctus iaculis. Mauris pulvinar erat non dui pretium, sed vestibulum sapien condimentum. Nam in urna quis sapien rhoncus placerat vitae sit amet odio. Vivamus finibus euismod nibh vestibulum lobortis.\margintext{These ideas were probably discussed in lecture 1 in a parallel universe.} Integer arcu tortor, vestibulum sit amet iaculis ut, ullamcorper non ante. Pellentesque consectetur nec odio quis placerat. Vestibulum vehicula massa vel euismod blandit.
63 | %
64 | \lipsum[8]
65 | %
66 | \margintext{\protect\vspace{2cm}Table \ref{tab:mori} courtesy of Mori, L.F. `Tables in \LaTeX2$\epsilon$: Packages and Methods'.}
67 | \begin{table}[h]
68 | \centering
69 | \begin{tabular}{clcc}
70 | \toprule
71 | \multicolumn{2}{c}{$D$} & $P_u$ & $\sigma_N$\\
72 | \multicolumn{2}{c}{(in)} & (lbs) & (psi)\\\toprule
73 | \multirow{3}*{5} & test 1 & 285 & 38.00\\\cmidrule(l){2-4}
74 | & test 2 & 287 & 38.27\\\cmidrule(l){2-4}
75 | & test 3 & 230 & 30.67\\\midrule
76 | \multirow{3}*{10} & test 1 & 430 & 28.67\\\cmidrule(l){2-4}
77 | & test 2 & 433 & 28.87\\\cmidrule(l){2-4}
78 | & test 3 & 431 & 28.73\\\bottomrule
79 | \end{tabular}
80 | \caption{A table beautified by the \protect\texttt{booktabs} package.}\label{tab:mori}
81 | \end{table}
82 | %
83 | \lipsum[9]
84 | %
85 | \subsubsection{This subsubsection is all by itself}
86 | \lipsum[12-14]
87 | %
88 | \vskip7ex
89 | \centering
90 | * * *
91 | %
92 | \end{document}%
--------------------------------------------------------------------------------