texlive[73727] Master/texmf-dist: lectures (4feb25)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 4 23:08:43 CET 2025


Revision: 73727
          https://tug.org/svn/texlive?view=revision&revision=73727
Author:   karl
Date:     2025-02-04 23:08:43 +0100 (Tue, 04 Feb 2025)
Log Message:
-----------
lectures (4feb25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/lectures/LICENSE
    trunk/Master/texmf-dist/doc/latex/lectures/README.md
    trunk/Master/texmf-dist/tex/latex/lectures/lectures.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/lectures/example.tex

Modified: trunk/Master/texmf-dist/doc/latex/lectures/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lectures/LICENSE	2025-02-04 22:08:29 UTC (rev 73726)
+++ trunk/Master/texmf-dist/doc/latex/lectures/LICENSE	2025-02-04 22:08:43 UTC (rev 73727)
@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2019 Luca Cappelletti
+Copyright (c) 2025 Luca Cappelletti
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: trunk/Master/texmf-dist/doc/latex/lectures/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lectures/README.md	2025-02-04 22:08:29 UTC (rev 73726)
+++ trunk/Master/texmf-dist/doc/latex/lectures/README.md	2025-02-04 22:08:43 UTC (rev 73727)
@@ -1,10 +1,19 @@
-# lectures
+# Lectures
+
+[![GitHub Actions](https://github.com/LucaCappelletti94/lectures/actions/workflows/latex.yml/badge.svg)](https://github.com/LucaCappelletti94/lectures/actions)
+[![Version](https://img.shields.io/badge/CTAN_Version-1.0.6-blue.svg)](https://ctan.org/pkg/lectures)
+[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/LucaCappelletti94/lectures/blob/master/LICENSE)
+[![Available in](https://img.shields.io/badge/Available_in-TEX_Live-green.svg)](https://ctan.org/pkg/texlive)
+[![Available in](https://img.shields.io/badge/Available_in-MiKTEX-green.svg)](https://ctan.org/pkg/miktex)
+
 A LaTeX documentclass for lecture notes.
 
 ## Usage
+
 ### Including the document class
-You can include the document class `lectures` as follows:
 
+You can include the document class `lectures` as follows (the default language is *english*):
+
 ```latex
 \documentclass{lectures}
 ```
@@ -15,87 +24,172 @@
 \documentclass[italian]{lectures}
 ```
 
+or, analogously:
+
+```latex
+\documentclass[english]{lectures}
+```
+
 ### Title page
+
 One of the main features of the library is the provided title page. You can create it as follows:
+
 ```latex
 \documentclass{lectures}
 \begin{document}
-    \maketitle{
-      Your title
-    }{
-      First author name,Second author name
-    }{
-      First professor name,Second professor name
-    }{
-      Parlo Parloni,Parletti Parini
-    }{
-      Year
-    }{
-      CFU of the course
-    }{
-      Informatica
-    }{
-      University name
-    }{
-      Country
-    }
+\maketitle{
+  Your title
+}{
+  First author name,Second author name
+}{
+  First professor name,Second professor name
+}{
+  Parlo Parloni,Parletti Parini
+}{
+  Year
+}{
+  CFU of the course
+}{
+  Informatica
+}{
+  University name
+}{
+  Country
+}
 
 \end{document}
 ```
 
+[![Title page example](https://github.com/LucaCappelletti94/lectures/blob/master/title_page_example.png?raw=true)](https://github.com/LucaCappelletti94/lectures/blob/master/title_page_example.png)
+
 ## Features
 
 ### Silenced useless warnings
+
 Using the package [`silence`](https://ctan.org/pkg/silence?lang=en) the library silences the following warnings:
 
-- **latex**
-    -  You have requested package
-    -  There were undefined references
-    -  Command
-- **latexfont**
-    -  Size substitutions with differences
-    -  Font shape
-- **biblatex** 
-    -  Using fall-back BibTeX(8)
-    -  Please (re)run BibTeX on the file(s)
--  **auxhook**
-    - Cannot patch  
-- **glossaries** 
-    - No \printglossary or \printglossaries found.
+- `latex`:
+  - You have requested package
+  - There were undefined references
+  - Command
+- `latexfont`:
+  - Size substitutions with differences
+  - Font shape
+- [`biblatex`](https://ctan.org/pkg/biblatex):
+  - Using fall-back BibTeX(8)
+  - Please (re)run BibTeX on the file(s)
+- [`auxhook`](https://ctan.org/pkg/auxhook):
+  - Cannot patch
+- [`glossaries`](https://ctan.org/pkg/glossaries):
+  - No \printglossary or \printglossaries found.
 
 ### Float related gimmicks
+
 All floating objects are automatically centered and set to `H` as position with other objects.
 
 ### Table related gimmicks
-#### L
-A new column type is given `L`, that allows for automatic mathmode in column.
 
-TODO: Add usage example!
+#### L, C and R
 
+New column types are given `L`, `C`, and `R`, that allow for automatic mathmode in columns.
+
+Example usage:
+
+```latex
+\documentclass{lectures}
+\begin{document}
+\begin{tabular}{L C R}
+  a & b & c \\
+  \alpha & \beta & \gamma \\
+  x_1 & x_2 & x_3 \\
+\end{tabular}
+\end{document}
+```
+
 ### Theorems related gimmicks
-All theorems are in `definition` style, meaning that they are not in *italic*.
 
+All theorems are in `definition` style, meaning that they are not in *italic*. All environments are color-coded to facilitate reading and reviewing.
+
 Proofs are treated as theorem environments.
 
-The following theorem-like environments are provided: 
-- theorem
-- corollary
-- lemma
-- proposition
-- observation
-- definition
-- complexity
-- property
-- problem
-- proof
+The following theorem-like environments are provided:
 
+- `axiom`: Fundamental principles assumed to be true.
+- `goal`: Objectives or targets to be achieved.
+- `definition`: Precise explanations of terms or concepts.
+- `fact`: Statements that are objectively true.
+- `theorem`: Proven statements based on axioms and other theorems.
+- `lemma`: Helper theorems used to prove larger results.
+- `claim`: Assertions that need to be proven.
+- `corollary`: Results that follow directly from theorems.
+- `property`: Characteristics or attributes of objects.
+- `proposition`: Important statements that are proven true.
+- `observation`: Noteworthy remarks or insights.
+- `conclusion`: Final statements derived from proofs or discussions.
+- `generalization`: Broader statements derived from specific cases.
+- `problem`: Questions or challenges to be solved.
+- `example`: Illustrative instances or cases.
+- `solution`: Answers or methods for solving problems.
+- `analysis`: Detailed examination of elements or structure.
+- `complexity`: Discussion of the computational complexity.
+- `proof`: Logical arguments establishing the truth of statements.
+
+Example usage:
+
+```latex
+\documentclass{lectures}
+\begin{document}
+
+\begin{theorem}[Pythagorean Theorem]
+In a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
+\begin{equation}
+a^2 + b^2 = c^2
+\end{equation}
+\end{theorem}
+
+\begin{proof}
+This can be proven using the properties of similar triangles.
+\end{proof}
+
+\begin{definition}[Prime Number]
+A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
+\end{definition}
+
+\end{document}
+```
+
+[![Theorem english example](https://github.com/LucaCappelletti94/lectures/blob/master/english_example.png?raw=true)](https://github.com/LucaCappelletti94/lectures/blob/master/english_example.png)
+
+Or if you selected the Italian language:
+
+[![Theorem italian example](https://github.com/LucaCappelletti94/lectures/blob/master/italian_example.png?raw=true)](https://github.com/LucaCappelletti94/lectures/blob/master/italian_example.png)
+
 ### Lists related gimmicks
+
 - Lists are built to be more compact and leave less blank space.
 - Using the environment `todolist` it is possible to create checklists.
 
-TODO: Add todolist example.
+Example usage:
 
+```latex
+\documentclass{lectures}
+\begin{document}
+\begin{todolist}
+  \item Complete the assignment
+  \item Review the lecture notes
+  \item Prepare for the exam
+\end{todolist}
+\end{document}
+```
+
+[![TODO List example](https://github.com/LucaCappelletti94/lectures/blob/master/todolist.png?raw=true)](https://github.com/LucaCappelletti94/lectures/blob/master/todolist.png)
+
 ### Additional gimmicks
+
 - When a page is empty, Latex won't generate page number or other page elements.
 - When you want to leave a blank line you can just leave a blank line, without adding `\\`.
-- If you'd like to use roman numerals there a command for that: `\rom{your number goes here}`.
\ No newline at end of file
+- If you'd like to use roman numerals there a command for that: `\rom{your number goes here}`.
+
+## License
+
+All the code in this repository is released under the MIT license. For more information, please refer to the [`LICENSE`](https://github.com/LucaCappelletti94/lectures/blob/master/LICENSE) file.

Added: trunk/Master/texmf-dist/doc/latex/lectures/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lectures/example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/lectures/example.tex	2025-02-04 22:08:43 UTC (rev 73727)
@@ -0,0 +1,50 @@
+\documentclass[english]{lectures}
+\begin{document}
+\maketitle{
+  Test title
+}{
+  Luca Cappelletti,Pinco Pallino
+}{
+  Mirco Marconi,Millo Malloni
+}{
+  Parlo Parloni,Parletti Parini
+}{
+  1782
+}{
+  3
+}{
+  Informatica
+}{
+  Università degli studi di Milano
+}{
+  Italy
+}
+
+\begin{tabular}{L C R}
+  a & b & c \\
+  \alpha & \beta & \gamma \\
+  x_1 & x_2 & x_3 \\
+\end{tabular}
+
+\begin{theorem}[Pythagorean Theorem]
+  In a right-angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.
+  \begin{equation}
+  a^2 + b^2 = c^2
+  \end{equation}
+\end{theorem}
+
+\begin{proof}
+This can be proven using the properties of similar triangles.
+\end{proof}
+
+\begin{definition}[Prime Number]
+A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
+\end{definition}
+
+\begin{todolist}
+  \item Complete the assignment
+  \item Review the lecture notes
+  \item Prepare for the exam
+\end{todolist}
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/lectures/example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/lectures/lectures.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lectures/lectures.cls	2025-02-04 22:08:29 UTC (rev 73726)
+++ trunk/Master/texmf-dist/tex/latex/lectures/lectures.cls	2025-02-04 22:08:43 UTC (rev 73727)
@@ -1,5 +1,5 @@
 %
-% Copyright 2020 Luca Cappelletti
+% Copyright 2025 Luca Cappelletti
 %
 % Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 %
@@ -7,10 +7,10 @@
 %
 % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 %
-\def\LectureNotesVersion{v1.0.5}
-\newcommand{\defaultlanguage}{italian}
+\def\LectureNotesVersion{v1.0.6}
+\newcommand{\defaultlanguage}{english}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{lectures}[2019/01/27 LaTeX document class for lectures notes.]
+\ProvidesClass{lectures}[2025/02/04 LaTeX document class for lectures notes.]
 \LoadClass{report}
 
 \DeclareOption{italian}{\renewcommand{\defaultlanguage}{italian}}
@@ -45,7 +45,7 @@
 
 \RequirePackage{amsmath,amsthm,amsfonts,amssymb,array,bm,xfrac}
 \RequirePackage{fp,xparse,iftex}
-\RequirePackage[english, italian]{babel} % Set up supported languages. Last one is default.
+\RequirePackage[\defaultlanguage]{babel} % Set up supported languages. Last one is default.
 \RequirePackage[T1]{fontenc}  % Defines true type fonts
 \RequirePackage{multicol}
 \RequirePackage{emptypage}
@@ -559,36 +559,31 @@
     \newtcolorbox[auto counter,number within=chapter]{#1}[1][]{colback=#3,colframe=#4,coltitle=#5,fonttitle=\bfseries,parbox=false,title=#2~\thetcbcounter~|~##1}
 }
 
-\createtheorem{axiom}{Assioma}{Gold1!10}{Gold1!60}{black}
-\createtheorem{goal}{Obbiettivo}{Goldenrod1!10}{Goldenrod1!50}{black}
+\newcommand{\defineTheorems}{
+  \createtheorem{axiom}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Assioma}{Axiom}}{Gold1!10}{Gold1!60}{black}
+  \createtheorem{goal}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Obbiettivo}{Goal}}{Goldenrod1!10}{Goldenrod1!50}{black}
+  \createtheorem{definition}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Definizione}{Definition}}{Red2!10}{Red2!40}{black}
+  \createtheorem{fact}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Fatto}{Fact}}{Green3!10}{Green3!30}{black}
+  \createtheorem{theorem}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Teorema}{Theorem}}{Chartreuse2!10}{Chartreuse3!30}{black}
+  \createtheorem{lemma}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Lemma}{Lemma}}{Chartreuse3!10}{Chartreuse3!40}{black}
+  \createtheorem{claim}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Affermazione}{Claim}}{Chartreuse3!10}{Chartreuse3!40}{black}
+  \createtheorem{corollary}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Corollario}{Corollary}}{Sienna2!10}{Sienna2!60}{black}
+  \createtheorem{property}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Proprietà}{Property}}{Sienna2!10}{Sienna2!90}{white}
+  \createtheorem{proposition}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Proposizione}{Proposition}}{SpringGreen3!10}{SpringGreen3!30}{black}
+  \createtheorem{observation}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Osservazione}{Observation}}{Firebrick2!10}{Firebrick2!40}{black}
+  \createtheorem{conclusion}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Conclusione}{Conclusion}}{SteelBlue3!10}{SteelBlue3!90}{black}
+  \createtheorem{generalization}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Generalizzazione}{Generalization}}{LavenderBlush3!10}{LavenderBlush3}{black}
+  \createtheorem{problem}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Problema}{Problem}}{Red1!10}{Red1!60}{white}
+  \createtheorem{example}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Esempio}{Example}}{MediumPurple3!10}{MediumPurple3!40}{black}
+  \createtheorem{solution}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Soluzione}{Solution}}{DodgerBlue3!10}{DodgerBlue3!30}{black}
+  \createtheorem{analysis}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Analisi}{Analysis}}{DeepPink2!10}{DeepPink2!30}{black}
+  \createtheorem{complexity}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Complessità}{Complexity}}{Turquoise4!10}{Turquoise4}{black}
+  \createtheorem{proofWrapper}{\ifthenelse{\equal{\defaultlanguage}{italian}}{Dimostrazione}{Proof}}{DarkOrchid4!10}{DarkOrchid4!30}{black}
+  \renewenvironment{proof}{\begin{proofWrapper}}{\end{proofWrapper}}
+}
 
-\createtheorem{definition}{Definizione}{Red2!10}{Red2!40}{black}
+\AtBeginDocument{\defineTheorems}
 
-\createtheorem{fact}{Fatto}{Green3!10}{Green3!30}{black}
-\createtheorem{theorem}{Teorema}{Chartreuse2!10}{Chartreuse3!30}{black}
-\createtheorem{lemma}{Lemma}{Chartreuse3!10}{Chartreuse3!40}{black}
-
-\createtheorem{claim}{Affermazione}{Chartreuse3!10}{Chartreuse3!40}{black}
-
-\createtheorem{corollary}{Corollario}{Sienna2!10}{Sienna2!60}{black}
-\createtheorem{property}{Proprietà}{Sienna2!10}{Sienna2!90}{white}
-
-\createtheorem{proposition}{Proposizione}{SpringGreen3!10}{SpringGreen3!30}{black}
-\createtheorem{observation}{Osservazione}{Firebrick2!10}{Firebrick2!40}{black}
-
-\createtheorem{conclusion}{Conclusione}{SteelBlue3!10}{SteelBlue3!90}{black}
-\createtheorem{generalization}{Generalizzazione}{LavenderBlush3!10}{LavenderBlush3}{black}
-
-\createtheorem{problem}{Problema}{Red1!10}{Red1!60}{white}
-\createtheorem{example}{Esempio}{MediumPurple3!10}{MediumPurple3!40}{black}
-
-\createtheorem{solution}{Soluzione}{DodgerBlue3!10}{DodgerBlue3!30}{black}
-\createtheorem{analysis}{Analisi}{DeepPink2!10}{DeepPink2!30}{black}
-\createtheorem{complexity}{Complessità}{Turquoise4!10}{Turquoise4}{black}
-
-\createtheorem{proofWrapper}{Dimostrazione}{DarkOrchid4!10}{DarkOrchid4!30}{black}
-\renewenvironment{proof}{\begin{proofWrapper}}{\end{proofWrapper}}
-
 %
 % THE FOLLOWING CODE ADDS BOLD TO THE THEOREM NAME
 %



More information about the tex-live-commits mailing list.