diff options
author | Norbert Preining <norbert@preining.info> | 2024-04-21 03:01:15 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-04-21 03:01:15 +0000 |
commit | 3617595995cb2684b6a938dcbb288f658b3f9501 (patch) | |
tree | 7b8881d6145a5eae4e9ca95073704ce3a83cad39 /macros/latex/contrib | |
parent | b235955f171a9dc4a73c82b7b44fc2be52576393 (diff) |
CTAN sync 202404210301
Diffstat (limited to 'macros/latex/contrib')
26 files changed, 1423 insertions, 139 deletions
diff --git a/macros/latex/contrib/huaz/huaz.pdf b/macros/latex/contrib/huaz/huaz.pdf Binary files differindex ab19e2a95f..fe31b1cfad 100644 --- a/macros/latex/contrib/huaz/huaz.pdf +++ b/macros/latex/contrib/huaz/huaz.pdf diff --git a/macros/latex/contrib/huaz/huaz.sty b/macros/latex/contrib/huaz/huaz.sty index 8127c5b585..1a9435bfff 100644 --- a/macros/latex/contrib/huaz/huaz.sty +++ b/macros/latex/contrib/huaz/huaz.sty @@ -18,7 +18,7 @@ %% The Current Maintainer of this work is Tibor Tomacs. %% \NeedsTeXFormat{LaTeX2e}[2021/10/10] -\ProvidesPackage{huaz}[2024/04/12 v1.1 Automatic Hungarian definite articles] +\ProvidesPackage{huaz}[2024/04/20 v1.2 Automatic Hungarian definite articles] \RequirePackage{xstring,refcount,iftex} @@ -83,6 +83,13 @@ \def\huaz@deloptparam{\huaz@y@\relax}% \def\textcolor{\huaz@deloptparam} --> \textcolor[RGB]{0,255,0}{text} --> text; \textcolor{red}{text} --> text \AddToHook{huaz}{% Ignored commands + \def\usefont#1#2#3#4{}% + \def\fontsize#1#2{}% + \def\fontencoding#1{}% + \def\fontfamily#1{}% + \def\fontseries#1{}% + \def\fontshape#1{}% + \def\selectfont{}% \def\textrm{}\def\rmfamily{}% \def\textsf{}\def\sffamily{}% \def\texttt{}\def\ttfamily{}% @@ -103,12 +110,16 @@ \def\uppercase{}\def\lowercase{}\def\MakeUppercase{}\def\MakeLowercase{}% \def\textcolor{\huaz@deloptparam}\def\color{\huaz@deloptparam}% \def\mbox{}\def\fbox{}% + \def\makebox#1#{}% \makebox{text} and \makebox[opt]{text} --> text + \def\framebox#1#{}% \framebox{text} and \framebox[opt]{text} --> text + \def\textqq{}% + \def\enquote#1#{}% \enquote{text} and \enquote*{text} --> text \def\told{}} \AddToHook{huaz}{% Expandable cross-references commands - \def\ref#1{\getrefnumber{#1}}% + \def\ref#1#{\getrefnumber}% \ref{...} and \ref*{...} --> \getrefnumber{...} + \def\pageref#1#{\getpagerefnumber}% \pageref{...} and \pageref*{...} --> \getpagerefnumber{...} \def\eqref#1{\getrefnumber{#1}}% - \def\pageref#1{\getpagerefnumber{#1}}% \def\cite{\huaz@cite}} %================================================= diff --git a/macros/latex/contrib/huaz/huaz.tex b/macros/latex/contrib/huaz/huaz.tex index c873d10fb4..a9bb258ad6 100644 --- a/macros/latex/contrib/huaz/huaz.tex +++ b/macros/latex/contrib/huaz/huaz.tex @@ -42,13 +42,13 @@ keepspaces}}{} \newcommand{\commandinline}{\hspace*{-15mm}\lstinline[ delim={[is][\color{green!50!black}\normalfont\small\sffamily]{!}{!}}, -basicstyle=\color{red!70!black}\normalfont\ttfamily, +basicstyle=\color{red!70!black}\normalfont\normalsize\ttfamily, columns=fullflexible, keepspaces]} \newcommand{\verbinline}{\lstinline[ delim={[is][\color{green!50!black}\normalfont\small\sffamily]{!}{!}}, -basicstyle=\normalfont\ttfamily, +basicstyle=\normalfont\normalsize\ttfamily, columns=fullflexible, keepspaces]} @@ -63,7 +63,7 @@ keepspaces]} \begin{document} \title{The \huaz\ package\\ - {\large v1.1 (2024/04/12)}} + {\large v1.2 (2024/04/20)}} \author{Tibor Tómács\\ {\normalsize\href{email:tomacs.tibor@gmail.com}{\nolinkurl{tomacs.tibor@gmail.com}}}} \date{} @@ -75,7 +75,7 @@ In Hungarian there are two definite articles, \emph{``a''} and \emph{``az''}, wh The \huaz\ package helps the user to insert automatically the correct definite article for cross-references and other commands containing text. Thus, if these change, the definite articles will also change accordingly. \medskip -\emph{Sorry, the documentation is in Hungarian. This is because only Hungar\-ian-speaking users are interested.} +\emph{The documentation is in Hungarian, because only Hungarian-speaking users are interested.} \end{abstract} \end{otherlanguage} @@ -214,7 +214,7 @@ eredménye ,,az 1. szakaszban, a \textbf{2}. szakaszban''. Ha a \texttt{section} \subsubsection*{Korlátozások} \begin{enumerate} -\item A \verbinline|!<szöveg>!| elején csak a \verb|\ref|, \verb|\pageref|, \verb|\eqref|, \verb|\cite| kereszthivatkozásokkal működik helyesen. Például a \texttt{hyperref} csomag \verb|\ref*| és \verb|\pageref*| parancsai nem működnek közvetlenül \verbinline|!<szöveg>!|-ként, de ez megoldható a később ismertetett \verb|\az*| paranccsal. +\item A \verbinline|!<szöveg>!| elején csak a \verb|\ref|, \verb|\ref*|, \verb|\pageref|, \verb|\pageref*|, \verb|\eqref|, \verb|\cite| kereszthivatkozásokkal működik helyesen. \item A \verbinline|!<szöveg>!| elején a \verb|\cite| parancs jól működik a \texttt{natbib} csomaggal és \texttt{bibtex} esetében is. A \texttt{biblatex} csomag használata esetén akkor működik jól, ha a \texttt{style} vagy \texttt{citestyle} opciók értéke \texttt{numeric}, \texttt{numeric-verb}, \texttt{alphabetic}, \texttt{alphabetic-verb} vagy \texttt{authoryear}. Akkor is jól működik, ha nem adjuk meg a \texttt{style} illetve \texttt{citestyle} opciók egyikét sem. @@ -227,11 +227,7 @@ Viszont a cím a szövegben, fejlécben és a tartalomjegyzékben jól fog megje \commandinline|\az*{!<szöveg>!}| -Ugyanaz mint a \texttt{*} nélküli esetben, de ekkor csak a névelő kerül kiírásra. Például \texttt{hyperref} csomag használatával: -\begin{examplelst} -\section{Cím}\label{sec} -\az*{\ref{sec}}~\ref*{sec}.~szakaszban -\end{examplelst} +Ugyanaz mint a \verb|*| nélküli esetben, de ekkor csak a névelő kerül kiírásra. \commandinline|\azv{!<szöveg>!}| @@ -246,16 +242,14 @@ eredménye ,,az V.~szakaszban, a V.~szakaszban'', mert az első esetben a V bet \commandinline|\azv*{!<szöveg>!}| -Ugyanaz mint a \texttt{*} nélküli esetben, de ekkor csak a névelő kerül kiírásra. - -A parancsok nevében az ,,a'' betű kicserélhető ,,A'' betűre. Ekkor a határozott névelő nagybetűvel fog kezdődni, ami mondatok elején szükséges. +Ugyanaz mint a \verb|*| nélküli esetben, de ekkor csak a névelő kerül kiírásra. \commandinline|\Az{!<szöveg>!}|\\ \commandinline|\Az*{!<szöveg>!}|\\ \commandinline|\Azv{!<szöveg>!}|\\ \commandinline|\Azv*{!<szöveg>!}| -Például +Ugyanaz, mint a kis ,,\texttt{a}'' betűvel kezdődő parancsok, de ekkor a határozott névelő nagybetűvel fog kezdődni, ami mondatok elején szükséges. Például \begin{examplelst} \section{Cím}\label{sec} \Az{\ref{sec}}.~szakaszban áttekintjük a téma rövid történetét. @@ -278,11 +272,11 @@ Ekkor a vázlatfába az \begin{examplelst} \azsaved~\ref{sec}... \end{examplelst} -kód kerül, ami már helyes eredményt ad. Ez a probléma a \verb|\texorpdfstring| helyett az +kód kerül, ami már helyes eredményt ad. \commandinline|\aznotshow| -paranccsal egyszerűbben is megoldható. Ugyanis ezt helyezve az \verb|\az| (vagy bármelyik verziója) elé, az eredmény nem jelenik meg, csak az \verb|\azsaved| generálódik le a megfelelő határozott névelővel. Így +Az előző probléma a \verb|\texorpdfstring| helyett ezzel a paranccsal egyszerűbben is megoldható. Ugyanis ezt helyezve az \verb|\az| (vagy bármelyik verziója) elé, az eredmény nem jelenik meg, csak az \verb|\azsaved| generálódik le a megfelelő határozott névelővel. Így \begin{examplelst} \aznotshow\Az{\ref{sec}} \section{\azsaved~\ref{sec}...} @@ -291,6 +285,8 @@ szintén helyes eredményt ad a vázlatfában is. \subsection{Rövidítések} +A \verb|\ref|, \verb|\pageref|, \verb|\eqref|, \verb|\cite| kereszthivatkozások (csak a \verb|*| nélküli verziók) elé nem csak az előbbi parancsokkal tehetünk határozott névelőt, mert mindegyiknek van egy rövidített egyparancsos verziója is: + \commandinline|\aref{!<kulcs>!} | $\equiv$ \verbinline|\az{\ref{!<kulcs>!}}|\\ \commandinline|\aref*{!<kulcs>!} | $\equiv$ \verbinline|\az*{\ref{!<kulcs>!}}|\\ \commandinline|\avref{!<kulcs>!} | $\equiv$ \verbinline|\azv{\ref{!<kulcs>!}}|\\ @@ -311,7 +307,7 @@ szintén helyes eredményt ad a vázlatfában is. \commandinline|\avcite[!<szöveg>!]{!<kulcs1>!,!<kulcs2>!,!...!} | $\equiv$ \verbinline|\azv{\cite[!<szöveg>!]{!<kulcs1>!,!<kulcs2>!,!...!}}|\\ \commandinline|\avcite*[!<szöveg>!]{!<kulcs1>!,!<kulcs2>!,!...!}| $\equiv$ \verbinline|\azv*{\cite[!<szöveg>!]{!<kulcs1>!,!<kulcs2>!,!...!}}| -A parancsok nevében az első ,,a'' betű kicserélhető ,,A'' betűre. Ekkor a határozott névelő nagybetűvel fog kezdődni, ami mondatok elején szükséges: +A parancsok nevében az első ,,\texttt{a}'' betű kicserélhető ,,\texttt{A}'' betűre. Ekkor a határozott névelő nagybetűvel fog kezdődni, ami mondatok elején szükséges: \commandinline|\Aref \Avref \Aeqref \Aveqref \Apageref \Avpageref \Acite \Avcite| @@ -325,7 +321,7 @@ eredménye ,,Az 1. és a 2. szakaszban''. \subsection{A huaz kapocs}\label{subsec-kapocs} -Amikor a \huaz\ csomag megkeresi a megfelelő határozott névelőt, akkor a szövegben található kereszthivatkozásokat lecseréli a kifejthető verziójukra, továbbá a kifejtés során a formázó parancsokat (\verb|\emph|, \verb|\textbf|, \verb|\small|, stb.) figyelmen kívül hagyja. Emiatt lehetséges, hogy például a következő kódok működnek: +Amikor a \huaz\ csomag megkeresi a megfelelő határozott névelőt, akkor a szövegben található \verb|\ref|, \verb|\ref*|, \verb|\pageref|, \verb|\pageref*|, \verb|\eqref|, \verb|\cite| kereszthivatkozásokat lecseréli a kifejthető verziójukra, továbbá a kifejtés során egy adott listában található formázó parancsokat (\verb|\emph|, \verb|\textbf|, \verb|\small|, stb.) figyelmen kívül hagyja. Emiatt lehetséges, hogy például a következő kódok működnek: \begin{examplelst} \newcommand{\osztaly}{V.B} Idén \az{\textbf{\osztaly}}~osztály rendezi a farsangot. @@ -336,39 +332,43 @@ Idén \az{\textbf{\osztaly}}~osztály rendezi a farsangot. \az{\textbf{\ref{sec}}} \end{examplelst} +De a következő kód is jól fog működni: +\begin{examplelst} +\newcommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} +\newcommand{\osztaly}{X.A~osztály} +\az{\myfont{\osztaly}} +\end{examplelst} +Ez nem azért van, mert a \verb|\myfont| is szerepel ebben az adott listában, hanem azért, mert a \verb|\myfont| kifejtésében található \verb|\usefont| benne van. + \commandinline|\AddToHook{huaz}{!<kód>!}| -A \huaz\ csomag azon szövegformázó parancsokat hagyja figyelmen kívül, melyek egy előre definiált listában szerepelnek. Amennyiben olyan formázó parancsot használ, ami még ezen a listán nem található, akkor az a felhasználó által is bővíthető. Például +Amennyiben olyan formázó parancsot használ, ami még ezen a listán nem található, akkor az a felhasználó által is bővíthető. Például a \texttt{shadowtext} csomag \verb|\shadowtext| parancsa nincs a listában, ezért a következő kód eredménye hibás lesz: \begin{examplelst} -\newcommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} -\newcommand{\mytext}{X.A~osztály} -\az{\myfont{\mytext}} +\newcommand{\osztaly}{X.A~osztály} +\az{\shadowtext{\osztaly}} \end{examplelst} -esetén a \verb|\myfont| nincs ezen a listán, ezért ez a kód hibával fordul. A listára az +A listára az \begin{examplelst} -\AddToHook{huaz}{\def\myfont{}} +\AddToHook{huaz}{\def\shadowtext{}} \end{examplelst} -módon vehető fel. Ezzel azt érjük el, hogy a névelő megállapítása során a \verb|\myfont| parancs ne jelentsen semmit. Tehát a következő kód már megfelelően működik: +módon vehető fel. Ezzel a névelő megállapítása során a \verb|\shadowtext| parancs nem jelent semmit. Tehát a következő kód már megfelelően működik: \begin{examplelst} -\AddToHook{huaz}{\def\myfont{}} -\newcommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} -\newcommand{\mytext}{X.A~osztály} -\az{\myfont{\mytext}} +\AddToHook{huaz}{\def\shadowtext{}} +\newcommand{\osztaly}{X.A~osztály} +\az{\shadowtext{\osztaly}} \end{examplelst} Az előző eset a \texttt{huaz} kapocs nélkül így is megoldható: \begin{examplelst} -\newcommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} -\newcommand{\mytext}{X.A~osztály} -\az*{\mytext}~\myfont{\mytext} +\newcommand{\osztaly}{X.A~osztály} +\az*{\osztaly}~\shadowtext{\osztaly} \end{examplelst} -Ha a \verb|\myfont| a \verb|\mytext| definíciójában szerepel, akkor a \texttt{huaz} kapocs használata nem kerülhető meg: +Ha a \verb|\shadowtext| az \verb|\osztaly| definíciójában szerepel, akkor a \texttt{huaz} kapocs használata nem kerülhető meg: \begin{examplelst} -\AddToHook{huaz}{\def\myfont{}} -\newcommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} -\newcommand{\mytext}{\myfont{X.A~osztály}} -\az{\mytext} +\AddToHook{huaz}{\def\shadowtext{}} +\newcommand{\osztaly}{\shadowtext{X.A~osztály}} +\az{\osztaly} \end{examplelst} -Kereszthivatkozásnál, ha maga a számozás van standardtól különböző paranccsal formázva, akkor a \texttt{huaz} kapocs használata szintén nem kerülhető meg. Például +Ha a formázó parancs erős, akkor a \texttt{huaz} kapocs használata szintén nem kerülhető meg. Például \begin{examplelst} \AddToHook{huaz}{\def\myfont{}} \DeclareRobustCommand{\myfont}[1]{{\usefont{T1}{yv1d}{m}{n}#1}} @@ -376,6 +376,5 @@ Kereszthivatkozásnál, ha maga a számozás van standardtól különböző para \section{Cím}\label{sec} \aref{sec} \end{examplelst} -Itt a \verb|\myfont| azért lett erős parancsként definiálva, mert mozgó argumentumba kerül. Az előző példa esete ritkán fordul elő, mert a számláló típusának megadásánál (arab, római, stb.) nem szokás szövegformázó parancsot is alkalmazni. \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/litesolution/README.md b/macros/latex/contrib/litesolution/README.md index a7a7996604..36b84425dc 100644 --- a/macros/latex/contrib/litesolution/README.md +++ b/macros/latex/contrib/litesolution/README.md @@ -3,7 +3,7 @@ This template provides a fresh design for typesetting solutions of midterm or final exam, textbooks and other exercises. **Welcome to pull requests -[here](https://github.com/xiamyphys/LiteSolution).** +[here](https://github.com/xiamyphys/litesolution).** ## License diff --git a/macros/latex/contrib/litesolution/doc/Beautiful-realities.jpeg b/macros/latex/contrib/litesolution/doc/figure/Beautiful-realities.jpeg Binary files differindex 2b6036083d..2b6036083d 100644 --- a/macros/latex/contrib/litesolution/doc/Beautiful-realities.jpeg +++ b/macros/latex/contrib/litesolution/doc/figure/Beautiful-realities.jpeg diff --git a/macros/latex/contrib/litesolution/doc/schrodinger.pdf b/macros/latex/contrib/litesolution/doc/figure/schrodinger.pdf Binary files differindex c9278e8113..c9278e8113 100644 --- a/macros/latex/contrib/litesolution/doc/schrodinger.pdf +++ b/macros/latex/contrib/litesolution/doc/figure/schrodinger.pdf diff --git a/macros/latex/contrib/litesolution/doc/figure/universe.pdf b/macros/latex/contrib/litesolution/doc/figure/universe.pdf Binary files differnew file mode 100644 index 0000000000..7795e2b843 --- /dev/null +++ b/macros/latex/contrib/litesolution/doc/figure/universe.pdf diff --git a/macros/latex/contrib/litesolution/doc/figure/universe.tex b/macros/latex/contrib/litesolution/doc/figure/universe.tex new file mode 100644 index 0000000000..3f432e5421 --- /dev/null +++ b/macros/latex/contrib/litesolution/doc/figure/universe.tex @@ -0,0 +1,44 @@ +\documentclass[svgnames,tikz]{standalone} + +\usepackage{xcolor}\let\Bbbk\relax +\usepackage{newtxtext,mtpro2,cancel,physics2,xfrac} +\usephysicsmodule{ab.legacy} +\usetikzlibrary{tikzmark} +\tikzset{every node/.style={align=center,MidnightBlue!30}, + every path/.style={MidnightBlue!30,line cap=round}} + +\begin{document}\tikz{ + \node [above right] at (0,0) {$\color{MidnightBlue!30} + \tikzmarknode a\Psi=\displaystyle\tikzmarknode b\int + \tikzmarknode c{\mathrm e}^{ + \sfrac{\tikzmarknode d{\mathrm i}}{\tikzmarknode e\hbar} + \int\ab(\frac{\tikzmarknode fR}{16\pi \tikzmarknode gG}-\frac14\tikzmarknode hF^2 + +\overline\psi\mathrm i\tikzmarknode{i}{\cancel D}\psi-\tikzmarknode j\lambda + \tikzmarknode k{\varphi\overline\psi}\psi + +\abs{D\tikzmarknode l\varphi}^2-V(\varphi))}$}; + \draw ([yshift=-1ex] a.south) coordinate (A) --++ (0,-.5) + node [scale=.45,below] {Schr\"odinger\\\footnotesize wave function}; + \draw ([yshift=1ex] b.north) coordinate (B) --++ (0,.55) + node [scale=.45,above] {\footnotesize path integral\\Feynmann}; + \draw ([yshift=-1ex] c.south) coordinate (C) --++ (0,-.7) + node [scale=.45,below] {Euler\\\footnotesize exponential}; + \draw ([yshift=1ex] d.north) coordinate (D) --++ (0,.45) + node [scale=.45,above,xshift=1ex] {\footnotesize imaginary unit}; + \draw ([yshift=-1ex] e.south) coordinate (E) --++ (0,-.5) + node [scale=.45,below,xshift=2ex] {Planck\\\footnotesize quantum}; + \draw ([yshift=1ex] f.north) coordinate (F) --++ (0,.7) + node [scale=.45,above] {\footnotesize spacetime-relativity\\Einstein}; + \draw ([yshift=-1ex] g.south) coordinate (G) --++ (0,-.5) + node [scale=.45,below] {Newton\\\footnotesize gravitation}; + \draw ([yshift=1ex] h.north) coordinate (H) --++ (0,.5) + node [scale=.45,above,xshift=5ex] {\footnotesize strong/weak/e.m. interactions\\Maxwell Yang-Mills}; + \draw ([yshift=-1ex] i.south) coordinate (I) --++ (0,-.6) + node [scale=.45,below] {Dirac\\\footnotesize relativistic wave function}; + \draw ([yshift=-1ex] j.south) coordinate (J) --++ (0,-.2) + node [scale=.45,below,xshift=3ex] {Kobayashi-Maskawa\\\footnotesize CKM matrix}; + \draw ([yshift=1ex] k.north) coordinate (K) --++ (0,.5) + node [scale=.45,above] {\footnotesize $\varphi$ - $\psi$ interaction\\Yukawa}; + \draw ([yshift=-1ex] l.south) coordinate (L) --++ (0,-.3) + node [scale=.45,below] {Higgs\\\footnotesize Boson}; + \foreach \x in {A,B,...,L}\fill [MidnightBlue!30] (\x) circle (.025);} +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/litesolution/doc/litesolution.pdf b/macros/latex/contrib/litesolution/doc/litesolution.pdf Binary files differindex a5550aae17..725a19a8d6 100644 --- a/macros/latex/contrib/litesolution/doc/litesolution.pdf +++ b/macros/latex/contrib/litesolution/doc/litesolution.pdf diff --git a/macros/latex/contrib/litesolution/doc/litesolution.tex b/macros/latex/contrib/litesolution/doc/litesolution.tex index 821a84006b..3a1212f47e 100644 --- a/macros/latex/contrib/litesolution/doc/litesolution.tex +++ b/macros/latex/contrib/litesolution/doc/litesolution.tex @@ -1,32 +1,29 @@ \documentclass[ans,mtpro2]{litesolution} \usepackage[listings]{tcolorbox} +\usepackage{fancyvrb} -\cover{schrodinger} +\lstset{language=[LaTeX]TeX,basicstyle=\small\ttfamily,breaklines=true,columns=flexible} \title{\sffamily The \pkg{LiteSolution} Class} \subtitle{\sffamily\scshape Hangzhou Dianzi University} -\bioinfo{\scshape\sffamily Mingyu Hsia, \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} | \today, Version 2.1a} -\coverdecoration{$\Psi=\displaystyle\int\e^{\frac i\hbar\int\ab(\frac{R}{16\pi G}-\frac14F^2+\overline\psi i\cancel D\psi-\lambda\varphi\overline\psi\psi+\abs{D\varphi}^2-V(\varphi))}$} +\bioinfo{\scshape\sffamily Mingyu Hsia, \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} | \today, Version 2.1c} +\cover[checkerboard]{schrodinger}\coverhead[5]{universe} \begin{document} - -\maketitle +\maketitle[MidnightBlue] \chapterimage{\UPFadingImage[trim={0 {.9\paperheight} 0 0},clip]{Beautiful-realities}} - -\chapter{An Introduction to the \pkg{LiteSolution} Class} +\chapter{An Introduction to The \pkg{LiteSolution} Class} \section{Introduction} -This is the document for \pkg{litesolution} template, which provides a lite design of the solution of test paper. - -\subsection{The purpose of this template} +This is the document for the \pkg{litesolution} class, which provides a lite design for typesetting solutions of exams, textbooks or other exercises. -This template provides a fresh design for typesetting solutions of exams, textbooks or other exercises. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litesolution}{GitHub}. +Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litesolution}{GitHub}. -\subsection{Installing \pkg{Litesolution} and loading it} +\subsection{Installing \pkg{litesolution} and loading it} -Simply download \verb|litesolution.cls| file from \href{https://github.com/xiamyphys/LiteSolution}{GitHub} or \href{https://ctan.org/pkg/litesolution}{CTAN} and save it under your working directory. However, I strongly suggest to use terminal to install and update all packages to the latest version +Simply download \verb|litesolution.cls| file from \href{https://github.com/xiamyphys/litesolution}{GitHub} or \href{https://ctan.org/pkg/litesolution}{CTAN} and save it under your working directory. However, I strongly suggest to use terminal to install and update all packages to the latest version \begin{verbatim} sudo tlmgr update --self --all @@ -35,9 +32,10 @@ Simply download \verb|litesolution.cls| file from \href{https://github.com/xiamy To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?} \subsection{Compatibility} -The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows, Linux and Unix platforms compatibility unknown. -\section{Global Options of \pkg{Litesolution}} +The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf / Ubuntu 22.04.2 + \hologo{TeX} Live 2024 and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows and Unix platforms compatibility unknown. + +\section{Global Options of this Class} \begin{verbatim} \documentclass[<options>]{litesolution} @@ -45,32 +43,36 @@ The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf and they all w \subsection{The \mode{answer} option} -This option has two modes, \mode{ans} and \mode{noans}, which can show or hide answers. After the \mode{noans} mode is enabled, the environment \cmd{solution} will be deactivated and contents in command \cmd{ans} will be hidden. +The \mode{ans} and \mode{noans} modes can show or hide contents in \cmd{solution} environment and \cmd{ans} command. \subsection{The \mode{counter} option} -This option has two modes, \mode{separate} and \mode{continuous}, which can make the page number between chapters be reset or continuous. +The \mode{separate} and \mode{continuous} modes can make the page number between chapters be reset or continuous. + +\subsection{The \mode{math} option} + +The \mode{mtpro2} and \mode{newtx} modes can format the font of formulas in the document. Please check if mtpro2 font has been installed on your computer correctly before using \mode{mtpro2} mode. \section{Cover Configurations} \subsection{The cover page configurations} \begin{verbatim} - \cover{<image name>} \title{<title>} \subtitle{<vertical subtitle>} - \bioinfo{<bioinfo on bottom>} \coverdecoration{<above contents>} -\end{verbatim} + \title{<content>} \subtitle{<content>} + \bioinfo{<content>} \cover[<pattern>]{<image>} + \coverhead[<angle>]{<image>} \coverhead*[<angle>]{<content>} -The same as the \pkg{book} class, the macro title could not be omitted, or it will return an error. The following is the cover configurations of this document + \begin{document} \maketitle[<color>] +\end{verbatim} \begin{verbatim} \title{\sffamily The \pkg{litesolution} Class} \subtitle{\sffamily\scshape Hangzhou Dianzi University} \bioinfo{\scshape\sffamily Mingyu Hsia, \href{mailto:xiamyphys@gmail.com} - {\ttfamily xiamyphys@gmail.com} | \today, Version 2.1a} - \coverdecoration{$\Psi=\displaystyle\int\e^{\frac i\hbar - \int\ab(\frac{R}{16\pi G}-\frac14F^2+\overline\psi i\cancel D\psi - -\lambda\varphi\overline\psi\psi+\abs{D\varphi}^2-V(\varphi))}$} - \cover{schrodinger} + {\ttfamily xiamyphys@gmail.com} | \today, Version 2.1a} + \cover[checkerboard]{schrodinger} \coverhead[5]{universe} + + \begin{document} \maketitle[Midnightblue] \end{verbatim} \subsection{The chapter head configurations} @@ -101,7 +103,10 @@ This command can create a fixable answer box when the mode \mode{noans} is enabl \subsection{Other preset commands} -This template provides the same math commands as \S 1.5 of the template \pkg{LiteBook} described additionly. +\begin{verbatim} + \def\i{\mathrm i} \def\e{\mathrm e} \def\T{\mathsf T} + \let\leq\leqslant \let\geq\geqslant +\end{verbatim} \section{Preset \pkg{amsthm} Environments} @@ -134,17 +139,44 @@ This template provides the same math commands as \S 1.5 of the template \pkg{Lit \end{tcblisting} \end{minipage} -\appendix -\def\thesection{Appendix \Alph{section}} +\subsection{Equation test} + +\[\i\hbar\partial_t\psi(\mathbf x,t)=-(\i\hbar c\bm\alpha\cdot\bm\nabla+\beta mc^2)\psi(\mathbf x,t)\] + +\section{Preset packages} + +This template has preset many packages. The following packages are the common ones -\section{An Introduction to The \pkg{notebeamer} Class} +\begin{table}[htbp] + \centering + \begin{tabular}{l l l l l l l l} + \toprule + \pkg{amsthm} & \pkg{bm} & \pkg{booktabs} & \pkg{cancel} & \pkg{caption} & \pkg{circuitikz} & \pkg{datetime} & \pkg{derivative}\\ + \midrule + \pkg{diagbox} & \pkg{esvect} & \pkg{extarrows} & \pkg{fancyhdr} & \pkg{fixdif} & \pkg{fontawesome5} & \pkg{geometry} & \pkg{indentfirst}\\ + \midrule + \pkg{lipsum} & \pkg{multicol} & \pkg{multirow} & \pkg{nicematrix} & \pkg{paracol} & \pkg{pgfplots} & \pkg{physics2} & \pkg{refstyle} \\ + \midrule + \pkg{setspace} & \pkg{siunitx} & \pkg{tabularx} & \pkg{tasks} & \pkg{wallpaper} & \pkg{xcolor} & \pkg{xeCJK} & \pkg{xfrac}\\ + \bottomrule + \end{tabular} +\end{table} -This class provides an easy way to input Beamers on note papers and make notebook quickly. It's optimized for Goodnotes' default paper size and there won't have difference between papers. +\section{Related packages} -In the future, this class will be redesigned to a package that optimized for the \pkg{litesolution} class. +\subsection{The \pkg{notebeamer} package} -\section{An Introduction to The \pkg{fadingimage} Package} +This package provides an easy way to input slides on note papers quickly for making annotations. + +\subsection{The \pkg{fadingimage} package} This package provides three commands for adding fading full width picture at the top or bottom of a page. +\clearpage\appendix\def\thesection{Appendix} + +\section{Original code for the cover head} + +\setstretch{1.15} +\lstinputlisting{figure/universe.tex} + \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/litesolution/tex/litesolution.cls b/macros/latex/contrib/litesolution/tex/litesolution.cls index ecba593464..5cd81c3155 100644 --- a/macros/latex/contrib/litesolution/tex/litesolution.cls +++ b/macros/latex/contrib/litesolution/tex/litesolution.cls @@ -15,12 +15,12 @@ %% * %% This work consists of the files litesolution.cls, * %% and README.md. * -%% available at https://github.com/xiamyphys/LitSolution * +%% available at https://github.com/xiamyphys/litsolution * %% *********************************************************** % !Mode:: "TeX:UTF-8" \NeedsTeXFormat{LaTeX2e} \PassOptionsToPackage{svgnames}{xcolor} -\ProvidesClass{litesolution}[2024/04/17 v2.1a LiteSolution document class] +\ProvidesClass{litesolution}[2024/04/20 v2.1c LiteSolution document class] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys} @@ -42,11 +42,12 @@ \ProcessKeyvalOptions*\relax \LoadClass[letterpaper,11pt,openany]{book} -\RequirePackage{geometry,setspace,datetime,caption,booktabs,multicol,diagbox,paracol,float,enumitem} +\RequirePackage{setspace,datetime,caption,booktabs,multicol,diagbox,paracol,enumitem} +\RequirePackage[notelinecolor=MidnightBlue,notemargin=.75in]{notebeamer} \RequirePackage[nokeyprefix]{refstyle} \newref{fig}{name={\sffamily\bfseries Figure~}} \newref{tab}{name={\sffamily\bfseries Table~}} -\geometry{margin = 1in} +\geometry{margin=1in} \linespread{1.3} \ddmmyyyydate \captionsetup{labelsep=period,labelfont={bf,sf},font=small} @@ -58,7 +59,7 @@ \setlist[enumerate]{itemsep=.5ex} \setlist[itemize]{itemsep=.5ex} -\RequirePackage{graphics,graphicx,wallpaper} +\RequirePackage{graphics,graphicx,wallpaper,pagecolor} \graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} \RequirePackage{ifxetex} @@ -79,13 +80,11 @@ \RequirePackage[libertine,mono=false]{newtx} }{\relax} \let\openbox\relax\def\hmmax{0}\def\bmmax{0} -\RequirePackage{amsthm,mdframed,physics2,bm,fixdif,derivative,cancel,extarrows,siunitx,xfrac,nicematrix} +\RequirePackage{amsthm,physics2,bm,fixdif,derivative,cancel,extarrows,siunitx,xfrac,nicematrix} \usephysicsmodule{ab,braket,diagmat,doubleprod,xmat,ab.legacy,op.legacy} \RequirePackage[e]{esvect} \AtBeginDocument{% - \def\i{\mathrm i} - \def\e{\mathrm e} - \def\T{\mathsf T} + \def\i{\mathrm i}\def\e{\mathrm e}\def\T{\mathsf T} \let\leq\leqslant\let\geq\geqslant \setlength{\abovedisplayskip}{9pt} \setlength{\belowdisplayskip}{9pt} @@ -99,13 +98,13 @@ \AddToHook{cmd/faIcon/after}{\endgroup} \RequirePackage{circuitikz,pgfplots,fadingimage} -\usetikzlibrary{arrows,tikzmark,patterns,calc,fadings,angles,quotes,intersections,} +\usetikzlibrary{arrows,tikzmark,patterns,calc,fadings,angles,quotes,intersections} \tikzset{>=stealth', every picture/.append style={% line join=round,line cap=round,thick }} \pgfplotsset{compat=1.8} -\ctikzset{capacitors/width=0.12,capacitors/height=0.3} +\ctikzset{capacitors/width=.12,capacitors/height=.3} \NewDocumentCommand\length{ O{} m m m m m }{% \node [#1] at ($.5*($#3+#2$)$) {#4}#6 \draw [->|,thick] ($.5*($#3+#2+#5$)$) -- #3#6 @@ -125,30 +124,39 @@ every picture/.append style={% \def\subtitle#1{\gdef\@subtitle{#1}} \def\bioinfo#1{\gdef\@bioinfo{#1}} -\def\coverdecoration#1{\gdef\@coverdecoration{#1}} -\def\cover#1{\gdef\@cover{#1}} -\renewcommand*\maketitle{ - \newgeometry{margin = 0in} +\NewDocumentCommand\coverhead{ s O{0} m }{ + \IfBooleanTF{#1}{ + \gdef\s@coverheadrotate{#2} + \gdef\s@coverhead{#3}}{ + \gdef\@coverheadrotate{#2} + \gdef\@coverhead{#3} + }} +\NewDocumentCommand\cover{ o m }{ + \IfValueT{#1}{\gdef\@coverpattern{#1}} + \gdef\@cover{#2}} +\RenewDocumentCommand\maketitle{O{MidnightBlue}}{ + \newgeometry{margin=0in}\newpagecolor{#1!10} \tikz[remember picture,overlay]{ - \fill [MidnightBlue!10] (current page.north west) rectangle (current page.south east); + \ifcsname @coverhead\endcsname + \node[rotate=\@coverheadrotate] at ($(current page.center)+(0,.35*\paperheight)$) {\includegraphics[width=\paperwidth]{\@coverhead}}; + \fi + \ifcsname s@coverhead\endcsname + \node[scale=2,color=#1!30,rotate=\s@coverheadrotate] at ($(current page.center)+(0,.35*\paperheight)$) {\s@coverhead}; + \fi \fill [white,opacity=.5] ($(current page.south west)+(.2*\paperwidth,.6*\paperheight)$) rectangle (current page.south east); \fill [white,opacity=.5] ($(current page.south west)+(.3*\paperwidth,.7*\paperheight)$) rectangle (current page.south east); \ifcsname @cover\endcsname \node [opacity=.5] at ($(current page.south west)+(.65*\paperwidth,.3*\paperheight)$) {\includegraphics[height=.3\paperheight]{\@cover}}; - \foreach \a in {0,1,...,50} - \fill [pattern=checkerboard,pattern color=MidnightBlue!10!white!50!white!50] ($(current page.south west)+(.3*\paperwidth,0)$) rectangle ++ (.7*\paperwidth,.6\paperheight); - \fi + \ifcsname @coverpattern\endcsname + \fill [pattern=\@coverpattern,pattern color=#1!10!white!50!white!50] ($(current page.south west)+(.3*\paperwidth,0)$) rectangle ++ (.7*\paperwidth,.6\paperheight); + \fi\fi \node [darkgray] at ($(current page.south west)+(.65*\paperwidth,.65*\paperheight)$) {\Huge\bfseries\@title}; \ifcsname @subtitle\endcsname - \node [rotate=90,gray!60] at ($(current page.south west)+(.25*\paperwidth,.3*\paperheight)$) {\huge\bfseries\@subtitle}; - \fi - \ifcsname @coverdecoration\endcsname - \node[opacity=0.5,scale=2,color=MidnightBlue!40,rotate=15] at ($(current page.center)+(0,.35*\paperheight)$) {\@coverdecoration}; + \node [rotate=90,gray,opacity=.6] at ($(current page.south west)+(.25*\paperwidth,.3*\paperheight)$) {\huge\bfseries\@subtitle}; \fi \ifcsname @bioinfo\endcsname - \node [gray!40] at ($(current page.south)+(.15*\paperwidth,.075*\paperheight)$) {\large\@bioinfo}; - \fi - }\restoregeometry + \node [gray,opacity=.4] at ($(current page.south)+(.15*\paperwidth,.075*\paperheight)$) {\large\@bioinfo}; + \fi}\restoregeometry\restorepagecolor } \def\chapterimage#1{\gdef\@chapterimage{#1}} @@ -200,16 +208,10 @@ every picture/.append style={% \AtBeginDocument{% \excludecomment{solution}\excludecomment{note} \let\endsolution\relax\let\endnote\relax} - \def\true{% - \addtocounter{task}{1}% - \thetask - } + \def\true{\addtocounter{task}{1}\thetask} }{\relax} \def\solute{\@ifstar\s@solute\@solute} -\newtheoremstyle{tags}{3pt}{3pt}{}{}{}{}{.5em} - {\bfseries \thmname{#1} \thmnumber{#2}. \hfill \thmnote{\normalfont\faIcon{rss}~#3}\\\leavevmode} -\theoremstyle{tags} \theoremstyle{definition} \newtheorem{problem}{\scshape\sffamily\color{DarkGreen}\faIcon{pen-square}~\scshape Problem}[chapter] \def\theproblem{\arabic{problem}} diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex d83649de1a..b2c61b2f61 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex new file mode 100644 index 0000000000..34da7d98f8 --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -0,0 +1,314 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} +% arara: pythontex: {rerun: always} +% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} +% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[a4paper,french,11pt]{article} +\def\PLversion{3.03d} +\def\PLdate{20 avril 2024} +\usepackage{amsfonts} +\usepackage{ProfLycee} +\useproflyclib{piton,minted,pythontex,ecritures,espace} +\usepackage[math-style=french]{fourier-otf} +\usepackage{mathrsfs}%pour mathscr +\usepackage{awesomebox} +\usepackage[lua]{tkz-euclide} +\usepackage{tkz-tab} +\tikzstyle{every picture}+=[remember picture] +\usetikzlibrary{hobby} +\usepackage[group-minimum-digits=4]{siunitx} +\sisetup{locale=FR} +\usepackage{enumitem} +\usepackage{fancyvrb} +\usepackage{fancyhdr} +\usepackage{tabularray} +\usepackage{multicol} +\DeclareMathSymbol{;}\mathbin{operators}{'73} %espacement avec ; +%fancy +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\lfoot{\sffamily \small [ProfLycee]} +\cfoot{\sffamily \small - \thepage{} -} +\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} + +\usepackage{graphics} +\usepackage{hologo} +\providecommand\tikzlogo{Ti\textit{k}Z} +\providecommand\TeXLive{\TeX{}Live\xspace} +\providecommand\PSTricks{\textsf{PSTricks}\xspace} +\let\pstricks\PSTricks +\let\TikZ\tikzlogo +\newcommand\TableauDocumentation{% + \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\huge\sffamily}} + {\LaTeX} & {\hologo{pdfLaTeX}} & {\hologo{LuaLaTeX}} & {\TikZ} & {\TeXLive} & {\hologo{MiKTeX}} \\ + \end{tblr} +} +\usepackage{simplekv} +\usepackage{menukeys} +\let\tab\relax +\usepackage{tabto} +\usepackage{pgf,pgfplots} +\pgfplotsset{compat=newest,xlabel near ticks,ylabel near ticks} +\usepackage{listofitems} +\usepackage{xintexpr} +\usepackage{codehigh} +\usepackage{scontents} +\usepackage{hyperref} +\urlstyle{same} +\hypersetup{pdfborder=0 0 0} +\usepackage{geometry} +\geometry{margin=1.5cm} +\usepackage{babel} +\usepackage{newverbs} + +\input{ProfLycee-doc-macropreamb.tex} + +\input{ProfLycee-doc-pagegarde.tex} + +\newpage + +\phantomsection +\hypertarget{matoc}{} + +\tableofcontents + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Introduction} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-introduction.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Liste des commandes} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-listecommandes.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Écritures mathématiques} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-ecritures.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour l'analyse} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-outilsanalyse.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils graphiques} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-outilsgraphiques.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Présentation de codes} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-prescodes.tex} + +\pagebreak + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour la géométrie} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-outilsgeom.tex} + +\pagebreak + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour la géométrie analytique} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-outilsgeomanalyt.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour les statistiques} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-stats.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour les probabilités} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-probas.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Outils pour l'arithmétique} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-arithm.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Écritures, simplifications} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-simplif.tex} + +\pagebreak + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Jeux et récréations} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-jeuxrecreat.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Compétences en lycée} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-competences.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Examens} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-exams.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Projets, en test} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-projets.tex} + +\newpage + +\phantom{t}\par\vfill\par +\begin{PART} + \begin{center} + \Huge\MakeUppercase{Historique} + \end{center} +\end{PART} +\par\vfill\par\phantom{t} + +\newpage + +\input{ProfLycee-doc-historique.tex} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex new file mode 100644 index 0000000000..03648eea0c --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex @@ -0,0 +1,427 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} +% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[french,a4paper,10pt]{article} +\def\PLver{3.03c} +\usepackage[margin=1.5cm]{geometry} +\usepackage{ProfLycee} +\useproflyclib{piton} +\usepackage[executable=python,ignoreerrors]{pyluatex} +\usepackage{babel} +\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4} +\usepackage{codehigh} + +\begin{document} + +\part*{ProfLycee (\PLver), Piton et Pyluatex} + +\section{Code \og Piton \fg{}, indépendant de Pyluatex} + +\subsection{Préambule basique} + +{\small \begin{codehigh} +\documentclass[french,a4paper,10pt]{article} +\usepackage{ProfLycee} +\useproflyclib{piton} % lua +\end{codehigh}} + +\subsection{Exemples} + +{\small \begin{codehigh} +%Sortie par défaut +\begin{CodePiton}{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} +\end{codehigh}} + +\begin{CodePiton}{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} + +{\small \begin{codehigh} +%Sortie avec style Classique, Largeur=10cm +\begin{CodePiton}[Largeur=10cm]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} +\end{codehigh}} + +\begin{CodePiton}[Largeur=10cm]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} + +\pagebreak + +{\small \begin{codehigh} +%Sortie avec Style=Moderne, Sans Titre, Largeur=10cm, centré +\begin{CodePiton}[Style=Moderne,Largeur=10cm,BarreTitre=false,Alignement=center]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} +\end{codehigh}} + +\begin{CodePiton}[Style=Moderne,Largeur=10cm,BarreTitre=false,Alignement=center]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} + +{\small \begin{codehigh} +%Sortie avec Style=Classique, Largeur=0.5\linewidth, aligné à droite, sans Cadre, avec Filigrane +\begin{CodePiton}% + [Largeur=0.5\linewidth,Cadre=false,Alignement=flush right,Filigrane,Titre={Script}]{} +#environnement piton avec numéros de ligne, pleine largeur, style moderne +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} +\end{codehigh}} + +\begin{CodePiton}[Largeur=0.5\linewidth,Cadre=false,Alignement=flush right,Filigrane,Titre={Script}]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} + +{\small \begin{codehigh} +%Sortie Moderne, Largeur=11cm, avec Filigrane, aligné à gauche, sans ligne +\begin{CodePiton}[Style=Moderne,Largeur=11cm,Filigrane,Alignement=flush left,Lignes=false]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} +\end{codehigh}} + +\begin{CodePiton}[Style=Moderne,Largeur=11cm,Filigrane,Alignement=flush left,Lignes=false]{} +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{CodePiton} + +\pagebreak + +\section{Console \og Piton \fg{}, dépendant de Pyluatex} + +\subsection{Préambule, avec le package pyluatex} + +{\small \begin{codehigh} +\documentclass[french,a4paper,10pt]{article} +\usepackage{ProfLycee} +\useproflyclib{piton} +\usepackage[executable=python]{pyluatex} % lua + shell-escape +\end{codehigh}} + +\subsection{Commande} + +{\small \begin{codehigh} +\begin{ConsolePiton}[Options piton]<Clés>{Options tcbox} +... +... +\end{ConsolePiton} +\end{codehigh}} + +\medskip + +Les clés, à placer entre \texttt{<...>}, sont : + +\begin{itemize} + \item \textbf{\textsf{$\langle$Logo$\rangle$}} pour afficher un petit logo dans les \textit{titres} de la console REPL ; \hfill{}défaut : \textbf{\textsf{$\langle$true$\rangle$}} + \item \textbf{\textsf{$\langle$Largeur$\rangle$}} pour spécifier la largeur de la console REPL ; \hfill{}défaut : \textbf{\textsf{$\langle$\textbackslash{}linewidth$\rangle$}} + \item \textbf{\textsf{$\langle$Alignement$\rangle$}} pour spécifier l'alignement de la console REPL.\hfill{}défaut : \textbf{\textsf{$\langle$flush left$\rangle$}} +\end{itemize} + +\subsection{Exemples} + +{\small \begin{codehigh} +%Déclaration d'une fonction python + librairie random pour utilisation ultérieure +\begin{python} +from random import randint + +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{python} +\end{codehigh}} + +\begin{python} +from random import randint + +def valeur_absolue(x) : + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0 : + return x + else: + return -x +\end{python} + +{\small \begin{codehigh} +\begin{ConsolePiton}{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +\end{ConsolePiton} +\end{codehigh}} + +\begin{ConsolePiton}{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +\end{ConsolePiton} + +\pagebreak + +{\small \begin{codehigh} +\begin{ConsolePiton}<Largeur=11cm,Alignement=center,Logo=false>{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +liste = [randint(1,20) for i in range(10)] +print(liste) +print(max(liste), min(liste), sum(liste)) +\end{ConsolePiton} +\end{codehigh}} + +\begin{ConsolePiton}<Largeur=11cm,Alignement=center,Logo=false>{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +liste = [randint(1,20) for i in range(10)] +print(liste) +print(max(liste), min(liste), sum(liste)) +\end{ConsolePiton} + +{\small \begin{codehigh} +\begin{ConsolePiton}<Largeur=10cm,Alignement=center>{} +[i**2 for i in range(50)] +\end{ConsolePiton} +\end{codehigh}} + +\begin{ConsolePiton}<Largeur=10cm,Alignement=center>{} +[i**2 for i in range(50)] +\end{ConsolePiton} + +\pagebreak + +\section{Présentation, et exécution, comme avec Thonny} + +\subsection{Préambule, avec le package pyluatex} + +{\small \begin{codehigh} +\documentclass[french,a4paper,10pt]{article} +\usepackage{ProfLycee} +\useproflyclib{piton} +\usepackage[executable=python]{pyluatex} % lua + shell-escape +\end{codehigh}} + +\subsection{Commandes} + +{\small \begin{codehigh} +\begin{PitonThonnyEditor}<clé>[options tcbox]{largeur} +... +\end{PitonThonnyEditor} +\end{codehigh}} + +\medskip + +La clé, à placer entre \texttt{<...>}, est : + +\begin{itemize} + \item la clé \textbf{\textsf{$\langle$Gobble$\rangle$}} pour spécifier des options liées au \textsf{gobble}, parmi \textbf{\textsf{$\langle$nb/auto$\rangle$}} ; + + \hfill{}à adapter en fonction des situations (!) + \item la clé \textbf{\textsf{$\langle$NomFichier$\rangle$}} pour afficher le nom du fichier dans le cartouche \textit{éditeur}. + + \hfill{}défaut : \textbf{\textsf{$\langle$script.py$\rangle$}} +\end{itemize} + +{\small \begin{codehigh} +\begin{PitonThonnyConsole}<clés>[options tcbox]{largeur} +... +\end{PitonThonnyConsole} +\end{codehigh}} + +\medskip + +Les clés, à placer entre \texttt{<...>}, sont : + +\begin{itemize} + \item la clé \textbf{\textsf{$\langle$NomConsole$\rangle$}} pour afficher le nom de la \textit{console} ; \hfill{}défaut \textbf{\textsf{$\langle$console$\rangle$}} + \item la clé \textbf{\textsf{$\langle$IntroConsole$\rangle$}} pour afficher le message d'accueil de la console. +\end{itemize} + +\subsection{Exemples} + +{\small\begin{codehigh} +\begin{python} +from math import gcd + +def est_duffy(n) : + nb_div, somme_div = 0, 0 + for i in range(1, n+1) : + if n % i == 0 : + nb_div += 1 + somme_div += i + if gcd(somme_div, n) == 1 : + return True + else : + return False + +\end{python} +\end{codehigh}} + +{\small\begin{codehigh} +\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm} +#PROJET CAPYTALE +from math import gcd + +def est_duffy(n) : + nb_div = 0 + somme_div = 0 + for i in range(1, n+1) : + if n % i == 0 : + nb_div += 1 + somme_div += i + if gcd(somme_div, n) == 1 : + return True + else : + return False +\end{PitonThonnyEditor} +\end{codehigh}} + +\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm} +#PROJET CAPYTALE +from math import gcd + +def est_duffy(n) : + nb_div = 0 + somme_div = 0 + for i in range(1, n+1) : + if n % i == 0 : + nb_div += 1 + somme_div += i + if gcd(somme_div, n) == 1 : + return True + else : + return False +\end{PitonThonnyEditor} + +{\small\begin{codehigh} +\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm} +#Run tpcapytale.py +est_duffy(6) +est_duffy(13) +est_duffy(265) + +from random import randint +nb = randint(1,100000) +nb, est_duffy(nb) +\end{PitonThonnyConsole} +\end{codehigh}} + +\begin{python} +from math import gcd + +def est_duffy(n) : + nb_div, somme_div = 0, 0 + for i in range(1, n+1) : + if n % i == 0 : + nb_div += 1 + somme_div += i + if gcd(somme_div, n) == 1 : + return True + else : + return False + +\end{python} +\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm} +#Run tpcapytale.py +est_duffy(6) +est_duffy(13) +est_duffy(265) + +from random import randint +nb = randint(1,100000) +nb, est_duffy(nb) +\end{PitonThonnyConsole} + +{\small\begin{codehigh} +\begin{PitonThonnyConsole}{8cm} +[i**2 for i in range(50)] +\end{PitonThonnyConsole} +\end{codehigh}} + +\begin{PitonThonnyConsole}{8cm} +[i**2 for i in range(50)] +\end{PitonThonnyConsole} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex new file mode 100644 index 0000000000..e418300cae --- /dev/null +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex @@ -0,0 +1,242 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode} +% arara: pythontex: {rerun: always} if found('pytxcode', 'PYTHONTEX#py') +% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode} if found('pytxcode', 'PYTHONTEX#py') +% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[french,a4paper,10pt]{article} +\def\PLver{2.7.5} +\usepackage[margin=1.5cm]{geometry} +\usepackage{ProfLycee} +\useproflyclib{pythontex} +\usepackage{babel} +\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4} +\usepackage{codehigh} + +\begin{document} + +\part*{ProfLycee (\PLver), Pythontex} + +\section{Code \og Pythontex \fg{}} + +\subsection{Préambule basique} + +{\small \begin{codehigh} +\documentclass[french,a4paper,10pt]{article} +\usepackage{ProfLycee} +\useproflyclib{pythontex} % compilation spécifique +\end{codehigh}} + +\subsection{Exemples} + +{\small \begin{codehigh} +%Sortie par défaut +\begin{CodePythontex}{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontex} +\end{codehigh}} + +\begin{CodePythontex}{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x + +#bla +#bla +#bla +\end{CodePythontex} + +{\small \begin{codehigh} +%Sortie avec Style=Classique, Largeur=10cm, centré +\begin{CodePythontexAlt}[Largeur=10cm,Centre,PremLigne=10]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontexAlt} +\end{codehigh}} + +\begin{CodePythontexAlt}[Largeur=10cm,Centre,PremLigne=10]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x + +#bla +#bla +#bla +\end{CodePythontexAlt} + +\pagebreak + +{\small \begin{codehigh} +%Sortie avec Style=Classique, Largeur=10cm +\begin{CodePythontexAlt}[Largeur=10cm]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontexAlt} +\end{codehigh}} + +\begin{CodePythontexAlt}[Largeur=10cm]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontexAlt} + +{\small \begin{codehigh} +%Sortie avec Style=Classique, Largeur=0.5\linewidth, centré, sans numéro +\begin{CodePythontexAlt}[Largeur=0.5\linewidth,Centre,Lignes=false]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontexAlt} +\end{codehigh}} + +\begin{CodePythontexAlt}[Largeur=0.5\linewidth,Centre,Lignes=false]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontexAlt} + +{\small \begin{codehigh} +%Sortie Moderne, Largeur=11cm, sans ligne +\begin{CodePythontex}[Largeur=11cm,Lignes=false]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontex} +\end{codehigh}} + +\begin{CodePythontex}[Largeur=11cm,Lignes=false]{} +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x +\end{CodePythontex} + +\pagebreak + +\section{Console \og Pythontex \fg{}} + +{\small \begin{codehigh} +%Déclaration d'une fonction python + librairie random pour utilisation ultérieure +\begin{pyconcode} +from random import randint + +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x + +\end{pyconcode} +\end{codehigh}} + +\begin{pyconcode} +from random import randint + +def valeur_absolue(x): + "Renvoie la valeur absolue de x" + #le petit test qui va bien + if x > 0: + return x + else: + return -x + +\end{pyconcode} + +{\small \begin{codehigh} +\begin{ConsolePythontex}{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +\end{ConsolePythontex} +\end{codehigh}} + +\begin{ConsolePythontex}{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +\end{ConsolePythontex} + +\pagebreak + +{\small \begin{codehigh} +\begin{ConsolePythontex}[Largeur=12cm,Centre]{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +liste = [randint(1,20) for i in range(10)] +print(liste) +print(max(liste), min(liste), sum(liste)) +\end{ConsolePythontex} +\end{codehigh}} + +\begin{ConsolePythontex}[Largeur=12cm,Centre]{} +1+1 +2**10 +valeur_absolue(-3) +valeur_absolue(0) +valeur_absolue(5) +print(f"La valeur absolue de 5 est {valeur_absolue(5)}") +print(f"La valeur absolue de -4 est {valeur_absolue(-4)}") +liste = [randint(1,20) for i in range(10)] +print(liste) +print(max(liste), min(liste), sum(liste)) +\end{ConsolePythontex} + +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index be9319048d..25a212e65a 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2024/03/30 3.03c Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2024/04/20 3.03d Aide pour l'utilisation de LaTeX en lycee] +% 3.03d Page de garde type BAC % 3.03c Correction du fonctionnement gobble avec piton + compatibilité luamplib PfC % 3.03b Compétences Maths Lycées + \pflnum pour num+xint :-) + correction de bugs (div eucl) % 3.03a Forme canonique + fonction homographique @@ -227,5 +228,7 @@ \input{proflycee-tools-recreat.tex} %%------Compétences \input{proflycee-tools-competences.tex} +%%------Examens +\input{proflycee-tools-exams.tex} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex index f013ab3d07..db3f2bc8ac 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex @@ -672,8 +672,8 @@ \NewDocumentCommand\InverseModulo{ s m m }{% \xdef\PGCDD{\xinteval{gcd(#2,#3)}}% - \xdef\resinvmod{#2{} n'est pas inversible modulo #3.} - \xintFor* ##1 in {\xintSeq{1}{#3}}\do{\xintifboolexpr{\xintiiRem{\xinteval{#2*##1}}{#3} == 1}{\xdef\resinvmod{##1}}{}}% + \xdef\resinvmod{#2{} n'est pas inversible modulo #3.}% + \xintFor* ##1 in {\xintSeq{1}{#3}}\do{\xintifboolexpr{\xintiiRem{\xinteval{#2*##1}}{#3} == 1}{\xdef\resinvmod{##1}}{}}% \IfBooleanTF{#1}% {% On a $\text{PGCD}(#2;#3)=\num{\PGCDD}$.~% @@ -696,7 +696,7 @@ \ifboolKV[chiffaffine]{Dechiffr}% {% \xdef\resinvmod{0}% - \xintFor* ##1 in {\xintSeq{1}{\tmpmodulo}}\do{ + \xintFor* ##1 in {\xintSeq{1}{\tmpmodulo}}\do{% \xintifboolexpr{\xintiiRem{\xinteval{(\tmpcoeffa)*(##1)}}{\tmpmodulo} == 1}% {\xdef\resinvmod{##1}}{}% }% diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-exams.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-exams.tex new file mode 100644 index 0000000000..940c64d0a4 --- /dev/null +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-exams.tex @@ -0,0 +1,152 @@ +% proflycee-tools-stats.tex +% Copyright 2024 Cédric Pierquet +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt + +%3.03d Page de garde Type BAC + +%====PAGE GARDE [BAC] +\defKV[EnteteSujetBac]{DernierePage=\def\packlastpage{#1},NbExos=\def\packnbexos{#1},Serie=\def\packfiliere{#1}} +\setKVdefault[EnteteSujetBac]{% + Police=\normalfont,% + Serie={GÉNÉRAL},% + Matiere=MATHÉMATIQUES,% + Filiere={SCIENCES ET TECHNOLOGIES DE L’INDUSTRIE ET DU DÉVELOPPEMENT DURABLE},% + Session={SESSION \the\year},% + AffSession=true,% + Jour={Jour 1},% + AffJour=true,% + Duree=4 heures,% + ModeExamen=true,% + DernierePage=lastpage,% + Justification=true,% + TraceRecherche=true,% + Clarte=true,% + NbExos=4,% + Traiter=false,% + EspaceAvant=1cm,% + LargeurPar={0.85\linewidth} +} + +\NewDocumentCommand\PageGardeSujetBac{ O{} }{% + \restoreKV[EnteteSujetBac]% + \setKV[EnteteSujetBac]{#1}% + \useKV[EnteteSujetBac]{Police}{% + \vspace*{\useKV[EnteteSujetBac]{EspaceAvant}} + + \begin{center} + {\Huge BACCALAURÉAT~% + \IfSubStr{\packfiliere}{GÉN}{GÉNÉRAL}{}% + \IfSubStr{\packfiliere}{GEN}{GÉNÉRAL}{}% + \IfSubStr{\packfiliere}{TECHNO}{TECHNOLOGIQUE}{}% + \IfSubStr{\packfiliere}{PRO}{PROFESSIONNEL}{}% + }% + \IfSubStr{\packfiliere}{PRO}% + {}% + {% + \vspace*{10mm} + + {\Large ÉPREUVE D’ENSEIGNEMENT DE SPÉCIALITÉ}% + }% + + \ifboolKV[EnteteSujetBac]{AffSession}% + {% + \vspace*{10mm} + + {\Large\bfseries\useKV[EnteteSujetBac]{Session}}% + }% + {}% + \IfSubStr{\packfiliere}{TECHNO}% + {% + \vspace*{10mm} + + \begin{minipage}{\useKV[EnteteSujetBac]{LargeurPar}} + \centering + \linespread{1.2}\LARGE\bfseries\useKV[EnteteSujetBac]{Filiere} + \end{minipage}% + }% + {}% + \IfSubStr{\packfiliere}{PRO}% + {% + \vspace*{10mm} + + \begin{minipage}{\useKV[EnteteSujetBac]{LargeurPar}} + \centering + \linespread{1.2}\LARGE\bfseries\useKV[EnteteSujetBac]{Filiere} + \end{minipage}% + }% + {}% + \vspace*{15mm} + + {\LARGE\bfseries \useKV[EnteteSujetBac]{Matiere}} + + \ifboolKV[EnteteSujetBac]{AffJour}% + {% + \vspace*{15mm} + + {\Large\bfseries \useKV[EnteteSujetBac]{Jour}}% + }% + {}% + + \vspace*{15mm} + + Durée de l’épreuve : \textbf{\useKV[EnteteSujetBac]{Duree}}% + + \vspace*{15mm} + + \ifboolKV[EnteteSujetBac]{ModeExamen}% + {% + \textit{L’usage de la calculatrice avec mode examen actif est autorisé.} + + \medskip + + \textit{L’usage de la calculatrice sans mémoire « type collège » est autorisé.} + }% + {% + \textit{L’usage de la calculatrice avec ou sans mode examen est autorisé.} + }% + \vspace*{10mm} + + Dès que ce sujet vous est remis, assurez-vous qu’il est complet. + + \smallskip + + Ce sujet comporte \IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]\ pages numérotées de 1/\IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]\ à \IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]/\IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]. + \end{center} + % + \begin{center} + \parbox{\useKV[EnteteSujetBac]{LargeurPar}}{% + \ifboolKV[EnteteSujetBac]{Justification}% + {% + \vspace*{10mm} + + \noindent\textbf{Sauf mention contraire, toute réponse devra être justifiée.} + }% + {}% + \ifboolKV[EnteteSujetBac]{Traiter}% + {% + \vspace*{5mm} + + \noindent\textbf{Le candidat doit traiter les \IfStrEqCase{\packnbexos}{{2}{deux}{3}{trois}{4}{quatre}{5}{cinq}{6}{six}{7}{sept}}\ exercices proposés.} + }% + {}% + \ifboolKV[EnteteSujetBac]{TraceRecherche}% + {% + \vspace*{10mm} + + \noindent\textit{Le candidat est invité à faire figurer sur la copie toute trace de recherche, même incomplète ou non fructueuse, qu’il aura développée.} + }% + {}% + \ifboolKV[EnteteSujetBac]{Clarte}% + {% + \vspace*{2mm} + + \noindent\textit{La qualité de la rédaction, la clarté et la précision des raisonnements seront prises en compte dans l’appréciation de la copie. Les traces de recherche, même incomplètes ou infructueuses seront valorisées.} + }% + {}% + }% + \end{center}% + }% + \pagebreak +} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/se2thesis/CHANGELOG.md b/macros/latex/contrib/se2thesis/CHANGELOG.md index 600f16953b..f5a4f80ded 100644 --- a/macros/latex/contrib/se2thesis/CHANGELOG.md +++ b/macros/latex/contrib/se2thesis/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to ## [Unreleased] +## [v3.4.0] – 2024–04–20 + +### Added +- Fix the referencing with cleveref's `\cref` etc. for the `resq` (research + questions) and `hyp` (hypotheses) environments + (see [#8](https://github.com/se2p/se2thesis/issues/8)) +- Add the thesis type `phdphil` for a PhD thesis in philosophy. +- Add section to documentation that the template is also available from Overleaf. + ## [v3.3.1] – 2024–02–23 ### Changed @@ -176,6 +185,8 @@ These changes might be breaking changes! ### Added - First official release +[Unreleased]: https://github.com/se2p/se2thesis/compare/v3.4.0...HEAD +[v3.4.0]: https://github.com/se2p/se2thesis/compare/v3.4.0...v3.3.1 [v3.3.1]: https://github.com/se2p/se2thesis/compare/v3.3.1...v3.3.0 [v3.3.0]: https://github.com/se2p/se2thesis/compare/v3.3.0...v3.2.0 [v3.2.0]: https://github.com/se2p/se2thesis/compare/v3.2.0...v3.1.0 diff --git a/macros/latex/contrib/se2thesis/se2colors.dtx b/macros/latex/contrib/se2thesis/se2colors.dtx index 97d57ee682..cec581f2e3 100644 --- a/macros/latex/contrib/se2thesis/se2colors.dtx +++ b/macros/latex/contrib/se2thesis/se2colors.dtx @@ -231,7 +231,7 @@ % % Identify the package and give the overall version information. % \begin{macrocode} -\ProvidesExplPackage {se2colors} {2024-02-23} {3.3.1} +\ProvidesExplPackage {se2colors} {2024-04-20} {3.4.0} {A colour support package for the se2thesis bundle} % \end{macrocode} % diff --git a/macros/latex/contrib/se2thesis/se2fonts.dtx b/macros/latex/contrib/se2thesis/se2fonts.dtx index 938c24d1f7..9e86b3a24d 100644 --- a/macros/latex/contrib/se2thesis/se2fonts.dtx +++ b/macros/latex/contrib/se2thesis/se2fonts.dtx @@ -151,7 +151,7 @@ % % Identify the package and give the overall version information. % \begin{macrocode} -\ProvidesExplPackage {se2fonts} {2024-02-23} {3.3.1} +\ProvidesExplPackage {se2fonts} {2024-04-20} {3.4.0} {A font-selection support package for the se2thesis bundle} % \end{macrocode} % diff --git a/macros/latex/contrib/se2thesis/se2packages.dtx b/macros/latex/contrib/se2thesis/se2packages.dtx index 8e29a96906..4cdae1d105 100644 --- a/macros/latex/contrib/se2thesis/se2packages.dtx +++ b/macros/latex/contrib/se2thesis/se2packages.dtx @@ -443,7 +443,7 @@ % % Identify the package and give the overall version information. % \begin{macrocode} -\ProvidesExplPackage {se2packages} {2024-02-23} {3.3.1} +\ProvidesExplPackage {se2packages} {2024-04-20} {3.4.0} {Supporting packages for the se2thesis bundle} % \end{macrocode} % @@ -881,6 +881,8 @@ \AddToHook { begindocument/before } { \RequirePackage[capitalise]{cleveref} + \Crefname{resq}{Research Question}{Research Questions} + \Crefname{hyp}{Hypothesis}{Hypotheses} } } % \end{macrocode} diff --git a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf Binary files differindex cdfb050e29..a58ba8209f 100644 --- a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf +++ b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.pdf diff --git a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.tex b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.tex index 15000000b2..4f10ae80f5 100644 --- a/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.tex +++ b/macros/latex/contrib/se2thesis/se2thesis-master-thesis-example.tex @@ -44,6 +44,10 @@ \institute{Chair of Example} \location{Passau} +\usepackage[capitalise]{cleveref} +%\crefname{resq}{research question}{research questions} +\Crefname{resq}{Research Question}{Research Questions} + \begin{document} \frontmatter @@ -72,13 +76,18 @@ \section{Further Examples} -We could reference the \TeX{} book~\autocite{Knu86}. +We could reference the \TeX{} book~\autocite{Knu86}. And we want to reference +\cref{rq:1} and \cref{hyp:1} here. -\begin{resq} +\begin{resq}\label{rq:1} What is \(41 + 1\)? \end{resq} -\begin{summary}{Research Question 1} +\begin{hyp}\label{hyp:1} + We hypothesise that the answer to \cref{rq:1} is 42! +\end{hyp} + +\begin{summary}{\Cref{rq:1}} It's 42, obviously! \end{summary} diff --git a/macros/latex/contrib/se2thesis/se2thesis.dtx b/macros/latex/contrib/se2thesis/se2thesis.dtx index 9bb167399c..c8888c343c 100644 --- a/macros/latex/contrib/se2thesis/se2thesis.dtx +++ b/macros/latex/contrib/se2thesis/se2thesis.dtx @@ -123,6 +123,27 @@ % thus also recent releases of \pkg{se2thesis} will be part of the image % soon after their release date. % +% \subsection{Availability on Overleaf}\label{sec:doc-intro-overleaf} +% +% Since April 3, 2024, the \pkg{se2thesis} document template is also available +% from Overleaf. The document that is in Overleafs gallery is based on the +% example document that comes with this package. Any Overleaf user can just +% create a new thesis document based on the template by clicking the respective +% button on Overleaf's gallery page. +% +% The gallery entry for \pkg{se2thesis} is available from +% \href{https://www.overleaf.com/latex/templates/se2thesis-a-thesis-class-for-the-chair-of-software-engineering-ii-at-the-university-of-passau-germany/fpymkmxmbgpc}{https://www.overleaf.com/latex/templates/se2thesis-a-thesis-class-for-the-chair-of-software-engineering-ii-at-the-university-of-passau-germany/fpymkmxmbgpc}.% +% +% \emph{Important remark:} Currently, the Overleaf template does not support +% \LuaLaTeX{} but requires builds with \pdfLaTeX. The reason is that Overleaf +% does not yet ship \TeXLive~2024, but only \TeXLive~2023, which does not +% provide the respective font package~(notably \pkg{inconsolata-nerd-font}). +% Until the latest \TeXLive{} will be available from Overleaf, one can only use +% the \pdfLaTeX{} mode, which has some drawbacks on the fonts, but works fine +% otherwise. From the Overleaf blog, we assume that \TeXLive~2024 might be +% available from some time in autumn 2024. We will update this documentation +% accordingly, as soon as the new version is available. +% % \subsection{General Macros}\label{sec:doc-intro-macros} % % They all have in common one macro, \cs{IfFormatAtLeastTF}; @@ -225,8 +246,8 @@ % |bachelor| for a bachelor thesis, |bachelorproposal| for a proposal to % a bachelor thesis, |master| for a master thesis, |masterproposal| for % a proposal to a master thesis, |phdproposal| for a proposal to a PhD thesis, -% |phd| for a PhD thesis in the natural sciences and |phdeng| for a PhD thesis -% in engineering. +% |phd| for a PhD thesis in the natural sciences, |phdeng| for a PhD thesis +% in engineering, and |phdphil| for a PhD thesis in philosophy. % \end{function} % % \begin{function}{colormode} @@ -586,7 +607,7 @@ % % Identify the class and give the overall version number. % \begin{macrocode} -\ProvidesExplClass {se2thesis} {2024-02-23} {3.3.1} +\ProvidesExplClass {se2thesis} {2024-04-20} {3.4.0} {A thesis class for the Chair of Software Engineering II} % \end{macrocode} % @@ -761,6 +782,7 @@ }, thesistype / phd .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phd}, thesistype / phdeng .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phdeng}, + thesistype / phdphil .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phdphil}, thesistype / phdproposal .code:n = { \tl_gset:Nn \l_@@_thesis_type_tl {phdproposal} }, @@ -1258,23 +1280,37 @@ in~ partial~ fulfillment~ of~ obtaining\\ the~ degree~ of~ a~ Doctor~ of~ Engineering } { - \tl_if_eq:NnT \l_@@_thesis_type_tl { bachelor } - { \GetTranslation{Bachelor-thesis} } - \tl_if_eq:NnT \l_@@_thesis_type_tl { bachelorproposal } - { \GetTranslation{Bachelor-thesis-proposal} } - \tl_if_eq:NnT \l_@@_thesis_type_tl { master } - { \GetTranslation{Master-thesis} } - \tl_if_eq:NnT \l_@@_thesis_type_tl { masterproposal } - { \GetTranslation{Master-thesis-proposal} } - \tl_if_eq:NnT \l_@@_thesis_type_tl { phdproposal } - { \GetTranslation{PhD-thesis-proposal} } - \tl_if_empty:NF \l_@@_degreeprogramme_tl + \tl_if_eq:NnTF \l_@@_thesis_type_tl { phdphil } { - \ in~\l_@@_degreeprogramme_tl + Dissertation~ zur~ Erlangung~ des~ Doktorgrades\\ + der~ Philosophie~ (Dr.\,phil.)\\ + eingereicht~ an~ der~ Fakultät~ für~ Informatik~ und~ Mathematik\\ + der~ Universität~ Passau\\ + \rule{\textwidth}{.1pt}\\ + Dissertation~ submitted~ to\\ + the~ Faculty~ of~ Computer~ Science~ and~ Mathematics\\ + of~ the~ University~ of~ Passau\\ + in~ partial~ fulfillment~ of~ obtaining\\ + the~ degree~ of~ a~ Doctor~ of~ Philosophy + } { + \tl_if_eq:NnT \l_@@_thesis_type_tl { bachelor } + { \GetTranslation{Bachelor-thesis} } + \tl_if_eq:NnT \l_@@_thesis_type_tl { bachelorproposal } + { \GetTranslation{Bachelor-thesis-proposal} } + \tl_if_eq:NnT \l_@@_thesis_type_tl { master } + { \GetTranslation{Master-thesis} } + \tl_if_eq:NnT \l_@@_thesis_type_tl { masterproposal } + { \GetTranslation{Master-thesis-proposal} } + \tl_if_eq:NnT \l_@@_thesis_type_tl { phdproposal } + { \GetTranslation{PhD-thesis-proposal} } + \tl_if_empty:NF \l_@@_degreeprogramme_tl + { + \ in~\l_@@_degreeprogramme_tl + } + \par + \tl_if_empty:NF \l_@@_department_tl { \l_@@_department_tl \par } + \tl_if_empty:NF \l_@@_institute_tl { \l_@@_institute_tl \par } } - \par - \tl_if_empty:NF \l_@@_department_tl { \l_@@_department_tl \par } - \tl_if_empty:NF \l_@@_institute_tl { \l_@@_institute_tl \par } } } \end{center}\par\bigskip @@ -1619,7 +1655,7 @@ % We provide the following English translations. % % \begin{macrocode} -\ProvideDictionaryFor{English}{se2translations}[2024/02/23] +\ProvideDictionaryFor{English}{se2translations}[2024/04/20] \ProvideDictTranslation{abstract}{abstract} \ProvideDictTranslation{Abstract}{Abstract} \ProvideDictTranslation{acknowledgement}{acknowledgement} @@ -1670,7 +1706,7 @@ % We provide the following German translations. % % \begin{macrocode} -\ProvideDictionaryFor{German}{se2translations}[2024/02/23] +\ProvideDictionaryFor{German}{se2translations}[2024/04/20] \ProvideDictTranslation{abstract}{Zusammenfassung} \ProvideDictTranslation{Abstract}{Zusammenfassung} \ProvideDictTranslation{acknowledgement}{Danksagung} diff --git a/macros/latex/contrib/se2thesis/se2thesis.pdf b/macros/latex/contrib/se2thesis/se2thesis.pdf Binary files differindex e83e4eeb21..263ffa53f0 100644 --- a/macros/latex/contrib/se2thesis/se2thesis.pdf +++ b/macros/latex/contrib/se2thesis/se2thesis.pdf |