From dd55715131d83d4e2a8e2ba9a38dc7ef3a8eccd3 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Mon, 31 Aug 2020 22:26:15 +0200 Subject: [PATCH] Attempt to make an application env with numbering and framing. Need to be reworked. --- jl-cours/environments.tex | 35 +++++++++++++++++++++++++++++++++++ jl-cours/jl-cours.cls | 2 +- jl-cours/mdtheorem.tex | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/jl-cours/environments.tex b/jl-cours/environments.tex index 27937ec..73faef7 100644 --- a/jl-cours/environments.tex +++ b/jl-cours/environments.tex @@ -355,6 +355,41 @@ } } +% Need to adapt the code in order to get numbering and +% framing +%% application +%\NewDocumentEnvironment{application}{ s o o o}{ +% \IfBooleanTF {#1} { +% % if starred: without logo and title +% \IfNoValueTF {#2} { +% % if no subtitle +% \begin{application2} +% +% }{ +% % if subtitle +% \begin{application2}[#2] +% +% } +% }{ +% % if not starred: with number +% \IfNoValueTF {#2} { +% % if no subtitle +% \begin{application1} +% +% }{ +% % if subtitle +% \begin{application1}[#2] +% +% } +% } +% }{ +% \IfBooleanTF {#1} { +% \end{application2} +% }{ +% \end{application1} +% } +% } + % exercice \NewDocumentEnvironment{exercice}{ s o o o}{ \IfBooleanTF {#1} { diff --git a/jl-cours/jl-cours.cls b/jl-cours/jl-cours.cls index 948ac52..6a64065 100644 --- a/jl-cours/jl-cours.cls +++ b/jl-cours/jl-cours.cls @@ -159,7 +159,7 @@ \cohead[]{\@title} \rohead[]{} }{ - \rohead[Cours]{Cours - \@title} + \rohead[Cours]{Cours - \@subtitle} } } } diff --git a/jl-cours/mdtheorem.tex b/jl-cours/mdtheorem.tex index 90739ef..c45e3e0 100644 --- a/jl-cours/mdtheorem.tex +++ b/jl-cours/mdtheorem.tex @@ -284,6 +284,40 @@ \end{@met2*} } +% Need to adapt the code in order to get numbering and +% framing +%% application +%\newtheoremstyle{@app1} +% {\topsep}% espace avant +% {\topsep}% espace apres +% {}% Police utilisee par le style de thm +% {}% Indentation (vide = aucune, \parindent = indentation paragraphe) +% {\bfseries}% Police du titre de thm +% {}% Signe de ponctuation apres le titre du thm +% {\newline}% Espace apres le titre du thm (\newline = linebreak) +% {\thmname{#1}\thmnumber{ #2}\thmnote{ - \normalfont{\textit{#3}}}} +% % composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre +% +%\theoremstyle{@app1} +%\newtheorem{application1}{\Jd Application} +% +%% application +%\newtheoremstyle{@app2} +%{\topsep}% espace avant +%{\topsep}% espace apres +%{}% Police utilisee par le style de thm +%{}% Indentation (vide = aucune, \parindent = indentation paragraphe) +%{\bfseries}% Police du titre de thm +%{}% Signe de ponctuation apres le titre du thm +%{\newline}% Espace apres le titre du thm (\newline = linebreak) +%{\thmname{#1}\thmnote{ - \normalfont{\textit{#2}}}} +%% composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre +% +%\theoremstyle{@app2} +%\newtheorem*{application2}{\Jd Application} +% +%\counterwithin*{application1}{section} + % exercice \newtheoremstyle{@exo1} {\topsep}% espace avant