Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Library Files #267

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions doc/tikzpingus-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
\let\say\enquote
\def\DTLlistformatoxford{,}\def\DTLandname{and}
% TODO: do guard against same keys for different selectors
\long\def\ParseDTLListElement#1"#2"\@nil{\textsuperscript{\smash{\raisebox{2pt}{\ifcsname pingu@@lib@#2@\CurrentList @\endcsname\index[\current@indexfile]{Libraries!\textit{\csname pingu@@lib@#2@\CurrentList @\endcsname}!#2?\hyperref[expl-list:\CurrentList]{\protect\lpingu{#2} {\tiny\sffamily(\MapDTLList{\CurrentList})}}}~$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\@declaredcolor{gray}Library}}}}}}{\text{\textit{\tiny\strut\csname pingu@@lib@#2@\CurrentList @\endcsname}}}$\fi}}}}
\long\def\ParseDTLListElement#1"#2"\@nil{}
\def\DTLlistformatitem#1{\textit{#1\expandafter\ParseDTLListElement :#1\@nil}}
\newcommand*\typesetselection[1][]{\begingroup\ifx!#1!\else\def\DTLlistformatitem##1{#1}\fi\dotypesetselection}
\def\dotypesetselection#1{\label{expl-list:#1}\def\CurrentList{#1}\expandafter\DTLformatlist\expandafter{\csname @pingu@#1@\endcsname}\endgroup}
Expand Down Expand Up @@ -281,7 +281,7 @@
\ifx\@tmpb\@empty\lpingu{#1#2}\@explainsuff\else\lpingu{#1#2 =\ }\texttt{<\textit{\@tmpb}>}\fi\hfill
\ifx\@tmp\@empty\else{\@declaredcolor{gray}(}#4{\@declaredcolor{gray})}\fi
}
}\ifcsname pingu@@lib@\@key @\endcsname\index[\current@indexfile]{Libraries!\textit{\csname pingu@@lib@#2@\endcsname}!\@idxkey?\hyperref[pk:#1\@key]{\protect\lpingu{#2}}}\rlap{~\quad\raisebox{2.75pt}{$\underset{\text{\tiny\smash{\raisebox{3pt}{\textsf{\hyperref[Libraries]{\@declaredcolor{gray}Library}}}}}}{\text{\textit{\footnotesize\parbox{4em}{\null\hfill\strut\csname pingu@@lib@#2@\endcsname\hfill\null}}}}$}}\fi\kern-\linewidth\par\endgroup
}\kern-\linewidth\par\endgroup
}
{\endminipage\smallskip\par}

Expand Down Expand Up @@ -364,8 +364,6 @@
{\@declaredcolor{gray}\small This is an alias for \keyref[#1]{#3}.}%
\endkeyexplain\endgroup}

\def\lib#1{\tikz[baseline=-.6ex]\node[draw=teal,fill=teal!3!white,very thick,rounded corners=2pt,inner ysep=0pt]{\sffamily\strut#1};}

\def\TikZ{Ti\textit{k}Z}
\def\tikzpingus{\TikZ pingus}

Expand Down Expand Up @@ -686,28 +684,6 @@ \subsection{Setting the defaults}
To overwrite these keys, see \cmdref{pingudefaults}.
\end{commandexplain}

\subsection{Libraries}
\label{Libraries}\index{Libraries}I've split the penguin features into a set of libraries. While all of them are loaded by default, the |bare| package-option disables the automatic loading of all libraries. They can be loaded (locally to the current group) using \cmdref{pinguloadlibrary} and \cmdref{pinguloadlibraries} passing on a comma separated list of desired libraries.
See the full reference or the index to learn which key comes from which library.
Please note that~--- at the moment~--- not all components of a library are labeled correctly.
% TODO: already count that? % global let?
\foreach[count=\i] \l/\xs in \pingu@defaultlibs{\xdef\pingu@defaultlibs@count{\i}}%
Currently there are the following libraries:
\foreach[count=\i] \l/\xs in \pingu@defaultlibs{%
\ifx\l\empty\else
\index[\current@indexfile]{Libraries!\textit{\l}}\textit{\l}\ifnum\numexpr\pingu@defaultlibs@count-1>\i,\space\else
\ifnum\pingu@defaultlibs@count=\i\else,~and\space\fi\fi
\fi
}.

\begin{commandexplain}{pinguloadlibrary}{\mand{library}}
Load a penguin library (actually, due to the implementation, you can use this command just like \cmdref{pinguloadlibraries} and load multiple libraries).
\end{commandexplain}

\begin{commandexplain}{pinguloadlibraries}{\mand{libraries}}
Load multiple penguin libraries, separated by a comma. For example: \texttt{\cmdref{pinguloadlibraries}\{shirts, glasses\}}.
\end{commandexplain}

\subsection{Changing the wings}
\label{subsec:wings}As already demonstrated, it is possible to change the wing positions!
All selected wing-items will adapt to the wing-position (although not all wing-items will make sense with every wing-position).
Expand Down
64 changes: 0 additions & 64 deletions tex/tikzpingus-bee.lib.tex

This file was deleted.

Loading
Loading