summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/LICENSE21
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/README.md46
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/example-net.tex20
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/nef.bib16
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdfbin0 -> 98569 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex133
-rw-r--r--Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex42
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-pictures.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/tikz-nef.tlpsrc0
10 files changed, 280 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/LICENSE b/Master/texmf-dist/doc/latex/tikz-nef/LICENSE
new file mode 100644
index 00000000000..c20a0e47443
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/LICENSE
@@ -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.
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/README.md b/Master/texmf-dist/doc/latex/tikz-nef/README.md
new file mode 100644
index 00000000000..f0dec40afef
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/README.md
@@ -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.
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex b/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex
new file mode 100644
index 00000000000..f91c2015eed
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex
@@ -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}
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/nef.bib b/Master/texmf-dist/doc/latex/tikz-nef/nef.bib
new file mode 100644
index 00000000000..0d3c33c2407
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/nef.bib
@@ -0,0 +1,16 @@
+
+@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}
+}
+
+
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
new file mode 100644
index 00000000000..c78204e0a74
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex
new file mode 100644
index 00000000000..319575b0449
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex
@@ -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@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}
diff --git a/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex b/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex
new file mode 100644
index 00000000000..7b86c940ee8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikz-nef/tikzlibrarynef.code.tex
@@ -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
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 48484c4923b..9ad9d3a9788 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -635,7 +635,7 @@ my @TLP_working = qw(
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
diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
index 4a08918ae21..a29b5666c52 100644
--- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
@@ -143,6 +143,7 @@ depend tikz-kalender
depend tikz-karnaugh
depend tikz-ladder
depend tikz-layers
+depend tikz-nef
depend tikz-opm
depend tikz-optics
depend tikz-page
diff --git a/Master/tlpkg/tlpsrc/tikz-nef.tlpsrc b/Master/tlpkg/tlpsrc/tikz-nef.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/tikz-nef.tlpsrc