summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/README3
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdfbin411123 -> 411119 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx30
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.dbx2
-rw-r--r--macros/latex/contrib/fontscale/README.txt3
-rw-r--r--macros/latex/contrib/fontscale/beery.cls244
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex37
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex36
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex36
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.pdfbin128999 -> 129405 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.tex376
-rw-r--r--macros/latex/contrib/fontscale/fontscale.sty5
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution-demo.tex417
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution-doc.tex45
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution-gauge.tex65
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.pdfbin910052 -> 612010 bytes
-rw-r--r--macros/latex/contrib/litesolution/doc/litesolution.tex10
-rw-r--r--macros/latex/contrib/litesolution/tex/litesolution.cls86
-rw-r--r--macros/latex/contrib/litesolution/tex/titleimage.sty20
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1572968 -> 1626650 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex6
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdfbin59463 -> 73899 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex163
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.pdfbin41175 -> 41179 bytes
-rw-r--r--macros/latex/contrib/proflycee/metapost/PfLEspace.mp762
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty10
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex80
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex284
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex135
-rw-r--r--macros/latex/contrib/yathesis/README.md2
-rw-r--r--macros/latex/contrib/yathesis/doc/yathesis-fr.pdfbin6462456 -> 6463137 bytes
-rw-r--r--macros/latex/contrib/yathesis/exemples/specimen/these.pdfbin1256548 -> 1257015 bytes
-rw-r--r--macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx8
-rw-r--r--macros/latex/contrib/yathesis/source/yathesis.dtx50
36 files changed, 2309 insertions, 618 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
index a79548be8b..10c4d180a9 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
@@ -46,6 +46,9 @@ instructions.
== CHANGES ==
+* V. 2.8 (2024-03-08):
+ - Fix delimiter with plauthor second in a truncated author list (#50).
+
* V. 2.7 (2023-10-07):
- Fix acending numbering without refsections (#49).
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
index ba109f5ebe..2fd5c90dbe 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
index 53fc669e69..19b80cb4f2 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
@@ -115,7 +115,7 @@
\thanks{Please report issues via \protect\url{https://github.com/jspitz/biblatex-publist}.}%
}
-\date{Version 2.7, 2023/10/07}
+\date{Version 2.8, 2024/03/08}
\maketitle
\begin{abstract}
@@ -788,7 +788,6 @@ Then a typical file would look like example~\ref{example} (p.~\pageref{example})
moretexcs={[5]{plauthorname,addbibresource,printbibliography,maketitle,newrefsection}}]
\documentclass{article}
\usepackage[T1]{fontenc}
-\usepackage[latin9]{inputenc}
\usepackage{csquotes}% not required, but recommended
\usepackage[style=publist]{biblatex}
@@ -944,6 +943,11 @@ until further change).
\begin{description}
+ \item [{V. 2.8 (2024/03/08):}]~
+ \begin{itemize}
+ \item Fix delimiter with plauthor second in a truncated author list.
+ \end{itemize}
+
\item [{V. 2.7 (2023/10/07):}]~
\begin{itemize}
\item Fix ascending numbering without refsections.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
index af9e32c741..7e955db150 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
@@ -25,8 +25,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{2.7}
-\def\bpl@rdate{2023/10/07}
+\def\bpl@version{2.8}
+\def\bpl@rdate{2024/03/08}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -72,8 +72,7 @@
% Valid options
%
-% We use l3keys here since (1) LaTeX2e keys are rather
-% new and (2) do not provide for choice keys yet.
+% We use l3keys here since we use l3 within the definitions anyway.
\ExplSyntaxOn
\keys_define:nn { bpl }
{
@@ -1159,27 +1158,34 @@
\newbibmacro*{bpl:omissiondelim}[1][author]
{%
\ifthenelse{\value{listcount}=1}{\global\togglefalse{plnameafteromission}}{%
+ % listcount > 1
\ifnumless{\value{listcount}}{\value{liststop}}%
- {%
+ {% listcount < liststop
\ifnumgreater{\value{listcount}}{\value{realliststop}}{%
- \iftoggle{plnameomitted}{%
+ % listcount > realliststop
+ \iftoggle{plnameomitted}{% [...] precedes
\multinamedelim\iftoggle{isplauthor}{\plnameomission\global\togglefalse{plnameomitted}%
\global\toggletrue{plnameafteromission}}{}%
- }{%
+ }{% an author name precedes
\ifnumless{\value{pl#1}}{\value{pl#1s}}{%
+ % more plauthors left
\iftoggle{isplauthor}
{\multinamedelim\plnameomission\global\togglefalse{plnameomitted}}
{\global\toggletrue{plnameomitted}}%
- }{}%
+ }{% last plauthor
+ \iftoggle{isplauthor}
+ {\multinamedelim}
+ {}%
+ }%
}%
- }{%
+ }{% listcount >= realliststop
\multinamedelim\global\togglefalse{plnameomitted}%
}%
- }{%
- \ifnumgreater{\value{listcount}}{\value{realliststop}}{%
+ }{% listcount >= liststop
+ \ifnumgreater{\value{listcount}}{\value{realliststop}}{% listcount > realliststop
\iftoggle{isplauthor}{\iftoggle{plnameomitted}{\multinamedelim\plnameomission}{}%
\finalnamedelim\global\togglefalse{plnameomitted}}{}%
- }{%
+ }{% listcount =< realliststop
\iftoggle{plnameomitted}{%
\ifnumequal{\value{listcount}}{\value{liststop}}%
{\finalnamedelim}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
index ee02fb1c2b..d1b46b1ab9 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
@@ -26,8 +26,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{2.7}
-\def\bpl@rdate{2023/10/07}
+\def\bpl@version{2.8}
+\def\bpl@rdate{2024/03/08}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.dbx
index 7363600606..87aebdbf2b 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.dbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.dbx
@@ -1,5 +1,5 @@
% publist.dbx, biblatex data model specification for the biblatex-publist
-% package, version 2.7 (2023/10/07).
+% package, version 2.8 (2024/03/08).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/fontscale/README.txt b/macros/latex/contrib/fontscale/README.txt
index 1662524eeb..292cfada9b 100644
--- a/macros/latex/contrib/fontscale/README.txt
+++ b/macros/latex/contrib/fontscale/README.txt
@@ -1,4 +1,5 @@
Package: fontscale -- A user interface for setting document font sizes
Copyright: 2024 (c) Oliver Beery <beeryoliver@gmail.com>
+CTAN: https://ctan.org/pkg/fontscale
Repository: https://github.com/beeryoliver/fontscale
-License: The LaTeX Project Public License 1.3c \ No newline at end of file
+License: The LaTeX Project Public License 1.3c
diff --git a/macros/latex/contrib/fontscale/beery.cls b/macros/latex/contrib/fontscale/beery.cls
new file mode 100644
index 0000000000..d1d480ba13
--- /dev/null
+++ b/macros/latex/contrib/fontscale/beery.cls
@@ -0,0 +1,244 @@
+% Note: This documentclass is designed ONLY for the document 'fontscale-manual'. Compiled using LuaLaTeX.
+
+% The 2023-06-01 LaTeX kernel update added the 'shipout' hook.
+\NeedsTeXFormat{LaTeX2e}[2023-06-01]
+\ProvidesExplClass
+ {beery}
+ {2024-03-08}
+ {}
+ {}
+
+\RequirePackage { fix-cm }
+\LoadClass { article }
+\RequirePackage { fontscale }
+\RequirePackage [ list-final-separator = { ,~ and~ } ] { siunitx }
+\RequirePackage { mathtools }
+\RequirePackage [ shortcuts , allowbreakbefore ] { extdash }
+\RequirePackage { csquotes }
+
+% CUSTOM MACROS
+
+\NewDocumentCommand \Key { m o o }
+ {
+ \group_begin:
+ \ttfamily
+ \bool_case:nF
+ {
+ {
+ \bool_lazy_and_p:nn
+ { \tl_if_novalue_p:n {#2} }
+ { \tl_if_novalue_p:n {#3} }
+ }
+ {#1}
+ {
+ \bool_lazy_and_p:nn
+ { ! \tl_if_novalue_p:n {#2} }
+ { \tl_if_novalue_p:n {#3} }
+ }
+ { #1~ =~ #2 }
+ {
+ \bool_lazy_and_p:nn
+ { ! \tl_if_novalue_p:n {#2} }
+ { ! \tl_if_novalue_p:n {#3} }
+ }
+ { #1~ =~ #2 \hspace* { \fill } \makebox { initial~ =~ #3 } }
+ }
+ { \errmessage { invalid } }
+ \group_end:
+ }
+\NewDocumentCommand \cmd { m } { \texttt { \token_to_str:N #1 } \@ }
+\NewDocumentCommand \cs { m } { \texttt { \token_to_str:c {#1} } \@ }
+\NewDocumentCommand \marg { m }
+ { \texttt { \c_left_brace_str #1 \c_right_brace_str } }
+\NewDocumentCommand \oarg { m } { \texttt { [ #1 ] } }
+\NewDocumentCommand \meta { m } { \texttt { \textlangle #1 \textrangle } }
+\NewDocumentCommand \cls { m } { \textsf {#1} }
+\NewDocumentCommand \env { m } { \texttt {#1} }
+\NewDocumentCommand \pkg { m } { \textsf {#1} }
+\NewDocumentCommand \filex { m } { \texttt {#1} \@ }
+\NewDocumentCommand \latin { m } { \textit {#1} }
+
+% PAGE STYLE
+
+\hbox_set:Nn \l_tmpa_box { abcdefghijklmnopqrstuvwxyz }
+\dim_const:Nn \c_beery_alphabet_dim { \box_wd:N \l_tmpa_box }
+
+\dim_const:Nn \c_beery_big_dim
+ { \fp_to_dim:n { \l_fontscale_normalsize_size_dim * 10 / 7 } }
+\dim_const:Nn \c_beery_medium_dim { \c_beery_big_dim / 2 }
+\dim_const:Nn \c_beery_small_dim { \c_beery_big_dim / 4 }
+\skip_const:Nn \c_beery_big_skip
+ {
+ \c_beery_big_dim
+ plus \dim_eval:n { \c_beery_big_dim / 2 }
+ minus \dim_eval:n { \c_beery_big_dim / 3 }
+ }
+\skip_const:Nn \c_beery_medium_skip { \c_beery_big_skip / 2 }
+\skip_const:Nn \c_beery_small_skip { \c_beery_big_skip / 4 }
+\skip_set_eq:NN \bigskipamount \c_beery_big_skip
+\skip_set_eq:NN \medskipamount \c_beery_medium_skip
+\skip_set_eq:NN \smallskipamount \c_beery_small_skip
+
+\flushbottom
+\int_set:Nn \vbadness { 100 }
+
+\skip_set:Nn \topskip { \l_fontscale_normalsize_size_dim }
+\skip_set_eq:NN \splittopskip \topskip
+\RequirePackage
+ [
+ letterpaper
+ , textwidth = \dim_eval:n { \fp_use:N \c_e_fp \c_beery_alphabet_dim }
+ , textheight =
+ \dim_eval:n { \fp_eval:n { \c_e_fp * 1.6180 } \c_beery_alphabet_dim }
+ , heightrounded
+ , centering
+ , headheight = \l_fontscale_footnotesize_baselineskip_skip
+ , headsep = \c_beery_big_dim
+ , footskip =
+ \dim_eval:n
+ { \c_beery_big_dim + \l_fontscale_footnotesize_baselineskip_skip }
+ ]
+ { geometry }
+
+\RequirePackage { fancyhdr }
+\pagestyle { fancy }
+\fancyhf { }
+\cs_set:Npn \headrulewidth { 0pt }
+\fancyfoot [ C ]
+ { \footnotesize \thepage \c_space_tl of~ \pageref { LastPage } }
+
+% PARAGRAPH STYLE
+
+\nonfrenchspacing
+\linespread { \fp_eval:n { 25 / 21 } }
+\RequirePackage [ skip = \c_beery_medium_skip ] { parskip }
+\RequirePackage [ raggedrightboxes ] { ragged2e }
+\skip_set:Nn \RaggedRightRightskip { 0pt plus 0.5 \linewidth }
+\RaggedRight
+\int_set:Nn \widowpenalty { 10000 }
+\int_set_eq:NN \clubpenalty \widowpenalty
+\int_set_eq:NN \displaywidowpenalty \widowpenalty
+
+% HEADINGS, TABLE OF CONTENTS
+
+\RequirePackage { titlesec , titletoc }
+\setcounter { secnumdepth } { 2 }
+\setcounter { tocdepth } { 2 }
+
+\titlespacing* \section % section
+ { 0pt } % indent
+ {
+ \fp_eval:n { 4 / 3 } \c_beery_medium_dim
+ plus \fp_eval:n { 1 / 2 * 4 } \c_beery_medium_dim
+ minus \fp_eval:n { 1 / 3 / 4 } \c_beery_medium_dim
+ } % before
+ { \c_beery_medium_skip } % after
+\titlespacing* \subsection
+ { 0pt }
+ {
+ \fp_eval:n { 4 / 3 } \c_beery_medium_dim
+ plus \fp_eval:n { 1 / 2 * 4 } \c_beery_medium_dim
+ minus \fp_eval:n { 1 / 3 / 4 } \c_beery_medium_dim
+ }
+ { \c_beery_medium_skip }
+
+\titleformat \section % section
+ [ block ] % shape
+ { \raggedright \large \bfseries } % format
+ { \thesection . } % label
+ { 0.5em } % the horizontal separation between label and title body
+ { } % before code
+ { } % after code
+\titleformat \subsection
+ [ block ]
+ { \raggedright \normalsize \bfseries }
+ { \thesubsection . }
+ { 0.5em }
+ { }
+ { }
+
+% LISTS, LIST HEADINGS
+
+\RequirePackage { enumitem }
+\setlist
+ {
+ % horizontal spacing
+ leftmargin = *
+ , labelsep = 0.5em
+ % vertical spacing
+ , topsep = 0pt
+ , partopsep = 0pt
+ , parsep = \c_beery_small_skip
+ , itemsep = 0pt
+ }
+\setlist [ itemize , 1 ] { label = \textbullet }
+\setlist [ enumerate , 1 ] { label = \arabic* . }
+
+% list headings
+% https://tex.stackexchange.com/questions/2644/how-to-prevent-a-page-break-before-an-itemize-list
+\NewDocumentCommand \KeepNextPar { s }
+ {
+ \par
+ \bool_if:NTF #1
+ { \int_compare:nNnT { \prevgraf } = { 1 } { \nobreak \@afterheading } }
+ { \nobreak \@afterheading }
+ }
+\NewDocumentCommand \listheading { m }
+ {
+ \par
+ #1
+ \par
+ \int_compare:nNnT { \prevgraf } = { 1 } { \nobreak \@afterheading }
+ \vspace { \skip_eval:n { \c_beery_small_skip - \parskip } }
+ }
+
+% TABLES
+
+\renewcommand \bottomfraction { 1 }
+\renewcommand \topfraction { 1 }
+\skip_set:Nn \textfloatsep
+ {
+ \c_beery_big_dim plus \c_beery_big_dim minus
+ \dim_eval:n { \c_beery_big_dim / 3 }
+ }
+
+\RequirePackage { tabularray }
+\UseTblrLibrary { booktabs , siunitx }
+
+% FOOTNOTES
+
+\RequirePackage [ bottom ] { footmisc }
+\renewcommand \footnoterule { }
+\setlength { \skip \footins } { \c_beery_big_skip }
+
+\coffin_new:N \l__beery_footnote_coffin
+% 1.2 = baselineskip-size-ratio
+\dim_const:Nn \c_beery_footnote_baselineheight_dim
+ { \fp_eval:n { 1.2 * \f@linespread - 1 } \l_fontscale_footnotesize_size_dim }
+\RenewDocumentCommand \@makefntext { +m }
+ {
+ \vcoffin_set:Nnn \l__beery_footnote_coffin { \textwidth }
+ {
+ \list { \@thefnmark . }
+ {
+ \dim_set:Nn \leftmargin
+ {
+ \fp_eval:n { ( 1 - \l_fontscale_footnotesize_scale_fp ) / 2 }
+ \textwidth
+ }
+ \dim_set_eq:NN \rightmargin \leftmargin
+ \dim_set:Nn \labelsep { 0.5em }
+ \skip_zero:N \topsep
+ \skip_zero:N \partopsep
+ }
+ \item #1 \endlist
+ }
+ \coffin_typeset:Nnnnn \l__beery_footnote_coffin { l } { b }
+ { 0pt } { - \c_beery_footnote_baselineheight_dim }
+ }
+
+% REFERENCES
+
+\AddToHook { shipout / lastpage } { \label { LastPage } }
+\RequirePackage { xurl }
+\RequirePackage [ bookmarksnumbered , hidelinks , linktoc = page ] { hyperref } \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
new file mode 100644
index 0000000000..56015bba68
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
@@ -0,0 +1,37 @@
+\ProvidesFile{fontscale-manual-table-classic.tex}[2024-03-08]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The size of each font size command in \unit{pt} when using a classic typographic scale.%
+ \label{table:classicscales}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ }
+ ,cell{1}{2-Z}={guard}
+ }
+ \toprule
+ Command & \Key{classic-10pt} & \Key{classic-11pt} & \Key{classic-12pt} \\
+ \midrule
+ \cs{tiny} & 6 & 7 & 8 \\
+ \cs{scriptsize} & 7 & 8 & 9 \\
+ \cs{footnotesize} & 8 & 9 & 10 \\
+ \cs{small} & 9 & 10 & 11 \\
+ \cs{normalsize} & 10 & 11 & 12 \\
+ \cs{large} & 11 & 12 & 14 \\
+ \cs{Large} & 12 & 14 & 16 \\
+ \cs{LARGE} & 14 & 16 & 18 \\
+ \cs{huge} & 16 & 18 & 21 \\
+ \cs{Huge} & 18 & 21 & 24 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
new file mode 100644
index 0000000000..8392f99dbb
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
@@ -0,0 +1,36 @@
+\ProvidesFile{fontscale-manual-table-font-steps.tex}[2024-03-08]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The step of each font size command.
+ These are constants and cannot be changed.%
+ \label{table:fontsteps}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2}={guard}
+ }
+ \toprule
+ Command & Step \\
+ \midrule
+ \cs{tiny} & -4 \\
+ \cs{scriptsize} & -3 \\
+ \cs{footnotesize} & -2 \\
+ \cs{small} & -1 \\
+ \cs{normalsize} & 0 \\
+ \cs{large} & 1 \\
+ \cs{Large} & 2 \\
+ \cs{LARGE} & 3 \\
+ \cs{huge} & 4 \\
+ \cs{Huge} & 5 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
new file mode 100644
index 0000000000..6fd10d9991
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
@@ -0,0 +1,36 @@
+\ProvidesFile{fontscale-manual-table-modular-musical.tex}[2024-03-08]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The size of each font size command when using a modular or musical typographic scale with the initial settings.
+ The font sizes are in \unit{pt} and rounded to two decimal places.%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ }
+ ,cell{1}{2-3}={guard}
+ }
+ \toprule
+ Command & \Key{modular} & \Key{musical} \\
+ \midrule
+ \cs{tiny} & 6.24 & 5.74 \\
+ \cs{scriptsize} & 7.02 & 6.60 \\
+ \cs{footnotesize} & 7.90 & 7.58 \\
+ \cs{small} & 8.89 & 8.71 \\
+ \cs{normalsize} & 10 & 10 \\
+ \cs{large} & 11.25 & 11.49 \\
+ \cs{Large} & 12.66 & 13.20 \\
+ \cs{LARGE} & 14.24 & 15.16 \\
+ \cs{huge} & 16.02 & 17.41 \\
+ \cs{Huge} & 18.02 & 20 \\
+ \bottomrule
+ \end{tblr}
+\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.pdf b/macros/latex/contrib/fontscale/fontscale-manual.pdf
index 22a18df81c..778dfdcccc 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual.pdf
+++ b/macros/latex/contrib/fontscale/fontscale-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.tex b/macros/latex/contrib/fontscale/fontscale-manual.tex
new file mode 100644
index 0000000000..3a24f6bca5
--- /dev/null
+++ b/macros/latex/contrib/fontscale/fontscale-manual.tex
@@ -0,0 +1,376 @@
+\documentclass{beery}
+
+\begin{document}
+
+
+\section*
+ {%
+ \SetFontStep*{1}%
+ The \pkg{fontscale} package%
+ }
+
+A user interface for setting document font sizes
+
+Oliver Beery
+
+Version 1.0.1\quad{}8~March 2024
+
+
+\section{Introduction}
+\label{sec:intro}
+
+\subsection{About}
+\label{subsec:about}
+
+\listheading{The \pkg{fontscale} package provides the following functionalities:}
+\begin{itemize}
+ \item
+ Set document font sizes via a classic, modular, or musical typographic scale.
+ \item
+ Set arbitrary scales, sizes, and baselineskips for the standard font size commands \cs{tiny}, \cs{scriptsize}, \cs{footnotesize}, \cs{small}, \cs{normalsize}, \cs{large}, \cs{Large}, \cs{LARGE}, \cs{huge}, and \cs{Huge}.
+ \item
+ Set the font size settings mid\-/document or within a local group.
+ \item
+ Set the font size by setting the font step, scale, or size.
+ \item
+ Set the font size relative to the current font size.
+ \item
+ Use the current font step, scale, size, and baselineskip directly, for example, for printing or within calculations.
+ \item
+ Print sample text to test different font sizes.
+ \item
+ For advanced users, store the step, scale, size, and baselineskip of each font size command in \pkg{expl3} variables.
+\end{itemize}
+
+
+\subsection{Loading the package}
+\label{subsec:loading}
+
+This package requires the 10~October 2023 \pkg{l3kernel} update.
+Since this update is fairly recent, you may need to ensure that your \LaTeX{} installation is up\-/to\-/date before using this package.
+
+This package lets the user set arbitrary font sizes.
+This works with most fonts produced today, but, for historical reasons, the default Computer Modern font is available only in a number of fixed sizes.
+If you get a warning that Computer Modern is not available in the requested size, you may need to add the code \cs{RequirePackage{fix-cm}} before \cs{documentclass} to make Computer Modern available at arbitrary font sizes.
+
+\cs{usepackage}\marg{fontscale}
+\nopagebreak\newline
+\cs{fontscalesetup}\marg{\meta{keys}}
+
+Load the \pkg{fontscale} package via the usual command in the document preamble.
+This package has no package options.
+Instead, the package keys are set up via the command \cs{fontscalesetup}\marg{\meta{keys}}.
+\meta{keys} must receive a comma\-/separated list of keys and their associated values.
+The package keys are documented in \S\ref{sec:choosing} and \S\ref{sec:overwriting}.
+
+Many \LaTeX{} document classes have a font size option (\Key{10pt}, \Key{11pt}, \Key{12pt}, etc.\@) which not only changes the set of document font sizes, but also modifies additional settings such as the page layout and vertical spacing which were specifically designed to work with those font sizes.
+For this reason, you may want to set the document class font size option close to the value of \cs{normalsize} set by this package.
+
+Internally, this package sets up each font size command from \cs{tiny} to \cs{Huge} using the kernel command \cs{@setfontsize}\---they have no additional functionality beyond that of \cs{@setfontsize}.
+Unlike the standard document classes, the font size commands set up by this package do not change the vertical spacing for displayed math and list structures.
+If the user would like to add this functionality or perhaps other features to the font size commands, they can do so via hooks, which are documented in the \LaTeX{} kernel.
+
+
+\subsection{Terminology}
+\label{subsec:terminology}
+
+When using the \pkg{fontscale} package, each font size, including the standard font size commands from \cs{tiny} to \cs{Huge}, has a step, scale, size, and baselineskip.
+The latter two parameters are the familiar first and second arguments to the low\-/level font command \cs{fontsize}\marg{\meta{size}}\marg{\meta{baselineskip}}.
+The font scale is the relative font size; the ratio of the font size to \cs{normalsize}.
+The font step is the number of font size gradations from \cs{normalsize}, which has a step of \num{0}.
+Table~\ref{table:fontsteps} lists the font step of each font size command.
+
+\input{./fontscale-manual-table-font-steps.tex}
+
+
+\section{Choosing the typographic scale}
+\label{sec:choosing}
+
+\Key{typographic-scale}
+ [classic-10pt, classic-11pt, classic-12pt, modular, musical]
+ [classic-10pt]
+\newline
+\Key{modular/ratio}[\meta{number}][1.125]
+\newline
+\Key{musical/ratio}[\meta{number}][2]%
+\nopagebreak\newline
+\Key{musical/notes}[\meta{integer}][5]
+
+The key \Key{typographic\-/scale} sets the font sizes using a classic, modular, or musical typographic scale.
+These are common methods of choosing a set of document font sizes.
+The choice of typographic scale initializes to \Key{classic\-/10pt}.
+
+The key \Key{typographic\-/scale} can also be set in a condensed format via the keys \Key{classic\-/10pt}, \Key{classic\-/11pt}, \Key{classic\-/12pt}, \Key{modular}, or \Key{musical}, which set the key \Key{typographic\-/scale} to the corresponding value.
+
+The classic typographic scale consists of the traditional font sizes
+\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
+\footnote{See \S{}3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
+They have been used since the sixteenth century and are the default font sizes on most computer software.
+The keys \Key{classic-10pt, classic-11pt, classic-12pt} set the size of each font size command to values based on their position in the classic typographic scale.
+The size of \cs{normalsize} is the named point size.
+The sizes of the other font size commands are the adjacent font sizes in the scale.
+Table~\ref{table:classicscales} lists the size of each font size command when using a classic typographic scale.
+
+\input{./fontscale-manual-table-classic.tex}
+
+The key \Key{modular} sets the font sizes from \cs{tiny} to \cs{Huge} using a modular typographic scale.
+In a modular scale, each font size is a fixed ratio from the adjacent font sizes.%
+\footnote{\url{https://alistapart.com/article/more-meaningful-typography/}}
+Here, the base font size is the size of \cs{normalsize}, which can be set via the key \Key{normalsize/size}[\meta{size}], more documented in \S\ref{sec:overwriting}.
+If not set, \cs{normalsize} initializes to \qty{10}{pt}.
+The modular ratio can be set via the key \Key{modular\slash{}ratio}.
+The initial modular ratio is \num{1.125}.
+
+\input{./fontscale-manual-table-modular-musical.tex}
+
+The key \Key{musical} sets the font sizes according to their position in a musical typographic scale.
+The font size is calculated using the formula:%
+\footnote
+ {%
+ I have referenced this article by Spencer Mortensen:
+ \newline
+ \url{https://spencermortensen.com/articles/typographic-scale/}%
+ }
+\[ f_i = f_0 \times r ^ { i / n } \]
+$f_0$ is the base font size, the size of \cs{normalsize}.
+$f_i$ is the font size with font step~$i$.
+$n$ is the number of notes in the musical scale\---the number of font size gradations or steps above \cs{normalsize}.
+$r$ is the ratio of the musical scale, the ratio of the highest to the lowest note $ f_n / f_0 $.
+(The modular typographic scale is actually a special case of the musical typographic scale where $n=1$.)
+
+The musical ratio~$r$ and the number of notes~$n$ can be set via the keys \Key{musical\slash{}ratio} and \Key{musical\slash{}notes}.
+The initial musical ratio\---\num{2}\---and the initial number of notes\---\num{5}\---are the same as that of the classic typographic scale.%
+\footnote{Ibid.}
+Conveniently, \cs{Huge} is \num{5} steps above \cs{normalsize}.
+The font size of \cs{normalsize}~$f_0$ can be set using the key \Key{normalsize/size}[\meta{size}], more documented in \S\ref{sec:overwriting}.
+When using a musical typographic scale, \cs{normalsize} initializes to \qty{10}{pt}.%
+\footnote {I have set the initial value to \qty{10}{pt} instead of the \qty{12}{pt} recommended by the Spencer Mortensen article because this matches the default settings of the standard \LaTeXe{} document classes.}
+
+\Key{baselineskip-size-ratio}[\meta{number}][1.2]
+\KeepNextPar*
+
+The key \Key{baselineskip\-/size\-/ratio} sets the ratio of the font baselineskip to the font size.
+By default, the font baselineskip of each font size command equals its font size times \Key{baselineskip\-/size\-/ratio}.
+Users should not adjust this value unless they really know what they are doing.
+When using increased line spacing, users should prefer the low\-/level font command \cs{linespread} or the \pkg{setspace} package.
+
+
+\section{Overwriting the typographic scale}
+\label{sec:overwriting}
+
+In some situations, users may need to explicitly set the scale, size, or baselineskip of a font size command, overwriting the value set by the keys in \S\ref{sec:choosing}.
+Note that the font steps and the scale of \cs{normalsize} are constants and cannot be changed.
+
+\Key{\meta{font size command}/scale}[\meta{number}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}scale} set the scale of \meta{font size command} to \meta{number}, ignoring the value set by the key \Key{typographic-scale}.
+The key \Key{normalsize\slash{}scale} is not defined.
+
+\Key{\meta{font size command}/size}[\meta{size}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}size} set the size of \meta{font size command} to \meta{size}, ignoring the values set by the keys \Key{typographic-scale} and \Key{\meta{font size command}\slash{}scale}.
+\meta{size} supplies a default unit of \unit{pt}.
+
+The package will issue a warning if the user sets the keys \Key{\meta{font size command}\slash{}size} and \Key{\meta{font size command}\slash{}scale} for the same \meta{font size command} since the latter key will be ignored.
+
+\Key{\meta{font size command}/baselineskip}[\meta{skip}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}baselineskip} set the font baselineskip of \meta{font size command} to \meta{skip} instead of calculating it from the size of \meta{font size command} and \Key{baselineskip\-/size\-/ratio}.
+\meta{skip} supplies a default unit of \unit{pt}.
+
+\Key{\meta{font size command}}[\meta{size}]
+\nopagebreak\newline
+\Key{\meta{font size command}}[\meta{size}/\meta{baselineskip}]
+
+The keys \Key{\meta{font size command}} set the keys \Key{\meta{font size command}\slash{}size} or \Key{\meta{font size command}\slash{}baselineskip} in a condensed format.
+The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, $10/12$ or $11/13$.
+The number before/after the slash is the size/leading in \unit{pts}.
+
+\Key{ignore-order}[true, false][false]
+\KeepNextPar*
+
+The user should take care to ensure that the font sizes and font baselineskips remain in the correct order when directly setting the scales, sizes, or baselineskips of the different font size commands.
+The magnitudes of the sizes and baselineskips should be ordered from \cs{tiny} to \cs{normalsize} to \cs{Huge}.
+This is important for typographic and syntactic consistency.
+This package will issue a warning if they are not in the correct order.
+The user can disable this warning via the key \Key{ignore\-/order}[true] or just \Key{ignore\-/order}.
+
+
+\section{User commands}
+\label{sec:usercommands}
+
+\subsection{Expandable font parameters}
+\label{subsec:fontparameters}
+
+\cs{CurrentFontStep}
+\nopagebreak\newline
+\cs{CurrentFontScale}
+\newline
+\cs{CurrentFontSize}
+\nopagebreak\newline
+\cs{CurrentFontBaselineskip}
+
+These are fully expandable commands that expand to the current font step, scale, size, or baselineskip.
+They can be used for printing or within calculations.
+Caution: \cs{CurrentFontStep} will expand to nothing if the current step is undefined.
+
+Internally, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} use the kernel command \cs{f@size}.
+\cs{CurrentFontSize} expands to \texttt{f@size pt}.
+\cs{CurrentFontBaselineskip} expands to the kernel command \cs{f@baselineskip}.
+Note that the low\-/level font command \cs{fontsize}\marg{\meta{size}}\allowbreak\marg{\meta{baselineskip}} sets \cs{f@size} before expanding its second argument.
+This means that \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} may need to be first expanded if used in \meta{baselineskip}.
+This package provides the command \cs{SetFontSizeBaselineskip} as an alternative to \cs{fontsize} + \cs{selectfont} that avoids this issue (\S\ref{subsec:fontsize}).
+
+\subsection{More font sizing commands}
+\label{subsec:fontsize}
+
+The \pkg{fontscale} package provides the commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} which set the font size in different ways.
+The first three commands have a starred version which sets the font size relative to the current font size.
+Internally, these commands all use the low\-/level font commands \cs{fontsize}\marg{\meta{size}}\allowbreak\marg{\meta{baselineskip}} and \cs{selectfont}.
+These commands should be used only in special cases.
+Generally, users should prefer the font size commands from \cs{tiny} to \cs{Huge} for typographic and syntactic consistency, although \cs{SetFontStep*}\marg{\meta{integer}} can use a font size command directly.
+
+\cs{SetFontStep}\marg{\meta{number}}
+\nopagebreak\newline
+\cs{SetFontStep*}\marg{\meta{number}}
+
+\cs{SetFontStep} sets the font size by setting the font step to \meta{number}.
+The starred version \cs{SetFontStep*} adds \meta{number} to the current font step.
+If the choice of typographic scale is not modular or musical, then the only valid values for \meta{number} are the integers from \num{-4} to \num{5}, corresponding to the font size commands from \cs{tiny} to \cs{Huge}.
+\cs{SetFontStep} will issue an error if the step is invalid.
+\cs{SetFontStep} sets the font baselineskip to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+If the step matches the step of any font size command, then that font size command will be used directly.
+
+\listheading{Examples:}
+\begin{itemize}
+ \item
+ For example, \cs{SetFontStep}\marg{-2} and \cs{SetFontStep}\marg{2} use \cs{footnotesize} and \cs{Large}.
+ Note that it is typically better to use the equivalent font size command in place of \cs{SetFontStep}\marg{\meta{integer}}.
+ \item
+ If the current font size is \cs{normalsize}, \cs{SetFontStep*}\marg{1} and \cs{SetFontStep*}\marg{-1} use \cs{large} and \cs{small}.
+ This is useful for moving up or down a note on the typographic scale.
+ \item
+ If the choice of typographic scale is modular or musical, \cs{SetFontStep*}\marg{-0.5} sets the font size and font baselineskip to values between that of \cs{normalsize} and \cs{small}.
+ Otherwise, it produces an error.
+\end{itemize}
+
+\cs{SetFontScale}\marg{\meta{number}}
+\nopagebreak\newline
+\cs{SetFontScale*}\marg{\meta{number}}
+
+\cs{SetFontScale} sets the font size by setting the font scale to \meta{number}.
+The font baselineskip is set to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+The starred version \cs{SetFontScale*} adds \meta{number} to the current font scale.
+For example, \cs{SetFontScale}\marg{1.25} makes the font size 25\% larger than \cs{normalsize}.
+If the current font size is \cs{normalsize}, \cs{SetFontScale*}\marg{0.25} is equivalent to \cs{SetFontScale}\marg{1.25}.
+
+\cs{SetFontSize}\marg{\meta{size}}
+\nopagebreak\newline
+\cs{SetFontSize*}\marg{\meta{size}}
+
+\cs{SetFontSize} sets the font size to \meta{size}.
+\meta{size} supplies a default unit of \unit{pt}.
+The font baselineskip is set to the font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+The starred version \cs{SetFontSize*} adds \meta{size} to the current size.
+For example, \cs{SetFontSize*}\marg{1} and \cs{SetFontSize*}\marg{-1pt} increase and decrease the current font size by a \unit{pt}.
+
+\cs{ScaleFont}\marg{\meta{number}}
+\KeepNextPar*
+
+Scales the current font size and the current font baselineskip by \meta{number}.
+\cs{ScaleFont} resembles the \cs{scalefont} command provided by the \pkg{scalefnt} package, except that it uses floating point calculations and clears the stretch and shrink components of the font baselineskip.
+For example, if the current font size and font baselineskip are \qty{10}{pt} and \qty{12}{pt}, using \cs{ScaleFont}\marg{0.8} will reduce them proportionally to \qty{8}{pt} and \qty{9.6}{pt}.
+
+\cs{SetFontSizeBaselineskip}\marg{\meta{size}}\marg{\meta{baselineskip}}
+\KeepNextPar*
+
+Sets the font size and font baselineskip to \meta{size} and \meta{baselineskip}.
+Both \meta{size} and \meta{baselineskip} supply a default unit of \unit{pt}.
+\cs{SetFontSizeBaselineskip} can be used as an alternative to \cs{fontsize} + \cs{selectfont} as it avoids the issue with \cs{f@size} discussed in \S\ref{subsec:fontparameters}
+\vfill\pagebreak%manual
+
+\subsection{Testing and debugging}
+\label{subsec:debug}
+
+The commands documented here are intended primarily for testing and debugging.
+I have used them often when developing this package so I think users will find them helpful.
+
+\cs{PrintFontParameters}
+\nopagebreak\newline
+\cs{PrintAllFontParameters}
+
+\cs{PrintFontParameters} prints the current step, scale, size, and baselineskip in this order in a comma\-/separated list of key = value pairs.
+If the current step is undefined (as explained for \cs{SetFontStep} in \S\ref{subsec:fontsize}), it will be left blank.
+\cs{PrintAllFontParameters} prints the step, scale, size, and baselineskip of each font size command.
+
+\cs{PrintSampleText}\oarg{\meta{text}}
+\nopagebreak\newline
+\cs{PrintSampleText*}\oarg{\meta{text}}
+
+\cs{PrintSampleText} prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
+The starred version \cs{PrintSampleText*} reverses the sizing order.
+The \meta{text} can be changed via the optional argument, but cannot contain \cs{par} tokens.
+The default \meta{text} is \enquote{The \texttt{fontscale} package: A user interface for setting document font sizes}.
+
+\cs{PrintFontSizeCommand}
+\KeepNextPar*
+
+\cs{PrintFontSizeCommand} tests whether the current font size and font baselineskip match that of any font size command.
+If so, it prints the name of that font size command.
+If not, it instead prints \enquote{UNDEFINED\@}.
+One useful way of printing example text is by using
+\cs{PrintSampleText}\allowbreak\oarg{\cs{PrintFontSizeCommand}:\textvisiblespace{}\cs{PrintFontParameters}}.
+
+\subsection
+ {%
+ \texorpdfstring
+ {More on \cs{fontscalesetup}}
+ {More on \textbackslash{}fontscalesetup}%
+ }
+\label{subsec:fontscalesetup}
+
+\cs{fontscalesetup}\marg{\meta{keys}}
+\KeepNextPar*
+
+Sets and processes the \pkg{fontscale} package keys and uses \cs{normalsize}.
+\cs{fontscalesetup} can be applied mid\-/document or locally within the current \TeX{} group.
+The key \Key{reset} is also available.
+Its value must be either \texttt{initial} or \texttt{preamble}.
+The key \Key{reset}[initial] or just \Key{reset} sets all the keys to their initial values.
+The key \Key{reset}[preamble] sets all the keys to their values at the end of the preamble (or does nothing if used before the end of the preamble).
+
+
+\section{Programming}
+\label{sec:programming}
+
+For \LaTeX3 programmers, the \pkg{fontscale} package provides some public \pkg{expl3} variables.
+No public \pkg{expl3} functions are provided.
+The package stores in public variables the step, scale, size, and baselineskip of each font size command.
+These variables should not be modified directly.
+Instead, they should be modified only indirectly via the command \cs{fontscalesetup}.
+
+Each takes the form:
+
+\begingroup
+ \ttfamily
+ \textbackslash{}c\_fontscale\_\meta{font size command}\_step\_fp
+ \nopagebreak\newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_scale\_fp
+ \newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_size\_dim
+ \nopagebreak\newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_baselineskip\_skip
+\endgroup
+
+Exception:
+\cs{l_fontscale_normalsize_scale_fp} is not defined.
+The scale of \cs{normalsize} is instead stored as the constant \cs{c_fontscale_normalsize_scale_fp}, which always equals \num{1}.
+
+The step, scale, size, and baselineskip of each font size command are also stored in property lists, one for each font size command:
+
+\texttt{\textbackslash{}l\_fontscale\_\meta{font size command}\_prop}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale.sty b/macros/latex/contrib/fontscale/fontscale.sty
index ac56b07015..c4ad86c21d 100644
--- a/macros/latex/contrib/fontscale/fontscale.sty
+++ b/macros/latex/contrib/fontscale/fontscale.sty
@@ -1,5 +1,6 @@
% Package : fontscale -- A user interface for setting document font sizes
% Copyright : 2024 (c) Oliver Beery <beeryoliver@gmail.com>
+% CTAN : https://ctan.org/pkg/fontscale
% Repository: https://github.com/beeryoliver/fontscale
% License : The LaTeX Project Public License 1.3c
@@ -7,8 +8,8 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{fontscale}
- {2024-03-04}
- {1.0.0}
+ {2024-03-08}
+ {1.0.1}
{A user interface for setting document font sizes}
% The 2023-10-10 l3kernel update added many 'e'-variants.
diff --git a/macros/latex/contrib/litesolution/doc/litesolution-demo.tex b/macros/latex/contrib/litesolution/doc/litesolution-demo.tex
deleted file mode 100644
index ce9319cace..0000000000
--- a/macros/latex/contrib/litesolution/doc/litesolution-demo.tex
+++ /dev/null
@@ -1,417 +0,0 @@
-\chapter{A Sample for \pkg{LiteSolution} Template}
-\fancyhead[L]{\color{H6}\kaishu\faIcon{atom}\;2023年\titlelogo{https://sci.hdu.edu.cn}{HDU}「大学物理2」期中模拟}
-\fancyhead[R]{\color{H6}\kaishu\rightmark\,}
-
-\date{2023年12月3日}{大学物理教学团队}{A0715012}
-{\href{https://qm.qq.com/q/UPbGudx8cK}{\textbf{物理問題作}}}
-{https://ctan.org/pkg/litesolution}{CTAN}
-{https://github.com/xiamyphys/LiteSolution}{GitHub}
-
-\section{选择题(每题3分,共36分)}
-\begin{choice}{D}[弹簧振子]
- 一劲度系数为$k$的轻弹簧,下端挂一质量为$m$的物体,系统的振动周期为$T_1$. 若将此弹簧截去一半的长度,下端挂一质量为$m/2$的物体,则系统振动周期$T_2$等于
-\begin{tasks}(4)
- \task $2T_1$
- \task $T_1$
- \task $\frac{T_1}{\sqrt2}$
- \task $\frac{T_1}{2}$
-\end{tasks}
-\end{choice}
-\begin{solution}*
- 弹簧的劲度系数与长度成反比,所以剪断一半后劲度系数变为$2k$;根据弹簧振子的周期表达式$T=2\pi\sqrt{\frac mk}$可知此时的周期$T_2=2\pi\sqrt{\frac{m/2}{2k}}=\frac{T_1}{2}$.\sokka{D}
-\end{solution}
-
-\begin{choice}{B}[单摆]
- 把单摆摆球从平衡位置向位移正方向拉开,使摆线与竖直方向成一微小角度$\theta$,然后由静止放手任其振动,从放手时开始计时.若用余弦函数表示其运动方程,则该单摆振动的初相为
- \begin{tasks}(4)
- \task $\theta$
- \task $0$
- \task $\frac\pi2$
- \task $-\pi$
- \end{tasks}
-\end{choice}
-
-\vskip-2ex
-\begin{paracol}{2}
-\begin{choice}{A}[平面简谐波的波函数]
- 一平面简谐波,波速$u=5\mathrm{m/s}$,$t=3\mathrm{s}$时波形曲线如图,则$x=0$处质点的振动方程可能为
-\begin{tasks}(2)
- \task $y=2\ee{-2}\cos\ab(\frac12\pi t-\frac12\pi)$
- \task $y=2\ee{-2}\cos\ab(\frac12\pi t+\frac12\pi)$
- \task $y=2\ee{-2}\cos(\pi t+\pi)$
- \task $y=2\ee{-2}\cos\ab(\pi t-\frac32\pi)$
-\end{tasks}
-\end{choice}
-\switchcolumn\centering
-\vfill
-\begin{tikzpicture}
- \draw [->,thick] (-1.2,0) -- (4.8,0) node [anchor=south] {$x(\mathrm{m})$};
- \draw [->,thick] (0,-1.8) -- (0,1.8) node [anchor=west] {$y(\mathrm{m})$};
- \draw [very thick] (-.8,0) sin (0,-1) node [anchor=north west] {$-2\ee{-2}$} cos (.8,0) sin (1.6,1) cos (2.4,0) sin (3.2,-1) cos (4,0) sin (4.8,1);
- \draw [thick,->] (1.6,1.2) -- (2.4,1.2) node [midway,anchor=south] {$u$};
- \foreach \a in {5,10,...,25}
- \node [anchor=north,xshift=0.16*\a cm] at (0,0) {\a};
-\end{tikzpicture}
-\vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}*
- 由图可知$A=0.02\mathrm{m},\ \omega=\frac{2\pi u}{\lambda}=\frac12\pi$.由于原点处$v>0$,所以初相$\varphi=-\frac\pi2$.\sokka{A}
-\end{solution}
-
-\begin{choice}{A}[增透膜]
- 一艘油船行经我国台湾岛东部海域时发生石油泄漏,在海面上形成大片油膜,太阳光在头顶正射时,救授人员乘直升飞机从上往下看,发现油膜对$552\mathrm{nm}$波长的可见光反射形成干涉相长而最亮,则可以推测该区域油膜厚度可能为多少?(设石油折射率$n=1.2$,海水折射率$n=1.3$)
-\begin{tasks}(4)
- \task $460\mathrm{nm}$
- \task $552\mathrm{nm}$
- \task $345\mathrm{nm}$
- \task $425\mathrm{nm}$
-\end{tasks}
-\end{choice}
-\begin{solution}
- \begin{itemize}
- \item 由于$n_{\text{空}}>n_{\text{海}}>n_{\text{油}}$,所以石油两个表面反射光光程差为$\delta=2ne$.
- \item 使反射光干涉相长,即$2ne=k\lambda$. A选项刚好满足$k=2$时,$e_{\min}=2\cdot\frac{\lambda}{2n}=460\mathrm{nm}$.
- \end{itemize}
-\end{solution}
-
-\begin{choice}{C}[光程和光程差]
- 在相同的时间内,一束波长为$\lambda$的单色光在空气中和在玻璃中
- \begin{tasks}(2)
- \task 传播的路程相等,走过的光程相等
- \task 传播的路程相等,走过的光程不相等
- \task 传播的路程不相等,走过的光程相等
- \task 传播的路程不相等,走过的光程不相等
- \end{tasks}
-\end{choice}
-\begin{solution}*
- 光程的定义:在相同时间内光线在真空中传播的距离.题目中光传播时间相同,故光程相等;又因为光在两种介质中的传播速度不同,所以在相同的时间内传播的路程不相等.\sokka{C}
-\end{solution}
-
-\begin{choice}{C}[多普勒效应]
- 一观察者站在铁路旁,一火车以$30\mathrm{m/s}$的速度向他驶来并发出频率为$440\mathrm{Hz}$的汽笛声. 已知空气中声速为$330\mathrm{m/s}$,问观察者听到的火车频率为
-\begin{tasks}(4)
- \task $403\mathrm{Hz}$
- \task $480\mathrm{Hz}$
- \task $484\mathrm{Hz}$
- \task $528\mathrm{Hz}$
-\end{tasks}
-\end{choice}
-\begin{solution}
- 已知多普勒效应观察者(Observer)和发射源(Source)的的频率关系为
- \[\nu=\frac{u\pm v_o}{u\mp v_s}\nu_0\]
-
- $v_o$为观察者速度,接近为$+$,远离为$-$;$v_s$为发射源速度,接近为$-$,远离为$+$.观察者静止,其所听频率为
- \[\nu=\frac{330}{330-30}\times 440\mathrm{Hz}=484\mathrm{Hz}\]
-
- \sokka{C}
-\end{solution}
-
-\vskip-2ex
-\begin{paracol}{2}
-\begin{choice}{C}[弗琅禾费衍射]
- 在如图所示的单缝弗琅禾费衍射实验中,若将单缝沿透镜光轴方向向透镜平移,则屏幕上的衍射条纹
-\begin{tasks}(5)
- \task 间距变大\!
- \task 间距变小\!
- \task 不变化
- \task* 间距不变,明暗纹交替
-\end{tasks}
-\end{choice}
-\switchcolumn\centering
-\vfill
-\begin{tikzpicture}
- \filldraw [fill=gray] (0,1.5) rectangle (0.2,0.5);
- \filldraw [fill=gray] (0,-1.5) rectangle (0.2,-0.5);
- \draw [thick,densely dashed] (-1.2,0)--(3,0);
- \draw [thick] (3,1.5)--(3,-1.5);
- \filldraw [fill=white] (1.5,0) ellipse (0.1 and 1.2);
- \foreach \y in {0.5,-0.5}
- \draw [thick,->,yshift=\y cm] (-1,0)--(0,0);
- \length{(1.5,-1.4)}{(3,-1.4)}{$f$}{(0.25,0)}
- \node [anchor=south] at (-1.2,0.5) {$\lambda$};
- \node [anchor=south] at (1.5,1.2) {$L$};
- \node [anchor=west] at (3,1.5) {Screen};
-\end{tikzpicture}
-\vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}*
- 条纹间距只与波长、焦距、缝宽有关,入射光方向不变,所以条纹间距、位置不变. \sokka{C}
-\end{solution}
-
-\begin{choice}{A}[牛顿环]
- 牛顿环干涉装置上平凸透镜在垂直于平板玻璃的方向上,逐渐向下平移(靠近玻璃板)时,反射光形成的干涉条纹的变化情况是
- \begin{tasks}(2)
- \task 环纹向边缘扩散,环数不变
- \task 环纹向边缘扩散,环数增加
- \task 环纹向中心靠拢,环数不变
- \task 环纹向中心靠拢,环数增加
- \end{tasks}
-\end{choice}
-\begin{solution}*
- 对于某条环,其光程差是确定的,所以环数不变;向边缘扩散光程差增大,可抵消透镜下移时导致的光程差减小.\sokka{A}
-\end{solution}
-
-\begin{choice}{B}[最大分辨力]
- 假设用FAST装置探测波长为$20\mathrm{cm}$的宇宙射电信号,FAST望远镜的镜面直径为$500\mathrm{m}$,则装置的最小分辨角为
-\begin{tasks}(4)
- \task $9.76\ee{-4}$
- \task $4.88\ee{-4}$
- \task $2.44\ee{-4}$
- \task $4.00\ee{-4}$
-\end{tasks}
-\end{choice}
-\begin{solution}*
- $\theta=\frac{1.22\lambda}{D}=4.88\ee{-4}\mathrm{rad}$.\sokka{B}
-\end{solution}
-
-\vskip-2ex
-\begin{paracol}{2}
- \begin{choice}{B}[双缝干涉]
- 在双缝干涉实验中,屏幕$E$上的$P$点是明纹.若将缝$S_2$盖住,并在$S_1S_2$连线的垂直平分面处放一高折射率反射面$M$,如图所示.则此时$P$点
- \begin{tasks}(2)
- \task $P$点仍为明条纹
- \task $P$点为暗条纹
- \task 不能确定$P$点是明纹还是暗纹
- \task 无干涉条纹
- \end{tasks}
- \end{choice}
- \switchcolumn\centering
- \vfill
- \begin{tikzpicture}[decoration={markings,mark=between positions .2 and .8 step 18mm with {\arrow{stealth}}}]
- \draw [very thick] (0,1.5)--(0,-1.5);
- \draw [thick,postaction=decorate] (-1,0)--(0,0.5)--(2,0.8);
- \draw [thick] (0,0.5)--(0.8,0);
- \draw [thick,postaction=decorate] (-1,0)--(0,-0.5)--(2,0.8);
- \draw [very thick] (0,0)--(1.8,0);
- \draw [very thick] (2,1.8)--(2,-1.8);
- \fill [pattern=north west lines] (0,0) rectangle (1.8,-0.2);
- \fill [pattern=north east lines] (2,1.8) rectangle (2.2,-1.8);
- \node [anchor=east] at (-1,0) {$S$} node [anchor=south east] at (0,0.5) {$S_1$} node [anchor=north east] at (0,-0.5) {$S_2$};
- \node [anchor=north] at (0.8,-0.2) {$M$} node [anchor=west] at (2.2,0.8) {$P$} node [anchor=north] at (2.1,-1.8) {$E$};
- \node at (-1,0) {$\times$};
- \end{tikzpicture}
- \vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}*
- $S_1MP$、$S_2MP$长度相等,但平面镜使在反射中一条光路发生半波损失,两条光路的相位差变化$\pi$,所以$P$点由原来的明纹变为暗纹.\sokka{B}
-\end{solution}
-
-\begin{choice}{A}[迈克尔逊干涉仪]
- 如果使迈克尔逊干涉仪的动镜移动$0.233\mathrm{mm}$,观察到$792$个条纹的移动,则所用照明单色光源的波长是多少?
-\begin{tasks}(4)
- \task $588\mathrm{nm}$
- \task $294\mathrm{nm}$
- \task $442\mathrm{nm}$
- \task $552\mathrm{nm}$
-\end{tasks}
-\end{choice}
-\begin{solution}*
- 移动带来的光程差满足$\delta=2d=N\lambda$,由此得$\lambda=\frac{2d}{N}=588.38\mathrm{mm}$.\sokka{A}
-\end{solution}
-
-\begin{choice}{B}[光栅]
- 某元素的特征光谱中含有波长分别为$\lambda_1=450\mathrm{nm},\ \lambda_2=750\mathrm{nm}$的谱线,在光栅光谱中这两种波长的谱线有重合现象,重叠处$\lambda_2$的谱线级数将是
-\begin{tasks}(4)
- \task $2,\ 4,\ 6,\ 8,\cdots$
- \task $3,\ 6,\ 9,\ 12,\cdots$
- \task $4,\ 8,\ 12,\ 16,\cdots$
- \task $5,\ 10,\ 15,\ 20,\cdots$
-\end{tasks}
-\end{choice}
-\begin{solution}*
- 由光栅方程$d\sin\theta=k_1\lambda_1=k_2\lambda_2$得$k_2=\frac{k_1\lambda_1}{\lambda_2}$,取整值得$k_2=3,6,9,12,\cdots$.
-\end{solution}
-
-\section{填空题(共18分)}
-\begin{problem}[弹簧振子][3]
- 当弹簧振子以频率$f$做简谐振动时,它的动能的变化频率为\ans{$2f$}.
-\end{problem}
-\begin{solution}*
- 动能和势能变化趋势相反,所以二者变化频率相同. 势能$E_p\propto x^2$,由于$x$是周期为$T$的余弦函数,所以$x^2$的周期为$\frac T2$,即势能的变化频率等于动能的变化频率等于$2f$.
-\end{solution}
-
-\begin{problem}[驻波][3]
- 在均匀介质中,一列余弦波沿$Ox$轴传播,波动方程为$y_1=A\cos\ab(2\pi t+\frac{2\pi x}3)$ (SI),在$x=1\mathrm{m}$处反射,反射点为固定端,则反射波和入射波产生的驻波表达式为\ans{$2A\cos{\ab(2\pi t+\frac{7\pi}6)}\cos{\ab(\frac{2\pi x}{3}-\frac{7\pi}{6})}$}.
-\end{problem}
-\begin{solution}
-\begin{itemize}
- \item 考虑反射带来的半波损失,$x=1\mathrm{m}$处反射波的振动方程为$y_{10}=A\cos\ab(2\pi t+\frac{2\pi}{3}+\pi)$.
- \item 反射后传播方向改变,考虑以$x=1$处为参考点需坐标变换$x'=x-1$,所以反射波的表达式为
- \[y_2=A\cos\ab(2\pi t+\frac{2\pi}{3}-\frac{2\pi(x-1)}3+\pi)=A\cos\ab(2\pi t-\frac{2\pi x}{3}+\frac{7\pi}3)\]
- \item 驻波表达式$y=y_1+y_2=2A\cos{\ab(2\pi t+\frac{7\pi}6)}\cos{\ab(\frac{2\pi x}{3}-\frac{7\pi}{6})}$.
-\end{itemize}
-\end{solution}
-
-\begin{problem}[双缝干涉][6]
- 如图所示,在双缝干涉实验中,若把一厚度为$e$、折射率为$n$的薄云母片覆盖在$S_1$缝上,中央明条纹将向\ans{上}移动;覆盖云母片后,两束相干光至原中央明纹$O$处的光程差为\ans{$(n-1)e$}.
-\end{problem}
-\begin{solution}*
- 覆盖云母片后,通过$S_1$的光路光程差变大,为抵消这一变化中央明纹需上移使通过$S_2$的光路变长;原光程差为零,现光程差即云母片带来的光程差$\delta=ne-e=(n-1)e$.
-\end{solution}
-
-\begin{problem}[牛顿环][3]
- 若把牛顿环装置(都是用折射率为$1.52$的玻璃制成的)由空气搬入折射率为$1.33$的水中,则干涉条纹\ans{变密}(变疏/变密).
-\end{problem}
-\begin{solution}*
- 放入水中后每条条纹的光程差变大,为抵消这一变化条纹需向中心收缩,所以干涉条纹变密.
-\end{solution}
-
-\begin{problem}[弗琅禾费衍射][3]
- 在单缝夫琅禾费衍射实验中,波长为$\lambda$的单色光垂直入射在宽度为$a=6\lambda$的单缝上,对应于衍射角为$30^\circ$的方向,单缝处波阵面可分成的半波带数目为\ans{6}.
-\end{problem}
-\begin{solution}*
- 由衍射公式$a\sin{\theta}=k\lambda$得$k=3$,可分成的半波带数目为$2k=6$.
-\end{solution}
-
-\section{计算题(共46分)}
-\begin{paracol}{2}
-\begin{problem}[平面简谐波的波函数][10]
- 一列平面简谐波在媒质中以波速$u=5\mathrm{m/s}$沿$x$轴正向传播,原点$O$处质元的振动曲线如图所示.
-\begin{enumerate}
- \item 求解$x=25\mathrm{m}$处质元的振动方程并画出该点振动曲线.
- \item 求解波动方程,并画出$t=3\mathrm{s}$时的波形曲线.
-\end{enumerate}
-\end{problem}
-\switchcolumn\centering
- \vfill
- \begin{tikzpicture}
- \draw [->,thick] (-0.5,0)--(4,0) node [anchor=south] {$t(\mathrm{s})$} node [anchor=north] {\textcolor{H6}{$x(\mathrm{cm})$}};
- \draw [->,thick] (0,-1.5)--(0,1.5) node [anchor=west] {$y(\mathrm{cm})$};
- \draw[thick,H1] (0,0) sin (0.6,1) cos (1.2,0) sin (1.8,-1) cos (2.4,0) sin (3.0,1) cos (3.6,0);
- \draw [densely dashed] (0,1)--(.6,1) node [anchor=east,at start] {$2$};
- \node [anchor=north east] at (0,0) {$O$} node [anchor=south west] at (1.2,0) {$2$} node [anchor=south east] at (2.4,0) {$4$};
- \draw [very thick,H2,dotted,line cap=round] (0,-1) cos (0.6,0) sin (1.2,1) cos (1.8,0) sin (2.4,-1) cos (3,0) sin (3.6,1);
- \draw [very thick,H6,densely dashed,line cap=round] (-.8,0) sin (0,-1) cos (.8,0) sin (1.6,1) cos (2.4,0) sin (3.2,-1) cos (4,0);
- \node [anchor=north] at (.8,0) {\textcolor{H6}{5}} node [anchor=north] at (2.4,0) {\textcolor{H6}{15}};
- \end{tikzpicture}
- \vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}
- \begin{enumerate}
- \item 由图知振幅$A=0.02\mathrm{m}$,角频率$\omega=\frac{2\pi}{T}=0.5\pi\mathrm{s}$. $t=0$时,$y=0,\ v>0$,初相$\varphi=-\frac\pi2$. 波动方程为\point{2}
- \[y=0.02\cos{\ab[\frac\pi2\ab(t-\frac{x}{5})-\frac\pi2]}\eqno\point{2}\]
- $x=25\mathrm{m}$处质元的振动方程为$y(x_0,t)=0.02\cos\ab(\frac\pi2t-\pi)$.\point{2}
- \item 波动方程见上问. $t=3\mathrm{s}$时的波形方程为
- \[y(x,t_0)=0.02\cos\ab(-\frac{\pi}{10}x+\pi)\eqno\point{2}\]
- \end{enumerate}
-\end{solution}
-
-\vskip-2ex
-\begin{paracol}{2}
-\begin{problem}[光程和光程差][8]\footnote{\kaishu 选自37th CPhO预赛试题第10题,原题未并提供参考图片.}
- 一艘船(如图中$S$)在$25\mathrm{m}$高的桅杆($SS'$)上装有一天线(如图中$S''$),不断发射某种波长的无线电波,已知波长在$2-4\mathrm{m}$范围内,在高出海平面$150\mathrm{m}$的悬崖顶($OP$)上有一接收站$P$能收到这无线电波,但当那艘船驶至离悬崖底部$OS=2\mathrm{km}$时,接收站就收不到无线电波.设海平面完全反射这无线电波,求所用无线电波的波长.
-\end{problem}
-\switchcolumn\centering
-\vfill
-\begin{tikzpicture}[scale=0.8]
- \coordinate [label=below left:{$S$}] (S) at (0,0);
- \coordinate [label=above left:{$S'$}] (S') at (0,1);
- \coordinate [label=below left:{$S''$}] (S'') at (0,-1);
- \coordinate [label=below:{$M$}] (M) at (1.5,0);
- \coordinate [label=above:{$P$}] (P) at (6,3);
- \coordinate [label=below:{$O$}] (O) at (6,0);
- \draw [thick,line join=round,line cap=round] (P) -- (O) -- (S) -- (S');
- \draw [thick,dashed,line join=round] (P) -- (S) -- (S'') -- (M);
- \draw [very thick,line cap=round,densely dashed,H1] (S') -- (P);
- \draw [very thick,line cap=round,dotted,H1] (S') -- (M) -- (P);
- \length{(-.25,0)}{(-.25,1)}{$a$}{(0,0.25)}
- \pic ["$\theta$", draw, thick, angle radius=5mm, angle eccentricity=1.5] {angle=O--S--P};
- \pic ["$\theta'$", draw, thick, angle radius=5mm, angle eccentricity=1.5] {angle=O--M--P};
- \pic ["$\Delta\theta$", draw, thick, angle radius=10mm, angle eccentricity=1.5] {angle=S--P--M};
- \draw [thick] (S') -- (0.75,-0.5) coordinate [label=below:$K$] (foot);
- \pic ["$\theta$", draw, thick, angle radius=3mm, angle eccentricity=2] {angle=S''--S'--foot};
- \length{($(S'')+({0.5*sin(atan(2/3))},{-0.5*cos(atan(2/3))})$)}{($(foot)+({0.5*sin(atan(2/3))},{-0.5*cos(atan(2/3))})$)}{$\scriptstyle 2a\sin\theta$}{({0.5*cos(atan(2/3))},{0.5*sin(atan(2/3))})}
- \length{($(S)-(0,2)$)}{($(O)-(0,2)$)}{$2\mathrm{km}$}{(1.5,0)}
- \length{($(O)+(0.5,0)$)}{($(P)+(0.5,0)$)}{$150\mathrm{m}$}{(0,0.5)}
- \draw [dashed,H4] (S') --++ (6,0) -- (P);
- \draw [dashed,H6] (S'') --++ (6,0) -- (P);
-\end{tikzpicture}
-\vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}
- 考虑半波损失,经海平面反射的光波与直达$P$点的光波之间的光程差为
- \[\delta=2a\sin\theta+\frac\lambda2\eqno\point{3}\]
- 由几何关系$\sin\theta=\sin\arctan\ab(\frac{150}{2000})=0.075$. 利用干涉相消条件得无线电波长为\point{2}
- \[\delta=\frac{2k+1}{2}\lambda,\ \lambda=\frac{2a\sin\theta}{k}\xlongequal[2<\lambda<4]{k=1}3.74\mathrm{m}\eqno\point{3}\]
- \textbf{本题中$\Delta\theta$不可忽略,不得认为$\theta=\angle PMO$! 否则会得到$k=2.18$.}
- \vskip1ex\hrule\vskip1ex
- 另一种更精确的解法是直接计算两条光路的长度之差\footnote{值得一提的是,因上一种解法近似认为$S'K\bot S''K$,相对于这种解法有$7.73\ee{-3}\%$的误差(小数点第四位及以后不同).}
- \[\begin{aligned}
- \delta&=\overline{S''P}-\overline{S'P}+\frac\lambda2=\sqrt{\ab(\overline{SO})^2+\ab(\overline{OP}+\overline{SS''})^2}-\sqrt{\ab(\overline{SO})^2+\ab(\overline{OP}-\overline{SS''})^2}+\frac\lambda2\\
- &=\sqrt{2000^2+(150+25)^2}-\sqrt{2000^2+(150-25)^2}+\frac\lambda2=\frac{2k+1}{2}\lambda
- \end{aligned}\]
-
- 解得$\lambda\xlongequal{k=1}3.74\mathrm{m}$.
-\end{solution}
-
-\begin{problem}[薄膜干涉][10]
-波长为$\lambda=500\mathrm{nm}$的单色光垂直入射到\textbf{置于空气中}的上下表面平行的薄膜上,已知膜的折射率$n=1.25$,求反射光、透射光最强时膜的最小厚度.
-\end{problem}
-\begin{solution}*
- 两个表面反射光光程差为$\delta=2ne+\frac\lambda2$. 分别由反射光干涉相长$\delta=k\lambda$和相消$\delta=\frac{2k+1}{2}\lambda$得\point{4}
- \[e_{\min_1}=\frac{\lambda}{4n}=100\mathrm{nm},\ e_{\min_2}=\frac{\lambda}{2n}=200\mathrm{nm}\eqno\point{4}\]
-\begin{itemize}
- \item 反射光干涉相长时,反射光最强,膜的最小厚度为$e_{\min_1}=100\mathrm{nm}$.\point{1}
- \item 反射光干涉相消时,透射光最强,膜的最小厚度为$e_{\min_2}=200\mathrm{nm}$.\point{1}
-\end{itemize}
-\end{solution}
-
-\vskip-2ex
-\begin{paracol}{2}
-\begin{problem}[光栅][12]
- 如右图所示,$AB$之间的虚线为一透射式光栅,该光栅在$1\mathrm{mm}$内刻画有$500$条狭缝,单条狭缝的缝宽为$a=0.5\mu\mathrm{m}$,一波长为$\lambda=500\mathrm{nm}$的单色平行光斜入射在该光栅上,入射角$\theta=30^\circ$(从光栅光轴下方入射),在光栅后放置凸透镜和观察屏(屏位于透镜的焦平面处),问屏上能看到哪几级谱线?
-\end{problem}
-\switchcolumn\centering
-\vfill
-\begin{tikzpicture}[decoration={markings,mark=between positions .25 and .8 step 20mm with {\arrow{stealth}}}]
- \filldraw [thick,fill=gray] (0,1.6) rectangle (0.15,0.5);
- \draw [densely dashed,thick] (0,0.5)--(0,-0.5);
- \filldraw [thick,fill=gray] (0,-1.6) rectangle (0.15,-0.5);
- \draw [densely dashed,thick] (-1.5,0)--(2,0);
- \coordinate (b) at (-1.5,0);
- \coordinate (a) at (0,0);
- \coordinate (c) at (-1,-0.4);
- \coordinate (d) at (1.5,0.2);
- \coordinate (e) at (2,0);
- \foreach \a in {-0.5,-0.25,0,0.25,0.5}
- \draw [yshift=\a cm,thick,postaction=decorate,->] (-1,-0.4)--(0,0)--(1.5,0.2);
- \pic["$\theta$", draw=black, very thick, angle
- eccentricity=1.35, angle radius=24]{angle=b--a--c};
- \pic["$\varphi$", draw=black, very thick, angle
- eccentricity=1.35, angle radius=36]{angle=e--a--d};
- \node[anchor=east] at (0,0.6) {$A$} node[anchor=east] at (0,-0.6) {$B$};
-\end{tikzpicture}
-\vfill
-\end{paracol}
-\vspace{-.75em}
-\begin{solution}*
- 光栅常数$d=\frac{1\ee{-3}}{500}=2\mu\mathrm{m}$. 由于光栅方程\point{2}
- \[d(\sin\varphi-\sin\theta)=k\lambda\eqno\point{2}\]
-\begin{itemize}
- \item 令$\varphi=\pm 90^\circ$得$k_{\min}=-6,\ k_{\max}=2$. 由缺级条件得$k'=\frac{d}{a}=\pm 4$,第$-4$级缺级.\point{4}
- \item 由于$\varphi$无法取到$\pm 90^\circ$,所以屏上可见主极大级次为$k=0,\ \pm 1,\ -2,\ -3,\ -5$.\point{4}
-\end{itemize}
-\end{solution}
-
-\begin{problem}[驻波][6]
- 由振动频率为$400\mathrm{Hz}$的音叉在两端固定拉紧的弦线上建立驻波.这个驻波共有三个波腹,其振幅为$0.30\mathrm{cm}$,波在弦上的速度为$320\mathrm{m/s}$.
-\begin{enumerate}
- \item 求此弦线的长度.
- \item 若以弦的中点为坐标原点,试写出弦线上驻波的表达式.
-\end{enumerate}
-\end{problem}
-\begin{solution}
-\begin{enumerate}
- \item 由题意得弦长为$1.5$个波长,即$l=1.5\lambda=1.5\frac{u}{f}=1.2\mathrm{m}$.\point{2}
- \item 驻波的角频率$\omega=2\pi f=800\pi$,波矢$k=\frac{2\pi}{\lambda}=\frac{5}{2}\pi$. 设驻波的表达式为
- \[y=3\ee{-3}\cos\ab(800\pi t+\phi)\cos\ab(\frac52\pi x+\varphi)\eqno\point{2}\]
- 中点$x=0$处是波腹,所以$\cos\varphi=1,\ \varphi=0\ \text{or}\ \pi$. 所以驻波的表达式为
- \[y=\pm 3\ee{-3}\cos\ab(800\pi t+\phi)\cos\ab(\frac52\pi x)\eqno\point{2}\]
- 符号$\pm$对应$\varphi$的两个解,$\phi$由初始条件决定.
-\end{enumerate}
-\end{solution} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/litesolution-doc.tex b/macros/latex/contrib/litesolution/doc/litesolution-doc.tex
index c358895d8e..41e608614c 100644
--- a/macros/latex/contrib/litesolution/doc/litesolution-doc.tex
+++ b/macros/latex/contrib/litesolution/doc/litesolution-doc.tex
@@ -2,10 +2,13 @@
\fancyhead[L]{\,\color{H7}\href{https://github.com/xiamyphys/litesolution}{\faIcon{github}\;\leftmark}}
\fancyhead[R]{\color{H7}\rightmark\,}
-\centerline{Xia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
+\centerline{Hsia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}}
\yyyymmdddate
-\centerline{\mailto{xiamyphys@gmail.com}}
-\centerline{\today,\quad Version 1.2a}
+\begin{center}
+ \mailto{xiamyphys@gmail.com}
+
+ \today,\quad Version 1.3a
+\end{center}
This is the document for \pkg{LiteSolution} template, which provides a lite design of the solution of test paper.
@@ -81,7 +84,8 @@ This command can add watermark to the document.
\subsection{Other customer commands}
In order to facilitate input, the following commands are scheduled. You can add others in the \verb|*.cls| file as you like.
\vskip1em
-\begin{center}
+\begin{table}[!ht]
+ \centering
\begin{tabular}{l|l|l|l|l|l}
\toprule
Command & Output & Command & Output & Command & Output\\
@@ -90,12 +94,12 @@ In order to facilitate input, the following commands are scheduled. You can add
\hline
\verb|\sokka{#1}| & 故本题选择\#1项 & \verb|\d| & $\mathrm{d}$ & \verb|\e| & $\mathrm{e}$\\
\hline
- \verb|\xSim[#1]{#2}| & $\xSim[r_1\times2]{r_2+r_1}$ & \verb|\ee{#1}| & $\ee{-34}$ & \verb|\mat{#1}^\T| & $\mat{A}^\T$\\
+ \verb|\xSim[#1]{#2}| & $\xSim[r_1\times2]{r_2+r_1}$ & \verb|\num{e#1}| & $\num{e-34}$ & \verb|\mat{#1}^\T| & $\mat{A}^\T$\\
\hline
\verb|\rank{#1}| & $\rank{\mat{AB}}$ & \verb|\QED| & \QED & \verb|$5\unit{kg}$| & $5\unit{kg}$\\
\bottomrule
- \end{tabular}
-\end{center}
+ \end{tabular}
+\end{table}
\section{Environments of \pkg{LiteSolution}}
\subsection{The \cmd{choice} environment}
@@ -161,7 +165,7 @@ Sightly different from the cmd{choice} environment: the two variables are points
\begin{problem}[Keywords]
If you want to add keywords only.
\end{problem}
- \begin{problem}*[][5]
+ \begin{problem} [5]
If you want to add points only.
\end{problem}
\end{tcblisting}
@@ -224,7 +228,6 @@ If a star (*) is added after the \verb|\begin{solution}|, then the content will
This is the answer for the problem.
\end{solution}
\end{tcblisting}
-
If a star (*) is added after the \verb|\begin{solution}|, then the content will follow the
\begin{tcblisting}{sidebyside}
\begin{solution}*
@@ -235,20 +238,13 @@ If a star (*) is added after the \verb|\begin{solution}|, then the content will
If mode \mode{noans} is enabled, the solution will disappear, leaving only a blank box with the same height as the solution, and the name of the box will change to \emph{\textcolor{1号色}{\textbf{\faIcon{pen-square} 答题区域}}}.
\section{Known Issues}
-\TeX Live will return errors when you enable the mode \mode{noans} and use the \cmd{solution} environment in \cmd{paracol} environment.
-
-\section{Version History}
-This template is used to type the mid-term and final exam solutions of \emph{College Physics}. Initially, I used the \href{https://www.ctan.org/pkg/elegantbook}{ElegantBook} template for layout, however, it's no longer be maintained since January 1st, 2023, so I turn to use the \href{https://github.com/Azure1210/VividBooK}{\pkg*{VividBooK}} instead. But this template is too bloated and some functions \& designs need to be redesigned, so I started developing \pkg{LiteSolution}.
-
-\textsf{\bfseries Version 0.1a} was finished developing on 29 June, 2023 and released on \href{https://mp.weixin.qq.com/s/kd4StYk3XybhNQZkAfoY6A}{\faIcon{weixin} WeChat Public Account: 物理问题作} with the name \emph{FreshSolution}. This version redesigned the \cmd{exercise} environment and the \cmd{solution} environment in terms of designs and functions, and improvements have been made to the design of the chapterimage part.
+Sometimes \TeX Live will return errors when you enable the mode \mode{noans} and use the \cmd{solution} environment in \cmd{paracol} environment.
-\textsf{\bfseries Version 0.1b} was finished developing on 6 July, 2023 and released on \href{https://www.latexstudio.net/index/details/index/mid/3553.html}{LaTeX Studio} (Xiaoshan, Hangzhou) and \href{http://xhslink.com/YBuuuw}{Xiaohongshu}, where won the favor of many people. This version has added the global option to make the page number be remaked or continuous between chapters, and command \cmd{watermark} has been added in this version.
+\clearpage
-\textsf{\bfseries Version 1.0a} was finished developing on 15 November, 2023. This version has redesigned the \cmd{chapterimage} part, \cmd{choice} and replaced the \cmd{exercise} environment with the \cmd{problem} environment.
-
-\textsf{\bfseries Version 1.2a} was finished developing on \textcolor{H1}{13 November, 2023}. This version has integrated the chapter design of \href{https://www.ctan.org/pkg/elegantbook}{\pkg*{ElegantBook}} into the star (*) key value of this template \cmd{chapter}. And some commands friendly for matrices typesetting were added in. The command \cmd{chapterfont} was redesigned that it can call the font in the local path or call system font with(out) a star (*) after it. Also, the environment \cmd{proof} was redesigned, and the mode \mode{noans} in this version supports hide the solution box and replace it with a fixable solution box. Today (\textcolor{H1}{2023/12/13}) is \emph{The National public memorial day of Nanjing Massacre}. Hope for world peace.
+\section{Version History}
+This template is used to type the mid-term and final exam solutions of \emph{College Physics}. Initially, I used the \pkg*{ElegantBook} template for layout, however, it's no longer be maintained since January 1st, 2023, so I turn to use the \href{https://github.com/Azure1210/VividBooK}{\pkg*{VividBooK}} instead. But this template is too bloated and some functions \& designs need to be redesigned, so I started developing \pkg{LiteSolution}.
-\newpage
\subsection*{Update Announcements}
\datechange{2023/07/06}{Version 0.1b}
\begin{itemize}
@@ -264,17 +260,22 @@ This template is used to type the mid-term and final exam solutions of \emph{Col
\item Added the \cmd{note} environment and some customer commands.
\end{itemize}
-\datechange{\today}{Version 1.2a}
+\datechange{2023/12/13}{Version 1.2a}
\begin{itemize}
\item Fixed the bug that the gap around the chapter image.
\item Added some commands for matrices.
\item Redesigned the \cmd{chapterfont} command.
\item Redesigned the \cmd{proof} environment.
\item Supports to adjust the height of solution box when output the exam paper without answer.
- \item Add the \emph{排版规范} in \emph{中文(简体)} after the package document.
\item Fixed the bug that warnings of the packages \pkg{xeCJK} and \pkg{fontspec}.
\end{itemize}
+\datechange{\today}{Version 1.3a}
+\begin{itemize}
+ \item Added the mode \mode{tcolorbox}, which you can choose whether the tcolorbox breakable or not.
+ \item This version separate the chapterimage part to a single \verb|titleimage.sty| file, which will be posted on \nolinkurl{ctan.org} soon to make this template more maintainable.
+\end{itemize}
+
\subsection*{Future Plans}
\begin{itemize}
\item Plan to add the \mode{dark} mode to this template to make the text color light while make the page color dark to protect eyesight.
diff --git a/macros/latex/contrib/litesolution/doc/litesolution-gauge.tex b/macros/latex/contrib/litesolution/doc/litesolution-gauge.tex
deleted file mode 100644
index dc99ae2b17..0000000000
--- a/macros/latex/contrib/litesolution/doc/litesolution-gauge.tex
+++ /dev/null
@@ -1,65 +0,0 @@
-\chapter*{\pkg{LiteSolution}~试卷解析模板排版规范}% standard
-\fancyhead[L]{\,\color{1号色}\kaishu\href{http://weixin.qq.com/r/hR1SSofEIdpercMp90iX}{物理問題作}}
-\fancyhead[R]{\color{1号色}\ttfamily\mailto{xiamyphys@gmail.com}\,}
-
-
-\centerline{夏明宇, \href{https://www.hdu.edu.cn}{杭州电子科技大学}}
-\yyyymmdddate
-\centerline{\mailto{xiamyphys@gmail.com}}
-
-\section{模板介绍}
-本模板用于高校期中 \& 期末试卷排版,支持一键输出无答案试卷.
-
-\section{数学公式}
-\subsection{正体问题}
-\begin{enumerate}
- \item 微分算符要使用正体:\verb|\d|.
- \item 自然对数要使用正体:\verb|\e|.
- \item 三角函数、exp正体:\verb|\function|
- \item 撇\verb|'|和\verb|^\prime|的作用相同:\href{https://tex.stackexchange.com/a/538413/299948}{TeX Stackexchange}.
-\end{enumerate}
-
-\subsection{行内 \& 行间公式}
-\begin{enumerate}
- \item 行内公式:要\verb|$ ... $|不要\verb|\( ... \)|
- \item 行间公式:要\verb|\[ ... \]|不要\verb|$$ ... $$|
-\end{enumerate}
-至于为何,“不要”的命令在\LaTeX 中属于「脆弱」命令,这里不做详解.
-
-\href{https://www.zhihu.com/question/27589739}{\LaTeX 中的「要」和「不要」 - 知乎}
-
-\subsection{选填题}
-\begin{enumerate}
- \item 使用tasks环境判断高度
- \begin{verbatim}
- \begin{tasks}(一行选项个数,自己掂量)
- \task 选项1 \task 选项2
- \task 选项3 \task 选项4
- \end{tasks}
- \end{verbatim}
-
- 不要使用\verb|tabular|制作选择题选项,选项不是画表格!
- \item 答案不要擅自使用\verb|\underline{}|命令,而是使用\verb|\ans{}|命令,否则制作空白无答案版时答案将无法隐藏.
-\end{enumerate}
-
-\subsection{等高括号}
-\begin{enumerate}
- \item 凡是你觉得很高的都需做等高括号处理:\verb|\ab( ), \ab[ ], \ab\{ \}|
- \item 但也不要所有括号都做等高处理,比如\verb|f\ab(x)|和\verb|f(x)|的效果是一样的,多一个\verb|\ab|判断高度只会徒增编译时间.
-\end{enumerate}
-
-\section{偷懒技巧}
-以\verb|\frac{}{}|为例
-\begin{enumerate}
- \item \verb|\frac12 == \frac{1}{2}, \frac\pi2 == \frac{\pi}{2}, \frac yx == \frac{y}{x}|
- \item \verb|frac{}{}|后跟两个键值,如果未使用\verb|{}|界定作用域,则默认scan到第1个char或宏(如\verb|\alpha|)时将其放入第一个键值,scan到第2个char或宏(如\verb|\alpha|)时将其放入第2个键值.
- \item 不会用的话别乱用,老实儿使用\verb|{}|界定作用域,不要出现诸如\verb|\frac x'2|: $\frac x'2$(事实你要写的是$\frac{x'}{2}$).
-\end{enumerate}
-
-\section{排版美观}
-\begin{enumerate}
- \item 尽量不要(甚至杜绝)题目在上一页,答案在下一页的情况(\emph{\textbf{六级完形文章和题目不在一页的痛你应该经历过}}).
- \item 杜绝出现题目/解答盒子断开跨页的情况,这很不美观. 如果一个题目解析实在过长,请尝试缩句,或者使用分栏\verb|multicols|环境以节省空间.
- \item 如果因第$n+1$页开头的题目盒子高度小于第$n$页末尾剩余了空间而导致了空间浪费,请试着将后文中高度与第$n$页最后一道题目+剩余空间相当的题目位置与其交换.
- \item 最完美的排版:除非遇到下一个\verb|section|,每一页从头到尾都恰好填满了题目与解析.
-\end{enumerate} \ No newline at end of file
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.pdf b/macros/latex/contrib/litesolution/doc/litesolution.pdf
index bf3764ef56..3391d993f5 100644
--- a/macros/latex/contrib/litesolution/doc/litesolution.pdf
+++ b/macros/latex/contrib/litesolution/doc/litesolution.pdf
Binary files differ
diff --git a/macros/latex/contrib/litesolution/doc/litesolution.tex b/macros/latex/contrib/litesolution/doc/litesolution.tex
index ba99681a2f..43f8d50f36 100644
--- a/macros/latex/contrib/litesolution/doc/litesolution.tex
+++ b/macros/latex/contrib/litesolution/doc/litesolution.tex
@@ -1,11 +1,13 @@
-\documentclass[ans,continuous]{litesolution}
+\documentclass[ans,continuous,nobreak]{litesolution}
+
+\usepackage{lipsum}
\begin{document}
\chapterimage{cover1.png}
\input{litesolution-doc.tex}
-\input{litesolution-demo.tex}
-\chapterfont{PingFang HK}
-\input{litesolution-gauge.tex}
+% \input{litesolution-demo.tex}
+% \chapterfont{PingFang HK}
+% \input{litesolution-gauge.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 232fc496a8..66a333f04e 100644
--- a/macros/latex/contrib/litesolution/tex/litesolution.cls
+++ b/macros/latex/contrib/litesolution/tex/litesolution.cls
@@ -7,7 +7,7 @@
%% * version. * * * ** * * * * *
%% ****************************************************** ***** ** * * *** * * *
%% start of file `litesolution.cls'. *
-%% Copyright 2023 LiteLaTeX (xiamyphys@gmail.com) *
+%% Copyright 2024 LiteLaTeX (xiamyphys@gmail.com) *
%% available at https://github.com/xiamyphys/LiteSolution *
%% Thanks https://github.com/ElegantLaTeX/ElegantBook, https://github.com/Azure1210/VividBooK *
%% !Mode:: "TeX:UTF-8" *
@@ -18,7 +18,7 @@
\PassOptionsToPackage{quiet}{fontspec}
\PassOptionsToPackage{no-math}{fontspec}
-\ProvidesClass{litesolution}[2023/12/13 v1.2a LiteSolution document class]
+\ProvidesClass{litesolution}[2024/03/08 v1.3a LiteSolution document class]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{family=LITE, prefix=LITE@, setkeys=\kvsetkeys}
@@ -28,7 +28,10 @@
\DeclareStringOption[ans]{answer}
\DeclareVoidOption{ans}{\ekv{answer=ans}}
\DeclareVoidOption{noans}{\ekv{answer=noans}}
-\DeclareVoidOption{preprint}{\ekv{answer=preprint}}
+
+\DeclareStringOption[breakable]{tcolorbox}
+\DeclareVoidOption{breakable}{\ekv{tcolorbox=breakable}}
+\DeclareVoidOption{nobreak}{\ekv{tcolorbox=nobreak}}
\DeclareStringOption[separate]{counter}
\DeclareVoidOption{separate}{\ekv{counter=separate}}
@@ -40,7 +43,7 @@
% ----- Default Options -----
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessKeyvalOptions*\relax
-\LoadClass[a4paper,oneside]{book}
+\LoadClass[letterpaper,oneside]{book}
\RequirePackage[letterpaper,margin=0.75in,headheight=0.25in,headsep=0.2in,footskip=0.2in]{geometry}
\usepackage[level]{datetime}
@@ -49,6 +52,8 @@
\usephysicsmodule{ab,ab.legacy,braket,nabla.legacy}
\RequirePackage{amsmath,amssymb}
\usepackage{nicematrix}
+\usepackage{diagbox}
+\usepackage{nicefrac}
\RequirePackage{bm}
\RequirePackage{esint}
\RequirePackage[e]{esvect}% 矢量箭头
@@ -59,7 +64,7 @@
\RequirePackage{tasks}% 选择题
\settasks{label=\Alph*.}
\RequirePackage{setspace}
-\setstretch{1.5}
+\setstretch{1.25}
\AtBeginDocument{
\everymath{\displaystyle}
\setlength{\abovedisplayskip}{3pt}
@@ -99,8 +104,7 @@
}
\gdef\@chapterfont{#2}
}
-\setmainfont{Libertinus Serif}
-\setsansfont{Libertinus Sans}
+\usepackage[libertine,mono=false]{newtx}
\setcounter{tocdepth}{1}
\AfterEndPreamble{
@@ -116,9 +120,9 @@
\definecolor{headrulecolor}{HTML}{640125}
\definecolor{1号色}{HTML}{4D5AAF} %
\definecolor{2号色}{HTML}{006E54} %
+\definecolor{solutioncolor}{HTML}{0F2350} %
\ifdefstring{\LITE@answer}{ans}{
- \definecolor{solutioncolor}{HTML}{0F2350} %
\def\solutionname{\faIcon{check-square} 分析与解}
\def\ans#1{\underline{\color{solutioncolor}\ #1\ }}
\def\choiceans#1{{\color{solutioncolor}\ #1\ }}
@@ -128,7 +132,6 @@
}{\relax}
\ifdefstring{\LITE@answer}{noans}{
- \definecolor{solutioncolor}{HTML}{FEFEFB} %
\def\solutionname{\faIcon{pen-square} 答题区域}
\def\ans#1{\underline{\phantom{\color{solutioncolor}#1}}}
\def\choiceans#1{\phantom{\color{solutioncolor}}}
@@ -146,6 +149,7 @@
\def\problemname{\faIcon{pen-square} 题目} % 题目=习题
\RequirePackage[most]{tcolorbox}
+\ifdefstring{\LITE@tcolorbox}{breakable}{
\tcbuselibrary{breakable}
\tcbset{
common/.style={
@@ -157,6 +161,22 @@
fonttitle=\bfseries
}
}
+}
+{\relax}
+\ifdefstring{\LITE@tcolorbox}{nobreak}{
+\tcbset{
+ common/.style={
+ blanker,
+ left=3mm,
+ toprule=.3em,
+ bottomrule=.3em,
+ bottomtitle=.75\baselineskip,
+ fonttitle=\bfseries
+ }
+}
+}
+{\relax}
+
\newcounter{prob}[chapter]
\setcounter{prob}{1}
\renewcommand{\theprob}{\arabic{prob}}
@@ -181,42 +201,44 @@
}
\rmfamily}{\end{tcolorbox}}
-\NewDocumentEnvironment{problem}{s o o}{
- \refstepcounter{prob}
- \IfBooleanTF{#1}{
- \def\tagname{\relax}
- }{
- \def\tagname{\hfill\faIcon{tag}}
- }
+\NewDocumentEnvironment{problem}{s !o o}{
+\refstepcounter{prob}
+\IfBooleanTF{#1}{
+\tcbset{
+ wrapfig/.style={sidebyside,righthand width=\dimeval{2\textwidth/7}}}
+}{
+\tcbset{
+ wrapfig/.style={}}
+}
\IfNoValueTF{#3}{
\IfNoValueTF{#2}{
\begin{tcolorbox}[
- common,
+ common,wrapfig,
borderline west={1.5pt}{0mm}{2号色},
title=\color{2号色}{\problemname} \theprob,
coltitle=2号色,
]
}{
\begin{tcolorbox}[
- common,
+ common,wrapfig,
borderline west={1.5pt}{0mm}{2号色},
- title=\color{2号色}{\problemname} \theprob\tagname~#2,
+ title=\color{2号色}{\problemname} \theprob\hfill\faIcon{tag}~#2,
coltitle=2号色,
]
}
}{
\IfNoValueTF{#2}{
\begin{tcolorbox}[
- common,
+ common,wrapfig,
borderline west={1.5pt}{0mm}{2号色},
title=\color{2号色}{\problemname} \theprob(本题#3分),
coltitle=2号色,
]
}{
\begin{tcolorbox}[
- common,
+ common,wrapfig,
borderline west={1.5pt}{0mm}{2号色},
- title=\color{2号色}{\problemname} \theprob(本题#3分)\tagname~#2,
+ title=\color{2号色}{\problemname} \theprob(本题#3分)\hfill\faIcon{tag}~#2,
coltitle=2号色,
]
}
@@ -268,7 +290,6 @@
{\end{tcolorbox}}
\RequirePackage{enumerate}
-% list/itemize/enumerate setting
\RequirePackage[shortlabels,inline]{enumitem}
\setlist{nolistsep,leftmargin=1.5em}
@@ -279,12 +300,13 @@
\RequirePackage{booktabs}
\RequirePackage{paracol}
\columnratio{0.67}
+% sidebyside,righthand width=\dimeval{\linewidth/4}
\RequirePackage{multicol,multirow}
\RequirePackage{fancyvrb}
%绘图
\RequirePackage{tikz} %% load tikz without tikz
-\usetikzlibrary{intersections,decorations.markings,spy,arrows,shapes,fadings,mindmap,shapes.arrows,shapes.symbols,tikzmark,shapes.geometric,graphs,decorations.pathmorphing,through,arrows.meta,shapes.misc,decorations.shapes,angles,backgrounds,calc,math,decorations,decorations.pathreplacing,fit,quotes,shadows,positioning,patterns,shadings}
+\usetikzlibrary{intersections,decorations.markings,spy,arrows,shapes,fadings,mindmap,shapes.arrows,shapes.symbols,tikzmark,shapes.geometric,graphs,decorations.pathmorphing,through,arrows.meta,shapes.misc,decorations.shapes,angles,backgrounds,calc,math,decorations,decorations.pathreplacing,fit,quotes,shadows,positioning,patterns}
\tikzset{>=stealth,line cap=round,line join=round}
\RequirePackage{pgfplots}
\pgfplotsset{compat=1.9}
@@ -318,15 +340,13 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%chapter图片定制开始%%%%%%%%%%%%%%%
+\RequirePackage{titleimage}
+\makeatletter
\def\chapterimage{\gdef\@chapterimage}
\def\@makechapterhead#1{%
- \begin{tikzpicture}[remember picture,overlay]
- \node[scope fading=south,anchor=north,inner sep=0pt,outer sep=0pt] at (current page.north) {\includegraphics[width=\paperwidth]{\@chapterimage}}; % 图片
- \draw [line width=2pt,2号色!40] ($(current page.north west)-(0,3.5/13*\paperwidth)$) -- ($(current page.north east)-(0,3.5/13*\paperwidth)$); % 上线
- \draw [line width=2pt,2号色!40] ($(current page.north west)-(0,4.5/13*\paperwidth)$) -- ($(current page.north east)-(0,4.5/13*\paperwidth)$); % 下线
- \fill [backgroundcolor!40,opacity=0.5] ($(current page.north west)-(0,3.5/13*\paperwidth)$) rectangle +(\paperwidth,-\paperwidth/13); % 中间
- \node at ($(current page.north west)-(-0.5*\paperwidth,4/13*\paperwidth)$) {\ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi\huge\bfseries#1~\color{2号色}\faIcon{feather-alt}}; % 标题
- \end{tikzpicture}\par
+ \titleimage[
+ \ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi\huge\bfseries#1~\color{2号色}\faIcon{feather-alt}]
+ {\@chapterimage}
\vspace{3.5\paperwidth/13}
\thispagestyle{plain}
\fancypagestyle{plain}{
@@ -344,6 +364,7 @@
\centering \ifcsname @chapterfont\endcsname\CJKfamily{chapterfont}\fi \huge \bfseries \color{1号色!80!2号色!80!black} #1\par\nobreak
\vspace*{1em}
}
+ \makeatother
\thispagestyle{plain}
\fancypagestyle{plain}{
\fancyhead{} % 页眉清空
@@ -389,11 +410,10 @@
}
% document setup
+\RequirePackage{siunitx}
\def\e{\mathrm{e}}
\def\i{\mathrm{i}}
-\def\ee#1{\times 10^{#1}}
\def\T{\mathsf{T}}
-\def\unit#1{\,\mathrm{#1}}
\def\mat#1{\mathbf{#1}}
\def\rank#1{\text{R}({#1})}
\def\QED{\hfill\sffamily Q.E.D. }
diff --git a/macros/latex/contrib/litesolution/tex/titleimage.sty b/macros/latex/contrib/litesolution/tex/titleimage.sty
new file mode 100644
index 0000000000..0a4972aae1
--- /dev/null
+++ b/macros/latex/contrib/litesolution/tex/titleimage.sty
@@ -0,0 +1,20 @@
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\ProvidesPackage{titleimage}[2024/03/08/ v0.1 Package for adding south-shading full width picture on the top of page.]
+
+\RequirePackage{tikz,xcolor}
+\usetikzlibrary{shadings}
+\definecolor{titleline}{HTML}{006E54} %
+
+\newsavebox\imagebox % goes into the preamble
+\NewDocumentCommand{\titleimage}{ o m }{
+ \tikz[remember picture,overlay]
+ {
+ \node[scope fading=south,anchor=north,inner sep=0pt,outer sep=auto] at (current page.north) {\includegraphics[width=\paperwidth]{#2}};
+ \IfNoValueF{#1}{
+ \fill [backgroundcolor!40,opacity=0.5] ($(current page.north west)-(0,3.5/13*\paperwidth)$) rectangle +(\paperwidth,-\paperwidth/13); % 中间
+ \draw [line width=2pt,titleline!40] ($(current page.north west)-(0,3.5/13*\paperwidth)$) -- ($(current page.north east)-(0,3.5/13*\paperwidth)$); % 上线
+ \draw [line width=2pt,titleline!40] ($(current page.north west)-(0,4.5/13*\paperwidth)$) -- ($(current page.north east)-(0,4.5/13*\paperwidth)$); % 下线
+ \node at ($(current page.north west)-(-0.5*\paperwidth,4/13*\paperwidth)$) {#1};
+ }
+ }
+} \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index e809c36645..e51248bb1d 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index a8aba8bbae..8c7da1f846 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,11 +5,11 @@
% 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.02c}
-\def\PLdate{23 février 2024}
+\def\PLversion{3.02f}
+\def\PLdate{7 mars 2024}
\usepackage{amsfonts}
\usepackage{ProfLycee}
-\useproflyclib{piton,minted,pythontex,ecritures}
+\useproflyclib{piton,minted,pythontex,ecritures,espace}
\usepackage[math-style=french]{fourier-otf}
\usepackage{mathrsfs}%pour mathscr
\usepackage{awesomebox}
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
index e22fb1e4fa..8d441bcc5c 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
index e138211317..937fed22c1 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
@@ -1,8 +1,9 @@
-% !TeX document-id = {fc3853a9-0c9c-4d02-b763-6dc6c85d34db}
-% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]
+% !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.01f}
+\def\PLver{3.02e}
\usepackage[margin=1.5cm]{geometry}
\usepackage{ProfLycee}
\useproflyclib{piton}
@@ -10,8 +11,6 @@
\usepackage{babel}
\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4}
\usepackage{codehigh}
-%\usepackage[most]{tcolorbox}
-%\newtcblisting{ShowCodeTeX}[1][]{colback=white,colframe=red!75!black,listing options={style=tcblatex},#1}
\begin{document}
@@ -271,4 +270,158 @@ print(max(liste), min(liste), sum(liste))
[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.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.pdf
index 9f881fc610..b52e27de71 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/metapost/PfLEspace.mp b/macros/latex/contrib/proflycee/metapost/PfLEspace.mp
new file mode 100644
index 0000000000..873ebd0684
--- /dev/null
+++ b/macros/latex/contrib/proflycee/metapost/PfLEspace.mp
@@ -0,0 +1,762 @@
+% PfLEspace.mp
+% Copyright 2024 Cédric Pierquet
+% Source David Nivaud (https://melusine.eu.org/syracuse/exemples/)
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+
+def repplansimple =
+ %plan simple
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t = (4u,0u);
+ r = (1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0 = (0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2 ;
+ draw z2--z3 ;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ %label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+enddef;
+
+def repinterplan =
+ %intersection de deux plans
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z5 = 0.5[z0,z1];
+ z6 = z5 transformed S;
+ z7 = (2.5u,-1u);
+ z8 = z7 transformed S;
+ z5 = 0.5[z9,z7];
+ z10= z9 transformed S;
+ draw z5--z6;
+ draw z9--z7;
+ draw z9--z10;
+ draw z10--z6;
+ draw z6--z3;
+ draw z6--z8 dashed evenly;
+ p1 = z2--z6;
+ q1= z9--z10;
+ z11 = p1 intersectionpoint q1;
+ draw z11--z6 dashed evenly;
+ draw z2--z11;
+ p2 = z7--z8;
+ q2= z5--z1;
+ z12 = p2 intersectionpoint q2;
+ draw z12--z8 dashed evenly;
+ draw z7--z12;
+ label.rt(btex $d$ etex scaled echelle, 0.5[z5,z6]);
+enddef;
+
+def repplantroispoints =
+ %representation d'un plan defini par trois points
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ dotlabel.top(btex $A$ etex scaled echelle, (2.25u,1.5u));
+ dotlabel.top(btex $B$ etex scaled echelle, (1.25u,.5u));
+ dotlabel.top(btex $C$ etex scaled echelle, (3.25u,1u));
+enddef;
+
+def repplandeuxdroites =
+ %representation d'un plan defini par deux droites secantes
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+enddef;
+
+def repplandroite =
+ %representation d'un plan defini par un point et une droite
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ dotlabel.top(btex $A$ etex scaled echelle, (2.05u,1.35u));
+ z4 = (1u,.5u);
+ z5 = (3.25u,1.05u);
+ draw z4--z5;
+ label.top(btex $d$ etex scaled echelle, z5);
+enddef;
+
+def repplandtespara =
+ %representation d'un plan defini par deux droites parallèles
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (1u,1.15u);
+ z5 =(3u,1.65u);
+ draw z4--z5;
+ z6 = (1.5u,0.2u);
+ z7 = z6 shifted (z5-z4);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+enddef;
+
+def droitesnoncoplan =
+ %representation de deux droites non parallelles et sans point commun
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.5u,.5u);
+ z5 = (4u,1u);
+ draw z4--z5;
+ label.top(btex $d$ etex scaled echelle, z5);
+ z6 = (2u,1.5u);
+ z7 = (0.2u,1u);
+ dotlabel.rt(btex $A$ etex scaled echelle, z6);
+ z9 = z6 shifted z7;
+ z10 = z6 shifted -2z7;
+ p1 = z6--z10;
+ p2 = z0--z1;
+ z11 = p1 intersectionpoint p2;
+ draw z6--z11 dashed evenly;
+ draw z11--z10;
+ draw z6--z9;
+ label.rt(btex $d'$ etex scaled echelle, z10);
+enddef;
+
+def repincidence =
+ %representation d'un plan
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4=(0u,-2.2u);
+ z5 = z4 transformed T;
+ z6 = z4 transformed S;
+ z7 = z4 transformed T transformed S;
+ draw z4--z6;
+ draw z4--z5 withpen pencircle scaled 0.05u;
+ draw z5--z7 withpen pencircle scaled 0.05u;
+ z8=1/5[z0,z1]+1/2[z0,z2];
+ z9=3/5[z4,z5]+1/2[z6,z4];
+ draw z8--z9;
+ z10 = z8 transformed S;
+ draw z8--z10;
+ z11 = z9 transformed S;
+ p1 = z10--z11;
+ q1 = z2--z3;
+ q2 = z0--z1;
+ q3 = z6--z7;
+ z12 = p1 intersectionpoint q1;
+ z13 = p1 intersectionpoint q2;
+ z14 = p1 intersectionpoint q3;
+ draw z10--z12;
+ draw z12--z13 dashed evenly;
+ draw z13--z14;
+ draw z14--z11
+ dashed evenly;
+ p2 = z8--z10;
+ z15 = p2 intersectionpoint q1;
+ draw z2--z15;
+ draw z15--z12 dashed evenly;
+ draw z12--z3;
+ p3 = z8--z9;
+ z16 = p3 intersectionpoint q2;
+ z17 = p3 intersectionpoint q3;
+ q4 = z4--z5;
+ z18 = p3 intersectionpoint q4;
+ draw z16--z12;
+ draw z6--z17;
+ draw z17--z14 dashed evenly;
+ draw z14--z7;
+ draw z18--z14;
+ p4 = z9--z11;
+ z19 = p4 intersectionpoint q4;
+ draw z9--z19;draw z19--z11 dashed evenly;
+ label.rt(btex $d$ etex scaled echelle, 0.5[z12,z16]);
+ label.rt(btex $d'$ etex scaled echelle, 0.5[z18,z14]);
+enddef;
+
+def repdroiteparaplans =
+ %droite parallele a deux plans secants
+ pair t,r;
+ transform T,S;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,1u); r=(0u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z1--z3;
+ z4=0.5[z0,z1];
+ z5 = z4 transformed S;
+ draw z4--z5;
+ label.lft(btex $\Delta$ etex scaled echelle,0.5[z4,z5]);
+ z6 = z4 shifted (1.5u,-1u);
+ z4=0.5[z6,z7];
+ z8 = z6 transformed S;
+ z9 = z7 transformed S;
+ draw z0--z4;
+ draw z4--z6;
+ draw z6--z8;
+ draw z8--z9;
+ draw z4--z7 dashed evenly;
+ p1= z4--z1;
+ p2 = z6--z8;
+ z10 = p1 intersectionpoint p2;
+ draw z4--z10 dashed evenly;draw z10--z1;
+ p3 = z2--z3;
+ p4 = z9--z7;
+ z11 = p3 intersectionpoint p4;
+ draw z11--z9;
+ draw z11--z7 dashed evenly;
+ draw z7--z4 dashed evenly;
+ z12 = (-1u,0u);
+ z13 = z12 shifted (0u,3u);
+ draw z13--z12;
+ label.lft(btex $d$ etex scaled echelle, z12);
+enddef;
+
+def reptoit =
+ %theoreme du toit
+ pair t,r,v;
+ transform T,S,V;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(3u,2u); r=(-2u,1.5u);v=(-3u,0u);
+ T = identity shifted t;
+ S = identity shifted r;
+ V = identity shifted v;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed S transformed T;
+ z4 = z0 transformed V;
+ z5 = z0 transformed V transformed T;
+ draw z0--z1;
+ draw z2--z3;
+ z101=0.1[z0,z1]; z10=0.9[z0,z1];
+ z23 = z101 transformed S;
+ z32=z10 transformed S;
+ z45 = z101 transformed V;
+ z54=z10 transformed V;
+ draw z101--z23;
+ draw z10--z32;
+ draw z23--z45;
+ draw z32--z54 dashed evenly;
+ p1 = z101--z23;
+ p2 = z4--z5;
+ z11 = p1 intersectionpoint p2;
+ draw z4--z11;
+ draw z11--z5 dashed evenly;
+ label.lft(btex $d$ etex scaled echelle, z0);
+ label.lft(btex $d'$ etex scaled echelle, z4);
+ label.top(btex $\Delta$ etex scaled echelle, z2);
+enddef;
+
+def repplanspara =
+ % plans paralleles a l'aide de droites secantes
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z14 = (0.8u,-1.5u); z15 =(4u,-1u);draw z14--z15;
+ z16 = (1u,-0.9u);z17=(3.6u,-2.1u);draw z16--z17;
+ label.rt(btex $d_{1}$ etex scaled echelle, z15);
+ label.rt(btex $d'_{1}$ etex scaled echelle, z17);
+enddef;
+
+def repdteplanpara =
+ % parallelisme plan et droite
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (1u,.5u);
+ z5 = (4u,1u);
+ draw z4--z5;
+ label.top(btex $d'$ etex scaled echelle, z4);
+ z6 = (1u,2.5u);
+ z7 = z6 shifted z5-z4;
+ draw z6--z7;
+ label.top(btex $d$ etex scaled echelle, z6);
+enddef;
+
+def repdtesortho =
+ %droites orthogonales
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(2u,3u); r=(0u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ draw z0--z1;
+ draw z0--z2;
+ label.bot(btex $I$ etex scaled echelle, z0);
+ z3=0.1[z0,z1];
+ z4=0.1[z0,z2];
+ z5=z3 shifted z4-z0;
+ draw z3--z5;
+ draw z4--z5;
+ z6=(0u,-1u);
+ z7 = z6 transformed T;
+ draw z7--z6;
+ label.bot(btex $\Delta$ etex scaled echelle, z7);
+ z8=(-1u,-1u);
+ z9= z8 transformed S;
+ label.lft(btex $d$ etex scaled echelle, z9);
+ draw z9--z8;
+enddef;
+
+def repdroiteorthoplan =
+ %droite orthogonale a un plan
+ pair t,r;
+ transform T,S;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ p1 = z4--z5;p2 = z6--z7;
+ z8 = p1 intersectionpoint p2;
+ z9 = z8 shifted (0u,2u);
+ label.rt(btex $\Delta$ etex scaled echelle, z9);
+ draw z8--z9;
+ z10 = z8 shifted (0u,-2u);
+ p3 = z9--z10;
+ p4 = z0--z1;
+ z11 = p3 intersectionpoint p4;
+ draw z8--z11 dashed evenly;
+ draw z11--z10;
+ z12=0.1[z8,z7];
+ z13=0.1[z8,z9];
+ z14= z13 shifted z12-z8;
+ draw z12--z14;
+ draw z13--z14;
+ z15=0.2[z8,z4];
+ z16=0.1[z8,z9];
+ z17= z16 shifted z15-z8;
+ draw z15--z17;
+ draw z16--z17;
+enddef;
+
+def repplansparadroiteortho =
+ %plans paralleles et droite orthogonale
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u); z5 =(4u,1.5u);draw z4--z5;
+ z6 = (1u,1.6u);z7=(3.6u,0.4u);draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z14 = (0.8u,-1.5u);
+ z15 =(4u,-1u);
+ draw z14--z15;
+ z16 = (1u,-0.9u);
+ z17=(3.6u,-2.1u);
+ draw z16--z17;
+ label.rt(btex $d_{1}$ etex scaled echelle, z15);
+ label.rt(btex $d'_{1}$ etex scaled echelle, z17);
+ p1=z4--z5;
+ p2=z6--z7;
+ p3=z14--z15;
+ p4=z16--z17;
+ p5=z0--z1;
+ p6=z10--z11;
+ z20 = p1 intersectionpoint p2;
+ z21 = p3 intersectionpoint p4;
+ p7 = z20--z21;
+ z22 = p7 intersectionpoint p5;
+ z24 = z20 shifted (0u,1.5u);
+ z25 = z21 shifted (0u,-1.5u);
+ p8 = z21--z25;
+ z23 = p8 intersectionpoint p6;
+ draw z24--z20;
+ draw z20--z22 dashed evenly;
+ draw z22--z21;
+ draw z21--z23
+ dashed evenly;
+ draw z23--z25;
+ label.rt(btex $\Delta$ etex scaled echelle, z24);
+ z30=0.2[z20,z4];
+ z31=0.1[z20,z24];
+ z32 = z31 shifted z30-z20;
+ draw z32--z30;
+ draw z32--z31;
+ z40=0.2[z21,z14];
+ z41=0.1[z21,z22];
+ z42 = z41 shifted z40-z21;
+ draw z42--z40;
+ draw z42--z41;
+ z50=0.1[z20,z7];
+ z51=0.1[z20,z24];
+ z52 = z51 shifted z50-z20;
+ draw z52--z50;
+ draw z52--z51;
+ z60=0.1[z21,z17];
+ z61=0.1[z21,z22];
+ z62 = z61 shifted z60-z21;
+ draw z62--z60;
+ draw z62--z61;
+enddef;
+
+def repdrtoitesorthoplanspara =
+ %droites orthogonales a deux plans paralleles
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z20 = (2u,1u);
+ z26 = z20 shifted (0u,-2.5u);
+ z21 = z20 shifted (0u,2u);
+ z22 = z20 shifted (0u,-4.5u);
+ p1 = z21--z22;
+ p2 = z0--z1;
+ p3 = z10--z11;
+ z24 = p1 intersectionpoint p2;
+ z25 = p1 intersectionpoint p3;
+ draw z21--z20;
+ draw z20--z24 dashed evenly;
+ draw z24--z26;
+ draw z26--z25 dashed evenly;
+ draw z25--z22;
+ z30 = (3u,1.5u);
+ z36 = z30 shifted (0u,-2.5u);
+ z31 = z30 shifted (0u,2u);
+ z32 = z30 shifted (0u,-4.5u);
+ p11 = z31--z32;
+ p12 = z0--z1;
+ p13 = z10--z11;
+ z34 = p11 intersectionpoint p12;
+ z35 = p11 intersectionpoint p13;
+ draw z31--z30;
+ draw z30--z34 dashed evenly;
+ draw z34--z36;
+ draw z36--z35 dashed evenly;
+ draw z35--z32;
+ z40=0.1[z20,z30];
+ z41=0.1[z20,z21];
+ z42 = z41 shifted z40-z20;
+ draw z42--z40;
+ draw z42--z41;
+ z50=0.1[z30,z20];
+ z51=0.1[z30,z31];
+ z52 = z51 shifted z50-z30;
+ draw z52--z50;
+ draw z52--z51;
+ z60=0.1[z26,z36];
+ z61=0.1[z26,z24];
+ z62 = z61 shifted z60-z26;
+ draw z62--z60;
+ draw z62--z61;
+ z70=0.1[z36,z26];
+ z71=0.2[z36,z34];
+ z72 = z71 shifted z70-z36;
+ draw z72--z70;
+ draw z72--z71;
+ draw z20--z30;
+ draw z26--z36;
+enddef;
+
+def repplansperp =
+ %intersection de deux plans perpendiculaires
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z5 = 0.5[z0,z1];
+ z6 = z5 transformed S;
+ z7 = z5 shifted (0u,-2.5u);
+ z8 = z7 transformed S;
+ z5 = 0.5[z9,z7];
+ z10= z9 transformed S;
+ draw z5--z6;
+ draw z9--z7;
+ draw z9--z10;
+ draw z10--z6;
+ draw z6--z3;
+ draw z7--z8;
+ p1 = z2--z6;
+ q1= z5--z9;
+ z11 = p1 intersectionpoint q1;
+ draw z11--z6 dashed evenly;
+ draw z2--z11;
+ p2 = z6--z8;
+ q2= z5--z1;
+ z12 = p2 intersectionpoint q2;
+ draw z12--z6 dashed evenly;
+ draw z8--z12;
+ label.rt(btex $d$ etex scaled echelle, 0.6[z5,z6]);
+ z13=0.5[z5,z6];
+ z14 = z13 shifted (0u,2u);
+ z15 = z13 shifted (0u,-2u);
+ p3 = z0--z1;
+ q3 = z13--z15;
+ z16 = p3 intersectionpoint q3;
+ draw z14--z13;
+ draw z13--z16 dashed evenly;
+ draw z16--z15;
+ z20=0.2[z13,z6];
+ z21=0.2[z13,z14];
+ z22 = z21 shifted z20-z13;
+ draw z22--z20;
+ draw z22--z21;
+ z17 = z13 shifted 0.8(z1-z5);
+ z18 = z13 shifted 0.8(z0-z5);
+ p4 = z13--z18;
+ z19 = q1 intersectionpoint p4;
+ draw z18--z19;
+ draw z19--z13 dashed evenly;
+ draw z13--z17;
+ z30=0.1[z13,z18];z31=0.1[z13,z14];
+ z32 = z31 shifted z30-z13;
+ draw z32--z30;
+ draw z32--z31;
+enddef;
+
+def repplansperpplan =
+ %plans perpendiculaires a un meme plan
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(5u,0u); r=(1u,2.3u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4= 1/4[z0,z1];
+ z5= 3/4[z0,z1];
+ z6= 1/2[z4,z5];
+ z7 = z6 shifted (0u,1u);
+ draw z4--z7;
+ draw z5--z7;
+ z8 = z4 shifted (0u,2u);
+ z9 = z5 shifted (0u,2u);
+ z10 = z7 shifted (0u,2u);
+ z4=0.5[z8,z11];
+ z5=0.5[z12,z9];
+ z7=0.5[z13,z10];
+ draw z8--z11;
+ draw z8--z10;
+ draw z12--z9;
+ draw z9--z10;
+ draw z7--z10;
+ draw z7--z6 dashed evenly;
+ draw z6--z13;
+ draw z11--z13;
+ draw z13--z12;
+ p1 = z2--z3;
+ q1 = z8--z10;
+ q2=z9--z10;
+ z14= p1 intersectionpoint q1;
+ z15= p1 intersectionpoint q2;
+ draw z2--z14;
+ draw z14--z15 dashed evenly;
+ draw z15--z3;
+ z20=0.1[z7,z10];
+ z21=0.2[z7,z4];
+ z22 = z21 shifted z20-z7;
+ draw z22--z20;
+ draw z22--z21;
+ z30=0.1[z7,z10];
+ z31=0.2[z7,z5];
+ z32 = z31 shifted z30-z7;
+ draw z32--z30;
+ draw z32--z31;
+enddef; \ 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 0c71456d5d..05945a83b1 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,10 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/02/23 3.02c Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/03/07 3.02f Aide pour l'utilisation de LaTeX en lycee]
+% 3.02f Ajout de petits schémas type pour la géométrie dans l'espace + conformité avec piton
+% 3.02e Présentation python dans la style 'thonny' + amélioration dans la gestion du gobble avec piton
+% 3.02d Retenues pour les soustractions dans les opérations posées
% 3.02c Ajout d'une commande pour le calcul d'une congruence (+petite pos / +petite nég) + ligne tkz-convex + Opérations posées
% 3.02b Amélioration du code pour les arbres de probas (tks M. Degrange pour les suggestions)
% 3.02a Ajout des [ecritures] proba conditionnelle, norme, valeur absolue et IF/IC
@@ -152,6 +155,11 @@
\input{proflycee-tools-piton.tex}
}%
{}%
+ \IfSubStr{#1}{espace}%
+ {%
+ \input{proflycee-tools-espace.tex}
+ }%
+ {}%
\IfSubStr{#1}{minted}%
{%
\if@build
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
index 1d8b4f2826..eccfd35733 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
@@ -1269,7 +1269,8 @@
Offset=6pt,%
AffEgal=true,%
LimiteCapac=0,%
- CouleurRetenue=red
+ CouleurRetenue=red,%
+ AffRetenues=true
}
\NewDocumentCommand\IntCalcMaxWidth{ m }{%
@@ -1279,20 +1280,22 @@
\StrChar{#1}{##1}[\tmpchar]%
\settowidth{\charwd}{\tmpchar}%
\setlength{\widestcharwd}{\maxof{\widestcharwd}{\charwd}}%
+
+
}%
}
-\NewDocumentCommand\IntCreateBoxNumbers{ m }{%
+\NewDocumentCommand\IntCreateBoxNumbers{ O{c} m }{%
\IfStrEqCase{\PoseOpeBase}{%
{dec}{\IntCalcMaxWidth{0123456789}}%
{bin}{\IntCalcMaxWidth{01}}%
{hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
}%
\addtolength{\widestcharwd}{\PoseOpeOffset/2}%
- \StrLen{#1}[\tmplennumber]%
+ \StrLen{#2}[\tmplennumber]%
\xintFor* ##1 in {\xintSeq{1}{\tmplennumber}}\do{%
- \StrChar{#1}{##1}[\tmpchiff]%
- \makebox[\the\widestcharwd][c]{\tmpchiff}%
+ \StrChar{#2}{##1}[\tmpchiff]%
+ \makebox[\the\widestcharwd][#1]{\tmpchiff}%
}%
}
@@ -1347,7 +1350,7 @@
\xintifboolexpr{\PoseOpeLimit > 0 }{\StrRight{\rescalcbin}{\PoseOpeLimit}[\rescalcbin]}{}%
%\ensuremath{\begin{array}{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
\ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
- \RowStyle[cell-space-limits=0pt]{} & \IntCreateBoxNumbersRetenue{\ListeRetenues} \\[-0.5\heightercharht]
+ \ifboolKV[poseoperation]{AffRetenues}{\RowStyle[cell-space-limits=0pt]{} & \IntCreateBoxNumbersRetenue{\ListeRetenues} \\[-0.5\heightercharht]}{}
\RowStyle[nb-rows=*,cell-space-limits=1pt]{} & \IntCreateBoxNumbers{#1} \\
+ & \IntCreateBoxNumbers{#2} \\
\hline
@@ -1362,8 +1365,72 @@
{bin}{\xdef\rescalcbin{\xintDecToBin{\xinteval{\xintBinToDec{#1}-\xintBinToDec{#2}}}}}%
{hex}{\xdef\rescalcbin{\xintDecToHex{\xinteval{\xintHexToDec{#1}-\xintHexToDec{#2}}}}}%
}%
+ %bourrage de zéros pour les retenues
+ \StrLen{#1}[\lenA]\StrLen{#2}[\lenB]%
+ \xdef\BwithZeros{#2}%
+ \xintifboolexpr{ \lenA > \lenB }%
+ {%
+ \xintFor* ##1 in {\xintSeq{1}{\xinteval{\lenA-\lenB}}}\do{\xdef\BwithZeros{0\BwithZeros}}%
+ }%
+ {}%
+ %suite
\xintifboolexpr{\PoseOpeLimit > 0 }{\StrRight{\rescalcbin}{\PoseOpeLimit}[\rescalcbin]}{}%
%\ensuremath{\begin{array}{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
+ \ifboolKV[poseoperation]{AffRetenues}{%
+ \ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset/2}}r@{\,}}
+ \RowStyle[nb-rows=*,cell-space-limits=1pt]{}
+ & \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\IntCalcMaxWidth{0123456789}}%
+ {bin}{\IntCalcMaxWidth{01}}%
+ {hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
+ }%
+ \addtolength{\widestcharwd}{\PoseOpeOffset/2}%
+ \StrLen{#1}[\tmplennumber]%
+ \xintFor* ##1 in {\xintSeq{1}{\tmplennumber}}\do{%
+ \xdef\tmplenctr{\inteval{\tmplennumber-##1+1}}%
+ \StrChar{#1}{##1}[\tmpchiff]%
+ \StrRight{#1}{\tmplenctr}[\tmpA]%
+ \StrRight{\BwithZeros}{\tmplenctr}[\tmpB]%
+ \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\xdef\rescalctmp{\xinteval{\tmpA-\tmpB}}}%
+ {bin}{\xdef\rescalctmp{\xinteval{\xintBinToDec{\tmpA}-\xintBinToDec{\tmpB}}}}%
+ {hex}{\xdef\rescalctmp{\xinteval{\xintHexToDec{\tmpA}-\xintHexToDec{\tmpB}}}}%
+ }%
+ \xintifboolexpr{ \rescalctmp >= 0 }%
+ {\makebox[\the\widestcharwd][r]{\tmpchiff}}%
+ %{\makebox[\the\widestcharwd][r]{${}_{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}$\kern-0.1em\tmpchiff}}%
+ {\makebox[\the\widestcharwd][r]{\raisebox{-0.5\height}{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}\kern-0.1em\tmpchiff}}%
+ } \\
+ - & \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\IntCalcMaxWidth{0123456789}}%
+ {bin}{\IntCalcMaxWidth{01}}%
+ {hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
+ }%
+ \addtolength{\widestcharwd}{\PoseOpeOffset/2}%
+ \StrLen{#1}[\tmplennumber]%
+ \StrChar{#2}{\lenB}[\tmplastB]%
+ \xintFor* ##1 in {\xintSeq{1}{\xinteval{\tmplennumber-1}}}\do{%
+ \xdef\tmplenctr{\inteval{\tmplennumber-##1}}%
+ \StrChar{\BwithZeros}{##1}[\tmpchiff]%
+ \StrRight{#1}{\tmplenctr}[\tmpA]%
+ \StrRight{\BwithZeros}{\tmplenctr}[\tmpB]%
+ \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\xdef\rescalctmp{\xinteval{\tmpA-\tmpB}}}%
+ {bin}{\xdef\rescalctmp{\xinteval{\xintBinToDec{\tmpA}-\xintBinToDec{\tmpB}}}}%
+ {hex}{\xdef\rescalctmp{\xinteval{\xintHexToDec{\tmpA}-\xintHexToDec{\tmpB}}}}%
+ }%
+ \xintifboolexpr{ \rescalctmp >= 0 }%
+ {\makebox[\the\widestcharwd][r]{\xintifboolexpr{ ##1 <= \lenA-\lenB }{}{\tmpchiff}}}%
+ %{\makebox[\the\widestcharwd][r]{${}_{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}$\xintifboolexpr{ ##1 <= \lenA-\lenB }{}{\kern-0.1em\tmpchiff}}}%
+ {\makebox[\the\widestcharwd][r]{\raisebox{-0.5\height}{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}\xintifboolexpr{ ##1 <= \lenA-\lenB }{\kern0.25em}{\kern-0.1em\tmpchiff}}}%
+ }\makebox[\the\widestcharwd][r]{\tmplastB} \\
+
+ %\IntCreateBoxNumbers{#2} \\
+ \hline
+ \ifboolKV[poseoperation]{AffEgal}{=}{} &\IntCreateBoxNumbers[r]{\rescalcbin} \\
+ \end{NiceArray}}%
+ }%
+ {%
\ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
\RowStyle[nb-rows=*,cell-space-limits=1pt]{}
& \IntCreateBoxNumbers{#1} \\
@@ -1371,6 +1438,7 @@
\hline
\ifboolKV[poseoperation]{AffEgal}{=}{} & \IntCreateBoxNumbers{\rescalcbin} \\
\end{NiceArray}}%
+ }%
%\end{array}}%
}
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex
new file mode 100644
index 0000000000..a8b48af2f6
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex
@@ -0,0 +1,284 @@
+% proflycee-tools-espace.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
+
+\RequirePackage{iftex}
+
+\ifluatex
+ \RequirePackage{luamplib}%
+ \mplibtextextlabel{enable}%
+ \everymplib{input PfLEspace; beginfig(1);}%
+ \everyendmplib{endfig;}%
+\else%
+ \RequirePackage[shellescape]{gmp}%inclusion de figures metapost "à la volée"%
+ \gmpoptions{everymp={prologues:=3; input PfLEspace;}}%
+\fi%
+
+\defKV[posrelatesp]{Echelle=\def\scaleminischemspace{#1}}
+\setKVdefault[posrelatesp]{Echelle=1}
+
+\NewDocumentCommand\SchemaEspace{ s O{} m }{%
+ \restoreKV[posrelatesp]%
+ \setKV[posrelatesp]{#2}%
+ \ifluatex
+ \IfBooleanTF{#1}%
+ {\def\tmplabelespace##1{\mathscr{##1}}}%
+ {\def\tmplabelespace##1{\mathcal{##1}}}%
+ \mplibforcehmode%
+ \IfStrEqCase{#3}{%
+ {plan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansimple ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {interplans}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repinterplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $\tmplabelespace{Q}$ etex scaled echelle, z9);
+ \end{mplibcode}
+ }%
+ {plan3points}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplantroispoints ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitessecantes}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandeuxdroites ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitepoint}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandroite ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitespara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandtespara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {droitesnoncopla}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ droitesnoncoplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {incidence}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repincidence ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z4+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {droiteparaplans}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdroiteparaplans ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0u,0.025u));
+ label.lft(btex $\tmplabelespace{Q}$ etex scaled echelle, z6+(0u,0.5u));
+ \end{mplibcode}
+ }%
+ {toit}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ reptoit ;
+ \end{mplibcode}
+ }%
+ {planspara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplanspara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {droiteplanpara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdteplanpara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {droitesortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdtesortho ;
+ \end{mplibcode}
+ }%
+ {droiteorthoplan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdroiteorthoplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plansparadroiteortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansparadroiteortho ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {plansparadroitesortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdrtoitesorthoplanspara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {plansperp}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansperp ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $\tmplabelespace{Q}$ etex scaled echelle, z9);
+ \end{mplibcode}
+ }%
+ {plansperpplan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansperpplan ;
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.bot(btex $\tmplabelespace{P}$ etex scaled echelle, z11+(0.2u,0.6u));
+ label.bot(btex $\tmplabelespace{P}'$ etex scaled echelle, z12+(-0.2u,0.8u));
+ \end{mplibcode}
+ }%
+ }%
+ \else
+ \IfStrEqCase{#3}{%
+ {plan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansimple ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {interplans}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repinterplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $Q$ etex scaled echelle, z9);
+ \end{mpost}
+ }%
+ {plan3points}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplantroispoints ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitessecantes}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandeuxdroites ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitepoint}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandroite ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitespara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandtespara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {droitesnoncopla}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ droitesnoncoplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {incidence}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repincidence ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z4+(0.1u,0u));
+ \end{mpost}
+ }%
+ {droiteparaplans}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdroiteparaplans ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0u,0.025u));
+ label.lft(btex $Q$ etex scaled echelle, z6+(0u,0.5u));
+ \end{mpost}
+ }%
+ {toit}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ reptoit ;
+ \end{mpost}
+ }%
+ {planspara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplanspara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {droiteplanpara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdteplanpara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {droitesortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdtesortho ;
+ \end{mpost}
+ }%
+ {droiteorthoplan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdroiteorthoplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plansparadroiteortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansparadroiteortho ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {plansparadroitesortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdrtoitesorthoplanspara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {plansperp}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansperp ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $Q$ etex scaled echelle, z9);
+ \end{mpost}
+ }%
+ {plansperpplan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansperpplan ;
+ label.urt(btex $Q$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.bot(btex $P$ etex scaled echelle, z11+(0.2u,0.6u));
+ label.bot(btex $P'$ etex scaled echelle, z12+(-0.2u,0.8u));
+ \end{mpost}
+ }%
+ }%
+ \fi
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
index f0011170eb..d325b88e74 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
@@ -2,6 +2,7 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.02e Thonny via piton + modification clé gobble ?
%3.01f PseudoCode via piton (?)
%3.01e Correction du comportement de la console repl piton/pyluatex
%2.7.6 Correction du comportement de la console, avec une meilleure gestion de la largeur ^^ (merci à ablasz ;-))
@@ -24,14 +25,15 @@
Style=\def\CODPITstyle{#1},%
Titre=\def\CODPITtitre{#1},%
EspacementV=\def\CODPITespV{#1},%
- CouleurNombres=\def\CODPITcolnb{#1}
+ CouleurNombres=\def\CODPITcolnb{#1},%
+ Gobble=\def\CODPITgobble{#1}
}
\setKVdefault[envpiton]{%
Largeur=\linewidth,%
Alignement=center,%
Lignes=true,%
- Gobble=true,%
+ Gobble={tabs},%
TaillePolice=\footnotesize,%
Filigrane=false,%
Style=Classique,%
@@ -87,14 +89,15 @@
TaillePolice=\def\CODPITPCfonte{#1},%
Style=\def\CODPITPCstyle{#1},%
Titre=\def\CODPITPCtitre{#1},%
- EspacementV=\def\CODPITPCespV{#1}
+ EspacementV=\def\CODPITPCespV{#1},%
+ Gobble=\def\CODPITPCgobble{#1}
}
\setKVdefault[envpcpiton]{%
Largeur=\linewidth,%
Alignement=center,%
Lignes=true,%
- Gobble=true,%
+ Gobble={tabs},%
TaillePolice=\footnotesize,%
Filigrane=false,%
Style=Classique,%
@@ -158,12 +161,23 @@
%------les styles piton
\SetPitonStyle{ Number = \color{\CODPITcolnb} }
\ifboolKV[envpiton]{Lignes}%si lignes=true
- {\PitonOptions{left-margin=0.75em,all-line-numbers,line-numbers={#3}}}%left-margin=auto,
- {}%
- \ifboolKV[envpiton]{Gobble}%si gobble=true
- {\PitonOptions{tabs-auto-gobble}}%
+ {\PitonOptions{left-margin=0.75em,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
{}%
- \PitonOptions{break-lines,indent-broken-lines}%,numbers-sep=0.65em}%language=Python}
+ %\ifboolKV[envpiton]{Gobble}%si gobble=true
+ % {\PitonOptions{}}%
+ % {}%
+ %--gestion du gobble
+ \IfStrEqCase{\CODPITgobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\CODPITgobble}{\PitonOptions{gobble=\CODPITgobble}}{}%
+ %--fin gestion du gobble
+ \PitonOptions{break-lines,indent-broken-lines,continuation-symbol={}}%,numbers-sep=0.65em}%language=Python}
%------les styles tcbox
\IfEq{\CODPITstyle}{Moderne}%style Moderne (défaut)
{%
@@ -213,7 +227,7 @@
\useKVdefault[envpcpiton]%
\setKV[envpcpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
%------les styles piton
- \PitonOptions{break-lines,indent-broken-lines,language=minimal}%,numbers-sep=0.65em}%
+ \PitonOptions{break-lines,indent-broken-lines,language=minimal,continuation-symbol={}}%,numbers-sep=0.65em}%
\SetPitonStyle{ Number = }
\ifboolKV[envpcpiton]{Couleurs}%
{%
@@ -247,9 +261,20 @@
\ifboolKV[envpcpiton]{Lignes}%si lignes=true
{\PitonOptions{left-margin=0.75em,all-line-numbers,line-numbers={#3}}}%left-margin=auto,
{}%
- \ifboolKV[envpcpiton]{Gobble}%si gobble=true
- {\PitonOptions{tabs-auto-gobble}}%
- {}%
+ %\ifboolKV[envpcpiton]{Gobble}%si gobble=true
+ % {\PitonOptions{auto-gobble}}%
+ % {}%
+ %--gestion du gobble
+ \IfStrEqCase{\CODPITPCgobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\CODPITPCgobble}{\PitonOptions{gobble=\CODPITPCgobble}}{}%
+ %--fin gestion du gobble
%------les styles tcbox
\IfEq{\CODPITPCstyle}{Moderne}%style Moderne (défaut)
{%
@@ -295,7 +320,7 @@
%======CONSOLE PYLUATEX (package à charger manuellement !!)
\tcbset{consolepylua/.style={%base de la boîte
enhanced,colback=white,colframe=CouleurVertForet,sharp corners,boxrule=1pt,%
- top=1.5mm,bottom=1.5mm,left=2mm,right=2mm,fontupper=\footnotesize,%
+ top=1.5mm,bottom=1.5mm,left=2mm,right=3mm,fontupper=\footnotesize,%
before skip=0.5\baselineskip,after skip=0.5\baselineskip,%
}
}
@@ -335,7 +360,7 @@
{
\restoreKV[consolepyluatex]% revenir au valeurs par défaut
\setKV[consolepyluatex]{#2}% lit les arguments optionnels
- \PitonOptions{width={\ConsPyluaLarg-4mm},break-lines,end-of-broken-line={},continuation-symbol={},#1}
+ \PitonOptions{width={\ConsPyluaLarg-5mm},break-lines,end-of-broken-line={},continuation-symbol={},#1}
\PyLTVerbatimEnv
\ifboolKV[consolepyluatex]{Logo}
{%
@@ -346,16 +371,86 @@
}%
% {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}}
% {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}}
- \begin{pythonrepl}%
+ \begin{pythonrepl}%
}
{
\end{pythonrepl}%
\directlua{
- tex.print("\\begin{Piton}")
- tex.print(pyluatex.get_last_output())
- tex.print("\\end{Piton}")
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}"
+ )
+ }%
+ \end{tcolorbox}%
+}
+
+%====PITONTHONNY
+\newlength{\LargeurNumbersThonny}
+
+\defKV[pitonthonny]{%
+ NomFichier=\def\thonnypitonfilename{#1},%
+ NomConsole=\def\thonnypitonshellname{#1},%
+ IntroConsole=\def\thonnypitonintroconsole{#1},%
+ Gobble=\def\thonnypitongobble{#1}
+}
+
+\setKVdefault[pitonthonny]{%
+ NomFichier=script.py,%
+ NomConsole=console,%
+ IntroConsole={Python 3.11.6 /usr/bin/python},%
+ Gobble={tabs}
+}
+
+\NewPitonEnvironment{PitonThonnyEditor}{ D<>{} O{} m }%
+{%
+ \restoreKV[pitonthonny]%
+ \setKV[pitonthonny]{#1}%
+ \settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
+ %--gestion du gobble
+ \IfStrEqCase{\thonnypitongobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\thonnypitongobble}{\PitonOptions{gobble=\thonnypitongobble}}{}%
+ %--fin gestion du gobble
+ \tcbset{tcbthonnypiton/.style={title=\vphantom{pf}\thonnypitonfilename\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
+ %\noindent%
+ \tcolorbox[sharp corners=all,enhanced,size=small,width=#3,colframe=gray,colback=lightgray!5,tcbthonnypiton,fonttitle=\scriptsize\sffamily,coltitle=black,
+ attach boxed title to top left={yshift*=-0.4pt},fontupper=\footnotesize,bottom=-0.25mm,#2,boxed title style={size=tight,colback=lightgray!15,sharp corners=all,boxrule=0.4pt,boxsep=2pt},boxrule=0.4pt,overlay={\begin{tcbclipinterior}\fill[draw=none,gray!25] ([shift={(0.4pt,0.4pt)}]frame.south west) rectangle ([shift={(\LargeurNumbersThonny+1mm+0.8pt,-0.4pt)}]frame.north west) ;\end{tcbclipinterior}}]%
+}%
+{%
+ \endtcolorbox%
+}%
+
+\NewDocumentEnvironment{PitonThonnyConsole}{ D<>{} O{} m }%
+{
+ \restoreKV[pitonthonny]%
+ \setKV[pitonthonny]{#1}%
+ \PyLTVerbatimEnv%
+ \tcbset{tcbthonnypitonconsole/.style={title=\vphantom{pf}\thonnypitonshellname\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
+ \noindent%
+ \PitonOptions{width={#3-5mm},break-lines,end-of-broken-line={},continuation-symbol={}}%
+ \tcolorbox[sharp corners=all,enhanced,size=small,width=#3,colframe=gray,colback=white,tcbthonnypitonconsole,fonttitle=\scriptsize\sffamily,coltitle=black,
+ attach boxed title to top left={yshift*=-0.4pt},fontupper=\footnotesize,bottom=-0.25mm,#2,boxed title style={size=tight,colback=lightgray!15,sharp corners=all,boxrule=0.4pt,boxsep=2pt},boxrule=0.4pt,top=1mm]%
+ \textcolor{gray}{\texttt{\thonnypitonintroconsole}}
+ \begin{pythonrepl}
+}
+{
+ \end{pythonrepl}
+ \directlua
+ {
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}")
+ tex.print("")
}%
- \end{tcolorbox}
+ \ignorespacesafterend%
+ \endtcolorbox%
}
\fi
diff --git a/macros/latex/contrib/yathesis/README.md b/macros/latex/contrib/yathesis/README.md
index 2e3268733d..a733e2c842 100644
--- a/macros/latex/contrib/yathesis/README.md
+++ b/macros/latex/contrib/yathesis/README.md
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------
-- `yathesis` --- Yet Another Thesis Class, version 1.0.11
+- `yathesis` --- Yet Another Thesis Class, version 1.0.12
- E-mail: `denis.bitouze@univ-littoral.fr`
- Released under the LaTeX Project Public License v1.3c or later. See
http://www.latex-project.org/lppl.txt
diff --git a/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
index 889dddfe2f..8cb190be11 100644
--- a/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
+++ b/macros/latex/contrib/yathesis/doc/yathesis-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
index 72d8c92210..2867956f0e 100644
--- a/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
+++ b/macros/latex/contrib/yathesis/exemples/specimen/these.pdf
Binary files differ
diff --git a/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx b/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx
index 33838d9870..0e87b16a40 100644
--- a/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx
+++ b/macros/latex/contrib/yathesis/source/yathesis-samples-templates.dtx
@@ -219,7 +219,7 @@
%
% Numéro de version du package pgfplots
%COMMENT
-\pgfplotsset{compat=1.17}
+\pgfplotsset{compat=1.18}
%<<COMMENT
%
% Ajustement pour éviter, dans la table des matières, des débordements de
@@ -245,15 +245,15 @@
%<<COMMENT
% Macro pour mettre en forme les noms de fichiers
%COMMENT
-\newcommand{\fichier}[1]{\texttt{#1}}
+\NewDocumentCommand{\fichier}{ m }{\texttt{#1}}
%<<COMMENT
% Macro pour mettre en forme les noms de packages LaTeX
%COMMENT
-\newcommand{\package}[1]{\textsf{#1}}
+\NewDocumentCommand{\package}{ m }{\textsf{#1}}
%<<COMMENT
% Macro pour mettre en forme des locutions étrangères
%COMMENT
-\newcommand{\locution}[1]{\emph{#1}}
+\NewDocumentCommand{\locution}{ m }{\emph{#1}}
%</flat-sample|macros-sample>
%<*these-sample|flat-sample>
%<<COMMENT
diff --git a/macros/latex/contrib/yathesis/source/yathesis.dtx b/macros/latex/contrib/yathesis/source/yathesis.dtx
index 867fc3f937..a03d55f178 100644
--- a/macros/latex/contrib/yathesis/source/yathesis.dtx
+++ b/macros/latex/contrib/yathesis/source/yathesis.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2012-2023 by Denis Bitouz'e <denis.bitouze@univ-littoral.fr>
+% Copyright (C) 2012-2024 by Denis Bitouz'e <denis.bitouze@univ-littoral.fr>
% -------------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -23,7 +23,7 @@
%<*readme>
-----------------------------------------------------------------------
-- `yathesis` --- Yet Another Thesis Class, version 1.0.11
+- `yathesis` --- Yet Another Thesis Class, version 1.0.12
- E-mail: `denis.bitouze@univ-littoral.fr`
- Released under the LaTeX Project Public License v1.3c or later. See
http://www.latex-project.org/lppl.txt
@@ -85,7 +85,7 @@ Typesetting the documentation of the class requires:
% This field contains the version of the package.
% The value is optional.
% The value is restricted to 32 characters.
-\version{1.0.11 2023-02-24}
+\version{1.0.12 2024-03-07}
% -------------------------------------------------------------------------
% This field contains the name of the author(s).
% The value is optional.
@@ -199,6 +199,12 @@ Note: The “ya” in the package name stands for “yet another”.
%<*changelog>
# [Unreleased]
+# [1.0.12] - 2024-03-07
+
+## Changed
+- Documentation improved
+- Code more robust
+
# [1.0.11] - 2023-02-24
## Changed
@@ -488,8 +494,8 @@ Note: The “ya” in the package name stands for “yet another”.
\fi
%</internal>
%<*class|install>
-\def\yathesisversion{1.0.11}
-\def\yathesisdate{2023-02-24}
+\def\yathesisversion{1.0.12}
+\def\yathesisdate{2024-03-07}
%</class|install>
%<*install>
\input l3docstrip.tex
@@ -756,8 +762,8 @@ This work consists of the file yathesis.dtx
%
% \DoNotIndex{\addbibresource,\biolinumKeyGlyph,\DeclareRobustCommand,\ClassWarning,\DescribeOption,\DescribeShortCut,\ifcase,\ifnum,\ifthenelse,\option,\pagestyle}
%
-% \def\yathesisversion{1.0.11}
-% \def\yathesisdate{2023-02-24}
+% \def\yathesisversion{1.0.12}
+% \def\yathesisdate{2024-03-07}
%
% \title{\textsf{yathesis} : classe \LaTeX{} pour la rédaction de thèses\\
% selon les (des) règles en vigueur en France\thanks{Ce fichier décrit la version
@@ -3593,7 +3599,7 @@ This work consists of the file yathesis.dtx
\YAD@localstyle % pour les local TOCs qui suivent
\ifbool{YAD@mainmatter}%
{%
- \pagestyle{mainmatter}%
+ \pagestyle{mainmatter}%
}{%
}%
\ifbool{YAD@backmatter}%
@@ -3628,7 +3634,7 @@ This work consists of the file yathesis.dtx
\YAD@localstyle % pour les local TOCs qui suivent
\ifbool{YAD@mainmatter}%
{%
- \pagestyle{mainmatter}%
+ \pagestyle{mainmatter}%
}{%
}%
\ifbool{YAD@backmatter}%
@@ -5944,12 +5950,18 @@ This work consists of the file yathesis.dtx
\xapptocmd{\listoftables}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
\xpretocmd{\listoffigures}{\renewcommand{\YAD@localtoc}{}}{}{}%
\xapptocmd{\listoffigures}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
-\xpretocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{}}{}{}%
-\xapptocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
-\xpretocmd{\printglossary}{\renewcommand{\YAD@localtoc}{}}{}{}%
-\xapptocmd{\printglossary}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
-\xpretocmd{\printindex}{\renewcommand{\YAD@localtoc}{}}{}{}%
-\xapptocmd{\printindex}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
+\ifcsdef{printbibliography}{%
+ \xpretocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{}}{}{}%
+ \xapptocmd{\printbibliography}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
+ }{}%
+\ifcsdef{printglossary}{%
+ \xpretocmd{\printglossary}{\renewcommand{\YAD@localtoc}{}}{}{}%
+ \xapptocmd{\printglossary}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
+ }{}%
+\ifcsdef{printindex}{%
+ \xpretocmd{\printindex}{\renewcommand{\YAD@localtoc}{}}{}{}%
+ \xapptocmd{\printindex}{\renewcommand{\YAD@localtoc}{\YAD@default@localtoc}}{}{}%
+}{}%
% \end{macrocode}
% On redéfinit la commande ×\section× de sorte que, comme la commande
% ×\chapter×, elle dispose d'un argument optionnel supplémentaire permettant de
@@ -7439,8 +7451,12 @@ style=#yadsymbolstyle,⟨autre⟩
}
\xpretocmd{\conclusion}{\cleardoublepage\zlabel{conclusion}}{}{}
\xpretocmd{\conclusion*}{\cleardoublepage\zlabel{conclusion}}{}{}
- \xpretocmd{\printbibliography}{\cleardoublepage\zlabel{printbibliography}}{}{}
- \xpretocmd{\printindex}{\cleardoublepage\zlabel{printindex}}{}{}
+ \ifcsdef{printbibliography}{%
+ \xpretocmd{\printbibliography}{\cleardoublepage\zlabel{printbibliography}}{}{}
+ }{}
+ \ifcsdef{printindex}{%
+ \xpretocmd{\printindex}{\cleardoublepage\zlabel{printindex}}{}{}
+ }{}
\xapptocmd{\makebackcover}{\zlabel{makebackcover}}{}{}
\let\include\input
}