From b8d4bb76703bcb15578e2b23c5d256532180b894 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 3 Dec 2019 03:01:24 +0000 Subject: CTAN sync 201912030301 --- graphics/pgf/contrib/pinoutikz/README.md | 9 ++-- graphics/pgf/contrib/pinoutikz/pinoutikz.sty | 50 +++++++++++++-------- .../pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf | Bin 68332 -> 68402 bytes .../pgf/contrib/pinoutikz/pinoutikz_doc_en.tex | 6 ++- 4 files changed, 43 insertions(+), 22 deletions(-) (limited to 'graphics') diff --git a/graphics/pgf/contrib/pinoutikz/README.md b/graphics/pgf/contrib/pinoutikz/README.md index f042634706..a45453e5ba 100644 --- a/graphics/pgf/contrib/pinoutikz/README.md +++ b/graphics/pgf/contrib/pinoutikz/README.md @@ -1,8 +1,8 @@ _________________ pinoutikz package - 1.1.0 - 2019/11/25 + 1.1.1 + 2019/12/02 _________________ This package provides macros for chip pinout diagrams typesetting. @@ -29,8 +29,11 @@ License: ------------------------------------------------------------------------------ This material is subject to the LATEX Project Public License 1.3c -Change history: +Revision history: ------------------------------------------------------------------------------ +Version 1.1.1, 2019/12/02 (against 1.1.0) +* PLCC package: 1st-pin index added +* Documentation updated Version 1.1.0, 2019/11/25 (against 1.0.1) * New packages added: TQFP, PLCC * Pin label syntax changed -> / diff --git a/graphics/pgf/contrib/pinoutikz/pinoutikz.sty b/graphics/pgf/contrib/pinoutikz/pinoutikz.sty index 30656c6143..0aafc9e188 100644 --- a/graphics/pgf/contrib/pinoutikz/pinoutikz.sty +++ b/graphics/pgf/contrib/pinoutikz/pinoutikz.sty @@ -38,7 +38,7 @@ \usetikzlibrary{shapes.misc, shapes.geometric} \def\pinoutikzname {pinouTikz} -\def\pinoutikzversion {1.1.0} +\def\pinoutikzversion {1.1.1} \def\pinoutikzdate {2019/11/25} %% Formatt a pin name @@ -58,15 +58,30 @@ } %% package rectangle -\def\CASE(#1)#2#3#4 {% +\def\CASE(#1)#2 {% +% \CASE(#3){\width*.5-0.75*.5,\width*.5-0.75*.5}{\width cm + 0.75 cm}{\height cm + 0.75 cm} + \def\edgecount{4} + \pgfmathparse{#2/\edgecount-1}\let\cntpinsl\pgfmathresult + \pgfmathparse{#2/\edgecount}\let\cntstr\pgfmathresult + \pgfmathparse{#2-1}\let\cntpinsr\pgfmathresult + \pgfmathparse{\cntstr*.4+.4}\let\height\pgfmathresult + \pgfmathparse{\height}\let\width\pgfmathresult \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); + \pgfmathparse{\width*.5-0.75*.5}\let\posx\pgfmathresult + \pgfmathparse{\height*.5-0.75*.5}\let\posy\pgfmathresult + \pgfmathparse{\width cm + 0.75 cm}\let\widthB\pgfmathresult + \pgfmathparse{\height cm + 0.75 cm}\let\heightB\pgfmathresult + \node[draw=black, rectangle,minimum width=\widthB,minimum height=\heightB,line width=1.5pt, chamfered rectangle, chamfered rectangle corners={north west, north east, south east, south west}] at (\posy,\posy) (case) {}; + \draw (-.44 cm,\height cm + 0.75 cm-1.1cm) circle (1.25mm); }{}% \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) {}; - }{}% + \pgfmathparse{\width*.5-0.75*.5}\let\posx\pgfmathresult + \pgfmathparse{\height*.5-0.75*.5}\let\posy\pgfmathresult + \pgfmathparse{\width cm + 0.75 cm}\let\widthB\pgfmathresult + \pgfmathparse{\height cm + 0.75 cm}\let\heightB\pgfmathresult + \node[draw=black, rectangle,minimum width=\widthB,minimum height=\heightB,line width=1.5pt, chamfered rectangle, chamfered rectangle corners={north west}] at (\posx,\posy) (case) {}; + \draw (\posx,\posy+\height*.5-.2) circle (1.25mm); + }{}% } %% PIN diagram with label decoding @@ -116,7 +131,7 @@ \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); + \draw (0.75 cm,\height cm) arc (180:360:2mm); %iterate through pin definitions \foreach \pinnum/\i in {#2}% {% @@ -131,29 +146,28 @@ \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 +% Generic 4-edged package diagram +% @param#1 - pin count +% @param#2 - pin array +% @param#3 - case type +% @param#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 + \def\edgecount{4} + \pgfmathparse{#1/\edgecount-1}\let\cntpinsl\pgfmathresult + \pgfmathparse{#1/\edgecount}\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} + \CASE(#3){#1} %iterate through pin definitions \foreach \pinnum/\i in {#2}% {% diff --git a/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf index 82680ea786..6ca7da1886 100644 Binary files a/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf and b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.pdf differ diff --git a/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex index b001360929..8b27813ff8 100644 --- a/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex +++ b/graphics/pgf/contrib/pinoutikz/pinoutikz_doc_en.tex @@ -136,7 +136,7 @@ All the macros of \pinouTikz are displayed in {\makeatletter\color{@xs@keywordsp \verbinline|\PDIP|\arguD{pincount}\ARGU{pinarray} \smallskip -Draws a PDIP package, with generic number of pins. +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. @@ -253,6 +253,8 @@ Draws a PDIP package, with generic number of pins. \verbinline|\TQFP|\arguD{pinnumber}\ARGU{pinarray} \smallskip +Draws a TQFP 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}. @@ -344,6 +346,8 @@ Draws a PDIP package, with generic number of pins. \verbinline|\PLCC|\arguD{pinnumber}\ARGU{pinarray} \smallskip +Draws a PLCC 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}. -- cgit v1.2.3