texlive[73969] branches/branch2024.final/Master/texmf-dist:

commits+karl at tug.org commits+karl at tug.org
Thu Feb 13 22:07:03 CET 2025


Revision: 73969
          https://tug.org/svn/texlive?view=revision&revision=73969
Author:   karl
Date:     2025-02-13 22:07:03 +0100 (Thu, 13 Feb 2025)
Log Message:
-----------
sim-os-menus (branch) (13feb25)

Modified Paths:
--------------
    branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.pdf
    branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.tex
    branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.pdf
    branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex
    branches/branch2024.final/Master/texmf-dist/tex/latex/sim-os-menus/sim-os-menus.sty

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.tex	2025-02-13 21:06:51 UTC (rev 73968)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc-fr.tex	2025-02-13 21:07:03 UTC (rev 73969)
@@ -23,8 +23,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=2cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.3}
-\def\TPdate{28/09/2024}
+\def\TPversion{0.1.4}
+\def\TPdate{13/02/2025}
 \usepackage{soul}
 \sethlcolor{lightgray!25}
 \NewDocumentCommand\MontreCode{ m }{%
@@ -59,7 +59,7 @@
 	\begin{tabular}{c}
 	\texttt{Cédric Pierquet}\\
 	{\ttfamily c pierquet -- at -- outlook . fr}\\
-	\texttt{\url{https://github.com/cpierquet/sim-os-menus}} \\
+	\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}} \\
 \end{tabular}
 \end{center}
 
@@ -490,4 +490,83 @@
 \end{ArborDossiers}
 \end{tcblisting}
 
+\pagebreak
+
+\subsection{Pouets comme sous Mastodon ou BlueSky}
+
+Il est possible de présenter des messages comme sur les plateformes Mastodon ou BlueSky.
+
+\begin{quote}
+\begin{verbatim}
+\begin{MastodonPost}[clés]<options tcolorbox>
+...
+\end{MastodonPost}
+
+\begin{BlueSkyPost}[clés]<options tcolorbox>
+...
+\end{BlueSkyPost}
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés} disponibles sont, à donner entre \MontreCode{[...]} :
+\begin{itemize}
+	\item \MontreCode{width} : largeur de la boîte ;
+	\item \MontreCode{avatar} : avatar du compte  (si possible en format \textit{carré});
+	\item \MontreCode{name} : pseudo du compte ;
+	\item \MontreCode{account} : compte ;
+	\item \MontreCode{time} : temps passé depuis le post ;
+	\item \MontreCode{counters} : compteurs pour les views/likes/shares ;
+	\item \MontreCode{font} : police du message ;
+	\item \MontreCode{colbg} : couleur de fond de la boîte.
+\end{itemize}
+
+Les entêtes et pies peuvent être redéfinis grâce aux macros suivante :
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+\newcommand\mastodonheader{%
+	\begin{tblr}{width=\linewidth,colspec={Q[c,m]X[m,l]Q[m,l]},
+			colsep=0pt,cells={font=\scriptsize\sffamily}}
+		$\vcenter{\hbox{\includegraphics[height=4ex]{\mastodonaccountavatar}}}$& {\hspace*{1.25ex}\mastodonaccountname \\ \hspace*{1.25ex}\color{darkgray}{\mastodonaccountadress}} & \color{darkgray}{\faGlobeAmericas~\mastodontime} \\
+	\end{tblr}\par\medskip
+}
+
+\newcommand\blueskyheader{%
+	{\scriptsize\sffamily\textbf{\mastodonaccountname}~
+	\textcolor{darkgray}{\mastodonaccountadress~
+	\textperiodcentered~\mastodontime}}\par\medskip
+}
+
+\newcommand\mastodonfooter{%
+	\textcolor{darkgray}{\scriptsize\scalebox{-1}[1]{\faShare}~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faStar[regular]~\mastodonnumbers[3] \hfill \faBookmark[regular] \hfill \faEllipsisH}
+}
+
+\newcommand\blueskyfooter{%
+	\textcolor{darkgray}{\scriptsize\faComment*[regular]~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faHeart[regular]~\mastodonnumbers[3] \hfill \faEllipsisH \hfill~}
+}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{MastodonPost}
+\textbf{TeX} est un système logiciel libre de composition de documents, indépendant du matériel utilisé pour la visualisation ou l'impression. Il a été créé à partir de 1977 par le mathématicien et informaticien Donald Knuth, excédé par la piètre qualité de la typographie des logiciels d'édition de l'époque. \TeX\ a vu le jour pour la première fois en 1978. Il est principalement conçu pour l'édition de documents techniques et est largement utilisé par les scientifiques, particulièrement en mathématiques, physique, bio-informatique, astronomie et informatique. Il est également extensible et permet notamment l'édition de documents plus complexes (affiches, plaquettes publicitaires, partitions musicales\ldots).
+
+\medskip
+
+\url{https://www.latex-project.org}
+\end{MastodonPost}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{BlueSkyPost}[width=12cm,account={\symbol{64}TeX.bluesky.social}]
+\textbf{TeX} est un système logiciel libre de composition de documents, indépendant du matériel utilisé pour la visualisation ou l'impression. Il a été créé à partir de 1977 par le mathématicien et informaticien Donald Knuth, excédé par la piètre qualité de la typographie des logiciels d'édition de l'époque. \TeX\ a vu le jour pour la première fois en 1978. Il est principalement conçu pour l'édition de documents techniques et est largement utilisé par les scientifiques, particulièrement en mathématiques, physique, bio-informatique, astronomie et informatique. Il est également extensible et permet notamment l'édition de documents plus complexes (affiches, plaquettes publicitaires, partitions musicales\ldots).
+
+\smallskip
+
+\hfill\includegraphics[width=0.667\linewidth]{example-image-16x9.pdf}\hfill~
+
+\smallskip
+
+\url{https://www.latex-project.org}
+\end{BlueSkyPost}
+\end{tcblisting}
+
 \end{document}
\ No newline at end of file

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex	2025-02-13 21:06:51 UTC (rev 73968)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex	2025-02-13 21:07:03 UTC (rev 73969)
@@ -23,8 +23,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=2cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.3}
-\def\TPdate{28/09/2024}
+\def\TPversion{0.1.4}
+\def\TPdate{13/02/2025}
 \usepackage{soul}
 \sethlcolor{lightgray!25}
 \NewDocumentCommand\MontreCode{ m }{%
@@ -58,7 +58,7 @@
 	\begin{tabular}{c}
 	\texttt{Cédric Pierquet}\\
 	{\ttfamily c pierquet -- at -- outlook . fr}\\
-	\texttt{\url{https://github.com/cpierquet/sim-os-menus}} \\
+	\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}} \\
 \end{tabular}
 \end{center}
 
@@ -146,6 +146,7 @@
 
 \begin{quote}
 \begin{verbatim}
+0.1.4: Mastodon or BlueSky posts 'like'
 0.1.3: Fofders/Files like in explorer
 0.1.2: Script editor viewer 'like'
 0.1.1: French version of the commands
@@ -399,7 +400,7 @@
 
 \pagebreak
 
-\subsection{Folders/files as in explrer}
+\subsection{Folders/files as in explorer}
 
 The \MontreCode{forest} package, with his library \MontreCode{edges}, can present foldertrees.
 
@@ -488,4 +489,84 @@
 \end{ForestDirTree}
 \end{tcblisting}
 
+\pagebreak
+
+\subsection{Posts as in Mastodon or BlueSky}
+
+It's possible to present posts as in Mastodon or BlueSky.
+
+\begin{quote}
+\begin{verbatim}
+\begin{MastodonPost}[options]<tcolorbox keys>
+...
+\end{MastodonPost}
+
+\begin{BlueSkyPost}[options]<tcolorbox keys>
+...
+\end{BlueSkyPost}
+\end{verbatim}
+\end{quote}
+
+Available \textsf{keys}, betweeen \MontreCode{[...]}, are:
+
+\begin{itemize}
+	\item \MontreCode{width}: width of box;
+	\item \MontreCode{avatar}: image of the avatar (square if possible !);
+	\item \MontreCode{name}: pseudo of the account
+	\item \MontreCode{account}: account name;
+	\item \MontreCode{time}: time of post;
+	\item \MontreCode{counters}: counters for views/likes/shares;
+	\item \MontreCode{font}: font fir main text;
+	\item \MontreCode{colbg}: background color of box.
+\end{itemize}
+
+Headers and footers are given by following macros, and can be redefined if necessary !
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
+\newcommand\mastodonheader{%
+	\begin{tblr}{width=\linewidth,colspec={Q[c,m]X[m,l]Q[m,l]},
+		colsep=0pt,cells={font=\scriptsize\sffamily}}
+		$\vcenter{\hbox{\includegraphics[height=4ex]{\mastodonaccountavatar}}}$& {\hspace*{1.25ex}\mastodonaccountname \\ \hspace*{1.25ex}\color{darkgray}{\mastodonaccountadress}} & \color{darkgray}{\faGlobeAmericas~\mastodontime} \\
+	\end{tblr}\par\medskip
+}
+
+\newcommand\blueskyheader{%
+	{\scriptsize\sffamily\textbf{\mastodonaccountname}~
+	\textcolor{darkgray}{\mastodonaccountadress~
+	\textperiodcentered~\mastodontime}}\par\medskip
+}
+
+\newcommand\mastodonfooter{%
+	\textcolor{darkgray}{\scriptsize\scalebox{-1}[1]{\faShare}~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faStar[regular]~\mastodonnumbers[3] \hfill \faBookmark[regular] \hfill \faEllipsisH}
+}
+
+\newcommand\blueskyfooter{%
+	\textcolor{darkgray}{\scriptsize\faComment*[regular]~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faHeart[regular]~\mastodonnumbers[3] \hfill \faEllipsisH \hfill~}
+}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{MastodonPost}
+\textbf{TeX}, stylized within the system as \TeX, is a typesetting program which was designed and written by computer scientist and Stanford University professor Donald Knuth and first released in 1978. The term now refers to the system of extensions – which includes software programs called TeX engines, sets of TeX macros, and packages which provide extra typesetting functionality – built around the original TeX language. \TeX\ is a popular means of typesetting complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems.
+
+\medskip
+
+\url{https://www.latex-project.org}
+\end{MastodonPost}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{BlueSkyPost}[width=12cm,account={\symbol{64}TeX.bluesky.social}]
+\textbf{TeX}, stylized within the system as \TeX, is a typesetting program which was designed and written by computer scientist and Stanford University professor Donald Knuth and first released in 1978. The term now refers to the system of extensions – which includes software programs called TeX engines, sets of TeX macros, and packages which provide extra typesetting functionality – built around the original TeX language. \TeX\ is a popular means of typesetting complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems.
+
+\smallskip
+
+\hfill\includegraphics[width=0.667\linewidth]{example-image-16x9.pdf}\hfill~
+
+\smallskip
+
+\url{https://www.latex-project.org}
+\end{BlueSkyPost}
+\end{tcblisting}
+
 \end{document}
\ No newline at end of file

Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/sim-os-menus/sim-os-menus.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/sim-os-menus/sim-os-menus.sty	2025-02-13 21:06:51 UTC (rev 73968)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/sim-os-menus/sim-os-menus.sty	2025-02-13 21:07:03 UTC (rev 73969)
@@ -1,9 +1,10 @@
 % Author     : C. Pierquet
-% licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{sim-os-menus}[2024/09/28 0.1.3 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox (en or fr commands)]
-% 0.1.3	DirTree avec forest
+\ProvidesPackage{sim-os-menus}[2025/02/13 0.1.4 Present 'context menu'/'terminal'/'windows', with TikZ or tcolorbox (en or fr commands)]
+% 0.1.4	Mastodon/BlueSky posts 'like'
+% 0.1.3	DirTree with forest
 % 0.1.2	Ajout d'une visionneuse type python
 % 0.1.1	French version of the commands
 % 0.1.0	Initial version
@@ -972,4 +973,82 @@
 	\endforest%
 }
 
+%====mastodon & bluesky
+\newcommand\mastodonheader{%
+	\begin{tblr}{width=\linewidth,colspec={Q[c,m]X[m,l]Q[m,l]},colsep=0pt,cells={font=\scriptsize\sffamily}}
+		$\vcenter{\hbox{\includegraphics[height=4ex]{\mastodonaccountavatar}}}$& {\hspace*{1.25ex}\mastodonaccountname \\ \hspace*{1.25ex}\color{darkgray}{\mastodonaccountadress}} & \color{darkgray}{\faGlobeAmericas~\mastodontime} \\
+	\end{tblr}\par\medskip
+}
+
+\newcommand\blueskyheader{%
+	{\scriptsize\sffamily\textbf{\mastodonaccountname}~\textcolor{darkgray}{\mastodonaccountadress~\textperiodcentered~\mastodontime}}\par\medskip
+}
+
+\newcommand\mastodonfooter{%
+	\textcolor{darkgray}{\scriptsize\scalebox{-1}[1]{\faShare}~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faStar[regular]~\mastodonnumbers[3] \hfill \faBookmark[regular] \hfill \faEllipsisH}
+}
+
+\newcommand\blueskyfooter{%
+	\textcolor{darkgray}{\scriptsize\faComment*[regular]~\mastodonnumbers[1] \hfill \faRetweet~\mastodonnumbers[2] \hfill \faHeart[regular]~\mastodonnumbers[3] \hfill \faEllipsisH \hfill~}
+}
+
+\tcbset{StyleMastodon/.style={%
+		nobeforeafter,enhanced,size=small,boxrule=0.5pt,arc=0.5pt,colframe=gray,colback=\mastodoncolbg,before upper={\readlist*\mastodonnumbers\mastodondata\mastodonheader},after upper={\par\medskip\mastodonfooter}
+	}
+}
+
+\tcbset{StyleBluesky/.style={%
+		nobeforeafter,enhanced,size=small,left=11.5mm,top=1.5mm,bottom=1.5mm,right=2mm,boxrule=0.5pt,arc=0.5pt,colframe=gray,colback=\mastodoncolbg,before upper={\readlist*\mastodonnumbers\mastodondata\blueskyheader},after upper={\par\medskip\blueskyfooter},
+		overlay={%
+			\begin{tcbclipinterior}%
+				\draw (interior.north west) node[below right=1.25mm] {\includegraphics[width=7.5mm]{\mastodonaccountavatar}};% {\includegraphics[height=10mm]{\mastodonaccountavatar}};%
+				%\clip ($(interior.north west)+(0.5em,-0.5em)$) rectangle++ (2em,-2em);
+				%\draw ($(interior.north west)+(1.5em,-1.5em)$) node {\includegraphics[height=10mm]{\mastodonaccountavatar}};%
+			\end{tcbclipinterior}
+			}
+	}
+}
+
+\newlength\mastodonwidth
+\defKV[envmastodon]{%
+	width=\setlength{\mastodonwidth}{#1},%
+	avatar=\def\mastodonaccountavatar{#1},%
+	name=\def\mastodonaccountname{#1},%
+	account=\def\mastodonaccountadress{#1},%
+	time=\def\mastodontime{#1},%
+	counters=\def\mastodondata{#1},%
+	font=\def\mastodonfont{#1},%
+	colbg=\def\mastodoncolbg{#1}
+}
+\setKVdefault[envmastodon]{%
+	width=8cm,%
+	avatar={example-grid-100x100pt.pdf},%
+	name={DK},%
+	account={\symbol{64}TeX},%
+	time={59 min},%
+	counters={1,6,4},%
+	font=\footnotesize\sffamily,%
+	colbg=lightgray!5
+}
+
+\NewDocumentEnvironment{MastodonPost}{ O{} D<>{} }%
+{%
+	\restoreKV[envmastodon]%
+	\setKV[envmastodon]{#1}%
+	\tcolorbox[StyleMastodon,width=\mastodonwidth,fontupper=\mastodonfont,#2]
+}%
+{%
+	\endtcolorbox
+}
+
+\NewDocumentEnvironment{BlueSkyPost}{ O{} D<>{} }%
+{%
+	\restoreKV[envmastodon]%
+	\setKV[envmastodon]{#1}%
+	\tcolorbox[StyleBluesky,width=\mastodonwidth,fontupper=\mastodonfont,#2]
+}%
+{%
+	\endtcolorbox
+}
+
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list.