summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-11-30 21:05:40 +0000
committerKarl Berry <karl@freefriends.org>2023-11-30 21:05:40 +0000
commita0906daf5c125af2521de7f1e3153179281b5a6f (patch)
tree9c6ef2dd3ebbd2993339586435bd6207831cac5e /Master
parent76076c576544105bf92ac40ae089ed73327fa120 (diff)
vectorlogos (30nov23)
git-svn-id: svn://tug.org/texlive/trunk@69010 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/vectorlogos/README.md8
-rw-r--r--Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.pdfbin430507 -> 487424 bytes
-rw-r--r--Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.tex135
-rw-r--r--Master/texmf-dist/tex/latex/vectorlogos/vectorlogos.sty42
4 files changed, 116 insertions, 69 deletions
diff --git a/Master/texmf-dist/doc/latex/vectorlogos/README.md b/Master/texmf-dist/doc/latex/vectorlogos/README.md
index 2f18c34c140..5c689d9c0fe 100644
--- a/Master/texmf-dist/doc/latex/vectorlogos/README.md
+++ b/Master/texmf-dist/doc/latex/vectorlogos/README.md
@@ -6,13 +6,13 @@ 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
Sources..........: I converted the logos from their original SVG or other forms, as found on the given urls, to PDF
-Scratch..........: Public https://commons.wikimedia.org/wiki/File:Scratchlogo.svg
-Scratch alt......: Public https://commons.wikimedia.org/wiki/File:Scratchlogo.svg
-Scratch cat......: CC40 https://fr.scratch-wiki.info/wiki/Fichier:Scratch_Cat_(cat-a).svg
Texstudio........: FREE https://en.m.wikipedia.org/wiki/File:TeXstudio_Logo.svg
Emacs............: FREE https://commons.wikimedia.org/wiki/File:EmacsIcon.svg
Emacs alt........: FREE https://fr.m.wikipedia.org/wiki/Fichier:Emacs-logo.svg
Geogebra.........: CC30 https://wiki.geogebra.org/en/File:Geogebra-logo-name.svg
-Geogebra icon....: CC30 https://fr.m.wikipedia.org/wiki/Fichier:Geogebra.svg
Texmaker.........: FREE https://en.wikipedia.org/wiki/File:TeXmaker_Logo.svg
Texmaker old.....: FREE https://en.wikipedia.org/wiki/File:TeXmaker_New_Logo.svg
+Scratch..........: Public https://commons.wikimedia.org/wiki/File:Scratchlogo.svg
+Scratch alt......: Public https://commons.wikimedia.org/wiki/File:Scratchlogo.svg
+Scratch cat......: CC40 https://fr.scratch-wiki.info/wiki/Fichier:Scratch_Cat_(cat-a).svg
+Geogebra icon....: CC30 https://fr.m.wikipedia.org/wiki/Fichier:Geogebra.svg
diff --git a/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.pdf b/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.pdf
index 18c36596983..9cd12192e77 100644
--- a/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.pdf
+++ b/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.tex b/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.tex
index 38b78876baa..3bf44201fa9 100644
--- a/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.tex
+++ b/Master/texmf-dist/doc/latex/vectorlogos/vectorlogos-doc.tex
@@ -27,8 +27,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{27/11/2023}
+\def\TPversion{0.1.2}
+\def\TPdate{30/11/2023}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks,listingsutf8}
\usepackage{soul}
@@ -74,14 +74,6 @@
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
\begin{center}
-%\scalebox{4}[4]{\logopython}\hspace{1cm}\scalebox{4}[4]{\logopython[notm]}\hspace{1cm}\scalebox{4}[4]{\logopython[vertical]}
-%
-%\medskip
-%
-%\scalebox{4}[4]{\logopython[icon]}\hspace{1cm}\scalebox{4}[4]{\logopython[powh]}\hspace{1cm}\scalebox{4}[4]{\logopython[powv]}
-
-\medskip
-
\scalebox{4}[4]{\logogeogebra}\hspace{1cm}\scalebox{4}[4]{\logogeogebra[icon]}
\medskip
@@ -94,11 +86,11 @@
\medskip
-\scalebox{4}[4]{\logoemacs}\scalebox{4}[4]{\logoemacs[alt]}
+\scalebox{4}[4]{\logoemacs}\hspace{1cm}\scalebox{4}[4]{\logoemacs[alt]}
\medskip
-\scalebox{4}[4]{\logotexmaker}\scalebox{4}[4]{\logotexmaker[alt]}
+\scalebox{4}[4]{\logotexmaker}\hspace{1cm}\scalebox{4}[4]{\logotexmaker[alt]}
\end{center}
\end{tcolorbox}
@@ -109,7 +101,7 @@
\medskip
\emph{%
-Logos came with GNU GPL or CC BY-SA (3.0 or 4.0) license.\\
+Logos came with GNU GPL or CC BY-SA (3.0 or 4.0).\\
Some brand icons/logos are trademarks of their respective owners. Please do not use brand icons/logos for any purpose except to represent the company, product, or service to which they refer.%\\
%"Python" and the Python Logo are trademarks of the Python Software Foundation (\url{https://www.python.org/psf/trademarks/}).%
}
@@ -130,9 +122,9 @@ Some brand icons/logos are trademarks of their respective owners. Please do not
\vspace*{5mm}
-\hrule
+%\hrule
-\vspace*{5mm}
+\pagebreak
\section{Introduction}
@@ -140,7 +132,7 @@ Some brand icons/logos are trademarks of their respective owners. Please do not
With this package you can insert inline (vectorial) logos of 'classic' softwares.
-The format of the logos is \textsf{pdf}, from \textsf{svg} files (given by \textsf{GNU GPL} or \textsf{CC-BY-3.0} licenses).
+The format of the logos is \textsf{pdf}, from \textsf{svg} files (given by \textsf{GNU GPL} or \textsf{CC-BY-3.0 / CC-BY-4.0} ot \textsf{MIT} licenses).
\medskip
@@ -165,12 +157,6 @@ Available logos are :
\medskip
\begin{tblr}{width=\linewidth,colspec={Q[m,l]Q[l,m]X[m,l]},cells={font=\LARGE\ttfamily,bg=teal!5},column{1}={font=\LARGE\bfseries\sffamily}}
-% python & vectorlogo-python.pdf & \logopython\ \\
-% & vectorlogo-python-icon.pdf & \logopython[icon] \\
-% & vectorlogo-python-notm.pdf & \logopython[notm] \\
-% & vectorlogo-python-powh.pdf & \logopython[powh] \\
-% & vectorlogo-python-powv.pdf & \logopython[powv] \\
-% & vectorlogo-python-vertical.pdf & \logopython[vertical] \\
\hline
emacs & vectorlogo-emacs.pdf & \logoemacs\ \\
& vectorlogo-emacs-alt.pdf & \logoemacs[alt] \\
@@ -185,7 +171,7 @@ Available logos are :
texmaker & vectorlogo-texmaker.pdf & \logotexmaker\ \\
& vectorlogo-texmaker-alt.pdf & \logotexmaker[alt] \\
\hline
- texstudio & vectorlogo-texstudio.pdf & \logotexstudio\ \\
+ texstudio & vectorlogo-texstudio.pdf & \logotexstudio\ \\
\end{tblr}
\pagebreak
@@ -194,31 +180,22 @@ Available logos are :
\subsection{A simple generic macro}
-In order to insert a vectorial logo, simpy use :
+In order to insert an \textit{existing} vectorial logo, simpy use :
\begin{quote}
\begin{verbatim}
-\simplevectorlogo[options includegraphics]{name}
+\simplevectorlogo*[options includegraphics]{name}
\end{verbatim}
\end{quote}
There's no automatic height or raising, it's just an \textit{alias} of a classic \MontreCode{\textbackslash includegraphics} with the given names of the precedent tabular.
-%\begin{tcblisting}{}
-%\simplevectorlogo[height=1.5cm]{scratch}\par
-%\simplevectorlogo[height=4cm]{scratch-cat}\par
-%\simplevectorlogo{python-vertical}\par
-%\simplevectorlogo[scale=0.33]{texstudio}\par
-%\simplevectorlogo{emacs}\par
-%\simplevectorlogo[width=3cm]{geogebra-icon}
-%\end{tcblisting}
-
\begin{tcblisting}{}
-\simplevectorlogo[height=1.5cm]{scratch}\par
-\simplevectorlogo[height=4cm]{scratch-cat}\par
-\simplevectorlogo[scale=0.33]{texstudio}\par
-\simplevectorlogo{emacs}\par
-\simplevectorlogo[width=3cm]{geogebra-icon}
+\simplevectorlogo*[height=1.5cm]{scratch}\par
+\simplevectorlogo*[height=4cm]{scratch-cat}\par
+\simplevectorlogo*[scale=0.33]{texstudio}\par
+\simplevectorlogo*{emacs}\par
+\simplevectorlogo*[width=3cm]{geogebra-icon}
\end{tcblisting}
\pagebreak
@@ -236,7 +213,7 @@ In order to insert a vectorial logo inline, simpy use :
The height (automatically calculated) of the logo is given by :
\begin{itemize}
- \item 90\,\% of the box \fbox{qB} in the current font ;
+ \item 90\,\% of the box \fbox{abcd...xyzABCD...XYZ} in the current font ;
\item raised 5\,\% bottom of the depth of \fbox{q} in the current font.
\end{itemize}
@@ -244,7 +221,6 @@ Available \textsf{names} are :
\begin{multicols}{3}
\begin{itemize}
- %\item \texttt{python}
\item \texttt{emacs}
\item \texttt{geogebra}
\item \texttt{scratch}
@@ -255,11 +231,6 @@ Available \textsf{names} are :
Available \textsf{options} are given by the suffix of alt logos.
-%\begin{tcblisting}{}
-%%classic size and fonte :
-%For example, it's a vectorial logo \vectorlogo{python} with inline insertion.
-%\end{tcblisting}
-
\begin{tcblisting}{}
%other font and other size
{\Large\sffamily For example, it's a vectorial logo \vectorlogo[icon]{geogebra} with inline insertion.}
@@ -287,9 +258,15 @@ There's an other (shortcut) way to insert logos, with a shortcut-name, like in \
Available options are given by the suffix of alt logos.
+\begin{tcblisting}{}
+A sample logo, \logoemacs[alt], inline.
+\end{tcblisting}
+
\pagebreak
-\section{Samples}
+\section{Samples and personal logos}
+
+\subsection{Samples}
\begin{tcblisting}{listing only}
%useful macro
@@ -338,19 +315,69 @@ Available options are given by the suffix of alt logos.
\samplevectorlogo{\logotexmaker[alt]}
\end{tcblisting}
-%\samplevectorlogo{\logopython}
-%\samplevectorlogo{\logopython[notm]}
-%\samplevectorlogo{\logopython[vertical]}
-%\samplevectorlogo{\logopython[icon]}
-%\samplevectorlogo{\logopython[powh]}
-%\samplevectorlogo{\logopython[powv]}
+\pagebreak
-\vfill~
+\subsection{Personal logos}
+
+If you wan't to use, \textit{inline}, your personal logos (located in workdir or in a \textsf{texmf} folder), you can use the command :
+
+\begin{quote}
+\begin{verbatim}
+\simplevectorlogo[scale]{filename}
+\end{verbatim}
+\end{quote}
+
+\MontreCode{[scale]}, which is \MontreCode{0.9} by default, is the ratio between the height of the logo and the height of the current 'text'.
+
+\MontreCode{filename} is the fullname of the logo.
+
+\begin{tcblisting}{}
+{\Huge A perfect test \simplevectorlogo{example-image-16x10.pdf} inline.}
+\end{tcblisting}
+
+\begin{tcblisting}{}
+{\Huge A perfect test \simplevectorlogo[1]{example-image-16x10.pdf} inline.}
+\end{tcblisting}
+
+\begin{tcblisting}{}
+{\LARGE Another perfect test \simplevectorlogo[0.5]{example-image-16x10.pdf} inline.}
+\end{tcblisting}
+
+\begin{tcblisting}{}
+{\LARGE Another perfect test \simplevectorlogo[2]{example-image-16x10.pdf} inline.}
+\end{tcblisting}
+
+\subsection{Generate personal macro}
+
+Other vectorial logos (which cannot be included in the package due to rights issues, but which are still usable) can be downloaded from \url{https://packages.cpierquet.fr/?dir=/vectorlogos/bonus/}.
+
+\smallskip
+
+By this way, and with logo named \MontreCode{vectorlogo-<basename>-...}, a specific command can be used to create special macro.
+
+\begin{quote}
+\begin{verbatim}
+%macro to create the command
+\GenMacroLogoVect{\namemacro}{basename}
+
+%use of the command
+\namemacro[option]
+\end{verbatim}
+\end{quote}
+
+\begin{tcblisting}{}
+%with file vectorlogo-xcas.pdf in workdir or texmf
+\GenMacroLogoVect{\logoxcas}{xcas}
+{\LARGE A personal logo, with a personal macro to include \logoxcas\ inline.}
+\end{tcblisting}
+
+\pagebreak
\section{History}
\begin{quote}
\begin{verbatim}
+0.1.2 : Alt command for manual insertion, with existing img
0.1.1 : Update licenses
0.1.0 : Initial version
\end{verbatim}
diff --git a/Master/texmf-dist/tex/latex/vectorlogos/vectorlogos.sty b/Master/texmf-dist/tex/latex/vectorlogos/vectorlogos.sty
index f7d681f74fe..329b5e8de3b 100644
--- a/Master/texmf-dist/tex/latex/vectorlogos/vectorlogos.sty
+++ b/Master/texmf-dist/tex/latex/vectorlogos/vectorlogos.sty
@@ -10,13 +10,14 @@
% Geogebra........: CC30 https://wiki.geogebra.org/en/File:Geogebra-logo-name.svg
% Geogebra icon...: CC30 https://fr.m.wikipedia.org/wiki/Fichier:Geogebra.svg
% Texmaker........: FREE https://en.wikipedia.org/wiki/File:TeXmaker_Logo.svg
-% Texmaker old....: FREE https://en.wikipedia.org/wiki/File:TeXmaker_New_Logo.svg
+% Texmaker alt....: FREE https://en.wikipedia.org/wiki/File:TeXmaker_New_Logo.svg
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{vectorlogos}[2023/11/27 0.1.1 Vectorial logos of 'classic' softwares, for inline use.]
+\ProvidesPackage{vectorlogos}[2023/11/30 0.1.2 Vectorial logos of 'classic' softwares, for inline use.]
%====HISTORY
+% v 0.1.2 Alt command for manual insertion, with existing img
% v 0.1.1 Licenses update
% v 0.1.0 Initial Version
@@ -30,9 +31,9 @@
\newlength{\tmp@logosvg@depth}
%====MACRO CREATOR
-\NewDocumentCommand\GenMacroLogoVect{ m m }{%1=macro,2=base,3=default
+\NewDocumentCommand\GenMacroLogoVect{ m m }{%1=macro,2=base
\NewDocumentCommand#1{ O{} }{%
- \settototalheight{\tmp@logosvg@total@height}{\hbox{qB}}%
+ \settototalheight{\tmp@logosvg@total@height}{\hbox{ABCDEFGHIJKLMNOPQQRSTUVWXYZabcdefghijklmnopqqrstuvwxyz}}%
\settodepth{\tmp@logosvg@depth}{\hbox{q}}%
\IfFileExists{vectorlogo-#2-##1.pdf}%
{%
@@ -45,17 +46,37 @@
}
%====SIMPLE MACRO
-\NewDocumentCommand\simplevectorlogo{ O{} m }{%
- \IfFileExists{vectorlogo-#2.pdf}%
+\NewDocumentCommand\simplevectorlogo{ s O{} m }{%
+ \IfBooleanTF{#1}%
{%
- \includegraphics[#1]{vectorlogo-#2.pdf}%
+ \IfFileExists{vectorlogo-#3.pdf}%
+ {%
+ \includegraphics[#2]{vectorlogo-#3.pdf}%
+ }%
+ {}%
+ }%
+ {%
+ \IfStrEq{#2}{}%
+ {%
+ \def\tmp@raiseper@logo{0.9}%
+ }%
+ {%
+ \def\tmp@raiseper@logo{#2}%
+ }%
+ \IfFileExists{#3}%
+ {%
+ %2=percent of height of box qB
+ \def\tmp@raise@logo{\fpeval{(1-\tmp@raiseper@logo)*0.5}}%
+ \settototalheight{\tmp@logosvg@total@height}{\hbox{ABCDEFGHIJKLMNOPQQRSTUVWXYZabcdefghijklmnopqqrstuvwxyz}}%
+ \settodepth{\tmp@logosvg@depth}{\hbox{q}}%
+ \raisebox{-\tmp@logosvg@depth+\tmp@raise@logo\tmp@logosvg@total@height}{\includegraphics[height=\tmp@raiseper@logo\tmp@logosvg@total@height]{#3}}%
+ }%
+ {}%
}%
- {}%
}
%====GENERIC MACROS
-\NewDocumentCommand\vectorlogo{ O{logo} m }{%
- %\IfEq{#2}{python}{\logopython[#1]}{}%
+\NewDocumentCommand\vectorlogo{ O{} m }{%
\IfEq{#2}{scratch}{\logoscratch[#1]}{}%
\IfEq{#2}{geogebra}{\logogeogebra[#1]}{}%
\IfEq{#2}{texstudio}{\logotexstudio[#1]}{}%
@@ -64,7 +85,6 @@
}
%====SPECIFIC MACROS
-%\GenMacroLogoVect{\logopython}{python}
\GenMacroLogoVect{\logoscratch}{scratch}
\GenMacroLogoVect{\logogeogebra}{geogebra}
\GenMacroLogoVect{\logotexstudio}{texstudio}