From 925f90688b3a4e7078b59adb3a371a9be656f042 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Sat, 4 Dec 2021 18:01:36 +0100 Subject: [PATCH] Add a corollaire environment --- jl-cours/environments.tex | 33 +++++++++++++++++++++++++++++++++ jl-cours/mdtheorem.tex | 20 ++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/jl-cours/environments.tex b/jl-cours/environments.tex index 73faef7..dc4f426 100644 --- a/jl-cours/environments.tex +++ b/jl-cours/environments.tex @@ -71,6 +71,39 @@ } } +% corollaire +\NewDocumentEnvironment{corollaire}{ s o }{ + \IfBooleanTF {#1} { + % if starred: with logo + \IfNoValueTF {#2} { + % if no subtitle + \begin{@coro1} + + }{ + % if subtitle + \begin{@coro1}[#2] + + } + }{ + % if not starred: without logo + \IfNoValueTF {#2} { + % if no subtitle + \begin{@coro2} + + }{ + % if subtitle + \begin{@coro2}[#2] + + } + } +}{ + \IfBooleanTF {#1} { + \end{@coro1} + }{ + \end{@coro2} + } +} + % propriete \NewDocumentEnvironment{propriete}{ s o }{ \IfBooleanTF {#1} { diff --git a/jl-cours/mdtheorem.tex b/jl-cours/mdtheorem.tex index e1b1e93..3148b2b 100644 --- a/jl-cours/mdtheorem.tex +++ b/jl-cours/mdtheorem.tex @@ -64,6 +64,26 @@ \end{@thm2*} } +\RenewDocumentEnvironment{@coro1}{ o } {%begin + \IfNoValueTF {#1} { + \begin{@coro1*} + }{ + \begin{@coro1*}[\hfill{\normalfont\slshape#1}] + } +}{%end + \end{@coro1*} +} + +\RenewDocumentEnvironment{@coro2}{ o } {%begin + \IfNoValueTF {#1} { + \begin{@coro2*} + }{ + \begin{@coro2*}[\hfill{\normalfont\slshape#1}] + } +}{%end + \end{@coro2*} +} + % propriete \mdtheorem[style=pencil, theoremseparator={}, theoremspace={}, outerlinewidth=1pt, outerlinecolor=black]{@ppt1}{\Jd Propriété}