diff options
Diffstat (limited to 'graphics/pgf')
-rw-r--r-- | graphics/pgf/contrib/dynkin-diagrams/README | 10 | ||||
-rw-r--r-- | graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf | bin | 0 -> 735799 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty | 69 | ||||
-rw-r--r-- | graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex | 19 | ||||
-rw-r--r-- | graphics/pgf/contrib/pinoutikz/README.md | 39 | ||||
-rw-r--r-- | graphics/pgf/contrib/pinoutikz/pinoutikz.sty | 225 | ||||
-rw-r--r-- | graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf | bin | 0 -> 68332 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex | 441 |
8 files changed, 776 insertions, 27 deletions
diff --git a/graphics/pgf/contrib/dynkin-diagrams/README b/graphics/pgf/contrib/dynkin-diagrams/README index 94427be9e2..d5d25bbb48 100644 --- a/graphics/pgf/contrib/dynkin-diagrams/README +++ b/graphics/pgf/contrib/dynkin-diagrams/README @@ -2,9 +2,9 @@ ___________________________________ Dynkin diagrams - v3.1415926 + v3.14159265 - 25 November 2019 + 26 November 2019 ___________________________________ Authors : Ben McKay @@ -15,10 +15,8 @@ Licence : Released under the LaTeX Project Public License v1.3c or ---------------------------------------------------------------------- -Draws Dynkin diagrams in LaTeX documents, using the TikZ package. -Version 3.1415926 fixes problems with -(1) horizontal alignment of labels of varying heights, -(2) text styles being ignored. +Draws Dynkin Coxeter, and Satake diagrams in LaTeX documents, using the TikZ package. +Version 3.14159265 fixes problems with text styles being ignored in Coxeter diagrams. diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf Binary files differnew file mode 100644 index 0000000000..f329e22aa5 --- /dev/null +++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.pdf diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty index e644e6251e..805b825760 100644 --- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty +++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.sty @@ -2,7 +2,7 @@ % % The Dynkin Diagrams package. % -% Version 3.1415926 +% Version 3.14159265 % % % This package draws Dynkin diagrams in LaTeX documents, using the TikZ package. @@ -2376,14 +2376,11 @@ decoration= \global\dynkin@Satake@diagramfalse% \ifdynkin@Coxeter% \gdef\dynkin@string{ddd.ddd}% -% \gdef\dynkin@string{***.***}% \else% \ifdynkin@is@extended% \gdef\dynkin@string{ddd.ddd}% -% \gdef\dynkin@string{***.***}% \else% \gdef\dynkin@string{dd.ddd}% -% \gdef\dynkin@string{**.***}% \fi% \fi% }% @@ -2400,10 +2397,8 @@ decoration= \global\dynkin@Satake@diagramfalse% \ifdynkin@Coxeter% \gdef\dynkin@string{ddd.ddd}% -% \gdef\dynkin@string{***.***}% \else% \gdef\dynkin@string{dd.ddd}% -% \gdef\dynkin@string{**.***}% \fi% }% {I}{\gdef\dynkin@string{oo.oo}}% @@ -3238,9 +3233,15 @@ decoration= \ifdynkin@Coxeter \Adynkin \convertRootPair{\the\drmo}{\the\dynkin@rank} - \node[/Dynkin diagram/text style,above] + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=4}\)% + }% + ] at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) - {\(4\)}; + {}; \else % Create the roots. \ifnum\dynkin@ply>1% @@ -3714,9 +3715,15 @@ decoration= \dynkinEdge*{SingleEdge}{2}{3} \dynkinEdge*{SingleEdge}{3}{4} \convertRootPair{2}{3} - \node[/Dynkin diagram/text style,above] + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=4}\)% + }% + ] at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) - {\(4\)}; + {}; \else \dynkinEdge*{SingleEdge}{1}{2} \dynkinEdge*{SingleEdge}{3}{4} @@ -3753,7 +3760,15 @@ decoration= {% \Adynkin% \convertRootPair{1}{2}% - \node[/Dynkin diagram/text style,above] at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) {\(5\)};% + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=5}\)% + }% + ] + at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) + {}; }% %% \Idynkin @@ -3765,7 +3780,15 @@ decoration= \dynkin@rank=2% \Adynkin% \convertRootPair{1}{2}% - \node[/Dynkin diagram/text style,above] at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) {\(\dynkin@gonality\)};% + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=\dynkin@gonality}\)% + }% + ] + at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) + {}; }% %% \extendedAdynkin @@ -3888,8 +3911,15 @@ decoration= \ifdynkin@Coxeter% \dynkinEdge*{SingleEdge}{\the\drmo}{\the\dynkin@rank}% \convertRootPair{\the\drmo}{\the\dynkin@rank} - \node[/Dynkin diagram/text style,above] at - ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) {\(4\)}; + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=4}\)% + }% + ] + at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) + {}; \else% \ifnum\dynkin@ply<3% \dynkinEdge*{DoubleEdge}{\the\drmo}{\the\dynkin@rank}% @@ -3912,8 +3942,15 @@ decoration= \ifdynkin@Coxeter% \dynkinEdge*{SingleEdge}{0}{1}% \convertRootPair{0}{1} - \node[/Dynkin diagram/text style,above] at - ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) {\(4\)}; + \node[inner sep=\dynkin@root@radius,% + label={% + [/Dynkin diagram/text style]% + above: + \(\pgfkeys{/Dynkin diagram/label macro*=4}\)% + }% + ] + at ($.5*(\dynkin@root@name \the\@fromRoot)+.5*(\dynkin@root@name \the\@toRoot)$) + {}; \else% \dynkinEdge*{DoubleEdge}{0}{1}% \fi% diff --git a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex index b11488ffdd..5685bbe4a5 100644 --- a/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex +++ b/graphics/pgf/contrib/dynkin-diagrams/dynkin-diagrams.tex @@ -1,6 +1,6 @@ \documentclass{amsart} -\title{The Dynkin diagrams package \\ Version 3.1415926} +\title{The Dynkin diagrams package \\ Version 3.14159265} \makeatletter \DeclareRobustCommand{\scotsMc}{\scotsMcx{c}} @@ -20,7 +20,7 @@ \author{Ben \scotsMc{}Kay} \address{School of Mathematical Sciences, University College Cork, Cork, Ireland} \email{b.mckay@ucc.ie} -\date{25 November 2019} +\date{26 November 2019} \usepackage{etex} \usepackage[T1]{fontenc} @@ -262,6 +262,7 @@ You can also pass options to the package in \verb!\usepackage!. \end{dynkinTable} +\newpage \section{Satake diagrams}\label{section:Satake} \begin{tcblisting}{title={Satake diagrams use the standard name instead of a rank}} @@ -310,6 +311,8 @@ We use a solid gray bar to denote the folding of a Dynkin diagram, rather than t \end{dynkinDiagram} \end{tcblisting} +\newpage + \begin{tcblisting}{title={The double arrows for \(A_{IIIa}\) are big}} \newcommand{\invol}[2]{\draw[latex-latex] (root #1) to [out=-60,in=-120] node[midway,below]{$\sigma$} (root #2);} @@ -329,6 +332,8 @@ shorten <=1mm,shorten >=1mm,}} \end{dynkinDiagram} \end{tcblisting} +\newpage + \begin{tcblisting}{title={\dots but you could try springs pulling roots together}} \tikzset{/Dynkin diagram/fold style/.style= {decorate,decoration={name=coil,aspect=0.5, @@ -372,6 +377,7 @@ segment length=1mm,amplitude=.6mm}}} \node[below] at (root 2) {\(\alpha_{\mathrlap{2}}\)}; \end{dynkinDiagram} \end{tcblisting} +\newpage \begin{tcblisting}{title={Commands to label several roots}} \begin{dynkinDiagram}{A}{7} \dynkinLabelRoots{,\alpha_2,\alpha_3,\alpha_4,\alpha_5,,\alpha_7} @@ -390,6 +396,7 @@ label macro*/.code={\gamma_{\mathrlap{#1}}}, labels={,2,...,5,,7}, labels*={1,3,4,5,6}]{A}{7} \end{tcblisting} +\newpage \begin{tcblisting}{title={Commands to label several roots}} \begin{dynkinDiagram}{A}{7} \dynkinLabelRoots{,\alpha_2,\alpha_3,\alpha_4,\alpha_5,,\alpha_7} @@ -405,7 +412,7 @@ Note the slight improvement that \verb!\mathrlap! makes: the labels are centered \dynkin[label,label macro/.code={\alpha_{\mathrlap{#1}}},edge length=.75cm]{D}{15} \end{tcblisting} - +\newpage \section{Height and depth of labels} Labels are set with default maximum height the height of the character \(b\), and default maximum depth the depth of the character \(g\). To change these, set \verb!label height! and \verb!label depth!: @@ -541,6 +548,7 @@ label macro/.code={\mathbb{A}_{\mathrlap{#1}}}]{A}{} \begin{tcblisting}{title={Edge lengths}} The Dynkin diagram of \(A_3\) is \dynkin[edge length=1.2,parabolic=3]{A}{3} \end{tcblisting} +\newpage \begin{tcblisting}{title={Root marks}} \dynkin{E}{8} \dynkin[mark=*]{E}{8} @@ -611,7 +619,6 @@ The parabolic subgroup \(E_{8,124}\) is \dynkin[parabolic=124,x/.style={brown,ve \section{Drawing on top of a Dynkin diagram} - \begin{tcblisting}{title={TikZ can access the roots themselves}} \begin{dynkinDiagram}{A}{4} \fill[white,draw=black] (root 2) circle (.15cm); @@ -619,6 +626,7 @@ The parabolic subgroup \(E_{8,124}\) is \dynkin[parabolic=124,x/.style={brown,ve \draw[black] (root 2) circle (.05cm); \end{dynkinDiagram} \end{tcblisting} +\newpage \begin{tcblisting}{title={Draw curves between the roots}} \begin{dynkinDiagram}[label]{E}{8} \draw[very thick, black!50,-latex] @@ -814,7 +822,7 @@ D_4 & - +\newpage \section{Parabolic subgroups} Each set of roots is assigned a number, with each binary digit zero or one to say whether the corresponding root is crossed or not: @@ -992,6 +1000,7 @@ We include a style called \verb!Kac! which tries to imitate the style of \cite{K \dyn[extended]{F}{4} \dyn[extended]{G}{2} \end{dynkinTable} +\newpage \begin{dynkinTable}{The Dynkin diagrams of the twisted simple root systems in Kac style}{6cm}{4.5cm} \dyn{A}[2]{2} \dyn{A}[2]{even} diff --git a/graphics/pgf/contrib/pinoutikz/README.md b/graphics/pgf/contrib/pinoutikz/README.md new file mode 100644 index 0000000000..f042634706 --- /dev/null +++ b/graphics/pgf/contrib/pinoutikz/README.md @@ -0,0 +1,39 @@ + _________________ + + pinoutikz package + 1.1.0 + 2019/11/25 + _________________ + +This package provides macros for chip pinout diagrams typesetting. + +Main features are: + * pinout diagrams: + - PDIP packages + - TQFP packages + - PLCC 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.md (this file) + +############################################################################## + Robert Blazek + <robert.h.blazek@gmail.com> + +License: +------------------------------------------------------------------------------ +This material is subject to the LATEX Project Public License 1.3c + +Change history: +------------------------------------------------------------------------------ +Version 1.1.0, 2019/11/25 (against 1.0.1) +* New packages added: TQFP, PLCC +* Pin label syntax changed -> <pin position>/<pin label> + +Version 1.0.1 2019/11/23 +* version created diff --git a/graphics/pgf/contrib/pinoutikz/pinoutikz.sty b/graphics/pgf/contrib/pinoutikz/pinoutikz.sty new file mode 100644 index 0000000000..30656c6143 --- /dev/null +++ b/graphics/pgf/contrib/pinoutikz/pinoutikz.sty @@ -0,0 +1,225 @@ +% License: LATEX Project Public License 1.3c +% Author: Robert Blazek +% Date: 2019/11/25 +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{pinoutikz}[1.1.0 Pinout diagram definitions] + +\RequirePackage{ifthen} +\RequirePackage{lmodern} +\RequirePackage{xstring} +\RequirePackage{upquote} +\RequirePackage{amsmath,amssymb} +\RequirePackage{amsfonts} +\RequirePackage{forarray} +\RequirePackage{arrayjob} +\RequirePackage{pgf} +\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 + +\usetikzlibrary{shapes.misc, shapes.geometric} + +\def\pinoutikzname {pinouTikz} +\def\pinoutikzversion {1.1.0} +\def\pinoutikzdate {2019/11/25} + +%% 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} +} + +%% package rectangle +\def\CASE(#1)#2#3#4 {% + \ifthenelse{\equal{#1}{TQFP}}{% + \node[draw=black, rectangle,minimum width=#3,minimum height=#4,line width=1.5pt, chamfered rectangle, chamfered rectangle corners={north west, north east, south east, south west}] at (#2) (case) {}; + \draw (-.39 cm,#4-1.15cm) circle (1.5mm); + }{}% + \ifthenelse{\equal{#1}{PLCC}}{% + \node[draw=black, rectangle,minimum width=#3,minimum height=#4,line width=1.5pt, chamfered rectangle, chamfered rectangle corners={north west}] at (#2) (case) {}; + %\node[draw=black, circle,minimum size=1.5mm] at (#3*.5 cm,#4-1.25cm) (mark) {}; + }{}% +} + +%% 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); + }{} + \ifthenelse{\equal{#1}{left}}% + {% + \draw (-0.12,0) node[label=left:{\footnotesize \pinlabel},label=right:{\small \pgfmathprintnumber{#4}} ]{}; + \draw[rotate=180] (0,-.15) rectangle(0.12,0.15); + }{} + \ifthenelse{\equal{#1}{top}}% + {% + \draw(0,0.12) node[rotate=90,label=right:\rotatebox{90}{\footnotesize \pinlabel},label=left:\rotatebox{90}{\small \pgfmathprintnumber{#4}} ]{}; + \draw[rotate=90](0,-.15) rectangle(0.12,0.15); + }{} + \ifthenelse{\equal{#1}{bottom}}% + {% + \draw(0,-0.12) node[rotate=90,label=left:\rotatebox{90}{\footnotesize \pinlabel},label=right:\rotatebox{90}{\small \pgfmathprintnumber{#4}} ]{}; + \draw[rotate=-90](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,-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} +} + +% #1 - pin count +% #2 - pin array +% #3 - case type +% #4 - pin offset +\def\GENFOUREDGE(#1)#2#3#4{% + \sffamily + \textsf{% + \def\pins{{#2}} + \pgfmathparse{#1/4-1}\let\cntpinsl\pgfmathresult + \pgfmathparse{#1/4}\let\cntstr\pgfmathresult + \pgfmathparse{#1-1}\let\cntpinsr\pgfmathresult + \pgfmathparse{\cntstr*.4+.4}\let\height\pgfmathresult + \pgfmathparse{\height}\let\width\pgfmathresult + %\draw[line width=1.5pt] (-0.75,-0.75) rectangle (\width,\height); +% \node[draw=black, rectangle,minimum width=\width cm + 0.75 cm,minimum height=\height cm + 0.75 cm,line width=1.5pt, chamfered rectangle, chamfered rectangle corners={north west}] at (\width*.5-0.75*.5,\width*.5-0.75*.5) (case) {}; + \CASE(#3){\width*.5-0.75*.5,\width*.5-0.75*.5}{\width cm + 0.75 cm}{\height cm + 0.75 cm} + %iterate through pin definitions + \foreach \pinnum/\i in {#2}% + {% + \pgfmathparse{\pinnum-1}\let\pinidx\pgfmathresult + \pgfmathparse{Mod((int(\pinidx+#1)-#4),#1)}\let\pinidx\pgfmathresult + \pgfmathparse{int(\pinidx/\cntstr)}\let\pinrange\pgfmathresult + \pgfmathparse{Mod(\pinidx,\cntstr)}\let\rngidx\pgfmathresult + \ifthenelse{\equal{\pinrange}{0} }% + {% + \pgfmathparse{(\cntpinsl-\rngidx)*0.40}\let\ypin\pgfmathresult + \PIN[left](-0.75,\ypin){\i}{\pinnum} + }{} + \ifthenelse{\equal{\pinrange}{1} }% + {% + \pgfmathparse{\rngidx*0.40}\let\ypin\pgfmathresult + \PIN[bottom](\ypin,-0.75){\i}{\pinnum} + }{} + \ifthenelse{\equal{\pinrange}{2} }% + {% + \pgfmathparse{\rngidx*0.40}\let\ypin\pgfmathresult + \PIN[right](\width,\ypin){\i}{\pinnum} + }{} + \ifthenelse{\equal{\pinrange}{3} }% + {% + \pgfmathparse{(\cntpinsl-\rngidx)*0.40}\let\ypin\pgfmathresult + \PIN[top](\ypin,\height){\i}{\pinnum} + }{}% \fi + } + } +} + +%% PLCC 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\PLCC(#1)#2{% + \begin{tikzpicture} + \begin{scope}[shift={(0,0)}] + \GENFOUREDGE(#1){#2}{PLCC}{round(#1*.125)} + \end{scope} + \end{tikzpicture} +} + +%% TQFP 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\TQFP(#1)#2{% + \begin{tikzpicture} + \begin{scope}[shift={(0,0)}] + \GENFOUREDGE(#1){#2}{TQFP}{0} + \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/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf Binary files differnew file mode 100644 index 0000000000..82680ea786 --- /dev/null +++ b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf diff --git a/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex new file mode 100644 index 0000000000..b001360929 --- /dev/null +++ b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex @@ -0,0 +1,441 @@ +\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 for creating pinout diagrams of chips. + + \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 either: 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{pincount}\ARGU{pinarray} +\smallskip + +Draws a PDIP package, with generic number of pins. + +\begin{itemize} + \item \argu{pincount} the number of pins of a DIP package and should be an even number. + \item \ARGU{pinarray} is a comma-separated list of pins - each pin definition is as follows: \argu{pinnumber}/\ARGU{pinlabel}. +\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}[ht!] + \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~}/RESET}, + 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}[ht!] + \centering + \PDIP(8){% + 1/CLK, + 2/A, + 3/B, + 4/GND, + 5/Y, + 6/{\FormatPinLabel{~Y~}/RESET}, + 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{figure}[ht!] + \centering + \PDIP(14){% + 1/A1, + 2/B1, + 3/\FormatPinLabel{\#1 AND/~OR~/GPIO1}, + 4/Y1, + 5/C1, + 6/\FormatPinLabel{\#2 AND/~OR~/GPIO2}, + 7/GND, + 8/PCLK, + 9/PDAT, + 10/A2, + 11/B2, + 12/\FormatPinLabel{\#2 INV/~SME~/GPIO3}, + 13/C2, + 14/$V_{cc}$} + \caption{Generic programmable TTL logic chip, 14-pin PDIP package} \label{fig:X_DIP14} +\end{figure} + +%% 14-pin example +\begin{minipage}[t]{0.65\linewidth} +\begin{lstlisting} +\begin{figure}[ht!] + \centering + \PDIP(14){% + 1/A1, + 2/B1, + 3/\FormatPinLabel{\#1 AND/~OR~/GPIO1}, + 4/Y1, + 5/C1, + 6/\FormatPinLabel{\#2 AND/~OR~/GPIO2}, + 7/GND, + 8/PCLK, + 9/PDAT, + 10/A2, + 11/B2, + 12/\FormatPinLabel{\#2 INV/~SME~/GPIO3}, + 13/C2, + 14/$V_{cc}$} + \caption{Generic programmable TTL logic chip, 14-pin PDIP package} \label{fig:X_DIP14} +\end{figure} +\end{lstlisting}% +\end{minipage}\hfill + +\subsubsection{\ttfamily\textbackslash TQFP} +\verbinline|\TQFP|\arguD{pinnumber}\ARGU{pinarray} +\smallskip + +\begin{itemize} + \item \argu{pincount} the number of pins of a DIP package and should be an even number. + \item \ARGU{pinarray} is a comma-separated list of pins - each pin definition is as follows: \argu{pinnumber}/\ARGU{pinlabel}. +\end{itemize} + +%% 32-pin TQFP example +\begin{minipage}[t]{0.65\linewidth} +\begin{lstlisting} +\begin{figure}[ht!] + \centering + \TQFP(32){% + 1/{PD.0/RTX1}, + 2/{PA.0/STX1}, + 3/PA.1, + 4/PA.2, + 5/PA.3, + 6/PA.4, + 7/PA.5, + 8/GND, + 9/PA.6, + 10/PA.7, + 11/{PB.0/RTX1}, + 12/{PB.1/STX1}, + 13/PB.2, + 14/PB.3, + 15/PB.4, + 16/PB.5, + 17/PB.6, + 18/PB.7, + 19/\FormatPinLabel{PC.0/~ALE~/PLPBC0}, + 20/PC.1, + 21/PC.2, + 22/PC.3, + 23/PC.4, + 24/PC.5, + 25/PC.6, + 26/PC.7, + 27/XTAL1/PD.3, + 28/XTAL2/PD.4, + 29/RST, + 30/PD.1, + 31/PD.2, + 32/$V_{cc}$} + \caption{A generic MCU chip, 32-pin TQFP package} \label{fig:X_TQFP32} +\end{figure} +\end{lstlisting}% +\end{minipage}\hfill + +%% 32-pin TQFP example +\begin{figure}[ht!] + \centering + \TQFP(32){% + 1/{PD.0/RTX1}, + 2/{PA.0/STX1}, + 3/PA.1, + 4/PA.2, + 5/PA.3, + 6/PA.4, + 7/PA.5, + 8/GND, + 9/PA.6, + 10/PA.7, + 11/{PB.0/RTX1}, + 12/{PB.1/STX1}, + 13/PB.2, + 14/PB.3, + 15/PB.4, + 16/PB.5, + 17/PB.6, + 18/PB.7, + 19/\FormatPinLabel{PC.0/~ALE~/PLPBC0}, + 20/PC.1, + 21/PC.2, + 22/PC.3, + 23/PC.4, + 24/PC.5, + 25/PC.6, + 26/PC.7, + 27/XTAL1/PD.3, + 28/XTAL2/PD.4, + 29/RST, + 30/PD.1, + 31/PD.2, + 32/$V_{cc}$} + \caption{A generic MCU chip, 32-pin TQFP package} \label{fig:X_TQFP32} +\end{figure} + +\subsubsection{\ttfamily\textbackslash PLCC} +\verbinline|\PLCC|\arguD{pinnumber}\ARGU{pinarray} +\smallskip + +\begin{itemize} + \item \argu{pincount} the number of pins of a DIP package and should be an even number. + \item \ARGU{pinarray} is a comma-separated list of pins - each pin definition is as follows: \argu{pinnumber}/\ARGU{pinlabel}. +\end{itemize} + +%% 28-pin PLCC example +\begin{minipage}[t]{0.65\linewidth} +\begin{lstlisting} +\begin{figure}[ht!] + \centering + \PLCC(28){% + 1/{PD.0/RTX1}, + 2/{PA.0/STX1}, + 3/PA.1, + 4/PA.2, + 5/PA.3, + 6/PA.4, + 7/PA.5, + 8/GND, + 9/PA.6, + 10/PA.7, + 11/{PB.0/RTX1}, + 12/{PB.1/STX1}, + 13/PB.2, + 14/PB.3, + 15/PB.4, + 16/PB.5, + 17/PB.6, + 18/PB.7, + 19/\FormatPinLabel{PC.0/~ALE~/PLPBC0}, + 20/PC.1, + 21/PC.2, + 22/PC.3, + 23/{XTAL1/PD.3}, + 24/{XTAL2/PD.4}, + 25/RST, + 26/PD.1, + 27/PD.2, + 28/$V_{cc}$} + \caption{A generic MCU chip, 28-pin PLCC package} \label{fig:X_PLCC28} +\end{figure} +\end{lstlisting}% +\end{minipage}\hfill + +%% 28-pin PLCC example +\begin{figure}[ht!] + \centering + \PLCC(28){% + 1/{PD.0/RTX1}, + 2/{PA.0/STX1}, + 3/PA.1, + 4/PA.2, + 5/PA.3, + 6/PA.4, + 7/PA.5, + 8/GND, + 9/PA.6, + 10/PA.7, + 11/{PB.0/RTX1}, + 12/{PB.1/STX1}, + 13/PB.2, + 14/PB.3, + 15/PB.4, + 16/PB.5, + 17/PB.6, + 18/PB.7, + 19/\FormatPinLabel{PC.0/~ALE~/PLPBC0}, + 20/PC.1, + 21/PC.2, + 22/PC.3, + 23/{XTAL1/PD.3}, + 24/{XTAL2/PD.4}, + 25/RST, + 26/PD.1, + 27/PD.2, + 28/$V_{cc}$} + \caption{A generic MCU chip, 28-pin PLCC package} \label{fig:X_PLCC28} +\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 |