From a01f81cc1fa81b449afcf1c77def8688146582d5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 16 Dec 2014 23:09:50 +0000 Subject: pas-cours (16dec14) git-svn-id: svn://tug.org/texlive/trunk@35842 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/pas-cours/README | 2 + .../doc/latex/pas-cours/macro-styles.tex | 55 ++++++++++++++-------- .../texmf-dist/doc/latex/pas-cours/pas-cours.tex | 43 ++++++++++++----- .../texmf-dist/tex/latex/pas-cours/pas-cours.sty | 15 ++++-- 4 files changed, 78 insertions(+), 37 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/pas-cours/README b/Master/texmf-dist/doc/latex/pas-cours/README index 0ffa4ce99f5..02377ba521a 100644 --- a/Master/texmf-dist/doc/latex/pas-cours/README +++ b/Master/texmf-dist/doc/latex/pas-cours/README @@ -15,6 +15,7 @@ Documentation The documentation of the package is in the ZIP file or under the directory /doc/ in french language. +If you don't find it, go to the URL http://get-software.net/macros/latex/contrib/pas-cours/doc/pas-cours.pdf Thanks to use pas-cours.sty. @@ -34,5 +35,6 @@ Documentation La documentation de l'extension se trouve dans le fichier ZIP ou dans dans le répertoire /doc/. +Si vous ne trouvez pas cette documentation, allez sur la page http://get-software.net/macros/latex/contrib/pas-cours/doc/pas-cours.pdf Merci d'utiliser pas-cours.sty. diff --git a/Master/texmf-dist/doc/latex/pas-cours/macro-styles.tex b/Master/texmf-dist/doc/latex/pas-cours/macro-styles.tex index b58cc8bdf8a..0a0b3314dda 100644 --- a/Master/texmf-dist/doc/latex/pas-cours/macro-styles.tex +++ b/Master/texmf-dist/doc/latex/pas-cours/macro-styles.tex @@ -96,16 +96,16 @@ \IfStrEq{\cmdPAS@env@title}{}{}{\def\texte{\cmdPAS@env@title}} \IfStrEq{\cmdPAS@env@color}{}{}{\def\couleur{\cmdPAS@env@color}} \ifPAS@env@degrade - \tikzstyle{noeud} = [rectangle,inner sep=10pt,fill=\couleur!10,path fading=east] + \tikzstyle{noeud} = [rectangle,inner ysep=10pt, inner xsep=5pt, fill=\couleur!10,path fading=east] \else - \tikzstyle{noeud} = [rectangle,inner sep=10pt,fill=\couleur!10] + \tikzstyle{noeud} = [rectangle,inner ysep=10pt, inner ysep=5pt, fill=\couleur!10] \fi \itemclass{\couleur} \noindent \begin{tikzpicture} \node [noeud] (box) {% - \begin{minipage}{\textwidth} + \begin{minipage}{\dimexpr\textwidth-40pt} \itshape #2 \ifPAS@env@endsymb \hfill \cmdPAS@env@symb @@ -114,7 +114,7 @@ }; \ifPAS@env@notitle\else \node[text=white,fill=\couleur,rectangle, shading=ball, ball color=\couleur, above right] (title) at ($(box.north west)+(-0.03,0)$) - {\begin{ant}\textbf{\texte}\end{ant}}; + {\kern-3pt\begin{ant}\textbf{\texte}\end{ant}}; \fi \draw[color=\couleur!50!black,very thick] (box.north west)--(box.south west)--(box.south east); \node[left,color=\couleur] at (box.north east) {\emph{\cmdPAS@env@name}}; @@ -264,13 +264,13 @@ \IfStrEq{\cmdPAS@env@title}{}{}{\def\texte{\cmdPAS@env@title}} \IfStrEq{\cmdPAS@env@color}{}{}{\def\couleur{\cmdPAS@env@color}} \ifPAS@env@degrade - \tikzstyle{noeud} = [rectangle,inner sep=10pt,fill=\couleur!10,path fading=east] + \tikzstyle{noeud} = [rectangle,inner ysep=10pt, inner xsep=5pt, fill=\couleur!10,path fading=east,outer sep=0pt] \else - \tikzstyle{noeud} = [rectangle,inner sep=10pt,fill=\couleur!10] + \tikzstyle{noeud} = [rectangle,inner ysep=10pt, inner xsep=5pt, fill=\couleur!10,outer sep=0pt] \fi \itemclass{\couleur} \begin{lrbox}{\pas@box} - \begin{minipage}{0.93\linewidth} + \begin{minipage}{\dimexpr\linewidth-\parindent-14pt} } { \ifPAS@env@endsymb @@ -287,16 +287,16 @@ \edef\texte{\texte~(suite)} \ifPAS@env@notitlebreak\else\ifPAS@env@notitle\else \node[text=white,fill=\couleur,rectangle, shading=ball, ball color=\couleur, above right] (title) at ($(box.north west)+(-0.03,0)$) - {\begin{ant}\textbf{\texte}\end{ant}}; + {\begin{ant}\kern-3pt\texte\end{ant}}; \fi\fi \else \ifPAS@env@notitle\else \node[text=white,fill=\couleur,rectangle, shading=ball, ball color=\couleur, above right] (title) at ($(box.north west)+(-0.03,0)$) - {\begin{ant}\textbf{\texte}\end{ant}}; + {\kern-3pt\begin{ant}\texte\end{ant}}; \fi \fi \draw[color=\couleur!50!black,very thick] (box.north west)--(box.south west)--(box.south east); - \node[left,color=\couleur] at (box.north east) {\emph{\cmdPAS@env@name}}; + \node[left,color=\couleur] at ($(box.north east)+(0,1pt)$) {\emph{\cmdPAS@env@name}}; \end{tikzpicture} \vspace{0.5cm} } @@ -322,11 +322,13 @@ \node[rounded corners=3pt,draw=\couleur!50!black,very thick,left,fill=white] at ($(box.south east)+(-0.5,0)$) {...}; \end{tikzpicture}\par \begin{lrbox}{\pas@box} - \begin{minipage}{0.93\linewidth} + \begin{minipage}{\dimexpr\linewidth-\parindent-14pt} } %%%%%%%%%% définition du titre +\newlength\pas@titlelinewidth + \define@cmdkey [PAS] {chap} {num}{} \define@cmdkey [PAS] {chap} {color}{} \define@cmdkey [PAS] {chap} {pos}{} @@ -346,7 +348,7 @@ { \tikzstyle{pastitrepos} = [text=\cmdPAS@chap@color,rectangle,left] \tikzstyle{pastrait} = [right color=\cmdPAS@chap@color, left color=white,thick] \tikzstyle{passstitre} = [\cmdPAS@chap@color,left,scale=0.5] - \edef\PASx{-\textwidth} + \setlength{\pas@titlelinewidth}{\dimexpr2cm-\linewidth} \def\PASpos{box.north west} \def\PAStrait{box.west} \def\PASsstitre{box.south west} @@ -355,24 +357,30 @@ { \tikzstyle{pastitrepos} = [text=\cmdPAS@chap@color,rectangle,right] \tikzstyle{pastrait} = [left color=\cmdPAS@chap@color, right color=white,thick] \tikzstyle{passstitre} = [\cmdPAS@chap@color,right,scale=0.5] - \edef\PASx{\textwidth} + \setlength{\pas@titlelinewidth}{\dimexpr\linewidth-2cm} \def\PASpos{box.north east} \def\PAStrait{box.east} \def\PASsstitre{box.south east} \def\PAStitrealign{flushleft} } \noindent + \begin{\PAStitrealign} \begin{tikzpicture} - \node[fill=\cmdPAS@chap@color, shading=ball, ball color=\cmdPAS@chap@color, very thick,circle, inner xsep=5pt, inner ysep=2pt] (box) at (0,0) {\begin{Large}\textcolor{white}{\begin{ant} \textbf{\titre@chapitre} \end{ant}}\end{Large}}; - \node[pastitrepos] at (\PASpos) {\begin{minipage}{\textwidth}\begin{\PAStitrealign} \begin{Large}\textcolor{\cmdPAS@chap@color}{ \begin{ant} #2 \end{ant}}\end{Large} \end{\PAStitrealign} \end{minipage}}; - \shade[pastrait] (\PAStrait) rectangle +(\PASx,-0.01); + % Le numero de chapitre + \node[fill=\cmdPAS@chap@color, shading=ball, ball color=\cmdPAS@chap@color, very thick,circle, inner xsep=5pt, inner ysep=2pt] (box) at (0,0) {\kern-5pt\begin{Large}\textcolor{white}{\begin{ant}\textbf{\titre@chapitre}\end{ant}}\end{Large}}; + % le titre + \node[pastitrepos] at (\PASpos) {\begin{minipage}{\dimexpr\textwidth-2cm}\begin{\PAStitrealign} \begin{Large}\textcolor{\cmdPAS@chap@color}{ \begin{ant} #2 \end{ant}}\end{Large} \end{\PAStitrealign} \end{minipage}}; + % la ligne + \shade[pastrait] (\PAStrait) rectangle +(\pas@titlelinewidth,-0.01); + % le sous-titre \node[passstitre] at (\PASsstitre) {\begin{ant}#3\end{ant}}; \end{tikzpicture} + \end{\PAStitrealign} } %%%%%%%%%%%% Définition d'un mot -\newcommand{\definmot}[1]{\texttt{\textbf{\textcolor{defi}{#1}}}} +\newcommand{\definmot}[1]{\texttt{\textbf{\textcolor{\couleur}{#1}}}} % Itemclass @@ -412,10 +420,17 @@ %%%%%%%%%%% PREREQUIS \newsavebox{\prerequisBox} +\newsavebox{\imgPrerequis} +\newlength{\largeurimgPrerequis} + \newenvironment{prerequis} {% + \begin{lrbox}{\imgPrerequis} + \includegraphics[scale=0.25]{prerequis.png} + \end{lrbox} + \settowidth{\largeurimgPrerequis}{\usebox{\imgPrerequis}}% \begin{lrbox}{\prerequisBox} - \begin{minipage}{0.9\linewidth} + \begin{minipage}{\dimexpr\textwidth-0.5\largeurimgPrerequis-15pt} \begin{itemize}[leftmargin=1em,label={\color{purple}$\bullet$}] \tocFONT } @@ -443,7 +458,7 @@ \end{lrbox} \settowidth{\largeurimageBox}{\usebox{\imageBox}}% \begin{lrbox}{\aretenirBox} -\begin{minipage}{\dimexpr\linewidth-\largeurimageBox-1em} +\begin{minipage}{\dimexpr\linewidth-\largeurimageBox-1em-10pt} } {% \end{minipage} @@ -467,7 +482,7 @@ \end{lrbox} \settowidth{\largeurimageBox}{\usebox{\imageBox}}% \begin{lrbox}{\attentionBox} -\begin{minipage}{\dimexpr\linewidth-\largeurimageBox-1em} +\begin{minipage}{\dimexpr\linewidth-\largeurimageBox-1em-10pt} } {% \end{minipage} diff --git a/Master/texmf-dist/doc/latex/pas-cours/pas-cours.tex b/Master/texmf-dist/doc/latex/pas-cours/pas-cours.tex index 31b2406e829..c5e376f9e84 100644 --- a/Master/texmf-dist/doc/latex/pas-cours/pas-cours.tex +++ b/Master/texmf-dist/doc/latex/pas-cours/pas-cours.tex @@ -17,7 +17,7 @@ \usepackage{lipsum} \usepackage{multido} \usepackage[table]{xcolor} -\usepackage{pas-cours} +\usepackage[ant]{pas-cours} %------------------------------ @@ -27,7 +27,7 @@ % TABLE DES MATIERES % ------------------- -\addto{\captionsfrench}{\renewcommand*{\contentsname}{\begin{ant}\color{red!50!black}\Huge Sommaire\end{ant}}} +\addto{\captionsfrench}{\renewcommand*{\contentsname}{\begin{ant}\color{red!50!black}\Huge\bfseries Sommaire\end{ant}}} \def\@dottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else @@ -97,7 +97,7 @@ \newcommand{\helvbx}{\usefont{T1}{phv}{m}{n}} -\title{pas-cours.sty\\\small v1.08} +\title{pas-cours.sty\\\small v1.09d} \date{\today} \author{Stéphane PASQUET\\\href{mailto:contact@mathweb.fr}{contact@mathweb.fr}} @@ -153,7 +153,7 @@ enumitem (pour la gestion des listes) \medskip -Pour une distribution Ubuntu, il peut s'installer dans le répertoire \texttt{texmf-local\textbackslash tex\textbackslash latex\textbackslash pas-cours\textbackslash}. +Je vous conseille d'installer manuellement ce package (dans le répertoire \texttt{texmf-local/tex/latex/pas-cours} par exemple) afin d'avoir accès à la documentation à tout moment avec la commande \texttt{texdoc pas-cours} car on m'a reporté un problème pour les utilisateurs de TeXLive et MacTeX. \section{Préambule} @@ -245,23 +245,23 @@ Si vous souhaitez que les titres soient \begin{lstlisting} \env[style=thm,name=Théorème de Pythagore,degrade] -{ Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} +{Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} \end{lstlisting} \medskip \env[style=thm,name=Théorème de Pythagore,degrade] -{ Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} +{Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} \begin{lstlisting} \env[style=thm,name=Théorème de Pythagore,num] -{ Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} +{Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} \end{lstlisting} \medskip \env[style=thm,name=Théorème de Pythagore,num] -{ Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} +{Si ABC est un triangle rectangle en A, alors $BC^2=AB^2+AC^2$.} \subsection{Définitions} @@ -375,8 +375,6 @@ C'est un peu long ...} Ici, on rédige la preuve du théorème de Pythagore.\\ C'est un peu long ...} -\newpage - \subsection{Noms avec virgule} Si un encadré doit avoir un nom avec une ou plusieurs virgules, il faut mettre le \texttt{name} entre accolades. @@ -708,7 +706,6 @@ name,legende] \end{tikzpicture} \end{center} -\newpage \begin{lstlisting} \begin{tikzpicture} @@ -1540,9 +1537,7 @@ coefopaq=.3] 07/05/2013 & Version V1.04 & ajout de l'option \texttt{notitlebreak} pour l'environnement \texttt{pasbox} et pour la commande \textbackslash env.\\ \hline 06/07/2013 & Version V1.05 & ajout de l'option \texttt{notoc} pour l'environnement \texttt{pasbox} et pour la commande \textbackslash env.\\ -\hline & & modification de la valeur par défaut de l'option \texttt{toc} (par défaut, \texttt{toc=false} maintenant).\\ -\hline & & ajout de l'option \texttt{everytoc} lors de l'appel du package\\ & & ajout de l'option \textbackslash\verb+@+ifpackageloaded\{tikz\} dans le code (problème de compatibilité avec d'autres extensions)\\ & & ajout des styles \og demo \fg{} et \og thm \fg{} pour l'environnement \texttt{pasbox} et pour la commande \textbackslash env.\\ @@ -1554,5 +1549,27 @@ coefopaq=.3] \hline 10/11/2014 & Version V1.08 & Correction de 2 problèmes (\og Théorème \fg{} était mis avec un \og s \fg{} m\^eme au singulier et le mot \og ar\^ete \fg{} était mal codé dans les légendes de solides.\\ \hline +26/11/2014 & Version V1.09 & Amélioration du centrage du numéro de chapitre dans le cercle.\\ +& & Amélioration de la commande \textbackslash definmot en choisissant automatiquement la couleur de l'environnement.\\ +& & Réajustement des dimensions pour les titres et les environnements (defi, thm, ...).\\ +& & correction du bug concernant l'option \og ant \fg{} lors de l'appel de l'extension.\\ +\hline +26/11/2014 & Version V1.09b & Amélioration de la correction concernant la largeur des environnements (defi,thm,...).\\ +\hline +27/11/2014 & Version V1.09c & Correction concernant l'option \og ant \fg{} (fonte en gras).\\ +\hline +11/12/2014 & Version V1.09d & Correction concernant les environnements \texttt{aretenir} et \texttt{prerequis} (réajustement de la largeur).\\ +& & Correctif de la commande \textbackslash\texttt{breakbox} (erreur de largeur)\\ +\hline \end{tabularx} + +\section{Remarques et suggestions} + +On m'a fait remarqué que je pourrais rendre automatique la liste à puces dans le cas où l'option \texttt{pluriel} était informé dans un environnement (thm, defi, ...). + +Je n'ai pas souhaité cette automatisation car je pense que certaines personnes n'aimeraient pas cela. + +\medskip + +Si vous aussi vous souhaitez participer à l'évolution de cette extension, n'hésitez pas à m'envoyer un mail. \end{document} diff --git a/Master/texmf-dist/tex/latex/pas-cours/pas-cours.sty b/Master/texmf-dist/tex/latex/pas-cours/pas-cours.sty index 35dbcaa01a0..1fe3c0edce6 100644 --- a/Master/texmf-dist/tex/latex/pas-cours/pas-cours.sty +++ b/Master/texmf-dist/tex/latex/pas-cours/pas-cours.sty @@ -1,6 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -% pas-cours.sty V1.08 encodage : UTF8 % +% pas-cours.sty V1.09d encodage : UTF8 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % @@ -23,10 +23,17 @@ % ajout de l'option "autonum" à \chap % retrait de l'option noclearpage à \chap % Ajout du 10/11/2014 : modifications de quelques bugs d'écriture +% Ajout du 26/11/2014 : amélioration du centrage du numéro de chapitre dans le cercle +% amélioration de la commande \definmot en choisissant automatiquement la couleur de l'environnement +% réajustement des dimensions pour les titres et les environnements (defi, thm, ...) +% correction du bug concernant l'option "ant" lors de l'appel de l'extension (booléen mal placé) +% correction du bug concernant l'option "ant" lors de l'appel de l'extension (texte en gras) +% Ajout du 08/12/2014 : réajustement des dimensions de l'environnement "prerequis" +% Ajout du 11/12/2014 : réajustement des dimensions de l'environnement "aretenir" et correctif de la commande \breakbox % Informations générales \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pas-cours}[2014/11/10] +\ProvidesPackage{pas-cours}[2014/11/27] %% Chargement des packages nécessaires @@ -45,9 +52,9 @@ \newenvironment{ant}{ \if@ant -\fontseries{bx}\fontshape{sc}\selectfont +\fontseries{bx}\fontfamily{anttlc}\selectfont \else -\fontfamily{anttlc}\selectfont +\fontseries{bx}\fontshape{sc}\selectfont \fi } -- cgit v1.2.3