From f76939750d63d6088b9bdeac794ce3fdf33d1269 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 12 Feb 2023 03:01:46 +0000 Subject: CTAN sync 202302120301 --- macros/latex/contrib/codehigh/codehigh.pdf | Bin 119611 -> 125913 bytes macros/latex/contrib/codehigh/codehigh.sty | 38 +++- macros/latex/contrib/codehigh/codehigh.tex | 59 +++++- .../latex/contrib/proflycee/doc/ProfLycee-doc.pdf | Bin 807448 -> 812183 bytes .../latex/contrib/proflycee/doc/ProfLycee-doc.tex | 81 +++++--- macros/latex/contrib/proflycee/tex/ProfLycee.sty | 94 ++++++++- .../proflycee/tex/proflycee-tools-minted.tex | 2 +- .../proflycee/tex/proflycee-tools-piton.tex | 2 +- .../proflycee/tex/proflycee-tools-pythontex.tex | 2 +- macros/latex/contrib/tidyres/README.md | 29 +++ macros/latex/contrib/tidyres/tidyres-doc.pdf | Bin 0 -> 211638 bytes macros/latex/contrib/tidyres/tidyres-doc.tex | 210 +++++++++++++++++++++ macros/latex/contrib/tidyres/tidyres.sty | 53 ++++++ 13 files changed, 528 insertions(+), 42 deletions(-) create mode 100644 macros/latex/contrib/tidyres/README.md create mode 100644 macros/latex/contrib/tidyres/tidyres-doc.pdf create mode 100644 macros/latex/contrib/tidyres/tidyres-doc.tex create mode 100644 macros/latex/contrib/tidyres/tidyres.sty (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/codehigh/codehigh.pdf b/macros/latex/contrib/codehigh/codehigh.pdf index 088eb890e8..21c152b571 100644 Binary files a/macros/latex/contrib/codehigh/codehigh.pdf and b/macros/latex/contrib/codehigh/codehigh.pdf differ diff --git a/macros/latex/contrib/codehigh/codehigh.sty b/macros/latex/contrib/codehigh/codehigh.sty index d9bfaec0e7..62438d7dac 100644 --- a/macros/latex/contrib/codehigh/codehigh.sty +++ b/macros/latex/contrib/codehigh/codehigh.sty @@ -12,11 +12,11 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\ProvidesExplPackage{codehigh}{2022-04-29}{2022E} +\ProvidesExplPackage{codehigh}{2023-02-11}{2023A} {Highlight codes and demos with l3regex and lpeg} %\RequirePackage{xparse} -\RequirePackage{l3benchmark} +%\RequirePackage{l3benchmark} \RequirePackage{catchfile} \RequirePackage{xcolor} \RequirePackage{ninecolors} @@ -599,6 +599,40 @@ \tl_use:N #1 } +%%% ------------------------------------------------------- +%%> \section{Fake Verbatim Command} +%%% ------------------------------------------------------- + +\tl_new:N \l__codehigh_fake_code_tl + +\NewDocumentCommand \fakeverb { +m } + { + \group_begin: + \tl_set:Nn \l__codehigh_fake_code_tl {#1} + \__codehigh_fake_verb:N \l__codehigh_fake_code_tl + \group_end: + } + +\cs_new_protected:Npn \__codehigh_fake_verb:N #1 + { + \regex_replace_all:nnN { \c{\\} } { \\ } #1 + % use \cO to avoid errors of unmatched braces + \regex_replace_all:nnN { \c{\{} } { \cO\{ } #1 + \regex_replace_all:nnN { \c{\}} } { \cO\} } #1 + % use \cO to avoid doubled hash characters + \regex_replace_all:nnN { \c{\#} } { \cO\# } #1 + % need to escape ^ because ^^ and ^^^^ are special + \regex_replace_all:nnN { \c{\^} } { \^ } #1 + % why we can not use \c{\ } instead of \c{\h}? + \regex_replace_all:nnN { \c{\h} } { \ } #1 + \regex_replace_all:nnN { \c{\%} } { \% } #1 + % remove spaces after control words + \regex_replace_all:nnN { . } { \c{string}\0 } #1 + \tl_set:Ne #1 { #1 } + %\tl_log:N #1 + \ttfamily \frenchspacing \tl_to_str:N #1 + } + %%% ------------------------------------------------------- %%> \section{Tracing CodeHigh} %%% ------------------------------------------------------- diff --git a/macros/latex/contrib/codehigh/codehigh.tex b/macros/latex/contrib/codehigh/codehigh.tex index c3bddd4632..5f1e0295e7 100644 --- a/macros/latex/contrib/codehigh/codehigh.tex +++ b/macros/latex/contrib/codehigh/codehigh.tex @@ -2,7 +2,7 @@ \documentclass[oneside]{book} \usepackage[a4paper,margin=2cm]{geometry} -\newcommand*{\myversion}{2022E} +\newcommand*{\myversion}{2023A} \newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)} \newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi} @@ -16,6 +16,7 @@ urlcolor=blue3, linkcolor=green3, } +\usepackage{tabularx,booktabs} \begin{document} @@ -177,6 +178,62 @@ Note that \verb!codehigh! package will load \verb!ninecolors!% To modify or add languages and themes, please read the source files \verb!codehigh.sty! and \verb!codehigh.lua! for reference. +\section{Fake Verbatim Command} + +\CodeHigh{language=latex/table,style/main=gray9,style/code=gray9,style/demo=white} + +To ease the pain of writing verbatim commands +(such as in \verb|tabularx| and \verb|tabularray| tables), +This package provides \verb|\fakeverb| command. + +This command will remove the backslashes in the following control symbols +before typesetting its content: + +\renewcommand\arraystretch{1.3} +\begin{center} +\begin{tabularx}{0.9\linewidth}{llX} +\toprule +Input & Result & Remark \\ +\midrule +\fakeverb{\\\\} & \fakeverb{\\} & + Need to be escaped only when typesetting other control symbols in this table \\ +\fakeverb{\\\{} & \fakeverb{\{} & + Need to be escaped only when left and right curly braces are unmatched \\ +\fakeverb{\\\}} & \fakeverb{\}} & + Need to be escaped only when left and right curly braces are unmatched \\ +\fakeverb{\\\#} & \fakeverb{\#} & + Always need to be escaped \\ +\fakeverb{\\\^} & \fakeverb{\^} & + Need to be escaped only when there are more than one in a row \\ +\texttt{\textbackslash\textvisiblespace} & \texttt{\textvisiblespace} & + Need to be escaped only when more than one in a row or after control words \\ +\fakeverb{\\\%} & \fakeverb{\%} & + Always need to be escaped \\ +\bottomrule +\end{tabularx} +\end{center} + +The argument of \verb|\fakeverb| command need to be enclosed with curly braces. +Therefore it could be safely used inside \verb|tabularray| tables and other LaTeX commands. + +Here is an example of using \verb!\fakeverb! commands inside \verb|tabularx| environment: + +\begin{demohigh}[language=latex/table] +\begin{tabularx}{0.5\textwidth}{lX} +\hline + Alpha & \fakeverb{\abc{}$&^_^uvw 123} \\ +\hline + Beta & \fakeverb{\bfseries\ \#\%} \\ +\hline +\end{tabularx} +\end{demohigh} + +Here is another example of using \verb!\fakeverb! commands inside \verb|\fbox| command: + +\begin{demohigh}[language=latex/latex2] +Hello\fbox{\fakeverb{$\left\\\{A\right.$\#}}Verb! +\end{demohigh} + \chapter{The Source Code} \dochighinput[language=latex/latex3]{codehigh.sty} diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf index 5bc213607f..b2293c1e65 100644 Binary files a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf and b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf differ diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 3d4e3e9240..d89b4727fd 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -5,8 +5,8 @@ % arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') \documentclass[a4paper,french,11pt]{article} -\def\PLversion{2.5.0} -\def\PLdate{8 Février 2023} +\def\PLversion{2.5.2} +\def\PLdate{11 Février 2023} \usepackage{ProfLycee} \useproflyclib{piton,minted,pythontex} \usepackage{lualatex-math} @@ -317,8 +317,8 @@ L'utilisateur est libre de charger ses autres {packages} utiles et habituels, ai Le {package} \ctex{ProfLycee} charge les {packages} : \begin{itemize} - \item \ctex{xcolor} avec les options \textsf{[table,svgnames]} ; - \item \ctex{tikz}, \ctex{pgf}, \ctex{pgffor} ; + \item \ctex{xcolor} avec l' option \textsf{[table,svgnames]} ; + \item \ctex{tikz}, \ctex{pgf}, \ctex{pgffor}, \ctex{nicefrac} ; \item \ctex{tcolorbox} avec l'option \textsf{[most]} ; \item \ctex{xparse}, \ctex{xstring}, \ctex{simplekv}, \ctex{xinttools} ; \item \ctex{listofitems}, \ctex{xintexpr} , \ctex{xintbinhex}, \ctex{xintgcd} ; @@ -699,7 +699,7 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent \begin{codetex}[listing only] %conversion en fraction, simplification de racine -\ConversionFraction[option]{argument} +\ConversionFraction(*)[option]{argument} \SimplificationRacine{expression} %ensemble d'éléments @@ -5395,46 +5395,74 @@ L'idée est d'obtenir une commande pour \textit{simplifier} un calcul sous forme \end{codeidee} \begin{codetex}[listing only] -\ConversionFraction[option]{argument} +\ConversionFraction(*)[option de formatage]{calcul} \end{codetex} \subsection{Commande et options} \begin{codecles} -Peu d'options pour ces commandes : +Quelques explications sur cette commande : \begin{itemize} -\item le premier argument, \textit{optionnel}, permet de spécifier le mode de sortie de la fraction \textsf{[t]} pour \textsf{tfrac} et \textsf{[d]} pour \textsf{dfrac} ; -\item le second, \textit{obligatoire}, est le \textsf{calcul} ou la \textsf{division} à convertir. + \item \cmaj{2.5.1} la version \textit{étoilée} force l'écriture du signe \og $-$ \fg{} sur le numérateur ; + \item le premier argument, \textit{optionnel} et entre \textsf{[...]} permet de spécifier un formatage du résultat : + \begin{itemize} + \item \Cle{t} pour l'affichage de la fraction en mode \textsf{tfrac} ; + \item \Cle{d} pour l'affichage de la fraction en mode \textsf{dfrac} ; + \item \Cle{n} pour l'affichage de la fraction en mode \textsf{nicefrac} ; + \item \Cle{dec} pour l'affichage du résultat en mode \texttt{décimal} (sans arrondi !) ; + \item \Cle{dec=k} pour l'affichage du résultat en mode \texttt{décimal} arrondi à $10^{-k}$ ; + \end{itemize} + \item le second argument, \textit{obligatoire}, est quant à lui, le calcul en syntaxe \textsf{xint}. \end{itemize} À noter que la macro est dans un bloc \ctex{ensuremath} donc les \ctex{\$...\$} ne sont pas nécessaires. \end{codecles} \begin{codetex}[listing only] +\ConversionFraction{-10+1/3*(-5/16)} %sortie par défaut +\ConversionFraction*{-10+1/3*(-5/16)} %sortie fraction avec - sur numérateur +\ConversionFraction[d]{-10+1/3*(-5/16)} %sortie en displaystyle +\ConversionFraction[n]{-10+1/3*(-5/16)} %sortie en nicefrac +\ConversionFraction[dec=4]{-10+1/3*(-5/16)} %sortie en décimal arrondi à 0,0001 +\ConversionFraction{2+91/7} %entier formaté \ConversionFraction{111/2145} \ConversionFraction{111/3} -$\frac{111}{2145}=\ConversionFraction{111/2145}$ -$\frac{3}{15}=\ConversionFraction[]{3/15}$ -$\tfrac{3}{15}=\ConversionFraction[t]{3/15}$ %formatage en \tfrac -$\dfrac{3}{15}=\ConversionFraction[d]{3/15}$ %formatage en \dfrac -$\dfrac{0,42}{0,015}=\ConversionFraction[d]{0.42/0.015}$ -$\dfrac{0,41}{0,015}=\ConversionFraction[d]{0.41/0.015}$ -$\dfrac{1}{7}+\dfrac{3}{8}=\ConversionFraction[d]{1/7+3/8}$ -$\ConversionFraction[d]{1+1/2}$ -$\ConversionFraction{0.1/0.7+30/80}$ \end{codetex} \begin{codesortie} -\begin{multicols}{2} -\ConversionFraction{111/2145} +\ConversionFraction{-10+1/3*(-5/16)} \smallskip -\ConversionFraction{111/3} +\ConversionFraction*{-10+1/3*(-5/16)} \smallskip +\ConversionFraction[d]{-10+1/3*(-5/16)} + +\smallskip + +\ConversionFraction[n]{-10+1/3*(-5/16)} + +\smallskip + +\ConversionFraction[dec=4]{-10+1/3*(-5/16)} + +\smallskip + +\ConversionFraction{2+91/7} + +\smallskip + +\ConversionFraction{111/2145} + +\smallskip + +\ConversionFraction{111/3} +\end{codesortie} + +\begin{codetex}[] $\frac{111}{2145}=\ConversionFraction{111/2145}$ \smallskip @@ -5459,7 +5487,7 @@ $\dfrac{0,41}{0,015}=\ConversionFraction[d]{0.41/0.015}$ \smallskip -$\dfrac{1}{7}+\dfrac{3}{8}=\ConversionFraction[d]{1/7+3/8}$ +$\dfrac{1}{7}-\dfrac{3}{8}=\ConversionFraction[d]{1/7-3/8}$ \smallskip @@ -5468,10 +5496,7 @@ $\ConversionFraction[d]{1+1/2}$ \smallskip $\ConversionFraction{0.1/0.7+30/80}$ -\end{multicols} - -~ -\end{codesortie} +\end{codetex} \begin{codeinfo} A priori le package \ctex{xint} permet de s'en sortir pour des calculs \og simples \fg, je ne garantis pas que tout calcul ou toute division donne un résultat \textit{satisfaisant} ! @@ -6222,6 +6247,10 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0 \part{Historique} +{\small \bverb|v 2.5.2|~:~~~~Correction d'un dysfonctionnement avec \textsf{tcolorbox 6.0} + +{\small \bverb|v 2.5.1|~:~~~~Ajout d'une version étoilée pour la conversion en fraction (page \pageref{convfrac}) + {\small \bverb|v 2.5.0|~:~~~~Système de \textsf{librairies} pour certains packages/commandes (page \pageref{librairies}) {\small \bverb|v 2.2.0|~:~~~~Ajout d'une clé \Cle{Notation} pour les arrangements et combinaisons (page \pageref{combinatoire}) diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index c65512f9e3..c6656d3c20 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,9 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/02/08 2.5.0 Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/02/11 2.5.2 Aide pour l'utilisation de LaTeX en lycee] +% 2.5.2 Correction d'un dysfonctionnement avec tcolorbox 6.0 :-( +% 2.5.1 Modification de la commande de conversion en fraction % 2.5.0 Passage à des libraires via \useproflyclib % 2.2.0 Ajout de clés [Notation] pour les arrangements et combinaisons % 2.1.9 Correction d'un bug avec les MiniSchémas + version étoilée @@ -50,6 +52,7 @@ \RequirePackage{tabularray} \RequirePackage{hologo} \RequirePackage{fancyvrb} +\RequirePackage{nicefrac} \RequirePackage{siunitx} %test avec v3 \sisetup{% locale=FR,output-decimal-marker={,},% @@ -57,7 +60,7 @@ reset-math-version=false,reset-text-family=false,% reset-text-series=false,reset-text-shape=false,% text-family-to-math=true,text-series-to-math=true,% - group-minimum-digits=4 + group-minimum-digits=4% }% \RequirePackage{fontawesome5} %librairies tikz @@ -421,12 +424,12 @@ } } -\DeclareTCBListing{CodePythonLst}{ s O{\linewidth} m }{% * off pour numéros de lignes + {largeur} + +\NewTCBListing{CodePythonLst}{ s O{\linewidth} m }{% * off pour numéros de lignes + {largeur} + \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, width=#2,#3 } -\NewTCBInputListing{\CodePythonLstFichier}{ s O{\linewidth} m m }{ +\NewTCBInputListing[]{\CodePythonLstFichier}{ s O{\linewidth} m m }{ \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, width=#2,#3, listing file={#4} @@ -807,16 +810,87 @@ {\left\lbrace \PLensopt{} \StrSubstitute{#2}{/}{{\PLenssep}} \right\rbrace} } -%%------SimplFrac -\DeclareDocumentCommand\ConversionFraction{ O{} m }{% argument optionnel [d ou t] puis argument mandataire {calcul ou fraction} - \def\calculargument{\xintPRaw{\xintIrr{\xinteval{#2}}}}%on calcule et on transforme en A/B +%%------SimplFrac ancienne version +%\DeclareDocumentCommand\ConversionFraction{ O{} m }{% argument optionnel [d ou t] puis argument mandataire {calcul ou fraction} +% \def\calculargument{\xintPRaw{\xintIrr{\xinteval{#2}}}}%on calcule et on transforme en A/B +% \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît +% {%si oui := fraction +% \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur +% \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur +% \ifblank{#1}{\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'argument optionnel est vide +% \IfStrEq{#1}{d}{\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'arg opt est d +% \IfStrEq{#1}{t}{\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'arg opt est t +% }{%si non := entier +% \num{\calculargument}%on affiche l'entier, avec le package siunitx +% }% +%} + +%%------SimplFrac nouvelle version +\NewDocumentCommand\ConversionFraction{ s O{} m }{% + %*=moins sur le numérateur + %2=argument.optionnel[d/t/dec=...] + %3=argument mandataire {calcul ou fraction} + \def\calculargument{\xintPRaw{\xintIrr{\xinteval{#3}}}}%on calcule et on transforme en A/B \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît {%si oui := fraction \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur - \ifblank{#1}{\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'argument optionnel est vide - \IfStrEq{#1}{d}{\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'arg opt est d - \IfStrEq{#1}{t}{\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}{}%si l'arg opt est t + \ifblank{#2}% + {% + \IfBooleanTF{#1}% + {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}% + {% + \ifthenelse{\numerateur < 0}% + {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}% + {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}% + }% + }% + {}%si l'argument optionnel est vide + \IfStrEq{#2}{d}% + {% + \IfBooleanTF{#1}% + {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}% + {% + \ifthenelse{\numerateur < 0}% + {\ensuremath{-\dfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}% + {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}% + }% + }% + {}%si l'argument optionnel est vide + \IfStrEq{#2}{t}% + {% + \IfBooleanTF{#1}% + {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}% + {% + \ifthenelse{\numerateur < 0}% + {\ensuremath{-\tfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}% + {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}% + }% + }% + {}%si l'argument optionnel est vide + \IfStrEq{#2}{n}% + {% + %\IfBooleanTF{#1}% + {\ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}}% + %{% + % \ifthenelse{\numerateur < 0}% + % {\ensuremath{-\nicefrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}% + % {\ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}}% + %}% + }% + {}%si l'argument optionnel est vide + \IfSubStr{#2}{dec}%on veut la forme décimale + {% + \IfSubStr{#2}{=}%si on rajoute une précision + {% + \StrBehind{#2}{=}[\precdecimal]% + \ensuremath{\num{\xintfloateval{round(#3,\precdecimal)}}}% + }% + {% + \ensuremath{\num{\xintfloateval{#3}}}% + }% + }% + {}%si l'argument optionnel est vide }{%si non := entier \num{\calculargument}%on affiche l'entier, avec le package siunitx }% diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex index 028199ee6d..5ba77401bf 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex @@ -45,4 +45,4 @@ before upper=\renewcommand{\theFancyVerbLine}{\scriptsize\ttfamily\color{Green}\arabic{FancyVerbLine}} } -\endinput +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex index 5e97e82cc1..2bb7dadcc8 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex @@ -64,4 +64,4 @@ } \fi -\endinput +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex index a27acf3248..1a4b2c0f94 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex @@ -126,4 +126,4 @@ \verbcenterpost } -\endinput +\endinput \ No newline at end of file diff --git a/macros/latex/contrib/tidyres/README.md b/macros/latex/contrib/tidyres/README.md new file mode 100644 index 0000000000..d9a29c957c --- /dev/null +++ b/macros/latex/contrib/tidyres/README.md @@ -0,0 +1,29 @@ +#### Package Name + +`tidyres` (Please read the documentation on CTAN for detailed usage.) + + + +#### Author + +Yifan Liang (Github User Name: futurelyf) +You may contact me via Github. + + + +#### Basic Functions + +This `tidyres` package aims to provide users with a simple interface to create multi-column formal resume. + +The `\restitle` command helps users produce the title of the resume. + +The `ressection` environment helps users create multi-column sections (e.g., Education, Experience, etc.) + +The `\ressep` command helps users to add small vertical space between sub-items in a section. + + + +#### License + +This work is licensed under Creative Commons ”Attribution 4.0 International” license. +For detailed information about the license, please visit the Creative Commons’ website. \ No newline at end of file diff --git a/macros/latex/contrib/tidyres/tidyres-doc.pdf b/macros/latex/contrib/tidyres/tidyres-doc.pdf new file mode 100644 index 0000000000..9fa4ac0ed0 Binary files /dev/null and b/macros/latex/contrib/tidyres/tidyres-doc.pdf differ diff --git a/macros/latex/contrib/tidyres/tidyres-doc.tex b/macros/latex/contrib/tidyres/tidyres-doc.tex new file mode 100644 index 0000000000..0fad9a2a69 --- /dev/null +++ b/macros/latex/contrib/tidyres/tidyres-doc.tex @@ -0,0 +1,210 @@ +\documentclass[a4paper,10pt]{article} +% packages % +\usepackage[margin=1in]{geometry} +\usepackage{amsmath,amssymb} +\usepackage[dvipsnames]{xcolor} +\usepackage{hologo} +\usepackage[hidelinks]{hyperref} +\usepackage[type={CC},modifier={by},version={4.0}]{doclicense} +\usepackage{tidyres} +\usepackage{cprotect} +\usepackage{listings} +\usepackage[most]{tcolorbox} +\usepackage{changepage} +\hypersetup{colorlinks=True,allcolors=cyan} +\renewcommand{\contentsname}{\centering Table of Contents} +% info % +\title{{\tt tidyres} for Tidy Formal Resume} +\author{\itshape Yifan Liang} +\date{v1.0.0 2023-02-10} + +\definecolor{codegreen}{rgb}{0,0.6,0} +\definecolor{codegray}{rgb}{0.5,0.5,0.5} +\definecolor{backcolour}{rgb}{0.95,0.95,0.92} +\lstdefinestyle{mystyle}{ + language=[LaTeX]{TeX}, + backgroundcolor=\color{backcolour}, + commentstyle=\color{codegreen}, + numberstyle=\small\color{codegray}, + basicstyle=\ttfamily\normalsize, + breakatwhitespace=false, + breaklines=true, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2, + texcsstyle=*\color{blue}, +} +\lstset{style=mystyle} + + +% document % +\begin{document} + +\maketitle +\tableofcontents +\thispagestyle{empty} + +\newpage +\setcounter{page}{1} +\pagestyle{plain} + +\section{Introduction} +\subsection{Basic Functions} +This {\tt tidyres} package aims to provide users with a simple interface to create multi-column style formal resume. The package is comprised of three major commands/environments: + +\begin{enumerate}[label=\textbullet,leftmargin=6ex,topsep=4ex] + \item \verb+\restitle+ command + \item \verb+ressection+ environment + \item \verb+\ressep+ command +\end{enumerate} + +Users can also incorporate other packages such as \verb+enumitem+ to make bullet point in the resume. + +\vspace{1cm} + +\subsection{License} +This work is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons "Attribution 4.0 International" license}.\\ +\\ +For detailed information about the license, please visit the Creative Commons' website by clicking the \textcolor{Cyan}{cyan text above} or the license image below. +\\ +\begin{flushright} + \doclicenseImage +\end{flushright} + +\newpage + +\section{General Setup Tips} +\subsection{Page Margin} +For a typical resume, depending on the font style and font size you use, it is suggested that you set the page margin between {\bf 0.5 inch} to {\bf 1 inch}.\\ +~\\ +You can set the margin with the {\tt geometry} package using the following code: +\begin{lstlisting} +\usepackage[margin=0.5in]{geometry} +\end{lstlisting} + +\vspace{1cm} + +\subsection{Font Size} +Typically, a resume would use {\bf 9pt} to {\bf 11pt} font.\\ +~\\ +I would suggest using the {\tt extarticle} class to set the font size globally: + +\begin{lstlisting} +\documentclass[9pt]{extarticle} +% The extarticle class supports at least 8pt font size. +\end{lstlisting} +\newpage + +\section{Resume Title} + +\subsection{Goal} +The \verb+\restitle+ command helps user to print the title of the resume, which contains key information such as name, location, email, phone, and Linkedin ID.\\ + +\subsection{Example Code} +\begin{lstlisting} +\restitle{My Name}{Location}{Email}{Phone}{LinkedinID}{http://linkedin.com} +\end{lstlisting} + +\vspace{1cm} + +{\it will produce (on the top of the page):} + +\vspace{1cm} + +\begin{tcolorbox}[standard jigsaw,opacityback=0.1,colback=gray,boxrule=0.5pt] +\restitle{My Name}{Location}{Email}{Phone}{ID}{http://linkedin.com} +\end{tcolorbox} + +\vspace{1cm} + +\subsection{Note} +The hyperlink color of Linkedin can be set via {\tt hyperref} package. If you wish to set it in black, you may use the following code: + +\begin{lstlisting} +\usepackage[hidelinks]{hyperref} +\end{lstlisting} + +\newpage + +\section{Resume Section} + +\subsection{Goal} +The \verb+ressection+ environment helps users set the sections (e.g., Education, Experience, Certifications, etc.) of the resume.\\ +~\\ +You may use {\tt enumerate} or the {\tt itemize} environment within the {\tt ressection} environment to create bullet points to specify the specific experience/event.\\ +~\\ +The \verb+\ressep+ command separates the experience/event within a section. + +\newpage + +\subsection{Example Code} +\begin{lstlisting} +\begin{ressection}[Education] + {\bf ABC University}, {\sl College of Arts \& Science}, New York, NY + \hfill + Feb 2023 - Present + + \begin{enumerate} + \item Bachelor of Arts in Economics (Minor in Mathematics) + \item Cumulative GPA: 4.0/4.0 + \item Honors \& Societies: ABC Economics Society + \item Related Coursework: ABC Economics 101, ABC Statistics 101 + \end{enumerate} + + \ressep + + {\bf XYZ High School}, New Jersey, NY + \hfill + Jan 2021 - Feb 2023 + + \begin{enumerate} + \item General High School Diploma + \item Cumulative GPA: 3.7/4.0 + \item Honors \& Societies: XYZ Poem Society + \end{enumerate} +\end{ressection} +\end{lstlisting} + +\vspace{1cm} + +{\it will produce:} + +\vspace{1cm} +\begin{ressection}[Education] + {\bf ABC University}, {\sl College of Arts \& Science}, New York, NY + \hfill + Feb 2023 - Present + + \begin{enumerate} + \item Bachelor of Arts in Economics (Minor in Mathematics) + \item Cumulative GPA: 4.0/4.0 + \item Honors \& Societies: ABC Economics Society + \item Related Coursework: ABC Economics 101, ABC Statistics 101 + \end{enumerate} + + \ressep + + {\bf XYZ High School}, New Jersey, NY + \hfill + Jan 2021 - Feb 2023 + + \begin{enumerate} + \item General High School Diploma + \item Cumulative GPA: 3.7/4.0 + \item Honors \& Societies: XYZ Poem Society + \end{enumerate} +\end{ressection} + +\vspace{-6cm} + +\begin{adjustwidth}{-15pt}{-15pt} +\begin{tcolorbox}[standard jigsaw,opacityback=0.1,colback=gray,boxrule=0.5pt] + \vspace{5cm} +\end{tcolorbox} +\end{adjustwidth} + +\end{document} \ No newline at end of file diff --git a/macros/latex/contrib/tidyres/tidyres.sty b/macros/latex/contrib/tidyres/tidyres.sty new file mode 100644 index 0000000000..45860b3f4a --- /dev/null +++ b/macros/latex/contrib/tidyres/tidyres.sty @@ -0,0 +1,53 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tidyres}[2023-02-10 v1.0.0] + +% packages % +\RequirePackage{paracol} +\RequirePackage{tabularray} +\RequirePackage{enumitem} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage[dvipsnames]{xcolor} +\RequirePackage{hologo} +\RequirePackage{setspace} +\RequirePackage[hidelinks]{hyperref} +\RequirePackage{fontawesome} + +% format % +\setlength{\parindent}{0pt} +\setlength{\columnsep}{2em} +\columnratio{0.12,0.88} +\setlist{label=\textbullet,leftmargin=*,nolistsep} +\linespread{1.25} +\pagestyle{empty} + +% font % +% \newfontfamily\textcm{CMU Serif} + +% definition % +\newcommand{\restitle}[6] +{\begin{spacing}{1.15} +\begin{tblr}{ + column{1} = {l}, + column{2} = {r}, + column{3} = {l}, + cell{1}{1} = {r=4}{}, + colspec = {X[5]X[2.8]X[2.2]} +} +\hspace{6mm}{\fontsize{22}{22}\selectfont \sc #1} +& \faLocationArrow +& #2 \\ +& \faAt +& {\sl #3} \\ +& \faPhone +& #4 \\ +& \faLinkedinSquare +& \href{#6}{Linkedin - {\sl #5}}\\ +\hline +\end{tblr}\end{spacing}\vspace{7mm}} + +\newenvironment{ressection}[2][Section] +{\begin{paracol}{2} {\sc #1} \switchcolumn {#2}} +{\end{paracol}\vspace{5mm}} + +\newcommand{\ressep}[0]{\vspace{2mm}} \ No newline at end of file -- cgit v1.2.3