# Tikz figure of the HTM Neuron

Hi,

If anyone is writing a report and want to use a tikz based HTM neuron.

Cheers!

3 Likes

I tried to get it rendering with LaTeXiT on macOS, but I get failures:

Ops, sorry, forgot to mention that you need the following imports:

\usepackage{tikz}
\usepackage{xcolor}
\usetikzlibrary{matrix,chains,positioning,decorations.pathreplacing,arrows,shapes.gates.logic.US,shapes.gates.logic.IEC,calc}


Tried it and it worked!

Where do I put that? I get the error Can be used only in preamble. when I put it at the top of the file.

Example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{xcolor}
\usetikzlibrary{matrix,chains,positioning,decorations.pathreplacing,arrows,shapes.gates.logic.US,shapes.gates.logic.IEC,calc}

\begin{document}

\begin{figure}[ht!]
\centering
\hbox{\hspace{5em}\input{!!!!PathToFolder!!!!/HTMNeuron.tex}}
\caption{Caption}
\label{fig:HTMNeuron}
\end{figure}

\end{document}


NB you can just copy paste in the code after \begin{document} instead. But I prefer folder/file structure in latex.