diff options
author | Karl Berry <karl@freefriends.org> | 2024-11-11 21:12:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-11-11 21:12:41 +0000 |
commit | 518da0b739f66212c3cda279d8376cf8ac7afc14 (patch) | |
tree | 631043775656a415cb1f2a142d6acb7c36294598 | |
parent | c7523a416aa442151e80be3a262491b057179f46 (diff) |
calculatoritems (11nov24)
git-svn-id: svn://tug.org/texlive/trunk@72819 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/calculatoritems/README.md | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.pdf | bin | 0 -> 222830 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.tex | 503 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/calculatoritems/tex/calculatoritems.sty | 401 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/calculatoritems.tlpsrc | 0 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 |
7 files changed, 915 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/calculatoritems/README.md b/Master/texmf-dist/doc/latex/calculatoritems/README.md new file mode 100644 index 00000000000..fb0e8b97f85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/calculatoritems/README.md @@ -0,0 +1,9 @@ +calculatoritems is a package with menus/items for classic calculators. + +---------------------------------------------------------------------- + +Author..: Cédric Pierquet + +email...: cpierquet@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 diff --git a/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.pdf b/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.pdf Binary files differnew file mode 100644 index 00000000000..f22439b78a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.pdf diff --git a/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.tex b/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.tex new file mode 100644 index 00000000000..1862f15b786 --- /dev/null +++ b/Master/texmf-dist/doc/latex/calculatoritems/doc/calculatoritems-doc.tex @@ -0,0 +1,503 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} + +\documentclass[11pt,a4paper]{ltxdoc} +\usepackage{bera} +\usepackage{inconsolata} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[scale=0.875]{cabin} +\usepackage{calculatoritems} +\usepackage{fancyvrb} +\usepackage{fancyhdr} +\usepackage{tabularray} +\usepackage{fontawesome5} +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\lfoot{\sffamily\small [calculatoritems]} +\cfoot{\sffamily\small - \thepage{} -} +\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} +\usepackage{hologo} +\providecommand\tikzlogo{Ti\textit{k}Z} +\providecommand\TeXLive{\TeX{}Live\xspace} +\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{11/11/2024} +\usepackage{enumitem} +\usepackage{tcolorbox} +\usepackage{pgffor} +\tcbuselibrary{breakable,skins,hooks,listingsutf8} + +\lstdefinestyle{packagestyle} +{ + language=[LaTeX]TeX,% + columns=fullflexible,% + extendedchars=true,% + basicstyle=\small\ttfamily,% + keywordstyle={\color{black}},% + classoffset=0,% + keywords={},% + alsoletter={-},% + keywordstyle={\color{blue}},% + classoffset=1,% + alsoletter={-},% + morekeywords={},% + keywordstyle={\color{violet}},% + classoffset=2,% + alsoletter={-},% + morekeywords={calculatoritems,\CalcItemMenu,nwkstri,tidots,casiodots},% + keywordstyle={\color{green!50!black}},% + classoffset=3,% + morekeywords={xelua,noamssymb,model,type,fsep,font,len,bg,rightsymb},% + keywordstyle={\color{orange}},% + inputencoding=utf8/latin1 +} + +\lstset{ +% language=[LaTeX]TeX,% + basicstyle=\small\ttfamily,% + keywordstyle={},% +% classoffset=0,% +% keywords={},% +% alsoletter={-},% +% keywordstyle={\color{blue}},% +% classoffset=1,% +% alsoletter={-},% +% morekeywords={},% +% keywordstyle={\color{violet}},% +% classoffset=2,% +% alsoletter={-},% +% morekeywords={calculatoritems,\CalcItemMenu,nwkstri,tidots,casiodots},% +% keywordstyle={\color{green!50!black}},% +% classoffset=3,% +% morekeywords={xelua,noamssymb,model,type,fsep,font,len,bg,rightsymb},% +% keywordstyle={\color{orange}} +} + +\newtcblisting{DemoCode}[1]{% + enhanced,width=\linewidth,% + bicolor,size=title,% + colback=cyan!10!white,% + colbacklower=cyan!5!white,% + colframe=cyan!75!black,% + listing options={% + breaklines=true,% + breakatwhitespace=true,% + style=packagestyle,% + basicstyle=\footnotesize\ttfamily,% + tabsize=4,% + commentstyle={\itshape\color{gray}}, + keywordstyle={\color{blue}},% + classoffset=0,% + keywords={\newfontfamily},% + alsoletter={-},% + keywordstyle={\color{blue}},% + classoffset=1,% + alsoletter={-},% + morekeywords={\CalcItemMenu,\nwkstri,\tidots,\casiodots},% + keywordstyle={\color{violet}},% + classoffset=2,% + alsoletter={-},% + morekeywords={calculatoritems,\CalcItemMenu,nwkstri,tidots,casiodots},% + keywordstyle={\color{green!50!black}},% + classoffset=3,% + morekeywords={xelua,noamssymb,model,type,fsep,font,len,bg,rightsymb},% + keywordstyle={\color{orange}} + },% + #1 +} + +\newtcbinputlisting\DemoCodeFile[1]{% + enhanced,width=\linewidth,% + bicolor,size=title,% + colback=lightgray!10!white,% + colbacklower=lightgray!5!white,% + colframe=lightgray!75!black,% + listing options={% + breaklines=true,% + breakatwhitespace=true,% + style=tcblatex, + extendedchars=true,% + basicstyle=\tiny\ttfamily,% + keywordstyle={},% + tabsize=2,% + commentstyle={\itshape\color{gray}},% + inputencoding=utf8/latin1 + },% + breakable, + listing only,% + listing file={#1} +} + +\NewDocumentCommand\ShowCode{ m }{% + \colorbox{lightgray!50}{\lstinline!#1!}% +} + +\begin{document} + +\thispagestyle{empty} + +\begin{center} + \begin{minipage}{0.88\linewidth} + \begin{tcolorbox}[colframe=yellow,colback=yellow!15] + \begin{center} + \renewcommand{\arraystretch}{1.25}% + \begin{tabular}{c} + {\Huge \texttt{calculatoritems}}\\ + \\ + {\LARGE Insert items of} \\ + {\LARGE classic calculators.} \\ + \\ + {\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/calculatoritems}} \\ + \end{tabular} +\end{center} + +\hrule + +\vfill + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only} +Classic calculators items or menus : + +35+E : + \CalcItemMenu[model=35+,font=\fontCASIOA]{GRAPH} + +90+E: + \CalcItemMenu[model=90+,type=bmenu,font=\fontCASIOB]{MAT} + +MATH+ : + \CalcItemMenu[model=math+,font=\fontCASIOB,rightsymb=>]{arithmetic} + +NWKS : + \CalcItemMenu[model=nwks,type=bmenu,rightsymb=\nwkstri,len=12,font\fontNWKS]{X predict} + +TI : + \CalcItemMenu[model=ti,type=itemsel,font=\small\fontTI]{6§{fmin(}} + +HP Prime : + \CalcItemMenu[model=hp,type=itemsel,font=\small\fontHP,rightsymb=>]{4§Quadratic Explorer} +\end{tcblisting} + +\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] +Classic calulators items or menus : + +\begin{itemize} + \item \texttt{35+E~} : \CalcItemMenu[model=35+,font=\fontCASIOA]{GRAPH} + \item \texttt{90+E~} : \CalcItemMenu[model=90+,type=bmenu,font=\fontCASIOB,bg=lightgray!5]{MAT} + \item \texttt{MATH+} : \CalcItemMenu[model=math+,font=\fontCASIOB,rightsymb=>]{arithmetic} + \item \texttt{NWKS~} : \CalcItemMenu[model=nwks,type=bmenu,rightsymb=\nwkstri,len=14, font=\fontNWKS]{X predict} + \item \texttt{TI~~~} : \CalcItemMenu[model=ti,type=itemsel,font=\fontTI]{6§{fmin(}} + \item \texttt{HP~~~} : \CalcItemMenu[model=hp,type=itemsel,font=\fontHP,rightsymb=>]{4§Quadratic Explorer} +\end{itemize} +\end{tcolorbox} + +\vfill~ + +%\hrule +% +%\medskip + +%\emph{% +% The \textsf{luarandom} package do the same things, but with the obligation to compile with \hologo{LuaLaTeX}. +%} +% +%\medskip + +\hrule + +\vspace*{5mm} + +\pagebreak + +\phantomsection + +\hypertarget{matoc}{} + +\tableofcontents + +\vspace*{5mm} + +\vfill + +\section{History \& Future} + +\texttt{0.1.0: Initial version} +\texttt{todo~: usage of nodepthtext package ?} + +\vspace*{5mm} + +%\hrule + +\pagebreak + +\section{Introduction} + +\subsection{Loading, useful packages} + +In order to load \ShowCode{calculatoritems}, simply use: + +\begin{DemoCode}{listing only} +\usepackage{calculatoritems} +\end{DemoCode} + +Loaded packages are \ShowCode{xstring}, \ShowCode{calc}, \ShowCode{simplekv}, \ShowCode{tcolorbox} and \ShowCode{circledtext}. + +Loaded libraries are \ShowCode{calc} and \ShowCode{skins}. + +\smallskip + +If \ShowCode{ammsymb} doen't need to be loaded (useful for int. macro), just add \ShowCode{[noamssymb]} to the loading. + +\begin{DemoCode}{listing only} +%w/o amssymb loading +\usepackage[noamssymb]{calculatoritems} +\end{DemoCode} + +\subsection{Fonts} + +The package define shortcuts for fonts, depending on the engine, an option \ShowCode{[xelua]} can be used. + +\begin{DemoCode}{listing only} +%normal loading, for classic engines (pdflatex/latex) +\usepackage{calculatoritems} +\end{DemoCode} + +\begin{DemoCode}{listing only} +%special loading, for recent engines (xelatex/lualatex) +\usepackage[xelua]{calculatoritems} +\end{DemoCode} + +Available fonts are given by followings macros (best fonts are \texttt{teletype}). + +\begin{DemoCode}{listing only} +%normal loading, for classic engines (pdflatex/latex) +\newcommand\fontNWKS{% + \fontencoding{T1}\fontfamily{SourceCodePro-TLF}\selectfont %nwks +} +\newcommand\fontCASIOA{% + \fontencoding{T1}\fontfamily{AnonymousPro}\fontseries{sb}\selectfont %casio35 +} +\newcommand\fontCASIOB{% + \fontencoding{T1}\fontfamily{AlegreyaSans-TLF}\fontseries{sb}\selectfont %casio90 & math+ +} +\newcommand\fontTI{% + \fontencoding{T1}\fontfamily{AnonymousPro}\fontseries{sb}\selectfont %ti +} +\newcommand\fontHP{% + \fontencoding{T1}\fontfamily{AlegreyaSans-TLF}\fontseries{sb}\selectfont %hp +} +\end{DemoCode} + +\begin{DemoCode}{listing only} +%special loading, for recent engines (xelatex/lualatex) with fontspec +\newfontfamily\fontNWKS{SourceCodePro-Medium} %numworks +\newfontfamily\fontCASIOA{AnonymousPro} %casio35 +\newfontfamily\fontCASIOB{AlegreyaSans} %casio90 & math+ +\newfontfamily\fontTI{AnonymousPro} %ti +\newfontfamily\fontHP{AlegreyaSans} %casio90 & math+ +\end{DemoCode} + +\subsection{Special macros} + +Special macros are available, to match with some custom \textit{symbols}. + +\begin{DemoCode}{} +\nwkstri \qquad \tidots \qquad \casiodots +\end{DemoCode} + +\section{Usage} + +\subsection{Global usage} + +The purpose of the main macro is to insert, \textit{inline}, a small \texttt{tcbox} to display \textit{items} as for classic calculators. + +Size and aspect are fixed, in order to \textit{match} the original rendering. + +\subsection{The macro} + +The main macro is \ShowCode{\\CalcItemMenu}. + +\begin{DemoCode}{listing only} +\CalcItemMenu[keys]{content} +\end{DemoCode} + +Available keys are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{model} : specify the model (\texttt{empty} by default) ; + \item \ShowCode{type} : type of item, according to the specified model (\texttt{empty} by default) ; + \item \ShowCode{fsep} : length for modifying the sep between rules and content (\texttt{1pt} by default) ; + \item \ShowCode{font} : font for the content (\texttt{\textbackslash bfseries\textbackslash ttfamily} by default) ; + \item \ShowCode{len} : internal key for modifying length of content, for same models/types (\texttt{auto} by default) ; + \item \ShowCode{bg} : bg color or the \textit{external background}, if necessary (\texttt{white} by default) ; + \item \ShowCode{rightsymb} : right symbol, if necessary (\texttt{empty} by default). +\end{itemize} + +\section{Samples} + +\subsection{Generic model} + +This is the default rendering. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := white menu (default value)\hfill\CalcItemMenu{MyItem} + \item \ShowCode{[type=black]} := black menu\hfill\CalcItemMenu[type=black]{MyItem} +\end{itemize} + +\begin{DemoCode}{listing only}% +\CalcItemMenu{MyItem} +\CalcItemMenu[type=black]{MyItem} +\end{DemoCode} + +\subsection{CASIO 35+ or fx-9860GIII} + +For this model, the key is \ShowCode{[model=35+]}, and font \ShowCode{[font=\\fontCASIOA]} can be used. + +By default, there's 4 \textit{characters} in the box, so if there's more, a \textit{h-stretch} is applied. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := white menu (default value) \hfill\CalcItemMenu[model=35+,font=\small\fontCASIOA]{GRPH} + \item \ShowCode{[type=bmenu]} := dark menu \hfill\CalcItemMenu[model=35+,type=bmenu,font=\small\fontCASIOA]{GRPH} + \item \ShowCode{[type=item]} := item menu \hfill\CalcItemMenu[model=35+,type=item,font=\small\fontCASIOA]{GRPH} + \item \ShowCode{[type=itemsel]} := item selected (19 chars) with optional right symbol\hfill\CalcItemMenu[model=35+,type=itemsel,font=\small\fontCASIOA]{TEST LONG ITEM} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=35+,font=\small\fontCASIOA]{GRPH} +\CalcItemMenu[model=35+,type=bmenu,font=\small\fontCASIOA]{GRPH} +\CalcItemMenu[model=35+,type=item,font=\small\fontCASIOA]{GRPH} +\CalcItemMenu[model=35+,type=itemsel,font=\small\fontCASIOA]{TEST LONG ITEM} +\end{DemoCode} + +\subsection{CASIO 90+ or fx-CG50} + +For this model, the key is \ShowCode{[model=90+]}, and font \ShowCode{[font=\\fontCASIOB]} can be used. + +By default, there's 5 \textit{characters} in the box, so if there's more, a \textit{h-stretch} is applied. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := white menu (default value) \hfill\CalcItemMenu[model=90+,font=\small\fontCASIOB]{GRAPH} + \item \ShowCode{[type=bmenu]} := black menu \hfill\CalcItemMenu[model=90+,type=bmenu,font=\small\fontCASIOB]{GRAPH} + \item \ShowCode{[type=item]} := item menu \hfill\CalcItemMenu[model=90+,type=item,font=\small\fontCASIOB]{GRAPH} + \item \ShowCode{[type=itemsel]} := item selected (22 chars) with optional right symbol + + \hfill\CalcItemMenu[model=90+,type=itemsel,font=\small\fontCASIOB]{TEST LONG ITEM} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=90+,font=\small\fontCASIOB]{GRAPH} +\CalcItemMenu[model=90+,type=bmenu,font=\small\fontCASIOB]{GRAPH} +\CalcItemMenu[model=90+,type=item,font=\small\fontCASIOB]{GRAPH} +\CalcItemMenu[model=90+,type=itemsel,font=\small\fontCASIOB]{TEST LONG ITEM} +\end{DemoCode} + +\subsection{CASIO MATH+} + +For this model, the key is \ShowCode{[model=math+]} (20 chars), and font \ShowCode{[font=\\fontCASIOB]} can be used. + +Only one item is available, due to \textit{new global usage}, but \texttt{rightsymb} can be used. + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[rightsymb=\{\}]} (default)\hfill\CalcItemMenu[model=math+,font=\small\fontCASIOB]{MyItem} + \item \ShowCode{[rightsymb=>]}\hfill\CalcItemMenu[model=math+,font=\small\fontCASIOB,rightsymb=>]{MyItem} + \item \ShowCode{[rightsymb=\\casiodots]}\hfill\CalcItemMenu[model=math+,font=\small\fontCASIOB,rightsymb=\casiodots]{MyItem} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=math+,font=\small\fontCASIOB]{MyItem} +\CalcItemMenu[model=math+,font=\small\fontCASIOB,rightsymb=>]{MyItem} +\CalcItemMenu[model=math+,font=\small\fontCASIOB,rightsymb=\casiodots]{MyItem} +\end{DemoCode} + +\subsection{NUMWORKS} + +For this model, the key is \ShowCode{[model=nwks]}, and font \ShowCode{[font=\\fontNWKS]} can be used. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := white menu (default)\hfill\CalcItemMenu[model=nwks,font=\small\fontNWKS]{MyItem} + \item \ShowCode{[type=gmenu]} := gray menu\hfill\CalcItemMenu[model=nwks,type=gmenu,font=\small\fontNWKS]{MyItem} + \item \ShowCode{[type=bmenu]} := black menu (22 chars, with \texttt{rightsymb})\hfill\CalcItemMenu[model=nwks,type=bmenu,font=\small\fontNWKS,rightsymb=\nwkstri]{MyItem} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=nwks,font=\small\fontNWKS]{MyItem} +\CalcItemMenu[model=nwks,type=gmenu,font=\small\fontNWKS]{MyItem} +\CalcItemMenu[model=nwks,type=bmenu,font=\small\fontNWKS,rightsymb=\nwkstri]{MyItem} +\end{DemoCode} + +\subsection{TI} + +For this model, the key is \ShowCode{[model=ti]}, and font \ShowCode{[font=\\fontTI]} can be used. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := black menu (default)\hfill\CalcItemMenu[model=ti,font=\small\fontTI]{MyItem} + \item \ShowCode{[type=menu]} := default menu\hfill\CalcItemMenu[model=ti,type=menu,font=\small\fontTI]{MyItem} + \item \ShowCode{[type=itemsel]} := selected itemn, with number\hfill\CalcItemMenu[model=ti,type=itemsel,font=\small\fontTI]{1§{MyItem\tidots}} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=ti,font=\small\fontTI]{MyItem} +\CalcItemMenu[model=ti,type=menu,font=\small\fontTI]{MyItem} +\CalcItemMenu[model=ti,type=itemsel,font=\small\fontTI]{1§{MyItem\tidots}} +\end{DemoCode} + +\subsection{HP Prime} + +For this model, the key is \ShowCode{[model=hp]}, and font \ShowCode{[font=\\fontHP]} can be used. + +By default, there's 5 \textit{characters} in the box, so if there's more, a \textit{h-stretch} is applied. + +Available items are : + +\begin{itemize}[leftmargin=*] + \item \ShowCode{[type=\{\}]} := semi-rounded (default value) \hfill\CalcItemMenu[model=hp,font=\small\fontHP]{Catlg} + \item \ShowCode{[type=ritem]} := rounded \hfill\CalcItemMenu[model=hp,type=ritem,font=\small\fontHP]{OK} + \item \ShowCode{[type=item]} := item with optional right symbol\hfill\CalcItemMenu[model=hp,type=item,font=\small\fontHP,rightsymb={~>}]{1§Extremum} + \item \ShowCode{[type=itemsel]} := item selected (21 chars) with optional right symbol + + \hfill\CalcItemMenu[model=hp,type=itemsel,font=\small\fontHP,rightsymb=>]{4§Quadratic Explorer} +\end{itemize} + +\begin{DemoCode}{listing only} +\CalcItemMenu[model=hp,font=\small\fontHP]{Catlg} +\CalcItemMenu[model=hp,type=ritem,font=\small\fontHP]{OK} +\CalcItemMenu[model=hp,type=item,font=\small\fontHP,rightsymb={~>}]{1§Extremum} +\CalcItemMenu[model=hp,type=itemsel,font=\small\fontHP,rightsymb=>]{4§Quadratic Explorer} +\end{DemoCode} + + +\pagebreak + +\section{The code} + +\DemoCodeFile{calculatoritems.sty} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/calculatoritems/tex/calculatoritems.sty b/Master/texmf-dist/doc/latex/calculatoritems/tex/calculatoritems.sty new file mode 100644 index 00000000000..839e9863ef6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/calculatoritems/tex/calculatoritems.sty @@ -0,0 +1,401 @@ +% Author : C. Pierquet +% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{calculatoritems}[2024/11/11 0.1.0 Menus from classic calculators] + +%====HISTORIQUE +% v 0.1.0 Initial version + +%====OPTION +\newif\if@xelua \@xeluafalse +\newif\if@amssymb \@amssymbtrue +\DeclareOption{xelua}{\@xeluatrue} +\DeclareOption{noamssymb}{\@amssymbfalse} +\DeclareOption*{} +\ProcessOptions\relax + +%====BASE +\if@amssymb + \RequirePackage{amssymb} + \newcommand\nwkstri{\footnotesize\textcolor{orange}{$\blacktriangleright$}} +\fi +\RequirePackage{xstring} +\RequirePackage{calc} +\RequirePackage{simplekv} +\RequirePackage{tcolorbox} +\RequirePackage{circledtext} +\usetikzlibrary{calc} +\tcbuselibrary{skins} + +%====DIMs & Useful +\newlength\calcsimmenusfsep +\setlength\calcsimmenusfsep{1pt} +\newlength\calcsimmenusmenutc +\newlength\calcsimmenusitemtc +\newlength\calcsimmenusdepth +\newcommand\tidots{\scalebox{0.44}[0.55]{...}} +\newcommand\casiodots{\circledtext[resize=real,width=0.75em]{$\cdots$}} + +%====TCSTYLES +\tcbset{casiotc/.style={% + enhanced,fontupper=\calcsimmenusfont,nobeforeafter,% + box align=base,boxsep=\calcsimmenusfsep,% + boxrule=0.8pt,left=0pt,right=0pt,top=0pt,% + bottom=\dimexpr1pt-\calcsimmenusdepth\relax,no borderline + } +} +\tcbset{casiotcmenunoir/.style={% + width=\calcsimmenusmenutc,colframe=black,colback=black,% + colupper=white,sharp corners,rounded corners=southeast,% + arc=3pt,arc is angular,add to width=1pt + } +} +\tcbset{casiotcmenublanc/.style={% + enhanced,frame hidden,width=\calcsimmenusmenutc,% + colframe=black,colback=white,colupper=black,% + sharp corners,add to width=1pt, + borderline north={0.75pt}{0pt}{black}, + borderline west={0.75pt}{0pt}{black} + } +} +\tcbset{casiotcitemnoir/.style={% + width=\calcsimmenusmenutc,colframe=black,% + colback=black,colupper=white,sharp corners,add to width=1pt + } +} +\tcbset{casiotcitemsel/.style={% + width=\calcsimmenusitemtc,sharp corners,% + colframe=black,colback=black,colupper=white + } +} + +\tcbset{casioqd/.style={% + fontupper=\calcsimmenusfont,nobeforeafter,% + box align=base,boxsep=\calcsimmenusfsep,% + boxrule=0.8pt,left=0pt,right=0pt,top=0pt,% + bottom=\dimexpr1pt-\calcsimmenusdepth\relax,% + } +} +\tcbset{casioqdmenunoir/.style={% + enhanced,width=\calcsimmenusmenutc,colframe=black,% + colback=black,colupper=white,arc=1pt,add to width=2pt + } +} +\tcbset{casioqdmenublanc/.style={% + width=\calcsimmenusmenutc,colframe=black,colback=white,% + colupper=black,rounded corners,arc=1pt,add to width=2pt + } +} +\tcbset{casioqditemnoir/.style={% + width=\calcsimmenusmenutc,colframe=black,colback=black,% + colupper=white,sharp corners,add to width=2pt + } +} +\tcbset{casioqditemsel/.style={% + width=\calcsimmenusitemtc,sharp corners,colframe=black,% + colback=black,colupper=white,sharp corners + } +} + +\tcbset{vignettemenunwks/.style={% + top=\dimexpr0.45pt+0.5\calcsimmenusfsep\relax,bottom=\dimexpr1pt-\calcsimmenusdepth\relax,% + left=2pt,right=2pt,fontupper=\calcsimmenusfont,nobeforeafter,% + box align=base,boxrule=0.45pt,boxsep=0.5\calcsimmenusfsep,sharp corners=all + } +} + +\tcbset{vignettemenuti/.style={% + size=tight,boxrule=0.45pt,fontupper=\calcsimmenusfont,% + nobeforeafter,left=0.45pt,right=0.45pt,top=0.15pt,bottom=0.15pt,box align=base + } +} + +\tcbset{vignettemenuhp/.style={% + enhanced,fontupper=\calcsimmenusfont,nobeforeafter,% + box align=base,boxsep=\calcsimmenusfsep,% + boxrule=0.8pt,left=0pt,right=0pt,top=0pt,% + bottom=\dimexpr1pt-\calcsimmenusdepth\relax,% + } +} + +\tcbset{vignettemenuhpnorth/.style={% + width=\calcsimmenusmenutc,colupper=white,colback=darkgray!90,colframe=darkgray,% + sharp corners=north,add to width=2pt + } +} +\tcbset{vignettemenuhpround/.style={% + width=\calcsimmenusmenutc,colupper=white,colback=darkgray!90,colframe=darkgray,% + rounded corners,arc=1pt,add to width=2pt + } +} +\tcbset{vignettemenuhpitemsel/.style={% + width=\calcsimmenusitemtc,sharp corners,colframe=cyan!15,% + colback=cyan!15,colupper=black,sharp corners + } +} + +\tcbset{vignettemenuhpitem/.style={% + sharp corners,colframe=cyan!15,colback=cyan!15,colupper=black,sharp corners + } +} + +%====SPECIAL +\if@xelua + \newfontfamily\fontNWKS{SourceCodePro-Medium} %numworks + \newfontfamily\fontCASIOA{AnonymousPro} %casio35 + \newfontfamily\fontCASIOB{AlegreyaSans} %casio90 + \newfontfamily\fontTI{AnonymousPro} %ti + \newfontfamily\fontHP{AlegreyaSans} %ti +\else + \newcommand\fontNWKS{\fontencoding{T1}\fontfamily{SourceCodePro-TLF}\selectfont} %nwks + \newcommand\fontCASIOA{\fontencoding{T1}\fontfamily{AnonymousPro}\fontseries{sb}\selectfont} %casio35 + \newcommand\fontCASIOB{\fontencoding{T1}\fontfamily{AlegreyaSans-TLF}\fontseries{sb}\selectfont} %casio90 + \newcommand\fontTI{\fontencoding{T1}\fontfamily{AnonymousPro}\fontseries{sb}\selectfont} %ti + \newcommand\fontHP{\fontencoding{T1}\fontfamily{AlegreyaSans-TLF}\fontseries{sb}\selectfont} %casio90 +\fi + +%====KEYS +\defKV[calcsimmenus]{% + model=\def\calcsimmenusmodel{#1},% + type=\def\calcsimmenustype{#1},% + fsep=\setlength\calcsimmenusfsep{#1},% + font=\def\calcsimmenusfont{#1},% + len=\def\calcsimmenuslen{#1},% + bg=\def\calcsimmenusbg{#1},% + rightsymb=\def\calcsimmenusrsymb{#1} +} +\setKVdefault[calcsimmenus]{% + model={},% + type={},% + fsep=0.5pt,% + font={\bfseries\ttfamily},% + len=auto,% + bg=white,% + rightsymb={} +} + +\NewDocumentCommand\CalcItemMenu{ O{} m }{% + \restoreKV[calcsimmenus]% + \setKV[calcsimmenus]{#1}% + \IfEq{\calcsimmenusmodel}{}%gen model + {% + \IfEq{\calcsimmenustype}{}%white bg + {% + {\setlength{\fboxsep}{\calcsimmenusfsep}\fcolorbox{black}{white}{\vphantom{qH}\calcsimmenusfont#2}}% + }% + {}% + \IfEq{\calcsimmenustype}{black}%black bg + {% + {\setlength{\fboxsep}{\calcsimmenusfsep}\fcolorbox{black}{black}{\vphantom{qH}\calcsimmenusfont\textcolor{white}{#2}}}% + }% + {}% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{35+}% + {% + \settowidth{\calcsimmenusmenutc}{\hbox{\calcsimmenusfont XXXX}}% + \addtolength{\calcsimmenusmenutc}{2pt}% + \settowidth{\calcsimmenusitemtc}{\hbox{\calcsimmenusfont XXXXXXXXXXXXXXXXXXX}}% + \settodepth{\calcsimmenusdepth}{\hbox{\calcsimmenusfont gH}}% + \IfEq{\calcsimmenuslen}{auto}% + {% + \StrLen{#2}[\calcsimmenusnbchar]% + \xdef\calcsimmenushscale{\fpeval{min(4/(\calcsimmenusnbchar),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + {% + \xdef\calcsimmenushscale{\fpeval{min(4/(\calcsimmenuslen),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + \IfEq{\calcsimmenustype}{}%white menu + {% + {\tcbox[tcbox width=minimum center,casiotc,casiotcmenublanc]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{bmenu}%black menu + {% + {\tcbox[tcbox width=minimum center,casiotc,casiotcmenunoir]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{item}%item + {% + {\tcbox[tcbox width=minimum center,casiotc,casiotcitemnoir]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{itemsel}%item sel + {% + {\tcbox[tcbox width=minimum left,casiotc,casiotcitemsel]{\makebox[\calcsimmenusitemtc]{\vphantom{qH}{#2}\hfill{\calcsimmenusrsymb}}}}% + }% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{90+}% + {% + \settowidth{\calcsimmenusmenutc}{\hbox{\calcsimmenusfont XXXXX}}% + \addtolength{\calcsimmenusmenutc}{2pt}% + \settowidth{\calcsimmenusitemtc}{\hbox{\calcsimmenusfont XXXXXXXXXXXXXXXXXXXXXX}}% + \settodepth{\calcsimmenusdepth}{\hbox{\calcsimmenusfont gH}}% + \IfEq{\calcsimmenuslen}{auto}% + {% + \StrLen{#2}[\calcsimmenusnbchar]% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenusnbchar),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + {% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenuslen),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + \IfEq{\calcsimmenustype}{}%white menu + {% + {\tcbox[tcbox width=minimum center,casioqd,casioqdmenublanc]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{bmenu}%black menu + {% + {\tcbox[tcbox width=minimum center,casioqd,casioqdmenunoir,overlay={\path[fill=\calcsimmenusbg]($(frame.south east) + (0.1pt,-0.1pt)$) -- ++ (0pt,3.2pt) -- ++ (-3.2pt,-3.2pt) -- cycle;}]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{item}%item + {% + {\tcbox[tcbox width=minimum center,casioqd,casioqditemnoir]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{itemsel}%item + {% + {\tcbox[tcbox width=minimum left,casioqd,casioqditemsel]{\makebox[\calcsimmenusitemtc]{\vphantom{qH}{#2}\hfill{\calcsimmenusrsymb}}}}% + }% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{math+}% + {% + \settowidth{\calcsimmenusmenutc}{\hbox{\calcsimmenusfont XXXXX}}% + \addtolength{\calcsimmenusmenutc}{2pt}% + \settowidth{\calcsimmenusitemtc}{\hbox{\calcsimmenusfont XXXXXXXXXXXXXXXXXXXX}}% + \settodepth{\calcsimmenusdepth}{\hbox{\calcsimmenusfont gH}}% + \IfEq{\calcsimmenuslen}{auto}% + {% + \StrLen{#2}[\calcsimmenusnbchar]% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenusnbchar),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + {% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenuslen),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + \IfEq{\calcsimmenustype}{}%white menu + {% + {\tcbox[tcbox width=minimum left,casioqd,casioqditemnoir]{\makebox[\calcsimmenusitemtc]{\vphantom{qH}{#2}\hfill{\calcsimmenusrsymb}}}}% + }% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{nwks}% + {% + \setlength{\calcsimmenusdepth}{0.375pt}% + \IfEq{\calcsimmenustype}{}%white menu + {% + {\tcbox[vignettemenunwks,colframe=gray,colupper=darkgray,colback=white]{\vphantom{qH}\scalebox{0.85}[0.95]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{gmenu}%gray menu + {% + {\tcbox[vignettemenunwks,colframe=lightgray!50,colupper=black,colback=lightgray!50]{\vphantom{qH}\scalebox{0.85}[0.95]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{bmenu}%dark menu + {% + \xdef\tmplengthmenunwks{}% + \IfEq{\calcsimmenuslen}{auto}% + {% + \foreach \i in {1,...,22}{\xdef\tmplengthmenunwks{X\tmplengthmenunwks}}% + }% + {% + \foreach \i in {1,...,\calcsimmenuslen}{\xdef\tmplengthmenunwks{X\tmplengthmenunwks}}% + }% + \settowidth{\calcsimmenusitemtc}{\hbox{\calcsimmenusfont\tmplengthmenunwks}}% + {% + \tcbox[width=\calcsimmenusitemtc,tcbox width=minimum left,vignettemenunwks,colframe=gray,colupper=black,colback=lightgray!75]% + {\makebox[\calcsimmenusitemtc]{\vphantom{qH}\scalebox{0.85}[0.95]{#2}\hfill{\calcsimmenusrsymb}}}% + }% + }% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{ti}% + {% + \IfEq{\calcsimmenustype}{}% black menu + {% + {\tcbox[vignettemenuti,colback=black,colframe=black,colupper=white]{\vphantom{qH}\scalebox{0.9}[1]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{menu}% menu sel + {% + {\tcbox[vignettemenuti,colback=white,colframe=black,colupper=black]{\vphantom{[A]/Fiy}\scalebox{0.9}[1]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{itemsel}%item sel + {% + \StrCut{#2}{§}{\calcsimmenusnb}{\calcsimmenuslab}% + {% + \tcbox[vignettemenuti,colback=black,colframe=black,colupper=white]{\vphantom{[A]/Fiy}\scalebox{0.9}[1]{\calcsimmenusnb:}}% + \hspace*{-0.225pt}% + \tcbox[vignettemenuti,colback=white,colframe=black,colupper=black]{\vphantom{[A]/Fiy}\scalebox{0.9}[1]{\calcsimmenuslab}}}% + }% + {}% + }% + {}% + \IfEq{\calcsimmenusmodel}{hp}% + {% + \settowidth{\calcsimmenusmenutc}{\hbox{\calcsimmenusfont XXXXX}}% + \addtolength{\calcsimmenusmenutc}{2pt}% + \settowidth{\calcsimmenusitemtc}{\hbox{\calcsimmenusfont XXXXXXXXXXXXXXXXXXXXX}}% + \settodepth{\calcsimmenusdepth}{\hbox{\calcsimmenusfont gH}}% + \IfEq{\calcsimmenuslen}{auto}% + {% + \StrLen{#2}[\calcsimmenusnbchar]% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenusnbchar),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + {% + \xdef\calcsimmenushscale{\fpeval{min(5/(\calcsimmenuslen),1)}}% + \xdef\calcsimmenusvscale{\fpeval{0.95*\calcsimmenushscale}}% + }% + \IfEq{\calcsimmenustype}{}%bottom rounded + {% + {\tcbox[tcbox width=minimum center,vignettemenuhp,vignettemenuhpnorth]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{ritem}%rounded item + {% + {\tcbox[tcbox width=minimum center,vignettemenuhp,vignettemenuhpround]{\vphantom{qH}\scalebox{\calcsimmenushscale}[\calcsimmenusvscale]{#2}}}% + }% + {}% + \IfEq{\calcsimmenustype}{item}%item + {% + \StrCut{#2}{§}{\calcsimmenusnb}{\calcsimmenuslab}% + {% + \tcbox[vignettemenuhp,vignettemenuhp,vignettemenuhpitem]% + {\vphantom{qH}\raisebox{0.75\calcsimmenusdepth}{\scalebox{0.66}[0.66]{\calcsimmenusnb}}\,{\calcsimmenuslab}{\calcsimmenusrsymb}}% + }% + }% + {}% + \IfEq{\calcsimmenustype}{itemsel}%item + {% + \StrCut{#2}{§}{\calcsimmenusnb}{\calcsimmenuslab}% + {% + \tcbox[tcbox width=minimum left,vignettemenuhp,vignettemenuhpitemsel]{% + \makebox[\calcsimmenusitemtc]{% + \vphantom{qH}\raisebox{0.75\calcsimmenusdepth}{\scalebox{0.66}[0.66]{\calcsimmenusnb}}\,{\calcsimmenuslab}\hfill{\calcsimmenusrsymb}% + }% + }% + }% + }% + {}% + }% + {}% +} + +\endinput
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index d096f314ea3..a1e25e8a2b8 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -163,7 +163,7 @@ my @TLP_working = qw( bxjalipsum bxjscls bxnewfont bxorigcapt bxtexlogo bxwareki byo-twemojis byrne bytefield c90 c-pascal cabin cachepic cahierprof - caladea calcage calcfrac calctab calculation calculator + caladea calcage calcfrac calctab calculation calculator calculatoritems calligra calligra-type1 callouts calrsfs cals calxxxx-yyyy cancel canoniclayout cantarell capt-of captcont captdef caption diff --git a/Master/tlpkg/tlpsrc/calculatoritems.tlpsrc b/Master/tlpkg/tlpsrc/calculatoritems.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/calculatoritems.tlpsrc diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 47400f3ea2a..10ee43bc8e5 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -156,6 +156,7 @@ depend bxtexlogo depend calcage depend calctab depend calculator +depend calculatoritems depend calrsfs depend cals depend calxxxx-yyyy |