texlive[69855] Master: pictochrono (14feb24)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 14 22:27:16 CET 2024


Revision: 69855
          https://tug.org/svn/texlive?view=revision&revision=69855
Author:   karl
Date:     2024-02-14 22:27:15 +0100 (Wed, 14 Feb 2024)
Log Message:
-----------
pictochrono (14feb24)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/pictochrono/
    trunk/Master/texmf-dist/doc/latex/pictochrono/README.md
    trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf
    trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.tex
    trunk/Master/texmf-dist/tex/latex/pictochrono/
    trunk/Master/texmf-dist/tex/latex/pictochrono/pictochrono.sty
    trunk/Master/tlpkg/tlpsrc/pictochrono.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/pictochrono/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pictochrono/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pictochrono/README.md	2024-02-14 21:27:15 UTC (rev 69855)
@@ -0,0 +1,5 @@
+pictochrono provides a chronometer, made with tikz, for inline insertion.
+------------------------------------------------------------------------
+Author.......: Cédric Pierquet
+email........: cpierquet at outlook.fr
+Licence......: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/pictochrono/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf	2024-02-14 21:26:12 UTC (rev 69854)
+++ trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf	2024-02-14 21:27:15 UTC (rev 69855)

Property changes on: trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.tex	2024-02-14 21:27:15 UTC (rev 69855)
@@ -0,0 +1,216 @@
+% !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[english,11pt,a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage{DejaVuSerif}
+%\usepackage[scale=1.125]{inconsolata}
+\usepackage{pictochrono}
+\usepackage{soul}
+\usepackage{tabularray}
+\usepackage{lipsum}
+\usepackage{codehigh}
+\usepackage{fontawesome5}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+%\rhead{\sffamily\small\affloetalab[Legende]}
+\lfoot{\sffamily\small [pictochrono]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\usepackage{xspace}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+
+\def\TPversion{0.1.0}
+\def\TPdate{13/02/2024}
+\usepackage{tcolorbox}
+
+\sethlcolor{lightgray!25}
+\NewDocumentCommand\MontreCode{ m }{%
+	\hl{\vphantom{\texttt{pf}}\texttt{#1}}%
+}
+
+\usepackage{babel}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\begin{center}
+	\begin{minipage}{0.88\linewidth}
+	\begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+		\begin{center}
+			\begin{tabular}{c}
+				{\Huge \texttt{pictochrono}}\\
+				\\
+				{\LARGE A chronometer, made with Ti\textit{k}Z,} \\
+				\\
+				{\LARGE for inline insertion.} \\
+				\\
+				{\small \texttt{Version \TPversion{} -- \TPdate}}
+		\end{tabular}
+		\end{center}
+	\end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+	\begin{tabular}{c}
+	\texttt{Cédric Pierquet}\\
+	{\ttfamily c pierquet -- at -- outlook . fr}\\
+	\texttt{\url{https://github.com/cpierquet/pictochrono}}
+\end{tabular}
+\end{center}
+
+\hrule
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+\hrule
+
+\vspace*{5mm}
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!10]
+\hfill
+{\pictochrono[Height=4cm]{20}}
+\hfill~
+\end{tcolorbox}
+
+\medskip
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!10]
+{\LARGE\bfseries\sffamily Exercise n°1 (\pictochrono[ColTime=red]{10})\dotfill(5 points)}\\
+{\LARGE\bfseries\sffamily Exercise n°2 (\pictochrono[ColTime=blue]{25})\dotfill(9 points)}\\
+{\LARGE\bfseries\sffamily Exercise n°3 (\pictochrono[Delta=15,ColTime=orange]{35})\dotfill(11 points)}
+\end{tcolorbox}
+
+\vfill~
+
+\pagebreak
+
+\section{The package pictochrono}
+
+\subsection{Ideas}
+
+The idea is to display a pictogram like "chronometer" to present times for exercises, for example.
+
+The pictogram can be inserted inline with automatic height and vertical offset, or with a manual height and offset.
+
+\subsection{Loading}
+
+The package loads within the preamble, with \MontreCode{\textbackslash usepackage\{pictochrono\}}.
+
+The only loaded packages are \MontreCode{simplekv}, \MontreCode{calc}, \MontreCode{simplekv}, \MontreCode{xstring}, \MontreCode{etoolbox} and \MontreCode{tikz} (with \MontreCode{calc} library).
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\usepackage{pictochrono}
+\end{codehigh}
+
+\section{The command}
+
+\subsection{Usage}
+
+The command is \MontreCode{\textbackslash pictochrono}.
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\pictochrono[keys]{duration}<v.align>
+\end{codehigh}
+
+\medskip
+
+The optional keys are :
+
+\begin{itemize}
+	\item the key \MontreCode{Height} :
+	\begin{itemize}
+		\item can use an automatic height, with \MontreCode{auto} (by default, global height of current fonte + small vertical offset) ;
+		\item can specify a global height ;
+	\end{itemize}
+	\item the key \MontreCode{Color} for the main color (\MontreCode{black} by default) ;
+	\item the key \MontreCode{ColTime} for the color of duration, if specified (\MontreCode{lightgray} by default) ;
+	\item the key \MontreCode{Delta} for the graduations of minutes (within \texttt{0/5/10/15/20/30}) (\MontreCode{5} by default) ;
+	\item the key \MontreCode{Offset} for manual vertical offset (\MontreCode{auto} by default) ;
+\end{itemize}
+
+\medskip
+
+The mandatory argument, between \MontreCode{\{...\}}, is the duration to be displayed.
+
+\medskip
+
+The optional argument, between \MontreCode{<...>}, can specify a vertical alignment of the pictogram (within \texttt{vcenter/vbottom/vtop}, or empty for default positioning).
+
+\subsection{Examples}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%automatic inline insertion
+This is a test, with a \pictochrono{25} minutes chronometer.
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%automatic inline insertion, with user colors.
+{\Huge This is an other test, with a 
+\pictochrono[Delta=15,Color=blue,ColTime=red]{20} minutes chronometer.}
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%manual inline insertion, with manual offset.
+This a \pictochrono[Height=3em,Offset=-0.75em]{45} minutes chronometer.
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%manual insertion
+\pictochrono[Height=5cm,ColTime=teal]{33}
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%wihtin a tblr
+\begin{tblr}{hlines,vlines,colspec={Q[m,c]Q[8cm,m,j]}}
+  \pictochrono[Height=4cm,ColTime=purple]{20}
+  &
+  \lipsum[1][1-9] \\
+\end{tblr}
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+	%wihtin a tblr
+\begin{tblr}{hlines,vlines,colspec={Q[m,c]Q[8cm,m,j]}}
+  \pictochrono[Height=4cm,ColTime=purple]{20}<vcenter>
+  &
+  \lipsum[1][1-9] \\
+\end{tblr}
+\end{demohigh}
+
+\vfill
+
+\section{History}
+
+\verb|v0.1.0|~:~~~~Initial version
+
+\vspace*{15mm}
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/pictochrono/pictochrono-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/pictochrono/pictochrono.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pictochrono/pictochrono.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/pictochrono/pictochrono.sty	2024-02-14 21:27:15 UTC (rev 69855)
@@ -0,0 +1,113 @@
+% Author        : C. Pierquet
+% licence       : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pictochrono}[2024/02/13 0.1.0 Inline chronometer, made with tikz]
+
+%====HISTORY
+% v 0.1.0	Initial version
+
+%====BASE
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\RequirePackage{calc}
+\RequirePackage{simplekv}
+\RequirePackage{xstring}
+\RequirePackage{etoolbox}
+
+%====DIMENSIONS
+\newlength{\tmp at chrono@hauteur at totale}
+\newlength{\tmp at chrono@profondeur}
+\newlength{\tmp at chrono@offset}
+
+%====KEYS
+\defKV[chronotikz]{Color=\def\colchrono{#1},Height=\def\hautchrono{#1},Delta=\def\deltachrono{#1},ColTime=\def\coltimechrono{#1},Offset=\def\raisechrono{#1}}
+\setKVdefault[chronotikz]{Color=black,Height=auto,Delta=5,ColTime=lightgray,Offset=auto}
+
+%====INTERNAL MACRO
+\newcommand\tmp at chrono@draw{%
+	\draw[\colchrono,line width={\echellechronotraits\tmp at chrono@hauteur at totale}] (0,0) circle[radius=1] ;
+	%rules
+	\filldraw[line width={\echellechronotraits\tmp at chrono@hauteur at totale},\colchrono,rounded corners={\echellechronoarrondis\tmp at chrono@hauteur at totale}] (65:1)--(65:1.15)--(57.5:1.15)--(57.5:1)--cycle ;
+	\filldraw[line width={\echellechronotraits\tmp at chrono@hauteur at totale},\colchrono,rounded corners={\echellechronoarrondis\tmp at chrono@hauteur at totale}] (115:1)--(115:1.15)--(122.5:1.15)--(122.5:1)--cycle ;
+	\filldraw[line width={\echellechronotraits\tmp at chrono@hauteur at totale},\colchrono,line join=round,rounded corners={\echellechronoarrondis\tmp at chrono@hauteur at totale}] (-0.1,1)--++(0,0.2)-|++(-0.15,0.15)--++(0.5,0)|-++(-0.15,-0.15)--++(0,-0.2)--cycle ;
+}
+
+%====MAIN MACRO
+\NewDocumentCommand\pictochrono{ O{} m D<>{} }{%1:=options,2=durée,3=baseline tikz
+	\restoreKV[chronotikz]%
+	\setKV[chronotikz]{#1}%
+	%calcul des dimensions
+	\def\echellechronotraits{0.037}%
+	\def\echellechronoarrondis{0.003}%
+	\IfStrEqCase{\deltachrono}{%
+		{10}{\def\tmp at gen@traits{90,150,210,270,330,30}}%
+		{15}{\def\tmp at gen@traits{0,90,180,270}}%
+		{20}{\def\tmp at gen@traits{90,210,330}}%
+		{30}{\def\tmp at gen@traits{90,270}}%
+	}%
+		[\def\tmp at gen@traits{0,30,60,90,120,150,180,210,240,270,300,330}]%
+	%option tikz
+	\ifstrempty{#3}%
+		{%
+			\tikzset{chronoalign/.style={}}%
+		}%
+		{%
+			\IfStrEqCase{#3}{%
+				{vcenter}{\tikzset{chronoalign/.style={baseline=(current bounding box.center)}}}%
+				{vtop}{\tikzset{chronoalign/.style={baseline=(current bounding box.north)}}}%
+				{vbottom}{\tikzset{chronoalign/.style={baseline=(current bounding box.south)}}}%
+			}%
+				[\tikzset{chronoalign/.style={}}]%
+		}%
+	%hauteur auto ou non
+	\IfStrEq{\hautchrono}{auto}%
+		{%
+			\settototalheight{\tmp at chrono@hauteur at totale}{\hbox{qB}}%
+			\settodepth{\tmp at chrono@profondeur}{\hbox{q}}%
+			\IfStrEq{\raisechrono}{auto}%
+				{%
+					\setlength{\tmp at chrono@offset}{-\tmp at chrono@profondeur}%
+				}%
+				{%
+					\setlength{\tmp at chrono@offset}{-\raisechrono}%
+				}%
+			%envt
+			\raisebox{\tmp at chrono@offset}{%
+				\begin{tikzpicture}[x={0.4125\tmp at chrono@hauteur at totale},y={0.4125\tmp at chrono@hauteur at totale},transform shape,chronoalign]
+					%time
+					\IfEq{#2}{}{}{\filldraw[rounded corners={\echellechronoarrondis\tmp at chrono@hauteur at totale},\coltimechrono,draw=none] (0,0)--({90-6*(#2)}:0.9) arc ({90-6*(#2)}:90:0.9)--cycle ;}%
+					%rules
+					\IfStrEq{\deltachrono}{0}%
+						{}%
+						{\foreach \i in \tmp at gen@traits {\draw[\colchrono,line width={\echellechronotraits\tmp at chrono@hauteur at totale}] (\i:0.6)--(\i:0.85);}}%
+					%clock
+					\tmp at chrono@draw
+				\end{tikzpicture}%
+			}%
+		}%
+		{%
+			\IfStrEq{\raisechrono}{auto}%
+				{%
+					\setlength{\tmp at chrono@offset}{0pt}%
+				}%
+				{%
+					\setlength{\tmp at chrono@offset}{\raisechrono}%
+				}%
+			\setlength{\tmp at chrono@hauteur at totale}{\hautchrono}%
+			\raisebox{\tmp at chrono@offset}{%
+				\begin{tikzpicture}[x={0.4125\tmp at chrono@hauteur at totale},y={0.4125\tmp at chrono@hauteur at totale},transform shape,chronoalign]
+					%time
+					\IfEq{#2}{}{}{\filldraw[rounded corners={\echellechronoarrondis\tmp at chrono@hauteur at totale},\coltimechrono,draw=none] (0,0)--({90-6*(#2)}:0.9) arc ({90-6*(#2)}:90:0.9)--cycle ;}%
+					%rules
+					\IfStrEq{\deltachrono}{0}%
+						{}%
+						{\foreach \i in \tmp at gen@traits {\draw[\colchrono,line width={\echellechronotraits\tmp at chrono@hauteur at totale}] (\i:0.6)--(\i:0.85);}}%
+					%clock
+					\tmp at chrono@draw
+				\end{tikzpicture}%
+			}%
+		}%
+}
+
+\endinput
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/pictochrono/pictochrono.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-02-14 21:26:12 UTC (rev 69854)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-02-14 21:27:15 UTC (rev 69855)
@@ -658,7 +658,7 @@
     phonenumbers phonetic phonrule photo photobook
     physconst physics physics2 physunits
     piano picinpar pict2e
-    pictex pictex2 pictexsum picture piechartmp piff pigpen
+    pictex pictex2 pictexsum pictochrono picture piechartmp piff pigpen
     pinlabel pinoutikz pitex piton pittetd pixelart pixelarttikz
     pkfix pkfix-helper pkgloader pkuthss
     pl placeat placeins placeins-plain

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2024-02-14 21:26:12 UTC (rev 69854)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2024-02-14 21:27:15 UTC (rev 69855)
@@ -1825,6 +1825,7 @@
  'pgfplots'		=> '&POSTpgfplots',
  'physics2'		=> '&POST_onelevel',
  'pict2e'		=> '&POSTpict2e',
+ 'pictochrono'		=> '&POST_onelevel',
  'pixelarttikz'		=> '&POST_onelevel',
  'pkfix-helper'		=> '&POSTpkfix_helper',
  'platex'		=> '&POST_preserve_man',

Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2024-02-14 21:26:12 UTC (rev 69854)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2024-02-14 21:27:15 UTC (rev 69855)
@@ -130,6 +130,7 @@
 depend pict2e
 depend pictex
 depend pictex2
+depend pictochrono
 depend pinlabel
 depend pixelart
 depend pixelarttikz

Added: trunk/Master/tlpkg/tlpsrc/pictochrono.tlpsrc
===================================================================


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