From 593142f36834bedc8b6afe512e52bca2ee042dad Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 5 Apr 2024 03:01:13 +0000 Subject: CTAN sync 202404050301 --- macros/latex/contrib/acmart/README | 2 + macros/latex/contrib/acmart/acmart.dtx | 13 +- macros/latex/contrib/acmart/acmart.pdf | Bin 915513 -> 915325 bytes macros/latex/contrib/acmart/acmguide.pdf | Bin 441025 -> 441031 bytes .../latex/contrib/acmart/samples/sample-acmcp.pdf | Bin 215115 -> 215115 bytes .../contrib/acmart/samples/sample-acmengage.pdf | Bin 400681 -> 400681 bytes .../contrib/acmart/samples/sample-acmlarge.pdf | Bin 611834 -> 611834 bytes .../acmart/samples/sample-acmsmall-biblatex.pdf | Bin 634465 -> 634465 bytes .../acmart/samples/sample-acmsmall-conf.pdf | Bin 1057103 -> 1057098 bytes .../acmart/samples/sample-acmsmall-submission.pdf | Bin 624275 -> 624275 bytes .../contrib/acmart/samples/sample-acmsmall.pdf | Bin 621763 -> 621763 bytes .../contrib/acmart/samples/sample-acmtog-conf.pdf | Bin 569862 -> 569862 bytes .../latex/contrib/acmart/samples/sample-acmtog.pdf | Bin 569337 -> 569337 bytes .../contrib/acmart/samples/sample-manuscript.pdf | Bin 623270 -> 623270 bytes .../acmart/samples/sample-sigconf-authordraft.pdf | Bin 1048896 -> 1048892 bytes .../acmart/samples/sample-sigconf-biblatex.pdf | Bin 622211 -> 622211 bytes .../contrib/acmart/samples/sample-sigconf-i13n.pdf | Bin 1060387 -> 1060387 bytes .../contrib/acmart/samples/sample-sigconf.pdf | Bin 1045103 -> 1045103 bytes .../contrib/acmart/samples/sample-sigplan.pdf | Bin 1053568 -> 1053568 bytes macros/latex/contrib/csquotes/csq-compat.def | 2 +- macros/latex/contrib/csquotes/csquotes.def | 15 +- macros/latex/contrib/csquotes/csquotes.pdf | Bin 304934 -> 305085 bytes macros/latex/contrib/csquotes/csquotes.sty | 14 +- macros/latex/contrib/csquotes/csquotes.tex | 13 +- .../contrib/customenvs/doc/customenvs-doc-en.pdf | Bin 116272 -> 182916 bytes .../contrib/customenvs/doc/customenvs-doc-en.tex | 83 +++++- .../contrib/customenvs/doc/customenvs-doc-fr.pdf | Bin 519283 -> 1399073 bytes .../contrib/customenvs/doc/customenvs-doc-fr.tex | 92 +++++- .../contrib/customenvs/doc/envtexo_exemples.tex | 160 +++++----- macros/latex/contrib/customenvs/tex/customenvs.sty | 323 ++++++++++++++++++++- macros/latex/contrib/rectopma/README.txt | 29 ++ macros/latex/contrib/rectopma/TestTitle.pdf | Bin 114178 -> 101830 bytes macros/latex/contrib/rectopma/TestTitle.tex | 56 ---- macros/latex/contrib/rectopma/rectopma.dtx | 219 ++++++++++++++ macros/latex/contrib/rectopma/rectopma.pdf | Bin 0 -> 141599 bytes macros/latex/contrib/rectopma/rectopma.sty | 88 ------ 36 files changed, 855 insertions(+), 254 deletions(-) create mode 100644 macros/latex/contrib/rectopma/README.txt delete mode 100644 macros/latex/contrib/rectopma/TestTitle.tex create mode 100644 macros/latex/contrib/rectopma/rectopma.dtx create mode 100644 macros/latex/contrib/rectopma/rectopma.pdf delete mode 100644 macros/latex/contrib/rectopma/rectopma.sty (limited to 'macros/latex') diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README index 8d799d2832..f72ea3b2bf 100644 --- a/macros/latex/contrib/acmart/README +++ b/macros/latex/contrib/acmart/README @@ -12,6 +12,8 @@ The production version is the one on CTAN and ACM sites. Changes +Version 2.05. Changed title for TELO. + Version 2.04. Compatibility with the new latex-dev format eSSN is always printed, even if pSSN is present Wording change in copyright statement diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx index 61251bff30..c9d253b955 100644 --- a/macros/latex/contrib/acmart/acmart.dtx +++ b/macros/latex/contrib/acmart/acmart.dtx @@ -1,6 +1,6 @@ % \iffalse % -% Copyright 2016-2023, Association for Computing Machinery +% Copyright 2016-2024, Association for Computing Machinery % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any @@ -57,7 +57,7 @@ % \ifx\currentjob\guide\OnlyDescription\fi % \GetFileInfo{acmart.dtx} % \title{\LaTeX{} Class for the \emph{Association for Computing -% Machinery}\thanks{\copyright 2016--2023, Association for Computing Machinery}} +% Machinery}\thanks{\copyright 2016--2024, Association for Computing Machinery}} % \author{Boris Veytsman\thanks{% % \href{mailto:borisv@lk.net}{\texttt{borisv@lk.net}}, % \href{mailto:boris@varphi.com}{\texttt{boris@varphi.com}}}} @@ -2158,7 +2158,7 @@ % TDS & ACM/IMS Transactions on Data Science\\ % TEAC & ACM Transactions on Economics and Computation\\ % TECS & ACM Transactions on Embedded Computing Systems \\ -% TELO & ACM Transactions on Evolutionary Learning \\ +% TELO & ACM Transactions on Evolutionary Learning and Optimization\\ % THRI & ACM Transactions on Human-Robot Interaction\\ % TIIS & ACM Transactions on Interactive Intelligent Systems\\ % TIOT & ACM Transactions on Internet of Things \\ @@ -2309,7 +2309,7 @@ \ProvidesFile{acmart.dtx} % %\ProvidesClass{acmart} -[2024/03/31 v2.04 Typesetting articles for the Association for Computing Machinery] +[2024/04/03 v2.05 Typesetting articles for the Association for Computing Machinery] % \end{macrocode} % % \changes{v1.00}{2016/04/14}{First released version} @@ -4391,6 +4391,7 @@ % \changes{1.89}{2023/03/25}{Added PACMMOD} % \changes{1.89}{2023/03/25}{Added TOPML} % \changes{1.90}{2023/03/30}{Added TOPML eISSN} +% \changes{2.05}{2024/04/04}{New data for TELO} % % We use the |xkeyval| interface to define journal titles and the relevant % information @@ -4633,8 +4634,8 @@ \def\@journalNameShort{ACM Trans. Embedd. Comput. Syst.}% \def\@permissionCodeOne{1539-9087}% \or % TELO - \def\@journalName{ACM Transactions on Evolutionary Learning}% - \def\@journalNameShort{ACM Trans. Evol. Learn.}% + \def\@journalName{ACM Transactions on Evolutionary Learning and Optimization}% + \def\@journalNameShort{ACM Trans. Evol. Learn. Optim.}% \def\@permissionCodeOne{2688-3007}% \or % THRI \def\@journalName{ACM Transactions on Human-Robot Interaction}% diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf index af42c74465..344d409f1b 100644 Binary files a/macros/latex/contrib/acmart/acmart.pdf and b/macros/latex/contrib/acmart/acmart.pdf differ diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf index c13a1ecd0b..20738de1c0 100644 Binary files a/macros/latex/contrib/acmart/acmguide.pdf and b/macros/latex/contrib/acmart/acmguide.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf index 0371cfab76..aa0af4ed03 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf and b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf index a9d9c5573d..ecef3f264c 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf and b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf index efad61a4f5..1dadd006b9 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf and b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf index fa2c7fcdb0..60c0827ba8 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf index 2d4ae466ce..b2cba4a4f3 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf index 925fec5551..23dc335812 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf index 1c1a2ab289..c7a9e5f575 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf and b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf index b3e3733cfd..b1df26ca61 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf and b/macros/latex/contrib/acmart/samples/sample-acmtog-conf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf index 7d9d35c82e..1434d59099 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf and b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf index c9c20da0cf..be3cac8e04 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf and b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf index ea9d209bd8..c95d95127d 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-authordraft.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf index 072c1d6a77..6aa27ae8fb 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf index 30463e2948..7a84d7c4e7 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf index 3bfab889d7..e1239820b7 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf and b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf differ diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf index 8a2c4acee7..cb491065d0 100644 Binary files a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf and b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf differ diff --git a/macros/latex/contrib/csquotes/csq-compat.def b/macros/latex/contrib/csquotes/csq-compat.def index 9a19bf1fa4..d37f4fde7d 100644 --- a/macros/latex/contrib/csquotes/csq-compat.def +++ b/macros/latex/contrib/csquotes/csq-compat.def @@ -1,5 +1,5 @@ \ProvidesFile{csq-compat.def} - [2022-09-14 v5.2n csquotes backwards compatibility (JAW)] + [2024-04-04 v5.2o csquotes backwards compatibility (JAW)] \def\csq@getversion#1{% \expandafter\csq@getversion@i diff --git a/macros/latex/contrib/csquotes/csquotes.def b/macros/latex/contrib/csquotes/csquotes.def index 80f8cb5713..feb396879a 100644 --- a/macros/latex/contrib/csquotes/csquotes.def +++ b/macros/latex/contrib/csquotes/csquotes.def @@ -1,5 +1,5 @@ \ProvidesFile{csquotes.def} - [2022-09-14 v5.2n csquotes generic definitions (JAW)] + [2024-04-04 v5.2o csquotes generic definitions (JAW)] % Set defaults @@ -63,11 +63,11 @@ {\textquoteleft} {\textquoteright} \DeclareQuoteStyle{dutch} - {\quotedblbase} + {\textquotedblleft} {\textquotedblright} [0.05em] - {\quotesinglbase}% unsure - {\textquoteright}% unsure + {\textquoteleft} + {\textquoteright} \DeclareQuoteStyle[american]{english}% verified {\textquotedblleft} {\textquotedblright} @@ -188,6 +188,12 @@ [0.05em] {\quotesinglbase} {\textquoteright} +\DeclareQuoteStyle{lithuanian} + {\quotedblbase} + {\textquotedblleft} + [0.05em] + {\textquoteright} + {\textquoteright} \DeclareQuoteStyle[guillemets]{norwegian} {\guillemotleft} {\guillemotright} @@ -397,6 +403,7 @@ \DeclareQuoteOption{japanese} \DeclareQuoteOption{latin} \DeclareQuoteOption{latvian} +\DeclareQuoteOption{lithuanian} \DeclareQuoteOption{norwegian} \DeclareQuoteOption{polish} \DeclareQuoteOption{portuguese} diff --git a/macros/latex/contrib/csquotes/csquotes.pdf b/macros/latex/contrib/csquotes/csquotes.pdf index c9e8a11c1e..27bb1ac7d3 100644 Binary files a/macros/latex/contrib/csquotes/csquotes.pdf and b/macros/latex/contrib/csquotes/csquotes.pdf differ diff --git a/macros/latex/contrib/csquotes/csquotes.sty b/macros/latex/contrib/csquotes/csquotes.sty index 0a5cbb4e84..676afbb578 100644 --- a/macros/latex/contrib/csquotes/csquotes.sty +++ b/macros/latex/contrib/csquotes/csquotes.sty @@ -1,5 +1,5 @@ % Copyright (c) 2003-2011 Philipp Lehman. -% (c) 2015-2019,2021,2022 Joseph Wright. +% (c) 2015-2019,2021,2022,2024 Joseph Wright. % % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{csquotes} - [2022-09-14 v5.2n context-sensitive quotations (JAW)] + [2024-04-04 v5.2o context-sensitive quotations (JAW)] %% Compatibility and requirements @@ -1034,22 +1034,22 @@ % PDF strings -\long\def\csq@pdf@quote#1{% - \if#1*\relax +\long\def\csq@pdf@quote#1#{% + \if*#1\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi {\csq@pdf@quote@ii} - {\csq@pdf@quote@i{#1}}} + {\csq@pdf@quote@i #1}} \long\def\csq@pdf@quote@i#1{% \csq@pdf@ooqmark #1\csq@pdf@coqmark} \long\def\csq@pdf@quote@ii#1{% \csq@pdf@oiqmark #1\csq@pdf@ciqmark} -\long\def\csq@pdf@fquote#1{% - \if#1*\relax +\long\def\csq@pdf@fquote#1#{% + \if*#1\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo diff --git a/macros/latex/contrib/csquotes/csquotes.tex b/macros/latex/contrib/csquotes/csquotes.tex index 97c6e2e3cc..74b7c93e1b 100644 --- a/macros/latex/contrib/csquotes/csquotes.tex +++ b/macros/latex/contrib/csquotes/csquotes.tex @@ -18,8 +18,8 @@ url={http://www.ctan.org/pkg/csquotes/}, author={Philipp Lehman, Joseph Wright}, email={joseph.wright@morningstar2.co.uk}, - revision={v5.2n}, - date={2022-09-14}} + revision={v5.2o}, + date={2024-04-04}} \hypersetup{% pdftitle={The csquotes Package}, @@ -158,6 +158,7 @@ This option controls multilingual support. It requires either the \sty{babel} pa latin & \raggedright italianguillemets, germanquotes, germanguillemets, britishquotes, americanquotes \tabularnewline latvian & \\ + lithuanian & \\ norwegian & guillemets, quotes \\ polish & guillemets, guillemets\* \\ portuguese & portuguese, brazilian \\ @@ -1554,8 +1555,14 @@ This revision history is a list of changes relevant to users of this package. Ch \begin{changelog} +\begin{release}{5.2o}{2024-04-04} +\item Correct detection of \texttt{*} at start of quotes in bookmarks +\item Added Lithuanian style +\item Fixed quoting in Dutch +\end{release} + \begin{release}{5.2n}{2022-09-14} -\item Furtehr work to localise font changes inside quotes +\item Further work to localise font changes inside quotes \end{release} \begin{release}{5.2m}{2022-09-09} diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf index c4a06de15b..f1bf30aacc 100644 Binary files a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf and b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex index 4bc63e0c5f..b8352c628d 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex @@ -34,8 +34,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.3} -\def\TPdate{30/03/2024} +\def\TPversion{0.1.4} +\def\TPdate{04/04/2024} \usepackage{tcolorbox} \sethlcolor{lightgray!25} \NewDocumentCommand\MontreCode{ m }{% @@ -111,6 +111,8 @@ \section{History} +\verb|v0.1.4|~:~~~~Create a SMS conversation + \verb|v0.1.3|~:~~~~Environment for exercise(s) (in french doc) \verb|v0.1.2|~:~~~~Pencil of skills @@ -357,7 +359,7 @@ The idea is to : \begin{itemize} \item present of list of categories and skills ; - \item prensented like a pencil. + \item presented like a pencil. \end{itemize} The code (within CC-BY-SA 4.0 license) is adapted from : @@ -420,4 +422,79 @@ The last argument, mandatory and between \MontreCode{(...)} give the list of cat Search/Skill 1\\Skill 2,Model/{Skill 1\\Skill 2}} \end{demohigh} +\pagebreak + +\section{SMS conversation} + +\subsection{Global use} + +The idea is to present a conversation of SMS. + +\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\begin{ChatSMS}[keys]{name} + \InSMS(*){time}{msg} + \OutSMS*(*){time}{msg} +\end{ChatSMS} +\end{codehigh} + +The style is globally fixed, but there's some customization available. + +\subsection{The environment} + +Available \MontreCode{keys} are : + +\begin{itemize} + \item \MontreCode{height} : height of the window (auto or specific) ; \MontreCode{auto} by default + \item \MontreCode{width} : width of the window ; \MontreCode{7cm} by default + \item \MontreCode{margin} : margin (L or R) for the bubble \MontreCode{1.5cm} by default + \item \MontreCode{color} : \textit{main} color (banner) ; \MontreCode{teal!75!cyan!75!white} by default ; + \item \MontreCode{colback} : color for background ; \MontreCode{lightgray!5} by default + \item \MontreCode{colorin} : color for incoming SMS ; \MontreCode{lime!25} by default + \item \MontreCode{colorout} : color for outcoming SMS ; \MontreCode{teal!25} by default + \item \MontreCode{writetxt} : text of sending zone ; \MontreCode{Write} by default + \item \MontreCode{fonttxt} : bubble's font ; \MontreCode{\textbackslash normalfont} by default + \item \MontreCode{avatar} : avatar of contact ; \MontreCode{\textbackslash faAddressCard} by default + \item \MontreCode{dispavatar} : boolean for displaying avatar near the bubbles ; \MontreCode{false} by default + \item \MontreCode{blackwhite} : boolean pour black\&white. \MontreCode{false} by default +\end{itemize} + +The argument, mandatory and between \MontreCode{(...)} give the name of the contact. + +\subsection{Macros for the bubbles} + +Regarding the bubble creation commands, \MontreCode{\textbackslash InSMS} and \MontreCode{\textbackslash OutSMS}: + +\begin{itemize} + \item the \textit{starred} version does not display the \textit{checkmarks} of \textit{good reception}; + \item the first mandatory argument is the time to display ; + \item the second mandatory argument is the message to display (including multi-lines). +\end{itemize} + +\subsection{Examples} + +\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +%with a personal image +\begin{ChatSMS}% + [width=6cm,fonttxt=\sffamily,height=10cm,avatar=img/android,dispavatar]{CP} + \InSMS{19:23}{Hi !} + \OutSMS{19:23}{Hi !\\ How are you ?} + \InSMS{19:25}{Just a problem with a math question\ldots} + \OutSMS{19:26}{Wanna help ??} + \InSMS{19:28}{Yes, I need to compute $\mathsf{\int_{0}^{1} x^2e^{-x}\,dx}$\ldots} + \OutSMS*{19:30}{Take care !!} +\end{ChatSMS} +\end{demohigh} + +\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25] +\begin{ChatSMS}% + [width=8cm,fonttxt=\sffamily,avatar=\faCanadianMapleLeaf,blackwhite]{CP} + \InSMS{19:23}{Hi !} + \OutSMS{19:23}{Hi !\\ How are you ?} + \InSMS{19:25}{Just a problem with a math question\ldots} + \OutSMS{19:26}{Wanna help ??} + \InSMS{19:28}{Yes, I need to compute $\mathsf{\int_{0}^{1} x^2e^{-x}\,dx}$\ldots} + \OutSMS*{19:30}{Take care !!} +\end{ChatSMS} +\end{demohigh} + \end{document} \ No newline at end of file diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf index c81bd43b7f..87d7507f61 100644 Binary files a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf and b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf differ diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex index 650bb37932..9cdaeadf73 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex @@ -39,9 +39,9 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.3} -\def\TPdate{30 mars 2024} -\usepackage[most]{tcolorbox} +\def\TPversion{0.1.4} +\def\TPdate{4 avril 2024} +\usepackage{tcolorbox} \tcbuselibrary{listingsutf8} \newtcblisting{DemoCode}[1]{% enhanced,width=0.95\linewidth,center,% @@ -66,10 +66,10 @@ keywordstyle={\color{violet}},% classoffset=2,% alsoletter={-},% - morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum},% + morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv},% keywordstyle={\color{green!50!black}},% classoffset=3,% - morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait},% + morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre},% keywordstyle={\color{orange}} },% #1 @@ -788,6 +788,88 @@ L'argument, obligatoire et entre \MontreCode{\{...\}} est la liste des catégori \pagebreak +\section{Fenêtre type conversation instantanée} + +\subsection{Principe et fonctionnement} + +L'idée est de proposer un environnement pour créer une fenêtre type \textit{conversation instantanée}, basée sur \MontreCode{tcolorbox}. + +\begin{DemoCode}{listing only} +\begin{EnvSMS}[Clés]{nom} + \SMSrec(*){heure}{msg} + \SMSenv(*){heure}{msg} +\end{EnvSMS} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{EnvSMS}{\LaTeX} + \SMSrec{19:23}{Salut !} + \SMSenv{19:23}{Salut!\\ Comment ça va~?} +\end{EnvSMS} +\end{DemoCode} + +La forme générale est fixée, et seuls quelques éléments de personnalisation(s) sont modifiables. + +\subsection{L'environnement} + +Les \MontreCode{clés} disponibles pour l'environnement, à donner entre \MontreCode{[...]}, sont : + +\begin{itemize} + \item \MontreCode{Hauteur} : hauteur de la fenêtre (automatique ou spécifique) ; \MontreCode{auto} par défaut + \item \MontreCode{Largeur} : largeur de la fenêtre (un minimum de 5 cm est conseillé) ; \MontreCode{7cm} par défaut + \item \MontreCode{Marge} : marge (G ou D) pour les bulles \MontreCode{1.5cm} par défaut + \item \MontreCode{Couleur} : couleur \textit{principale} (bandeau) ; \MontreCode{teal!75!cyan!75!white} par défaut ; + \item \MontreCode{CouleurFond} : couleur du fond ; \MontreCode{lightgray!5} par défaut + \item \MontreCode{CouleurR} : couleur des bulles de réception ; \MontreCode{lime!25} par défaut + \item \MontreCode{CouleurE} : couleur des bulles d'envoi ; \MontreCode{teal!5} par défaut + \item \MontreCode{TxtEcrire} : texte dans la zone d'envoi ; \MontreCode{Écrire} par défaut + \item \MontreCode{PoliceTxt} : police des textes ; \MontreCode{\textbackslash normalfont} par défaut + \item \MontreCode{Avatar} : avatar du contact ; \MontreCode{\textbackslash faAddressCard} par défaut + \item \MontreCode{AffAvatar} : booléen pour ajouter l'avatar aux bulles de réception ; \MontreCode{false} par défaut + \item \MontreCode{NoirBlanc} : booléen pour forcer un affichage N\&B. \MontreCode{false} par défaut +\end{itemize} + +L'argument, obligatoire et entre \MontreCode{\{...\}}, est le nom du contact à afficher. + +\subsection{Les commandes de création des bulles} + +En ce qui concerne les commandes de création des bulles, \MontreCode{\textbackslash SMSrec} et \MontreCode{\textbackslash SMSenv} : + +\begin{itemize} + \item la version \textit{étoilée} n'affiche pas les \textit{coches} de \textit{bonne réception} ; + \item le premier argument obligatoire est l'heure à afficher ; + \item le deuxième argument obligatoire est le message à afficher (y compris multi-lignes). +\end{itemize} + +\subsection{Exemples} + +\begin{DemoCode}{} +%avec une image personnelle +\begin{EnvSMS}% + [Largeur=5cm,Hauteur=13cm,AffAvatar,Avatar=Image/avatar]{CP} + \SMSrec{19:23}{Salut !} + \SMSenv{19:23}{Salut!\\ Comment ça va~?} + \SMSrec{19:25}{Je n'arrive pas à un truc en maths\ldots} + \SMSenv{19:26}{Tu veux un coup de main ??} + \SMSrec{19:28}{Oui, faut qu'je calcule $\int_{0}^{1} x^2e^{-x}\,dx$\ldots} + \SMSenv*{19:30}{Je m'en occupe !!} +\end{EnvSMS} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{EnvSMS}% + [Largeur=8cm,PoliceTxt=\sffamily,NoirBlanc]{CP} + \SMSrec{19:23}{Salut !} + \SMSenv{19:23}{Salut!\\ Comment ça va~?} + \SMSrec{19:25}{Je n'arrive pas à un truc en maths\ldots} + \SMSenv{19:26}{Tu veux un coup de main ??} + \SMSrec{19:28}{Oui, faut que je calcule $\mathsf{\int_{0}^{1} x^2e^{-x}\,dx}$\ldots} + \SMSenv*{19:30}{Je m'en occupe !!} +\end{EnvSMS} +\end{DemoCode} + +\pagebreak + \section{Titre d'exercices} \subsection{Principe et définition du style global} diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex index bc9bf990f7..e782579dec 100644 --- a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex +++ b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex @@ -1,80 +1,80 @@ -% !TeX TXS-program:compile = txs:///arara -% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} -% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') - -\documentclass[a5paper,11pt]{article} -\usepackage[margin=1cm]{geometry} -\usepackage{customenvs} -%facultatif, pour les décorations -\usepackage{graphicx} -\usepackage{dashrulex} -\usepackage{coloredbelts} -\usepackage{pictochrono} -%mise en page -\usepackage{ipsum} -\setlength{\parindent}{0pt} - -\begin{document} - -\begin{EnvtExo}%exo1 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Trait=pointilles]%exo2 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Trait=dashilles]%exo3 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Chrono/20]%exo6 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Decoration=Points/7]%exo9 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10 - \ipsum -\end{EnvtExo} - -\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] - -\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 - \ipsum -\end{EnvtExo} - -\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12 - \ipsum -\end{EnvtExo} - -\StyleEnvtExoDefaut - -\begin{EnvtExo}% - [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13 - \ipsum -\end{EnvtExo} - -\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14 - -\ipsum - -\end{document} +% !TeX TXS-program:compile = txs:///arara +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[a5paper,11pt]{article} +\usepackage[margin=1cm]{geometry} +\usepackage{customenvs} +%facultatif, pour les décorations +\usepackage{graphicx} +\usepackage{dashrulex} +\usepackage{coloredbelts} +\usepackage{pictochrono} +%mise en page +\usepackage{ipsum} +\setlength{\parindent}{0pt} + +\begin{document} + +\begin{EnvtExo}%exo1 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Trait=pointilles]%exo2 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Trait=dashilles]%exo3 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Chrono/20]%exo6 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Points/7]%exo9 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10 + \ipsum +\end{EnvtExo} + +\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] + +\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 + \ipsum +\end{EnvtExo} + +\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12 + \ipsum +\end{EnvtExo} + +\StyleEnvtExoDefaut + +\begin{EnvtExo}% + [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13 + \ipsum +\end{EnvtExo} + +\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14 + +\ipsum + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty index 08083eb103..ee8f4427a2 100644 --- a/macros/latex/contrib/customenvs/tex/customenvs.sty +++ b/macros/latex/contrib/customenvs/tex/customenvs.sty @@ -3,9 +3,10 @@ % source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145 \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{customenvs}[2024/03/30 0.1.3 Custom classic environments] +\ProvidesPackage{customenvs}[2024/04/04 0.1.4 Custom classic environments] %====HISTORIQUE +% v 0.1.4 Commande (en/fr) pour du texte dans une boîte arrondie, de hauteur 'figée' + 'Chat' SMS % v 0.1.3 Environnement/Commande pour présentation d'un exercice % v 0.1.2 Crayon de compétences % v 0.1.1 Ajout de tableaux de compétences @@ -54,6 +55,8 @@ \RequirePackage{calc} \RequirePackage{tikz} \usetikzlibrary{decorations.pathmorphing,positioning,shapes.misc,calc} +\usepackage{tcolorbox} +\tcbuselibrary{skins} %%----COMMANDES FR @@ -913,6 +916,179 @@ \EnvtExoCodeAvant% } +%====BOITE ARRONDIE +\newlength{\tmpheightbox} +\defKV[BoiteArrondie]{EspH=\def\RoundedBoxDelta{#1},Style=\def\RoundedBoxStyle{#1}} +\setKVdefault[BoiteArrondie]{% + Fond=red,% + Texte=white,% + EspH=0.25em,% + Style=rect +} +\NewDocumentCommand\BoiteArrondie{ O{} m O{char} }{% + \restoreKV[BoiteArrondie]% + \setKV[BoiteArrondie]{#1}% + \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale + \IfStrEqCase{\RoundedBoxStyle}{% + {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[BoiteArrondie]{Fond}},inner sep=0.75pt,outer sep=0pt,text={\useKV[BoiteArrondie]{Texte}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}% + {cercle}{\tikz[remember picture,baseline=(#3.base)]{\node[shape=circle,minimum height=\tmpheightbox,fill={\useKV[BoiteArrondie]{Fond}},inner sep=0.75pt,outer sep=0pt,text={\useKV[BoiteArrondie]{Texte}}] (#3) {\vphantom{(qE)}#2};}}% + }\relax +} + +%%====Chat SMS + +%===Données utiles +\newlength{\WidthofSMS} +\newlength{\HeightofSMS} +\newlength{\OffsetofSMS} +\newlength{\WidthofSMSavatar} +\newlength{\MarginofSMSavatar} +\colorlet{smscolp}{teal!75!cyan!75!white} +\colorlet{smscoltitle}{white} + +%===Styles [FR/EN] +\tcbset{SMSglobal/.style={ + enhanced,arc=0pt,outer arc=0pt,colback=\ProjectSmsColback,toptitle=0.3cm,bottomtitle=0.3cm,title={\null}, + overlay={ + %la barre de titre + \node[anchor=east,smscoltitle,font=\large] at ([xshift=-1mm]title.east) {\faVideo~~\faPhone*~~\faEllipsisV}; + \node[draw=none,anchor=west,inner sep=1pt,text=smscoltitle,font=\large] at ([xshift=1mm]title.west) (picture) {\ProjectSmsAvat}; + \node[draw=none,anchor=west,text=smscoltitle,font=\large,text depth=0pt,inner sep=1pt] at (picture.east) {\sffamily\bfseries\vphantom{pB}\NameofSMS} ; + %le bas + \draw[line width=0.85pt,darkgray] ([yshift=1cm]frame.south west) -- ([yshift=1cm]frame.south east); + \node[draw=smscolp!75!black,top color=lightgray!40,bottom color=lightgray!40,middle color=white,line width=1pt,rounded corners=2pt,text width={{\WidthofSMS-2.5cm}},minimum height=0.75cm,font=\large\ProjectSmsFonte,text=darkgray,inner xsep=6pt] at ([shift={(0,0.5cm)}]frame.south) {\textcolor{gray}{\rule[-0.1cm]{1pt}{0.5cm}}\,\ProjectSmsWrite}; + \node[draw=none,font=\LARGE,text=darkgray!50,anchor=east,align=center] at ([shift={(-1mm,0.5cm)}]frame.south east) (send) {\faPaperPlane}; + \node[draw=none,font=\LARGE,text=darkgray!50,anchor=west,align=center] at ([shift={(1mm,0.5cm)}]frame.south west) (add) {\faPlusCircle}; + }, + boxrule=0.85pt,colframe=darkgray, + title style={top color=smscolp!90!black,bottom color=smscolp!90!black,middle color=smscolp!75}, + bottom=1.15cm,top=0mm,left=1mm,right=1mm + } +} + +%===Keys [FR] +\defKV[ProjetSMS]{% + Hauteur=\def\ProjectSmsHeight{#1},% + Largeur=\setlength{\WidthofSMS}{#1},% + Marge=\setlength{\OffsetofSMS}{#1},% + Couleur=\colorlet{smscolp}{#1},% + CouleurFond=\def\ProjectSmsColback{#1},% + CouleurR=\def\ProjectSmsColIn{#1},% + CouleurE=\def\ProjectSmsColOut{#1},% + CouleurTitre=\colorlet{smscoltitle}{#1},% + PoliceTxt=\def\ProjectSmsFonte{#1},% + Avatar=\def\ProjectSmsAvatar{#1},% + TxtEcrire=\def\ProjectSmsWrite{#1} +} +\setKVdefault[ProjetSMS]{% + Hauteur=auto,% + Largeur=7cm,% + Marge=1.5cm,% + CouleurFond={lightgray!5},% + CouleurR=lime!25,% + CouleurE=teal!25,% + TxtEcrire={Écrire\ldots},% + PoliceTxt=\normalfont,% + Avatar=\faAddressCard,% + AffAvatar=false,% + NoirBlanc=false +} + +%===Envt [FR] +\NewDocumentEnvironment{EnvSMS}{ O{} m } +{ + \restoreKV[ProjetSMS]% + \setKV[ProjetSMS]{#1}% + \def\NameofSMS{#2}% + \IfSubStr{\ProjectSmsAvatar}{Image}% + {% + \StrBehind{\ProjectSmsAvatar}{/}[\tmpimgavatar]% + \def\ProjectSmsAvat{\includegraphics[height=0.5cm]{\tmpimgavatar}}% + \ifboolKV[ProjetSMS]{AffAvatar}% + {% + \setlength{\WidthofSMSavatar}{\widthof{\includegraphics[height=0.5\baselineskip]{\tmpimgavatar}}}% + \setlength{\MarginofSMSavatar}{\WidthofSMSavatar+2pt}% + }% + {% + \setlength{\MarginofSMSavatar}{0pt}% + }% + }% + {% + \def\ProjectSmsAvat{\ProjectSmsAvatar}% + \ifboolKV[ProjetSMS]{AffAvatar}% + {% + \setlength{\WidthofSMSavatar}{\widthof{\tiny\ProjectSmsAvatar}}% + \setlength{\MarginofSMSavatar}{\WidthofSMSavatar+2pt}% + }% + {% + \setlength{\MarginofSMSavatar}{0pt}% + }% + }% + \IfStrEq{\ProjectSmsHeight}{auto}% + {% + \tcbset{SMSsize/.style={width=\WidthofSMS}}% + }% + {% + \setlength{\HeightofSMS}{\ProjectSmsHeight}% + \tcbset{SMSsize/.style={width=\WidthofSMS,height=\HeightofSMS,valign=bottom}}% + }% + \ifboolKV[ProjetSMS]{NoirBlanc}% + {% + \colorlet{smscolp}{lightgray!25}% + \def\ProjectSmsColback{lightgray!5}% + \def\ProjectSmsColIn{lightgray!10}% + \def\ProjectSmsColOut{lightgray!10}% + \colorlet{smscoltitle}{gray}% + }% + {}% + \tcolorbox[SMSsize,SMSglobal]% +} +{ + \endtcolorbox% +} + +%===Macros [FR] +\NewDocumentCommand\SMSrec{ s m m }{% + \ifboolKV[ProjetSMS]{AffAvatar}% + {% + \IfSubStr{\ProjectSmsAvatar}{Image}% + {% + \tcbset{SMSAffLogo/.style={left skip=\MarginofSMSavatar,overlay={\node[anchor=north east] at ([yshift={1mm+1pt}]interior.north west) {\includegraphics[height=0.5\baselineskip]{\tmpimgavatar}};}}}% + }% + {% + \tcbset{SMSAffLogo/.style={left skip=\MarginofSMSavatar,overlay={\node[anchor=north east,font=\tiny,text=gray] at ([yshift={1mm+1pt}]interior.north west) {\ProjectSmsAvatar};}}}% + }% + }% + {% + \tcbset{SMSAffLogo/.style={}}% + }% + \tcbox[enhanced,interior code={},before skip=0.5mm,after skip=0.5mm,halign=left,left=1.5mm,right=1.5mm, + frame code={ + \filldraw[\ProjectSmsColIn,draw=black,rounded corners=4pt] + (frame.south east) rectangle (frame.north west) ; + }, + width={\WidthofSMS-\OffsetofSMS},top=1mm,bottom=1mm, + capture=minipage,fontupper=\small\ProjectSmsFonte, + attach boxed title to top left, + coltitle=black,fonttitle=\scriptsize\sffamily, + boxed title style={size=fbox,bottom=0pt,boxsep=2pt,frame empty,interior empty}, + title={\@ifpackageloaded{babel}{\NoAutoSpacing#2}{#2}\IfBooleanTF{#1}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}{}},left=1mm,right=1mm,boxsep=0mm,SMSAffLogo]{#3}% +} +\NewDocumentCommand\SMSenv{ s m m }{% + \tcbox[enhanced,interior code={},before skip=0.5mm,after skip=0.5mm,halign=left,left=1.5mm,right=1.5mm, + frame code={ + \filldraw[\ProjectSmsColOut,draw=black,rounded corners=4pt] + (frame.south east) rectangle (frame.north west) ; + }, + width={\WidthofSMS-\OffsetofSMS},top=1mm,bottom=1mm,flush right, + capture=minipage,fontupper=\small\ProjectSmsFonte, + attach boxed title to top right, + coltitle=black,fonttitle=\scriptsize\sffamily, + boxed title style={size=fbox,bottom=0pt,boxsep=2pt,frame empty,interior empty}, + title={\@ifpackageloaded{babel}{\NoAutoSpacing#2}{#2}\IfBooleanTF{#1}{}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}},left=1mm,right=1mm,boxsep=0mm]{#3}% +} + + %%----COMMANDES EN %====QCMs @@ -1169,4 +1345,149 @@ \end{tikzpicture}% } +%====ROUNDED BOX +\defKV[RoundedBox]{hmargin=\def\RoundedBoxDelta{#1},style=\def\RoundedBoxStyle{#1}} +\setKVdefault[RoundedBox]{% + bg=red,% + txt=white,% + hmargin=0.25em,% + style=rect +} + + + +\NewDocumentCommand\RoundedBox{ O{} m O{char} }{% + \restoreKV[RoundedBox]% + \setKV[RoundedBox]{#1}% + \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale + \IfStrEqCase{\RoundedBoxStyle}{% + {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}% + {circle}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=circle,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}#2};}}% + }\relax +} + +%====Chat SMS +%===Keys [EN] +\defKV[ProjectSMS]{% + height=\def\ProjectSmsHeight{#1},% + width=\setlength{\WidthofSMS}{#1},% + margin=\setlength{\OffsetofSMS}{#1},% + color=\colorlet{smscolp}{#1},% + colback=\def\ProjectSmsColback{#1},% + colorin=\def\ProjectSmsColIn{#1},% + colorout=\def\ProjectSmsColOut{#1},% + coltitle=\colorlet{smscoltitle}{#1},% + fonttxt=\def\ProjectSmsFonte{#1},% + avatar=\def\ProjectSmsAvatar{#1},% + writetxt=\def\ProjectSmsWrite{#1} +} +\setKVdefault[ProjectSMS]{% + height=auto,% + width=7cm,% + margin=1.5cm,% + colback=lightgray!5,% + colorin=lime!25,% + colorout=teal!25,% + writetxt={Write\ldots},% + fonttxt=\normalfont,% + avatar=\faAddressCard,% + dispavatar=false,% + blackwhite=false +} + +%===Envt [EN] +\NewDocumentEnvironment{ChatSMS}{ O{} m } +{ + \restoreKV[ProjectSMS]% + \setKV[ProjectSMS]{#1}% + \def\NameofSMS{#2}% + \IfSubStr{\ProjectSmsAvatar}{img}% + {% + \StrBehind{\ProjectSmsAvatar}{/}[\tmpimgavatar]% + \def\ProjectSmsAvat{\includegraphics[height=0.5cm]{\tmpimgavatar}}% + \ifboolKV[ProjectSMS]{dispavatar}% + {% + \setlength{\WidthofSMSavatar}{\widthof{\includegraphics[height=0.5\baselineskip]{\tmpimgavatar}}}% + \setlength{\MarginofSMSavatar}{\WidthofSMSavatar+2pt}% + }% + {% + \setlength{\MarginofSMSavatar}{0pt}% + }% + }% + {% + \def\ProjectSmsAvat{\ProjectSmsAvatar}% + \ifboolKV[ProjectSMS]{dispavatar}% + {% + \setlength{\WidthofSMSavatar}{\widthof{\tiny\ProjectSmsAvatar}}% + \setlength{\MarginofSMSavatar}{\WidthofSMSavatar+2pt}% + }% + {% + \setlength{\MarginofSMSavatar}{0pt}% + }% + }% + \IfStrEq{\ProjectSmsHeight}{auto}% + {% + \tcbset{SMSsize/.style={width=\WidthofSMS}}% + }% + {% + \setlength{\HeightofSMS}{\ProjectSmsHeight}% + \tcbset{SMSsize/.style={width=\WidthofSMS,height=\HeightofSMS,valign=bottom}}% + }% + \ifboolKV[ProjectSMS]{blackwhite}% + {% + \colorlet{smscolp}{lightgray!25}% + \def\ProjectSmsColback{lightgray!5}% + \def\ProjectSmsColIn{lightgray!10}% + \def\ProjectSmsColOut{lightgray!10}% + \colorlet{smscoltitle}{gray}% + }% + {}% + \tcolorbox[SMSsize,SMSglobal]% +} +{ + \endtcolorbox% +} + +%===Macros [EN] +\NewDocumentCommand\InSMS{ s m m }{% + \ifboolKV[ProjectSMS]{dispavatar}% + {% + \IfSubStr{\ProjectSmsAvatar}{img}% + {% + \tcbset{SMSAffLogo/.style={left skip=\MarginofSMSavatar,overlay={\node[anchor=north east] at ([yshift={1mm+1pt}]interior.north west) {\includegraphics[height=0.5\baselineskip]{\tmpimgavatar}};}}}% + }% + {% + \tcbset{SMSAffLogo/.style={left skip=\MarginofSMSavatar,overlay={\node[anchor=north east,font=\tiny,text=gray] at ([yshift={1mm+1pt}]interior.north west) {\ProjectSmsAvatar};}}}% + }% + }% + {% + \tcbset{SMSAffLogo/.style={}}% + }% + \tcbox[enhanced,interior code={},before skip=0.5mm,after skip=0.5mm,halign=left,left=1.5mm,right=1.5mm, + frame code={ + \filldraw[\ProjectSmsColIn,draw=black,rounded corners=4pt] + (frame.south east) rectangle (frame.north west) ; + }, + width={\WidthofSMS-\OffsetofSMS},top=1mm,bottom=1mm, + capture=minipage,fontupper=\small\ProjectSmsFonte, + attach boxed title to top left, + coltitle=black,fonttitle=\scriptsize\sffamily, + boxed title style={size=fbox,bottom=0pt,boxsep=2pt,frame empty,interior empty}, + title={#2\IfBooleanTF{#1}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}{}},left=1mm,right=1mm,boxsep=0mm,SMSAffLogo]{#3}% +} +\NewDocumentCommand\OutSMS{ s m m }{% + \tcbox[enhanced,interior code={},before skip=0.5mm,after skip=0.5mm,halign=left,left=1.5mm,right=1.5mm, + frame code={ + \filldraw[\ProjectSmsColOut,draw=black,rounded corners=4pt] + (frame.south east) rectangle (frame.north west) ; + }, + width={\WidthofSMS-\OffsetofSMS},top=1mm,bottom=1mm,flush right, + capture=minipage,fontupper=\small\ProjectSmsFonte, + attach boxed title to top right, + coltitle=black,fonttitle=\scriptsize\sffamily, + boxed title style={size=fbox,bottom=0pt,boxsep=2pt,frame empty,interior empty}, + title={#2\IfBooleanTF{#1}{}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}},left=1mm,right=1mm,boxsep=0mm]{#3}% +} + + \endinput \ No newline at end of file diff --git a/macros/latex/contrib/rectopma/README.txt b/macros/latex/contrib/rectopma/README.txt new file mode 100644 index 0000000000..7fe99006d6 --- /dev/null +++ b/macros/latex/contrib/rectopma/README.txt @@ -0,0 +1,29 @@ + + +This file is README.txt for the rectopma package. +Current version : [2024/04/04] +Author: Battista Benciolini + + +The distribution includes: + + README.txt this file + rectopma.dtx a self extracting and self documenting file + rectopma.sty the package + rectopma.pdf the complete and formatted documentation + TestTitle.tex a minimal example of the usage of the package (source) + TestTitle.pdf a minimal example of the usage of the package (formatted) + + +pdflatex rectopma.dtx creates rectopma.pdf, rectopma.sty and TestTitle.tex +pdflatex TestTitle creates TestTitle.pdf + +tested with TeX-live 2024 + +This program may be used, distributed and modified under +the conditions of the LaTeX Project Public License +see:http://www.latex-project.org/lppl.txt + + +===================== END of README file ====================== + diff --git a/macros/latex/contrib/rectopma/TestTitle.pdf b/macros/latex/contrib/rectopma/TestTitle.pdf index 55cd5861cd..ba73f8c96b 100644 Binary files a/macros/latex/contrib/rectopma/TestTitle.pdf and b/macros/latex/contrib/rectopma/TestTitle.pdf differ diff --git a/macros/latex/contrib/rectopma/TestTitle.tex b/macros/latex/contrib/rectopma/TestTitle.tex deleted file mode 100644 index 9ec54d5bf8..0000000000 --- a/macros/latex/contrib/rectopma/TestTitle.tex +++ /dev/null @@ -1,56 +0,0 @@ -% THIS IS BOTH A MINIMAL USER-MANUAL -% OF THE PACKAGE rectopma.sty -% AND AN EXAMPLE OF ITS USE -% -% File : TestTitle.tex -% Author: Battista Benciolini -% E-mail: -% Date : January 2002 -% See file rectopma.sty for more information -% -\documentclass[a4paper,10pt]{article} -\usepackage{rectopma} -% -\date{ } -\title{Test of the package \texttt{rectopma} \intitlebreak and -suggestions for its use \intitlebreakvs (I need a long title)\thanks{ -Comments are welcome !}} -\author{B.Benciolini\thanks{e-mail: battista.benciolini@ing.uitn.it} -\and No Second Author\thanks{No-Where Institute}} -% -\SaveTopMatter -% -\begin{document} -\maketitle -% -\section{Introduction} -The package \verb+rectopma+ makes it possible to reuse the main -content of \verb+\title+ and \verb+\author+ in different parts of a -document. -It is also possible to force linebreaks in the title with a command -that is only active inside the top-matter, not when the title is -re-printed elsewhere. -% -\section{Instruction} -The new commands \verb+\intitlebreak+ and \verb+\intitlebreakvs+ -(vs= vertical skip) are used to force a line break in the title -that disappears when the title itself is re-used outside the top matter -of the paper. -The content of \verb+\title+ and \verb+\author+ must be saved with the -command \verb+\SaveTopMatter+ before the action of \verb+\maketitle+ -and can be reprinted with the new commands \verb+\SavedAuthor+ -and \verb+\SavedTitle+. When they are reprinted the names of the -various authors are simply separated by commas and the content of -\verb+\thanks+ is ignored. -% -\section{Examples} -The authors of this paper are listed here after: \SavedAuthor. This -is obtained with \verb+\SavedAuthor+. It is also possible to reprint -the title, by means of \verb+\SavedTitle+, and the result is: -\SavedTitle. The title can be printed with a different style, as in: -\textbf{\SavedTitle}, obtained with \verb+\textbf{\SavedTitle}+. -% -\end{document} -\endinput -% -% End of file TestPaper.tex diff --git a/macros/latex/contrib/rectopma/rectopma.dtx b/macros/latex/contrib/rectopma/rectopma.dtx new file mode 100644 index 0000000000..aadfbe1da6 --- /dev/null +++ b/macros/latex/contrib/rectopma/rectopma.dtx @@ -0,0 +1,219 @@ +%\iffalse +% file: rectopma.dtx +% author: Battista Benciolini +% contact: benciolinibattista at gmail dot com +% date: 2024-04-04 +%\fi +%\iffalse +%<*ins> +\begingroup +\input docstrip.tex +\keepsilent +\preamble +---------------------------------------------------------------- +This file is part of the distribution of rectopma [2024-04-04] +The author of rectopma is Battista Benciolini + +---------------------------------------------------------------- +This program may be used, distributed and modified under +the conditions of the LaTeX Project Public License. +(see: http://www.latex-project.org/lppl.txt) +---------------------------------------------------------------- +\endpreamble +\askforoverwritefalse +\generate{\file{rectopma.sty}{\from{rectopma.dtx}{package}}} +\generate{\file{TestTitle.tex}{\from{rectopma.dtx}{example}}} +\endgroup +% +%\fi +%\iffalse +%<*driver> +\documentclass[a4paper,10pt]{ltxdoc} +\title{The \texttt{rectopma} package: +\\ recicle top matter, i.e. +\\ reuse the title and author(s)} +\author{Battista Benciolini +\thanks{e-mail: benciolinibattista at gmail dot com}} +\begin{document} +\maketitle +\DocInput{rectopma.dtx} +\end{document} +% +%\fi +% +%\section{Introduction} +% The package |rectopma| makes it possible to reuse the main +% content of |\title| and |\author| in different parts of a +% document. It is also possible to force linebreaks in the title with +% a command that has no effect +% when the title is re-printed. +% The file |TestTitle.tex| is an example of the use +% of the functions made available by the package. +% +% +%\iffalse +%<*example> +%\fi +%\section{Suggestions for the use and an example} +% +% I first present the suggestions for the use of |rectopma.sty| +% and the example that will be available in |TestTitle.tex| +% The example must obviously start loading the class (I use article) +% and the package rectopma +% \begin{macrocode} +\documentclass{article} +\usepackage{rectopma} +% \end{macrocode} +% +% In the preamble I define the title and the authors. +% The authors must be separated by |\and|. Title and authors +% can have a note using |\thanks|, and the note will disappear when +% the title and the author will be reused. +% When a long title is present it is +% \DescribeMacro{\intitlebreak} +% \DescribeMacro{\intitlebreakvs} +% perhaps useful to force linebreaks in some special position. +% The new commands |\intitlebreak| and |\intitlebreakvs| +% (vs= vertical skip) are used for this purpose, and their effect +% will disappears when the title itself is re-used in the document. +% \begin{macrocode} +\title{Test of the package \texttt{rectopma} +\intitlebreak and suggestions for its use +\intitlebreakvs (I need a long title)% +\thanks{Comments are welcome !}} +\author{Battista Benciolini% +\thanks{e-mail: benciolinibattista at gmail dot com}% +\and No Second Author\thanks{No-Where Institute}}% +% \end{macrocode} +% +%\par +% The main part of the document starts as usual. +% The command \DescribeMacro{\SaveTopMatter} |\SaveTopMatter| +% must be used before |maketitle| to save the title and the author(s). +% +% \begin{macrocode} +\begin{document} +\SaveTopMatter +\maketitle +% \end{macrocode} +% +% The title and the authors can be reprinted with the commands +% \DescribeMacro{\SavedTitle} \DescribeMacro{\SavedAuthor} +%|\SavedTitle| and |\SavedAuthor|. When they are +% reprinted the names of the various authors are simply separated +% by commas and the content of |\thanks| is ignored. +% +% \begin{macrocode} +The authors are listed here after: \SavedAuthor. +This is obtained with \verb|\SavedAuthor|. +It is also possible to reprint the title, +by means of \verb|\SavedTitle|, +and the result is: \SavedTitle. +% \end{macrocode} +% +% And this is the end of the example. +% \begin{macrocode} +\end{document} +% \end{macrocode} +% +%\iffalse +% +%<*package> +%\fi +%\section{Code of the package} +% +% \begin{macrocode} +\ProvidesPackage{rectopma}[2024/04/04] +% \end{macrocode}% +% +% \begin{macro}{\declarecommand} +% I need |\declarecommand| ! +% The definition is due to egreg in +% a comment to question 128797 in |tex.stackexchange.com|. +% \begin{macrocode} +\newcommand\declarecommand[1]{\providecommand{#1}{}\renewcommand{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\intitlebreak} +% The command |\intitlebreak| is used to force a line break in the title. +% \begin{macrocode} +\newcommand{\intitlebreak}{\\} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\intitlebreakvs} +% The comman |\intitlebreakvs| (vs= vertical skip) +% produces a line break and a vertical skip. +% \begin{macrocode} +\newcommand{\intitlebreakvs}{\\ \vskip 4mm } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@outsidetitle} +% The commands |\intitlebreak|, |\intitlebreakvs|, +% |\and| and |\thanks| need a redefinition for the +% correct output of title and authors in a generic +% position in the document. +% The redefinition is operated by the command |\@outsidetitle|. +% (I follow the old tradition of inserting a |@| in the +% commands that are of internal use, not available to the user.) +% \begin{macrocode} +\newcommand{\@outsidetitle}{% +\renewcommand{\intitlebreak}{\relax}% +\renewcommand{\intitlebreakvs}{\relax}% +\declarecommand{\thanks}[1]{\relax}% +\declarecommand{\and}{\unskip,\ }}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SaveTopMatter} +% The new command |\SaveTopMatter| saves the contents of |\@title| +% and |\@author| in |\@SavedTitle| and |\@SavedAuthor| respectively, +% so that they can be re-used anywhere in the document. +% \begin{macrocode} +\newcommand{\SaveTopMatter}{% +\global\let\@SavedTitle\@title% +\global\let\@SavedAuthor\@author} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SavedTitle} +% The command |\SavedTitle| +% actually prints the title. +% \begin{macrocode} +\newcommand{\SavedTitle}{\@outsidetitle\@SavedTitle} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SavedAuthor} +% The command |\SavedAuthor| +% actually prints the authors. +% \begin{macrocode} +\newcommand{\SavedAuthor}{\@outsidetitle\@SavedAuthor} +% \end{macrocode} +% \end{macro} +% +% The package is now complete. +% +%\iffalse +% +%\fi +%\section{History} +%\begin{description} +%\item[2002] first release in CTAN, +%\item[2024] second release in CTAN, +% complete re-coding of |rectopma.sty|, +% some changes in |TestTitle.sty|, +% new documentation, +% all stuff collected in |rectopma.dtx|. +%\end{description} +%\section{Recommendation} +% I recommend all the users of |rectopma|, and all the +% persons that by chance encounter it, +% to send me any comment about it. +% \vfill\centerline{\Large ***}\vfill +% +%\iffalse +% END OF FILE rectopma.dtx +%\fi diff --git a/macros/latex/contrib/rectopma/rectopma.pdf b/macros/latex/contrib/rectopma/rectopma.pdf new file mode 100644 index 0000000000..b1a89c3382 Binary files /dev/null and b/macros/latex/contrib/rectopma/rectopma.pdf differ diff --git a/macros/latex/contrib/rectopma/rectopma.sty b/macros/latex/contrib/rectopma/rectopma.sty deleted file mode 100644 index ec5fd8593a..0000000000 --- a/macros/latex/contrib/rectopma/rectopma.sty +++ /dev/null @@ -1,88 +0,0 @@ -\ProvidesPackage{rectopma}[2002/01/07] -%************************************************* -%* * -%* This file is * -%* * -%* rectopma.sty * -%* ------------- * -%* * -%* RECycling TOp MAtter * -%* * -%* Version : January 5, 2002 * -%* * -%* Author: Battista Benciolini * -%* * -%* Address: Dip. Ing. Civile e Ambientale * -%* Via Mesiano, 77 * -%* I-38050 Trento * -%* ITALY * -%* * -%* e-mail: Battista.Benciolini@ing.unitn.it * -%* * -%************************************************* -% -% -% PURPOSE -% ======= -% -% This package allows the re-use of the main content -% of \title and \author anywhere in the document. -% -% IMPORTANT NOTES -% =============== -% -% 1 - This file is part of a program (in the meaning specified -% by the LPPL) that includes two files posted in the same -% folder: -% - rectopma.sty (= this file) -% - TestTitle.tex (= sample and suggestions) -% 2 - This program may be used, distributed and/or modified under -% the conditions of the LaTeX Project Public License. -% The latest version of this license is in: -% http://www.latex-project.org/lppl.txt -% -% HISTORY -% ======= -% -% (The mechanism implemented here have been originally -% encoded in others packages) -% -% January 2002 : first version -% -% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -% -% -% The new if \ifintitle is used to govern the different format of -% author and title when used in the top matter and when used -% anywhere else. -% (At present it is used only for intitlebreak and intitlebreakvs) -\newif\ifintitle \intitlefalse -% -% The commands \intitlebreak and \intitlebreakvs (vs= vertical skip) -% are used to force a line break in the title that disappears when -% the title itself is re-used outside the top matter of the paper. -\newcommand{\intitlebreak}{\ifintitle \\ \else\relax\fi} -\newcommand{\intitlebreakvs}{\ifintitle \vskip 1mm \else\relax\fi} -% -% The redefinition of \@maketitle includes -% the ON-OFF settings of \ifintitle -\let\OLD@maketitle\@maketitle -\def\@maketitle{\intitletrue\OLD@maketitle\intitlefalse} -% -% The redefinition of maketitle rebuilds -% \and to be a generic separator -% \thanks to do nothing (but it must have an argument) -\global\let\OLDmaketitle\maketitle -\gdef\maketitle{\OLDmaketitle -\gdef\and{\unskip,\ } -\gdef\thanks##1{\relax}} -% -% the new command \SaveTopMatter saves the contents of \@title and -% \@author in \SavedTitle and \SavedAuthor respectively, so that they -% can be re-used anywhere in the document. -\newcommand{\SaveTopMatter}{ -\global\let\SavedTitle\@title -\global\let\SavedAuthor\@author} -% -% -% end end end -- cgit v1.2.3