summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-11-13 20:34:52 +0000
committerKarl Berry <karl@freefriends.org>2023-11-13 20:34:52 +0000
commit4ef4edaf14d0821ef34c4f88426a46041049aeba (patch)
tree2580a4d2df11ef59b6933ae3ca9e05918e7f416a /Master/texmf-dist/doc/latex
parent184f9baab9494760f1659a77ba8639f6bf55e04a (diff)
sim-os-menus (13nov23)
git-svn-id: svn://tug.org/texlive/trunk@68830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/sim-os-menus/README.md7
-rw-r--r--Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.pdfbin0 -> 399589 bytes
-rw-r--r--Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex362
3 files changed, 369 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/sim-os-menus/README.md b/Master/texmf-dist/doc/latex/sim-os-menus/README.md
new file mode 100644
index 00000000000..8367c7746d5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/sim-os-menus/README.md
@@ -0,0 +1,7 @@
+sim-os-menus is a package to present a window/context menu/terminal like in an OS
+-------------------------------------------------------------------------------------------------------
+sim-os-menus est un pakage pour afficher une fenêtre, un terminal, un menu contextuel comme dans un OS.
+-------------------------------------------------------------------------------------------------------
+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/sim-os-menus/sim-os-menus-doc.pdf b/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.pdf
new file mode 100644
index 00000000000..d7e7c69c9b9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex b/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex
new file mode 100644
index 00000000000..677a0883c53
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/sim-os-menus/sim-os-menus-doc.tex
@@ -0,0 +1,362 @@
+% !TeX TXS-program:compile = txs:///pdflatex
+
+\documentclass[11pt,a4paper]{ltxdoc}
+\usepackage{sim-os-menus}
+\usepackage{graphicx}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{hyperref}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+%\rhead{\sffamily\small\affloetalab[Legende]}
+\lfoot{\sffamily\small [sim-os-menus]}
+\rfoot{\sffamily\small - \thepage{} -}
+%\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=2cm]{geometry}
+\setlength{\parindent}{0pt}
+\def\TPversion{0.1.0}
+\def\TPdate{13/11/2023}
+\usepackage{soul}
+\sethlcolor{lightgray!25}
+\NewDocumentCommand\MontreCode{ m }{%
+ \hl{\vphantom{\texttt{pf}}\texttt{#1}}%
+}
+
+\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{sim-os-menus}}\\
+ \\
+ {\LARGE Simulate 'windows', 'terminal' or} \\
+ {\LARGE 'context menu' like in an OS.} \\
+ \\
+ {\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/sim-os-menus}} \\
+\end{tabular}
+\end{center}
+
+\hrule
+
+\vfill
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\ContextMenu[Font=\sffamily,ListSeps={1,3/1/4/1/},ListOffsets={1,2,1,0}]{%
+ Menu1(>),Menu2,Menu3(>)(*),Menu4 §
+ SubMenuA(>),SubMenuB(>)(*) §
+ SubSubMenu1,SubSubMenu2,SubSubMenu3(>)(*),SubSubMenu4,SubSubMenu5(>) §
+ SSSSMa,SSSSMa(>)(*),SSSSMc §
+ OK(*),KO
+}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{TermUnix}[Width=12cm,Align=center]{}
+test@DESKTOP:~$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TermUnix}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{IMGViewer}[Width=12cm]{}
+\includegraphics[width=5cm]{example-image-b}
+\end{IMGViewer}
+\end{tcolorbox}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+\begin{TermMac}[Width=14cm,Align=flush left]{}
+[test@server]$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TermMac}
+\end{tcolorbox}
+
+\vfill~
+
+\pagebreak
+
+\phantomsection
+
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vspace*{5mm}
+
+\hrule
+
+\vspace*{5mm}
+
+\section{Introduction}
+
+\subsection{Description}
+
+With this package you can create context menu, or terminal, or doc viewer, like in an OS.
+
+Global styles are mostly fixed, but some customizations are possible.
+
+\subsection{Loading}
+
+To load the package, simply use :
+
+\begin{quote}
+\begin{verbatim}
+\usepackage{sim-os-menus}
+\end{verbatim}
+\end{quote}
+
+The package loads the packages :
+
+\begin{itemize}
+ \item \MontreCode{tikz} (with \MontreCode{calc,positioning}), \MontreCode{pgf}, \MontreCode{pgffor} ;
+ \item \MontreCode{calc}, \MontreCode{fontawesome5} ;
+ \item \MontreCode{simplekv}, \MontreCode{xintexpr}, \MontreCode{listofitems}, \MontreCode{xstring} ;
+ \item \MontreCode{settobox}, \MontreCode{tabularray} ;
+ \item \MontreCode{tcolorbox} (with \MontreCode{breakable,fitting,skins,listings,listingsutf8,hooks}).
+\end{itemize}
+
+\vfill
+
+\subsection{History}
+
+\begin{quote}
+\begin{verbatim}
+0.1.0 : Initial version
+\end{verbatim}
+\end{quote}
+
+\pagebreak
+
+\section{The macros}
+
+\subsection{Context menu}
+
+I order to create a context menu, the command is :
+
+\begin{quote}
+\begin{verbatim}
+%----contextual menu
+\ContextMenu[keys]{list of items}<tikz options>
+\end{verbatim}
+\end{quote}
+
+Optional keys, between \MontreCode{[...]} are :
+
+\begin{itemize}
+ \item \MontreCode{ColBack} := background color ;
+ \item \MontreCode{ColHL} : = highlight color ;
+ \item \MontreCode{Rounded} := boolean for rounded corners (\MontreCode{true} by default) ;
+ \item \MontreCode{Font} := font for the items (\MontreCode{\textbackslash normalsize\textbackslash normalfont} by default) ;
+ \item \MontreCode{ColItems} := color(s) for the items (\MontreCode{black} by default) ;
+ \item \MontreCode{MarginV} := vertical margin of the lines (\MontreCode{6pt} by default) ;
+ \item \MontreCode{MarginH} := horizontal margin of the lines (\MontreCode{12pt} by default) ;
+ \item \MontreCode{Arrow} := character for the arrow (\MontreCode{\textbackslash faCaretRight} by default) ;
+ \item \MontreCode{ListSeps} := list for the possible sep lines (empty or for all the levels !) ;
+ \item \MontreCode{ListIcons} := list for the possible icons (empty or for all the levels/items !) ;
+ \item \MontreCode{ListOffsets} := list for the possible vertical offset of levels (from 2, \ldots !) (empty or for all the sub-levels !) ;
+ \item \MontreCode{Icons} := boolean for icons (\MontreCode{false} by default) ;
+ \item \MontreCode{Bar} := boolean for small vertical bar with icons (\MontreCode{true} by default) ;
+ \item \MontreCode{Space} := horizontal space between levels (\MontreCode{-0.125} by default).
+\end{itemize}
+
+\medskip
+
+The mandatory argument, between \MontreCode{\{...\}}, is given as :
+
+\smallskip
+
+\hfill\MontreCode{item1A,item1B,... § item2A,itemp2B,... § ...}\hfill~
+
+\begin{itemize}
+ \item if an item ends with \MontreCode{(*)}, this is the beginning of the next level (\underline{only one} by level !) ;
+ \item if an item ends with \MontreCode{(>)} (\underline{before} optional \MontreCode{(*)}), an arrow is written at the end of the line.
+\end{itemize}
+
+A correct usage of the syntax is necessary for the code !
+
+\vspace{5mm}
+
+A few tips, due to \MontreCode{ListIcons}, \MontreCode{ListOffsets} and \MontreCode{ListSeps} keys, which are \textit{sensitive} :
+
+\begin{itemize}
+ \item \MontreCode{ListIcons} must have the same number of elements than the number of levels/items (with possible empty items) ;
+ \item \MontreCode{ListSeps} must have the same number of elements than the number of levels (with possible empty items) ;
+ \item \MontreCode{ListOffsets} must have the same number of elements than the numbers of sub-levels (with 0 si no offset !).
+\end{itemize}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%default style
+\ContextMenu{Item1A(>),Item1B,Item1C(>)(*),Item1D § Item2A(*),Item2B(>),Item2C}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+%custom style
+\ContextMenu[Rounded=false,ColBack=yellow,ColHL=teal,%
+ ListSeps={1,3/2},ColItems={black/white},Icons,Space=0,%
+ ListIcons={\faCut,\faIcon[regular]{copy},\faCopy,\faPaste / \faNotEqual}]
+ {Item1A(>)(*),Item1B,Item1C(>),Item1D § Item2A(*),Item2B(>),Item2C}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\ContextMenu[Font=\sffamily,ListSeps={1,3/1/4/1/},ListOffsets={1,2,1,0}]{%
+ Menu1(>),Menu2,Menu3(>)(*),Menu4 §
+ SubMenuA(>),SubMenuB(>)(*) §
+ SubSubMenu1,SubSubMenu2,SubSubMenu3(>)(*),SubSubMenu4,SubSubMenu5(>) §
+ SSSSMa,SSSSMa(>)(*),SSSSMc §
+ OK(*),KO
+}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Terminal}
+
+In order to create a terminal (Win/UNiX/Mac), environments are :
+
+\begin{quote}
+\begin{verbatim}
+%----Windows like terminal
+\begin{TermWin}[keys]{tcbox options}
+ ...
+\end{TermWin}
+
+%----UNiX like terminal
+\begin{TermUnix}[keys]{tcbox options}
+ ...
+\end{TermUnix}
+
+%----OSX like terminal
+\begin{TermMac}[keys]{tcbox options}
+ ...
+\end{TermMac}
+\end{verbatim}
+\end{quote}
+
+Optional keys, between \MontreCode{[...]} are :
+
+\begin{itemize}
+ \item \MontreCode{Title} := title of the terminal (\MontreCode{Terminal Win/UNiX/Mac} by default) ;
+ \item \MontreCode{Align} := horizontal alignment of the box (\MontreCode{center} by default) ;
+ \item \MontreCode{Width} := width of the box (\MontreCode{\textbackslash linewidth} by default).
+\end{itemize}
+
+\medskip
+
+The mandatory argument, between \MontreCode{\{...\}}, are options to give to the tcbox.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TermWin}{}
+Microsoft Windows [version 10.0.22000.493]
+(c) Microsoft Corporation. Tous droits réservés.
+C:\Users\test>ping ctan.org
+Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données :
+Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=37 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51
+Réponse de 5.35.249.60 : octets=32 temps=39 ms TTL=51
+Statistiques Ping pour 5.35.249.60:
+Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
+Durée approximative des boucles en millisecondes :
+Minimum = 35ms, Maximum = 39ms, Moyenne = 36ms
+\end{TermWin}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TermUnix}[Align=flush right]{hbox}
+test@DESKTOP:~$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TermUnix}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{TermMac}[Width=14cm,Align=flush left]{}
+[test@server]$ ping -c 2 ctan.org
+PING ctan.org (5.35.249.60) 56(84) bytes of data.
+\end{TermMac}
+\end{tcblisting}
+
+\pagebreak
+
+\subsection{Viewers}
+
+In order to create a 'fake' viewer (for \textsf{pdf} or \textsf{img}), environments are :
+
+\begin{quote}
+\begin{verbatim}
+%----PDF Viewer like
+\begin{PDFViewer}[keys]{tcbox options}
+ ....
+\end{PDFViewer}
+
+%----Image Viewer like
+\begin{IMGViewer}[keys]{tcbox options}
+ ....
+\end{IMGViewer}
+\end{verbatim}
+\end{quote}
+
+Optional keys, between \MontreCode{[...]} are :
+
+\begin{itemize}
+ \item \MontreCode{Title} := title of the terminal (\MontreCode{Terminal Windows} by default) ;
+ \item \MontreCode{Align} := horizontal alignment of the box (\MontreCode{center} by default) ;
+ \item \MontreCode{Width} := width of the box (\MontreCode{\textbackslash linewidth} by default) ;
+ \item \MontreCode{Halign} := horizontal alignment fot the content (\MontreCode{left} by default) ;
+ \item \MontreCode{Icons} := boolean for the icons (\MontreCode{true} by default).
+\end{itemize}
+
+\medskip
+
+The mandatory argument, between \MontreCode{\{...\}}, are options to give to the tcbox.
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{PDFViewer}{hbox}
+\fbox{\includegraphics[page=35,width=6cm]{ProfLycee-doc.pdf}}%
+\fbox{\includegraphics[page=36,width=6cm]{ProfLycee-doc.pdf}}
+\end{PDFViewer}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{PDFViewer}[Width=14cm,Icons=false]{}
+\fbox{\includegraphics[page=65,width=4.75cm]{ProfLycee-doc.pdf}}
+\end{PDFViewer}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{IMGViewer}[Icons=false]{hbox}
+\includegraphics[width=5cm]{example-image-b}
+\end{IMGViewer}
+\end{tcblisting}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\begin{IMGViewer}[Width=12cm]{}
+\includegraphics[width=3cm]{example-image}
+\end{IMGViewer}
+\end{tcblisting}
+
+\end{document} \ No newline at end of file