summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-24 21:25:54 +0000
committerKarl Berry <karl@freefriends.org>2019-11-24 21:25:54 +0000
commitdec6380aa131051a91ef04b6694e8ff660c98f74 (patch)
treefe8ffd16d732a4d3040917d7da5b507c1aae0690 /Master
parentbda33c341eb25c458644341f2f5bd8e4ac9b93c8 (diff)
pinoutikz (24nov19)
git-svn-id: svn://tug.org/texlive/trunk@52907 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/pinoutikz/README.md26
-rw-r--r--Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.pdfbin0 -> 53111 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.tex265
-rw-r--r--Master/texmf-dist/tex/latex/pinoutikz/pinoutikz.sty124
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/pinoutikz.tlpsrc0
7 files changed, 418 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/pinoutikz/README.md b/Master/texmf-dist/doc/latex/pinoutikz/README.md
new file mode 100644
index 00000000000..748cb642b90
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pinoutikz/README.md
@@ -0,0 +1,26 @@
+ _________________
+
+ pinoutikz package
+ v 1.0.1
+ 2019/11/23
+ _________________
+
+This package provides macros manipulating for generating chip pinout diagrams.
+
+Main features are:
+ * pinout diagrams:
+ - PDIP packages
+ * formatting of pin labels:
+ - logical negation (show as a text with oveeline).
+
+This bundle contains 4 files:
+ * pinoutikz.sty (the package itself)
+ * pinoutikz_doc.tex and pinoutikz_doc.pdf (manual in english)
+ - this one substitutes for a quick test as well
+ * README (this file)
+
+##############################################################################
+ Robert Blazek
+ <robert.h.blazek@gmail.com>
+
+This material is subject to the LATEX Project Public License 1.3c
diff --git a/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.pdf b/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.pdf
new file mode 100644
index 00000000000..928aca5222c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.tex b/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.tex
new file mode 100644
index 00000000000..4540a2bfcdb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pinoutikz/pinoutikz_doc_en.tex
@@ -0,0 +1,265 @@
+\documentclass[english,a4paper,10pt]{article}
+\usepackage{fontspec}
+\usepackage[bookmarks=true,bookmarksopen=true,colorlinks=true,hyperfootnotes=false,filecolor=black,linkcolor=blue,urlcolor=blue,pdfauthor={Robert Blazek},pdftitle={pinouTikz},pdfsubject={package for strings of tokens},pdfkeywords={pinouTikz,latex,chip,pinout},pdfcreator={LaTeX}]{hyperref}
+\usepackage[margin=1.9cm]{geometry}
+\usepackage{libertine}
+\usepackage[scale=0.85]{noto-mono}
+\usepackage[bottom]{footmisc}
+\usepackage{amsmath,amssymb,amsfonts,color,eurosym,xspace,babel,listings}
+\usepackage{pinoutikz}
+\makeatletter
+\definecolor{@xs@bckgcolor}{rgb}{0.9,1,1}
+\definecolor{@xs@keywordspinouTikz}{rgb}{0,0,0.9}
+\definecolor{@xs@keywordslatex}{rgb}{1,0,0}
+\definecolor{@xs@arguments}{rgb}{0,0,0}
+\definecolor{@xs@comments}{rgb}{0.5,0.5,0.5}
+\definecolor{violet}{rgb}{0.66,0,0.66}
+\lstset{%
+ language=[AlLaTeX]TeX,%
+ morekeywords={numexpr,detokenize},%
+ float=hbp,%
+ basicstyle=\small\ttfamily,%
+ identifierstyle=\color{@xs@arguments},%
+ keywordstyle=\color{@xs@keywordslatex},%
+ commentstyle=\itshape\color{@xs@comments},%
+ columns=fixed,%
+ tabsize=4,%
+ frame=single,%
+ extendedchars=true,%
+ showspaces=false,%
+ showstringspaces=false,%
+ numbers=left,%
+ numberstyle=\tiny\ttfamily,%
+ breaklines=true,%
+ breakindent=3em,%
+ backgroundcolor=\color{@xs@bckgcolor},%
+ breakautoindent=true,%
+ captionpos=t,%
+ xleftmargin=1em,%
+ xrightmargin=1em,%
+ lineskip=0pt,%
+ numbersep=1em,%
+ classoffset=1,%
+ morekeywords={% macros and commands of pinouTikz
+ PDIP,%
+ PLCC,%
+ SOP},%
+ keywordstyle=\color{@xs@keywordspinouTikz},%
+ classoffset=0}
+\makeatother
+
+\newcommand\guill[1]{"#1"}
+\newcommand\argu[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand\ARGU[1]{\texttt{\{}\argu{#1}\texttt{\}}}
+\newcommand\arguC[1]{\texttt{[}\argu{#1}\texttt{]}}
+\newcommand\arguCC[2]{\texttt{[}\argu{#1}{,}\argu{#2}\texttt{]}}
+\newcommand\arguD[1]{\texttt{(}\argu{#1}\texttt{)}}
+\newcommand\texte[1]{\texttt{text}${}_{#1}$}
+\newcommand\etoile{$\langle$\texttt{[*]}$\rangle$}
+\newenvironment{Conditions}[1][1cm]%
+{\begin{list}%
+ {$\vartriangleright$}%
+ {\setlength{\leftmargin}{#1}
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \setlength{\topsep}{2ptplus3ptminus2pt}
+ }}%
+{\end{list}}
+\renewcommand\th{${}^\text{th}$\xspace}
+\newcommand\US{syntax unit\xspace}
+\newcommand\USs{syntax units\xspace}
+\newcommand\pinouTikz{\textsf{pinouTikz}\xspace}
+\newcommand\styleexemple{\small\baselineskip1.03\baselineskip\vskip\baselineskip\relax}
+\newcommand\styleexercice{\footnotesize}
+\newcommand\verbinline{\lstinline[basicstyle=\normalsize\ttfamily]}
+\newcommand\colorise{\color{violet}}
+\begin{document}
+\setlength{\parindent}{0pt}
+\begin{titlepage}
+ \null\par\vfill
+ \begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{center}
+ \Huge\bfseries \pinoutikzname\par\vspace{5pt}
+ \small v\pinoutikzversion\par\vspace{25pt}
+ \normalsize User's manual
+ \end{center}
+ \end{minipage}
+ \end{center}
+ \vspace{1cm}
+ \begin{center}
+ Robert {\sc Blazek}\par\small
+ \href{mailto:robert.h.blazek@gmail.com}{\nolinkurl{robert.h.blazek@gmail.com}}\par\vspace{5pt}
+ %\xstringenglishdate
+ \end{center}
+ \vfill\hrulefill
+ \begin{center}
+ \begin{minipage}{0.85\linewidth}
+ \noindent
+ \hfill\textbf{\textit{Abstract}}\hfill{}\medskip\par
+ This package which requires $\varepsilon$-\TeX{}, provides macros manipulating strings of tokens. For a basic use, tokens can be alphanumeric chars, but the macros can also be useful for manipulating tokens, i.e. \TeX{} code.
+
+ \end{minipage}
+ \end{center}
+ \hrulefill\vfill{}
+\end{titlepage}
+
+\tableofcontents
+
+\section{Introduction}
+\subsection{Description}
+This package defines macros for generating symbolic pinout diagrams for different package classes, such as DIP, PLCC, etc.
+
+\subsection{Motivation}
+Whoever has ever had to do with FPGA or MCUs (whether for living and leisure), it's just natural he or she might have been in a need to document some pins. So was my case and since I failed in finding any package in \LaTeX{} to suit my needs, I opted for creating one myself.
+
+I hope others will find it as useful as it was to me and my colleagues.
+
+This is my first latex package documentation ever - and since I hate reinventing the wheel - this manual has been based upon that of \textbf{xstrings} - with the courtesy of the author, of course.
+
+\section{The macros}
+For a better understanding, let's see first the macros with the simpler arguments possible. No special catcode, no exotic token, no control sequence neither: only alphanumeric chars will be contained in the arguments.\medskip
+
+In the following chapters, all the macros will be presented this way:
+\begin{itemize}
+ \item a short description of the operation;
+ \item the operation under special conditions. For each conditions considered, the operation described has priority on that (those) below;
+ \item finally, several examples are given. I tried to find them most easily comprehensible and most representative of the situations met in normal use.
+\end{itemize}\smallskip
+
+\textbf{Important}: in the following, a \argu{number} can be an integer written with numeric chars, a counter, or the result of an arithmetic operation made with the command \verbinline|\numexpr|.\smallskip
+
+All the macros of \pinouTikz are displayed in {\makeatletter\color{@xs@keywordspinouTikz}red}.
+
+\subsection{The pinout diagrams}
+\subsubsection{\ttfamily\textbackslash PDIP}
+\verbinline|\PDIP|\arguD{pinnumber}\ARGU{pinarray}
+\smallskip
+
+\begin{itemize}
+ \item \argu{pinnumber} thethe number of pins of a DIP package and should be an even number.
+ \item \ARGU{pinarray} is a list of pins - position of every pin's description is defined by its position in this array.
+\end{itemize}
+
+%% 4-pin example
+%\begin{minipage}[t]{0.65\linewidth}
+\begin{lstlisting}
+\begin{figure}
+ \centering
+ \PDIP(4){%
+ 1/E,2/B,3/NC,4/C}
+ \caption{NPN-Transistor, 4-pin PDIP package} \label{fig:X_DIP4}
+\end{figure}
+\end{lstlisting}%
+
+%% 4-pin example
+\begin{figure}
+ \centering
+ \PDIP(4){%
+ 1/E,
+ 2/B,
+ 3/NC,
+ 4/C
+ }%
+ \caption{NPN-Transistor, 4-pin PDIP package} \label{fig:X_DIP4}
+\end{figure}
+
+%\end{minipage}\hfill
+%% 8-pin example
+%\begin{minipage}[t]{0.65\linewidth}
+\begin{lstlisting}
+\begin{figure}
+ \centering
+ \PDIP(8){%
+ 1/CLK,
+ 2/A,
+ 3/B,
+ 4/GND,
+ 5/Y,
+ 6/\FormatPinLabel{~Y~},
+ 7/NC,
+ 8/$V_{cc}$%
+ }
+ \caption{TTL logic chip, 8-pin PDIP package} \label{fig:X_DIP8}
+\end{figure}
+\end{lstlisting}%
+
+%% 8-pin example
+\begin{figure}
+ \centering
+ \PDIP(8){%
+ 1/CLK,
+ 2/A,
+ 3/B,
+ 4/GND,
+ 5/Y,
+ 6/\FormatPinLabel{~Y~},
+ 7/NC,
+ 8/$V_{cc}$%
+ }
+ \caption{TTL logic chip, 8-pin PDIP package} \label{fig:X_DIP8}
+\end{figure}
+
+%\end{minipage}\hfill
+%% 14-pin example
+%\begin{minipage}[t]{0.65\linewidth}
+\begin{lstlisting}
+\begin{figure}
+ \centering
+ \PDIP(14){%
+ 1/A1, %1
+ 2/B1, %2
+ 3/\FormatPinLabel{\#1 AND/~OR~/GPIO1}, %3
+ 4/Y1, %4
+ 5/C1, %5
+ 6/\FormatPinLabel{\#2 AND/~OR~/GPIO2}, %6
+ 7/GND, %7
+ 8/PCLK, %8
+ 9/PDAT, %9
+ 10/A2, %10
+ 11/B2, %11
+ 12/\FormatPinLabel{\#2 INV/~SME~/GPIO3}, %12
+ 13/C2, %13
+ 14/$V_{cc}$} %14
+ \caption{Generic programmable TTL logic chip, 14-pin PDIP package} \label{fig:X_DIP14}
+\end{figure}
+\end{lstlisting}%
+%\end{minipage}\hfill
+
+%% 14-pin example
+\begin{figure}
+ \centering
+ \PDIP(14){%
+ 1/A1, %1
+ 2/B1, %2
+ 3/\FormatPinLabel{\#1 AND/~OR~/GPIO1}, %3
+ 4/Y1, %4
+ 5/C1, %5
+ 6/\FormatPinLabel{\#2 AND/~OR~/GPIO2}, %6
+ 7/GND, %7
+ 8/PCLK, %8
+ 9/PDAT, %9
+ 10/A2, %10
+ 11/B2, %11
+ 12/\FormatPinLabel{\#2 INV/~SME~/GPIO3}, %12
+ 13/C2, %13
+ 14/$V_{cc}$} %14
+ \caption{Generic programmable TTL logic chip, 14-pin PDIP package} \label{fig:X_DIP14}
+\end{figure}
+
+%% Examples for PDIP packages
+\begin{minipage}[t]{0.35\linewidth}
+ \styleexemple
+\end{minipage}%
+
+
+%\bigskip\bigskip
+\begin{center}
+$\star$\par
+$\star$\quad$\star$
+\end{center}
+\par\nobreak\bigskip\bigskip
+That's all, I hope you will find this package useful!\par\nobreak
+Please, send me an \href{mailto:robert.h.blazek@gmail.com}{email} if you find a bug or if you have any idea of improvement\ldots\par\nobreak\medskip
+Robert Blazek
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/pinoutikz/pinoutikz.sty b/Master/texmf-dist/tex/latex/pinoutikz/pinoutikz.sty
new file mode 100644
index 00000000000..4ecbcdcd314
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pinoutikz/pinoutikz.sty
@@ -0,0 +1,124 @@
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{pinoutikz}[1.0.1 Pinout diagram definitions]
+
+\RequirePackage{ifthen}
+\RequirePackage{lmodern}
+\RequirePackage{xstring}
+\RequirePackage{upquote}
+\RequirePackage{amsmath,amssymb}
+\RequirePackage{amsfonts}
+\RequirePackage{forarray}
+\RequirePackage{arrayjob}
+\RequirePackage{tikz}
+
+%% 'sans serif' option
+\DeclareOption{sans}{
+ \renewcommand{\familydefault}{\sfdefault}
+}
+
+%% 'roman' option
+\DeclareOption{roman}{
+ \renewcommand{\familydefault}{\rmdefault}
+}
+
+%% Global indentation option
+\newif\if@neverindent\@neverindentfalse
+\DeclareOption{neverindent}{
+ \@neverindenttrue
+}
+
+\ExecuteOptions{sans}
+
+\ProcessOptions\relax
+
+\def\pinoutikzname {pinouTikz}
+\def\pinoutikzversion {1.0.1}
+\def\pinoutikzdate {2019/11/23}
+
+%% Formatt a pin name
+\def\FormatPinLabel#1{
+ \pgfmathparse{0}\let\negstate\pgfmathresult
+ \pgfmathparse{0}\let\index\pgfmathresult
+ \ForEach{~}%
+ {%
+ \StrLen{\thislevelitem}[\itemlen]%
+ \ifthenelse{\itemlen>0}{%
+ \ifthenelse{\equal{\negstate}{1}}{$\overline{\thislevelitem}$}{\thislevelitem}%
+ \pgfmathparse{\index+1}\let\index\pgfmathresult
+ }{}%
+ \pgfmathparse{!\negstate}\let\negstate\pgfmathresult%
+ }%
+ {#1}
+}
+
+%% PIN diagram with label decoding
+%% @param#1: options
+%% @param#2: offset
+%% @param#3: pin name
+%% @param#4: pin number
+\def\PIN[#1](#2)#3#4{
+ % decode label
+ \begin{scope}[shift={(#2)}]
+ \def\pinlabel{#3}
+ \ifthenelse{\equal{#1}{right}}{%
+ \draw (0.12,0) node[label=right:{\footnotesize \pinlabel},label=left:{\small \pgfmathprintnumber{#4}} ]{};
+ \draw (0,-.15) rectangle(0.12,0.15);
+ }%
+ {%
+ \draw (0,0) node[label=left:{\footnotesize \pinlabel},label=right:{\small \pgfmathprintnumber{#4}} ]{};
+ \draw (0,-.15) rectangle(0.12,0.15);
+ }%
+ \end{scope}
+}
+
+%% PDIP package diagram
+%% @param#1: offset
+%% @param#2: number of pins (divisible by 2)
+%% @param#3: comma separated definitions list for every pin - every pin definition must be enclosed in quotation marks ("")
+\def\PDIP(#1)#2{%
+ \begin{tikzpicture}
+ \begin{scope}[shift={(0,0)}]
+ \sffamily
+ \textsf{%
+ \def\pins{{#2}}
+ \pgfmathparse{#1/2-1}\let\cntpinsl\pgfmathresult
+ \pgfmathparse{#1/2}\let\cntstr\pgfmathresult
+ \pgfmathparse{#1-1}\let\cntpinsr\pgfmathresult
+ \pgfmathparse{\cntstr*.5}\let\height\pgfmathresult
+ \draw[line width=1.5pt] (0.12,-0.5) rectangle (1.88,\height);
+ \draw (0.80,\height) arc (180:360:2mm);
+ %iterate through pin definitions
+ \foreach \pinnum/\i in {#2}%
+ {%
+ \pgfmathparse{\pinnum-1}\let\pinidx\pgfmathresult
+ \pgfmathparse{(\pinnum>0 && \pinnum<(\cntstr+1)) ? 0 : 1}\let\pinrange\pgfmathresult
+ \ifthenelse{\equal{\pinrange}{0} }
+ {%
+ \pgfmathparse{(\cntpinsl-\pinidx)*0.5}\let\ypin\pgfmathresult
+ \PIN[left](0,\ypin){\i}{\pinnum}
+ }%else
+ {%
+ \pgfmathparse{(\pinidx-\cntstr)*0.5}\let\ypin\pgfmathresult
+ \PIN[right](1.88,\ypin){\i}{\pinnum}
+ }
+% \fi
+ }
+ }
+ \end{scope}
+ \end{tikzpicture}
+}
+
+%%
+
+\newlength{\pardefault}
+\setlength{\pardefault}{\parindent}
+\newcommand{\neverindent}{ \setlength{\parindent}{0pt} }
+\newcommand{\autoindent}{ \setlength{\parindent}{\pardefault} }
+
+\if@neverindent
+\neverindent
+\fi
+
+% ...
+
+\endinput \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 7ed53bad89d..16cf4c46afb 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -540,7 +540,8 @@ my @TLP_working = qw(
philex philokalia philosophersimprint
phonenumbers phonetic phonrule photo physics piano picinpar pict2e
pictex pictex2 pictexsum piechartmp piff pigpen
- pinlabel pitex pittetd pixelart pkfix pkfix-helper pkgloader pkuthss
+ pinlabel pinoutikz pitex pittetd pixelart
+ pkfix pkfix-helper pkgloader pkuthss
pl placeat placeins placeins-plain
plain-doc plainpkg plainyr plari plantslabels plantuml plates
platex platex-tools platexcheat plautopatch
diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
index fdb43b37869..f70f8402ab9 100644
--- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
@@ -140,6 +140,7 @@ depend ot-tableau
depend oubraces
depend perfectcut
depend physics
+depend pinoutikz
depend pm-isomath
depend polexpr
depend prftree
diff --git a/Master/tlpkg/tlpsrc/pinoutikz.tlpsrc b/Master/tlpkg/tlpsrc/pinoutikz.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/pinoutikz.tlpsrc