texlive[48240] Master: tikz-nef (21jul18)

commits+karl at tug.org commits+karl at tug.org
Sat Jul 21 22:18:00 CEST 2018


Revision: 48240
          http://tug.org/svn/texlive?view=revision&revision=48240
Author:   karl
Date:     2018-07-21 22:18:00 +0200 (Sat, 21 Jul 2018)
Log Message:
-----------
tikz-nef (21jul18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/tikz-nef/
    trunk/Master/texmf-dist/doc/latex/tikz-nef/LICENSE
    trunk/Master/texmf-dist/doc/latex/tikz-nef/README.md
    trunk/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex
    trunk/Master/texmf-dist/doc/latex/tikz-nef/nef.bib
    trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
    trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex
    trunk/Master/texmf-dist/tex/latex/tikz-nef/
    trunk/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex
    trunk/Master/tlpkg/tlpsrc/tikz-nef.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/LICENSE	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Jan Gosmann
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/README.md	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,46 @@
+# tikz-nef
+The *nef* TikZ library provides predefined styles and shapes to create diagrams
+ for neural networks constructed with the methods of the Neural Engineering
+ Framework (NEF) [1].
+
+![Gated difference integrator example.](https://raw.githubusercontent.com/jgosmann/tikz-nef/master/example-net.png)
+
+The example above was generated with this code:
+
+```latex
+\begin{tikzpicture}[nef]
+    \graph {
+        input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext];
+        integrator -> [bend right, "$-1$"] gate;
+        integrator -> [recurrent] integrator;
+        store -> [inhibit] gate;
+    };
+\end{tikzpicture}
+```
+
+The following styles are supported:
+
+* ea: ensemble array
+* ens: ensemble
+* ext: external input or output
+* inhibt: inhibitory connection
+* net: network
+* pnode: pass-through node
+* rect: rectification ensemble
+* recurrent: recurrent connection
+
+## Installation
+
+While this package is not available in [CTAN](https://ctan.org/) follow these
+instruction:
+
+1. Create the required installation directory (if not already existing):
+   `mkdir -p "$(kpsewhich -var-value TEXMFHOME)/tex/generic"`
+2. `cd "$(kpsewhich -var-value TEXMFHOME)/tex/generic"`
+3. `git clone https://github.com/jgosmann/tikz-nef.git`
+
+## References
+
+[1]: Chris Eliasmith and Charles H. Anderson. Neural engineering: Computation,
+     representation, and dynamics in neurobiological systems. MIT Press,
+     Cambridge, MA, 2003.


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-nef/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,20 @@
+\RequirePackage{luatex85}
+\documentclass{standalone}
+
+\usepackage{fontspec}
+
+\usepackage{tikz}
+\usetikzlibrary{graphs}
+\usetikzlibrary{nef}
+\usetikzlibrary{quotes}
+
+\begin{document}
+\begin{tikzpicture}[nef]
+    \graph {
+        input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext];
+        integrator -> [bend right, "$-1$"] gate;
+        integrator -> [recurrent] integrator;
+        store -> [inhibit] gate;
+    };
+\end{tikzpicture}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/nef.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/nef.bib	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/nef.bib	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,16 @@
+
+ at book{eliasmith2003,
+  address = {Cambridge, MA},
+  title = {Neural Engineering: Computation, Representation, and Dynamics in Neurobiological Systems},
+  isbn = {978-0-262-55060-4},
+  shorttitle = {Neural {{Engineering}}},
+  abstract = {A synthesis of current approaches to adapting engineering tools to the study of neurobiological systems.},
+  timestamp = {2017-01-27T23:37:38Z},
+  publisher = {{MIT Press}},
+  author = {Eliasmith, Chris and Anderson, Charles H.},
+  year = {2003},
+  keywords = {verified},
+  file = {Neural Engineering - Eliasmith, Aug 1 2004.pdf:/Volumes/Home/blubb/Library/Application Support/Zotero/Profiles/b4t24zu4.default/zotero/storage/FCD2HVIA/Neural Engineering - Eliasmith, Aug 1 2004.pdf:application/pdf}
+}
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-nef/nef.bib
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf	2018-07-21 07:02:37 UTC (rev 48239)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf	2018-07-21 20:18:00 UTC (rev 48240)

Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,133 @@
+\documentclass{ltxdoc}
+
+\usepackage{fontspec}
+
+\GetFileInfo{tikzlibrarynef.code.tex}
+
+\title{The \textsf{nef} TikZ library\thanks{This document corresponds to \textsf{tikz-nef}~\fileversion, dated~\filedate.}}
+\author{Jan Gosmann \\ \texttt{jan at hyper-world.de}}
+
+\usepackage[backend=biber]{biblatex}
+\usepackage{tikz}
+\usetikzlibrary{graphs}
+\usetikzlibrary{nef}
+\usetikzlibrary{quotes}
+
+\addbibresource{nef.bib}
+
+\newcommand{\nef}{\emph{nef}}
+
+\begin{document}
+\maketitle
+\begin{abstract}
+    The \nef\ TikZ library provides predefined styles and shapes to create diagrams for neural networks constructed with the methods of the Neural Engineering Framework (NEF)~\cite{eliasmith2003}.
+\end{abstract}
+\tableofcontents
+
+\section{Usage}
+
+To use the \nef\ TikZ library load the \emph{tikz} package and the library with:
+\begin{verbatim}
+    \usepackage{tikz}
+    \usetikzlibrary{nef}
+\end{verbatim}
+
+\subsection{Global styles}
+\paragraph{nef}
+This style provides basic general settings like minimum node sizes and arrow tips for the diagrams. It also sets some layout options on for graphs. The style can be applied to the \texttt{tikzpicture} environment or to more narrow scopes.
+
+\subsection{Node styles and shapes}
+\begin{figure}
+    \centering
+    \begin{tikzpicture}
+        \matrix [row sep=4pt, column sep=4pt] {
+            \node {Style/shape}; & & \node [right] {Usage}; \\
+            \node {\texttt{ea}}; & \node [nef,ea] {}; & \node [right] {ensemble array}; \\ 
+            \node {\texttt{ens}}; & \node [nef,ens] {ens}; & \node [right] {ensemble}; \\ 
+            \node {\texttt{ext}}; & \node [nef,ext] {ext}; & \node [right] {external inputs and outputs}; \\ 
+            \node {\texttt{net}}; & \node [nef,net] {net}; & \node [right] {network}; \\ 
+            \node {\texttt{pnode}}; & \node [nef,pnode] {}; & \node [right] {pass-through node}; \\
+            \node {\texttt{rect}}; & \node [nef,rect] {}; & \node [right] {rectification ensemble}; \\ 
+        };
+    \end{tikzpicture}
+    \caption{Node styles and shapes.}
+\end{figure}
+
+\paragraph{ea}
+Use this style for ensemble arrays.
+
+\paragraph{ens}
+Use this style for single ensembles.
+
+\paragraph{ext}
+Use this style for inputs and outputs external to the displayed network.
+
+\paragraph{net}
+Use this style for networks.
+
+\paragraph{pnode}
+Use this style for pass-through nodes.
+
+\paragraph{rect}
+Use this style for rectification ensembles (i.e., all encoders are 1).
+
+\subsection{Edge styles}
+\begin{figure}
+    \centering
+    \begin{tikzpicture}
+        \matrix [row sep=4pt, column sep=4pt] {
+            \node {Style}; & & \node [right] {Usage}; \\
+            \node {\texttt{inhibit}}; & \draw (-10pt, 0) -- (10pt, 0) [inhibit]; & \node [right] {inhibitory connection}; \\ 
+            \node {\texttt{modulatory}}; & \draw (-10pt, 0) -- (10pt, 0) [modulatory]; & \node [right] {modulatory connection}; \\ 
+            \node {\texttt{recurrent}}; & \node (ens) [nef,ens] {}; \path [nef] (ens) edge [nef,recurrent] (ens) ; & \node [right] {recurrent connection}; \\ 
+        };
+    \end{tikzpicture}
+    \caption{Edge styles.}
+\end{figure}
+
+\paragraph{inhibit}
+Use this style for inhibitory connections.
+
+\paragraph{modulatory}
+Use this style for modulatory connections.
+
+\paragraph{recurrent}
+Use this style for recurrent connections. It will add a loop above an ensemble or network.
+
+
+
+\section{Examples}
+
+\subsection{Gated difference integrator (working memory)}
+\begin{center}
+    \begin{tikzpicture}[nef]
+        \graph {
+            input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext];
+            integrator -> [bend right, "$-1$"] gate;
+            integrator -> [recurrent] integrator;
+            store -> [inhibit] gate;
+        };
+    \end{tikzpicture}
+\end{center}
+
+\begin{verbatim}
+\usepackage{tikz}
+\usetikzlibrary{graphs}
+\usetikzlibrary{nef}
+\usetikzlibrary{quotes}
+
+%% ....
+
+\begin{tikzpicture}[nef]
+    \graph {
+        input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext];
+        integrator -> [bend right, "$-1$"] gate;
+        integrator -> [recurrent] integrator;
+        store -> [inhibit] gate;
+    };
+\end{tikzpicture}
+\end{verbatim}
+
+
+\printbibliography{}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex	2018-07-21 20:18:00 UTC (rev 48240)
@@ -0,0 +1,42 @@
+\def\fileversion{v0.1}
+\def\filedate{2017/03/29}
+
+\usetikzlibrary{arrows.meta}
+\usetikzlibrary{shadows}
+\usetikzlibrary{shapes.geometric}
+
+\pgfdeclareshape{rectification}{
+    \inheritsavedanchors[from=circle]
+    \inheritanchorborder[from=circle]
+    \inheritanchor[from=circle]{center}
+    \inheritanchor[from=circle]{north}
+    \inheritanchor[from=circle]{south}
+    \inheritanchor[from=circle]{west}
+    \inheritanchor[from=circle]{east}
+    \backgroundpath{
+        \pgfsetarrows{-}
+        \pgfpathcircle{\pgfpoint{0}{0}}{\radius} \pgfusepath{stroke,clip}
+        \pgfpathmoveto{\pgfpoint{-\radius}{-0.25 * \radius}}
+        \pgfpathlineto{\pgfpoint{0}{-0.25 * \radius}}
+        \pgfpathlineto{\pgfpoint{\radius}{\radius - 0.25 * \radius}}
+    }
+}
+
+\tikzset{
+    nef/.style={
+        minimum width=1.5em, minimum height=1.5em,
+        every path/.style={>=Latex},
+        graphs/every graph/.style={grow right sep=15mm, branch down sep=15mm, nodes={anchor=center}, edge quotes={above, node font=\footnotesize}},
+    },
+    ext/.style={draw=none},
+    net/.style={draw, rounded corners=0.5em},
+    ens/.style={draw, circle, inner sep=0.25ex},
+    pnode/.style={draw, circle, fill=black, minimum width=0.75em, minimum height=0.75em},
+    rect/.style={draw, shape=rectification, inner sep=0.25ex},
+    ea/.style={draw, fill=white, circle, inner sep=0.05em, double copy shadow={opacity=0.6, shadow yshift=-0.3ex, shadow xshift=0.3ex}},
+    recurrent/.style={loop above, min distance=2em, in=120, out=60},
+    inhibit/.style={-Circle},
+    modulatory/.style={-{Arc Barb[reversed]}}
+}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-07-21 07:02:37 UTC (rev 48239)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-07-21 20:18:00 UTC (rev 48240)
@@ -635,7 +635,7 @@
     tikz-bayesnet tikz-cd tikz-3dplot tikz-dependency tikz-dimline
     tikz-feynhand tikz-feynman tikz-inet
     tikz-kalender tikz-karnaugh tikz-ladder tikz-layers
-    tikz-opm tikz-optics tikz-palattice tikz-qtree
+    tikz-nef tikz-opm tikz-optics tikz-palattice tikz-qtree
     tikz-relay tikz-sfc tikz-timing
     tikzcodeblocks tikzducks tikzinclude tikzmark tikzmarmots tikzorbital
     tikzpagenodes tikzpeople tikzpfeile tikzposter tikzscale tikzsymbols

Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2018-07-21 07:02:37 UTC (rev 48239)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2018-07-21 20:18:00 UTC (rev 48240)
@@ -143,6 +143,7 @@
 depend tikz-karnaugh
 depend tikz-ladder
 depend tikz-layers
+depend tikz-nef
 depend tikz-opm
 depend tikz-optics
 depend tikz-page

Added: trunk/Master/tlpkg/tlpsrc/tikz-nef.tlpsrc
===================================================================


More information about the tex-live-commits mailing list