diff options
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r-- | macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf | bin | 6061282 -> 6059957 bytes | |||
-rw-r--r-- | macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex | 22 | ||||
-rw-r--r-- | macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty | 3 | ||||
-rw-r--r-- | macros/latex/contrib/maze/README.md | 37 | ||||
-rw-r--r-- | macros/latex/contrib/maze/maze.pdf | bin | 0 -> 79265 bytes | |||
-rw-r--r-- | macros/latex/contrib/maze/maze.sty | 87 | ||||
-rw-r--r-- | macros/latex/contrib/maze/maze.tex | 33 | ||||
-rw-r--r-- | macros/latex/contrib/resmes/README.md | 9 | ||||
-rw-r--r-- | macros/latex/contrib/resmes/resmes.dtx | 76 | ||||
-rw-r--r-- | macros/latex/contrib/resmes/resmes.ins | 43 | ||||
-rw-r--r-- | macros/latex/contrib/resmes/resmes.pdf | bin | 0 -> 69170 bytes |
11 files changed, 298 insertions, 12 deletions
diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf Binary files differindex 7bcb945355..112248c583 100644 --- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf +++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex index 718997a14c..62fbeafdd0 100644 --- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex +++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex @@ -52,8 +52,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\TPversion{0.2.0} -\def\TPdate{26 Décembre 2022} +\def\TPversion{0.2.1} +\def\TPdate{27 Décembre 2022} \usepackage[most]{tcolorbox} \usepackage[outputdir=build]{minted} @@ -185,12 +185,12 @@ Une commande pour des cartes en version \og miniatures \fg{} (individuelle, main \part{Historique} -{\small \bverb|v0.2.0|~:~~~~Modification du design des cartes (pdf pour Poker/Uno + png pour Tarot) + alternatives pour le Poker +{\small \bverb|v0.2.1|~:~~~~Correction du nom d'une carte pokerv1... -{\small \bverb|v0.1.5|~:~~~~Correction d'un bug dans les noms de fichiers de cartes Uno +{\small \bverb|v0.2.0|~:~~~~Modification du design des cartes (pdf pour Poker/Uno + png pour Tarot) + alternatives pour le Poker {\small \bverb|v0.1.4|~:~~~~Réduction de la taille des images \texttt{png} - + {\small \bverb|v0.1.3|~:~~~~Ajout de cartes Uno (CC1.0 par AlexDer) + modification des commandes + rami {\small \bverb|v0.1.2|~:~~~~Modification du nom (et de la source) des images de Tarot (CC0) @@ -249,21 +249,21 @@ On peut citer par exemple : \end{codeinfo} \begin{codeattention} -Les images utiles sont proposées en format \textsf{pdf} pour les cartes type \textsf{Poker} et \textsf{Uno} (obtenues grâce à des fichiers \textsf{svg} !), pour une qualité optimale et une taille réduite, et en format \textsf{png} pour les cartes Type \textsf{Tarot}, donc une solution de compilation adaptée au format \textsf{png} est nécessaire. +Les images utiles sont proposées en format \textsf{pdf} pour les cartes type \textsf{Poker} et \textsf{Uno} (obtenues grâce à des fichiers \textsf{svg} !), pour une qualité optimale et une taille réduite, et en format \textsf{png} pour les cartes Type \textsf{Tarot}, donc une solution de compilation adaptée aux formats \textsf{pdf/png} est nécessaire. \smallskip -Les fichiers \textsf{eps} pour les cartes type \textsf{Tarot} ne sont pas intégrées dans le package, mais elles sont disponible sur le dépôt \textsf{github} \url{https://github.com/cpierquet/JeuxCartes}. +Les fichiers \textsf{eps} ne sont pas intégrées dans le package, mais elles sont disponible sur le dépôt \textsf{github} \url{https://github.com/cpierquet/JeuxCartes}. -%\smallskip -% -%La présente documentation a été, après compilation, compressée pour obtenir une taille plus petite, donc le rendu réel des cartes est peut-être légèrement dégradé sur ce document ! +\smallskip + +Pour une compilation avec \LaTeX{} (et la chaîne \textsf{dvi-ps-ps2pdf}), il faudra donc enregistrer (\textit{manuellement}) les images au format \textsf{eps} ! \end{codeattention} \subsection{Chargement du package} \begin{codetex}[listing only] -%exemple de chargement pour une compilation en (pdf)latex +%exemple de chargement pour une compilation en pdflatex \documentclass[french]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} diff --git a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty index be879c1e06..c37e0334e6 100644 --- a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty +++ b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty @@ -7,7 +7,8 @@ % Uno v1 cards Image's Licence : MIT License https://eperezcosano.github.io/uno-part1/ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{JeuxCartes}[2022/12/26 v0.2.0 Jeux de cartes] +\ProvidesPackage{JeuxCartes}[2022/12/27 v0.2.1 Jeux de cartes] +% 0.2.1 Correction d'un bug avec une carte de poker... % 0.2.0 Modification des images (en mode pdf !) + v3 Poker + réduction taille Tarot % 0.1.7 Correction d'un bug avec les noms de Uno % 0.1.5 Ajout v2 pour le Poker diff --git a/macros/latex/contrib/maze/README.md b/macros/latex/contrib/maze/README.md new file mode 100644 index 0000000000..c20c91c791 --- /dev/null +++ b/macros/latex/contrib/maze/README.md @@ -0,0 +1,37 @@ +The maze package +========= + +The maze package can generate random square mazes of a specified size. + +Basic Usage +----------- +The package only provides a user command. + + \maze {⟨size⟩}[⟨seed⟩] + +You can read the package manual for some explanations. + +Copyright and License +--------------------- + + Copyright (C) 2022 by Sicheng Du <siddsc@foxmail.com> + ----------------------------------------------------------------- + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either + version 1.3c of this license or (at your option) any later + version. This version of this license is in + http://www.latex-project.org/lppl/lppl-1-3c.txt + and the latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3 or later is part of all distributions of + LaTeX version 2005/12/01 or later. + + This work has the LPPL maintenance status "maintained". + + The Current Maintainer of this work is Sicheng Du. + + This package consists of the files maze.tex, + maze.pdf, + maze.sty and + README.md (this file).
\ No newline at end of file diff --git a/macros/latex/contrib/maze/maze.pdf b/macros/latex/contrib/maze/maze.pdf Binary files differnew file mode 100644 index 0000000000..3f75e2a64d --- /dev/null +++ b/macros/latex/contrib/maze/maze.pdf diff --git a/macros/latex/contrib/maze/maze.sty b/macros/latex/contrib/maze/maze.sty new file mode 100644 index 0000000000..4401fa6099 --- /dev/null +++ b/macros/latex/contrib/maze/maze.sty @@ -0,0 +1,87 @@ +% Copyright (C) 2022 by Sicheng Du <siddsc@foxmail.com> +% This project is distributed under the LaTeX Project Public License, version 1.3c. +%-------------------------% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{maze}[1.1] +\ExplSyntaxOn +\int_new:N\l_rand +\int_new:N\l_old \int_new:N\l_new +\dim_const:Nn\g_size{\linewidth} +\newcommand{\m@ze}[2]{ + \sys_gset_rand_seed:n{#2} + \let\g_map\undefined + \let\g_walls_v\undefined\let\g_walls_h\undefined + \intarray_new:Nn\g_map{#1*#1} + \intarray_new:Nn\g_walls_v{#1*(#1-1)} + \intarray_new:Nn\g_walls_h{#1*(#1-1)} + \int_step_inline:nn{#1*#1}{ + \intarray_gset:Nnn\g_map{##1}{##1} + } + \int_step_inline:nn{#1*(#1-1)}{ + \intarray_gset:Nnn\g_walls_v{##1}{1} + \intarray_gset:Nnn\g_walls_h{##1}{1} + } + \bool_do_until:nn{ + \int_compare_p:nNn{\intarray_item:Nn\g_map{1}} + ={\intarray_item:Nn\g_map{#1*#1}} + }{ + \int_set:Nn\l_rand{\int_rand:n{#1*(#1-1)}} + \int_compare:nNnTF{0}={\intarray_item:Nn\g_walls_v{\l_rand}}{}{ + \int_compare:nNnTF{ + \intarray_item:Nn\g_map{\l_rand+\int_div_truncate:nn{\l_rand-1}{#1-1}} + }={ + \intarray_item:Nn\g_map{ + 1+\l_rand+\int_div_truncate:nn{\l_rand-1}{#1-1} + } + }{}{ + \int_set:Nn\l_new{ + \intarray_item:Nn\g_map{1+\l_rand+\int_div_truncate:nn{\l_rand-1}{#1-1}} + } + \int_set:Nn\l_old{ + \intarray_item:Nn\g_map{\l_rand+\int_div_truncate:nn{\l_rand-1}{#1-1}} + } + \intarray_gset:Nnn\g_walls_v{\l_rand}{0} + \int_step_inline:nn{#1*#1}{ + \int_compare:nNnTF{\l_old}={\intarray_item:Nn\g_map{##1}} + {\intarray_gset:Nnn\g_map{##1}{\l_new}}{} + } + } + } + \int_set:Nn\l_rand{\int_rand:n{#1*(#1-1)}} + \int_compare:nNnTF{0}={\intarray_item:Nn\g_walls_h{\l_rand}}{}{ + \int_compare:nNnTF{\intarray_item:Nn\g_map{\l_rand}} + ={\intarray_item:Nn\g_map{#1+\l_rand}}{}{ + \int_set:Nn\l_new{\intarray_item:Nn\g_map{#1+\l_rand}} + \int_set:Nn\l_old{\intarray_item:Nn\g_map{\l_rand}} + \intarray_gset:Nnn\g_walls_h{\l_rand}{0} + \int_step_inline:nn{#1*#1}{ + \int_compare:nNnTF{\l_old}={\intarray_item:Nn\g_map{##1}} + {\intarray_gset:Nnn\g_map{##1}{\l_new}}{} + } + } + } + } +} +\NewDocumentCommand\maze{mO{\c_sys_minute_int}}{ + \m@ze{#1}{#2} + \setlength{\unitlength}{\fp_eval:n{.4/#1}\g_size} + \begin{picture}(\int_eval:n{#1+2},\int_eval:n{#1+2})(-1,-1) + \put(0,0){\line(0,1){#1}}\put(0,0){\line(1,0){#1}} + \put(#1,#1){\line(0,-1){#1}}\put(#1,#1){\line(-1,0){#1}} + \int_step_inline:nn{#1*(#1-1)}{ + \int_compare:nNnTF{0}={\intarray_item:Nn\g_walls_h{##1}}{}{ + \put( + \int_mod:nn{##1-1}{#1}, + \int_eval:n{1+\int_div_truncate:nn{##1-1}{#1}} + ){\line(1,0){1}} + } + \int_compare:nNnTF{0}={\intarray_item:Nn\g_walls_v{##1}}{}{ + \put( + \int_mod:nn{##1}{#1-1}, + \int_div_truncate:nn{##1-1}{#1-1} + ){\line(0,1){1}} + } + } + \end{picture} +} +\ExplSyntaxOff
\ No newline at end of file diff --git a/macros/latex/contrib/maze/maze.tex b/macros/latex/contrib/maze/maze.tex new file mode 100644 index 0000000000..0783535bfc --- /dev/null +++ b/macros/latex/contrib/maze/maze.tex @@ -0,0 +1,33 @@ +\documentclass{ltxdoc} +\title{The \textsf{maze} package\footnote{~~This project is distributed under the \LaTeX~Project Public License, version 1.3c.}} +\usepackage{graphicx} +\usepackage{fontspec} +\setmainfont{Times New Roman} +\usepackage[misc]{ifsym} +\author{Sicheng Du\thanks{~~\Letter~~\href{mailto:siddsc@foxmail.com}{siddsc@foxmail.com}}} +\date{\today~~~~v1.1} +\usepackage[colorlinks,linkcolor=purple]{hyperref} +\usepackage{maze} +\begin{document} +\maketitle +The \textsf{maze} package can generate random square mazes of a specified size. You need to start from the bottom-left corner and reach the top-right corner to play it. +\begin{macro}{\maze} +\marg{size}\oarg{seed} is the syntax of the command that generates a maze. Thereinto +\begin{description} +\item[\marg{size}] controls the density of the walls inside the maze and directly influences its complexity. It must be a positive integer greater or equal to 2. + +To have the package produce a satisfactory outcome, it is recommended to input a number between 20 and 30 into \marg{text}. Over large numbers may cause \TeX~to exhaust its capacity and fail to produce anything. +\item[\oarg{seed}] is an optional parameter that specifies the seed for random numbers. If it is omitted, the current time (minute) will be used as the seed instead. +\end{description}\end{macro} + +As an example, the following can be created by \cs{maze{30}[4]} and \cs{maze{20}[6]} respectively. +\begin{figure}[h] +\begin{minipage}{.5\textwidth} +\maze{30}[4] +\end{minipage}\hfill +\begin{minipage}{.5\textwidth} +\maze{20}[6] +\end{minipage} +\end{figure} +\eject +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/resmes/README.md b/macros/latex/contrib/resmes/README.md new file mode 100644 index 0000000000..0847b2a1a5 --- /dev/null +++ b/macros/latex/contrib/resmes/README.md @@ -0,0 +1,9 @@ +# resmes +Restriction of measure in LaTeX + +## Package usage +Just put in your preamble + + \usepackage{resmes} + +It provides command `\resmes` that prints measure restriction symbol. diff --git a/macros/latex/contrib/resmes/resmes.dtx b/macros/latex/contrib/resmes/resmes.dtx new file mode 100644 index 0000000000..7497320eaf --- /dev/null +++ b/macros/latex/contrib/resmes/resmes.dtx @@ -0,0 +1,76 @@ +% \iffalse meta-comment +% +% resmes Restriction of measures symbol in LaTeX +% +% Copyright (c) 2022 Paolo +% +% Licensed under MIT (https://github.com/Loara/resmes/blob/main/LICENSE) +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{resmes.dtx}[2022/12/27 v1.0 Restriction of measures symbol in LaTeX] +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{resmes}[2022/12/27 v1.0 Restriction of measures symbol in LaTeX] +%<package>\RequirePackage{xparse} +%<package>\RequirePackage{tikz} +%<*driver> +\documentclass{ltxdoc} +\usepackage{resmes} +\begin{document} +\DocInput{resmes.dtx} +\end{document} +%</driver> +% \fi +% +%\newcommand{\thpkg}{\texttt{resmes}} +% +%\title{\thpkg} +%\author{Paolo De Donato} +%\date{2022/21/27\ v1.0} +% +%\maketitle +% +% This package defines the |\resmes| command in order to print measure restriction symbol. For example in mathmode +% \begin{verbatim} +% \mu\resmes A +% \end{verbatim} +% expands as +% \[ +% \mu\resmes A +% \] +% +% This package works also in inline math mode ($\mu\resmes A$) and in subscript/superscript emvironments ($a^{\mu\resmes A}, b_{c^{\mu\resmes A}}$). +%\StopEventually +% +%\section{Implementation} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} + +\NewDocumentCommand{\ress@D}{}{ + \tikz{\draw[thick, join=round, cap=round] (0.24, 0) -- (0,0) -- (0, 0.24);}} +\NewDocumentCommand{\ress@T}{}{ + \tikz{\draw[semithick, join=round, cap=round] (0.23, 0) -- (0,0) -- (0, 0.23);}} +\NewDocumentCommand{\ress@S}{}{ + \,\tikz{\draw[thin, join=round] (0.154, 0) -- (0,0) -- (0, 0.154);}} +\NewDocumentCommand{\ress@SS}{}{ + \tikz{\draw[very thin, join=round] (0.11, 0) -- (0,0) -- (0, 0.11);}} + +\NewDocumentCommand{\resmes}{}{ + \mathchoice{\mathbin{\ress@D}}{\mathbin{\ress@T}} + {\mathbin{\ress@S}}{\mathbin{\ress@SS}}} + +% \end{macrocode} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +%\Finale +% +%\PrintIndex diff --git a/macros/latex/contrib/resmes/resmes.ins b/macros/latex/contrib/resmes/resmes.ins new file mode 100644 index 0000000000..58950cc880 --- /dev/null +++ b/macros/latex/contrib/resmes/resmes.ins @@ -0,0 +1,43 @@ +%% +%% resmes Restriction of measures symbol in LaTeX +%% +%% Copyright (c) 2022 Paolo +%% +%% Licensed under MIT (https://github.com/Loara/resmes/blob/main/LICENSE) +%% + +\input l3docstrip.tex +\keepsilent + +\usedir{tex/latex/resmes} + +\preamble + +This is a generated file. + +resmes Restriction of measures symbol in LaTeX + +Copyright (c) 2022 Paolo + +Licensed under MIT (https://github.com/Loara/resmes/blob/main/LICENSE) + +\endpreamble + +\askforoverwritefalse +\generate{\file{resmes.sty}{\from{resmes.dtx}{package}}} + +\obeyspaces +\Msg{:^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^)} +\Msg{(*^.^*)} +\Msg{*-* Hey dude, remember you have to move the following file *-*} +\Msg{(*^.^*)} +\Msg{resmes.sty} +\Msg{(*^.^*)} +\Msg{*-* into a directory searched by TeX!! *-*} +\Msg{*-* To produce the documentation look it up on the Internet. *-*} +\Msg{(*^.^*)} +\Msg{*-* See ya! *-*} +\Msg{(*^.^*)} +\Msg{:^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^) :^)} + +\endbatchfile diff --git a/macros/latex/contrib/resmes/resmes.pdf b/macros/latex/contrib/resmes/resmes.pdf Binary files differnew file mode 100644 index 0000000000..ab9bb70f9e --- /dev/null +++ b/macros/latex/contrib/resmes/resmes.pdf |