Skip to content
Snippets Groups Projects
Commit 7d6f493b authored by Benjamin Cumming's avatar Benjamin Cumming
Browse files

add latex documentation

parent 91cfd277
No related branches found
No related tags found
No related merge requests found
......@@ -32,3 +32,11 @@
*.dot
*.pdf
*.jpg
# latex output
*.aux
*.log
*.out
*.pdf
*.toc
% ---------------------------------------------------------------------
% Conference proceedings and article templates for
% personal open-archiving activities
% September 2012
% ---------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{SelfArx}[25/01/2012, v1.0]
\RequirePackage{ifthen}
\RequirePackage{calc}
\AtEndOfClass{\RequirePackage{microtype}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions*
\LoadClass{article}
\RequirePackage{ifpdf} % Needed to pick between latex and pdflatex
%----------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------
\RequirePackage{times} % Loads the Times-Roman Fonts
\RequirePackage{mathptmx} % Loads the Times-Roman Math Fonts
%----------------------------------------------------------------------
% VARIOUS USEFUL PACKAGES
%----------------------------------------------------------------------
\RequirePackage[utf8]{inputenc}
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{graphicx,xcolor}
\RequirePackage[english]{babel}
\RequirePackage{booktabs}
%----------------------------------------------------------------------
% MARGINS
%----------------------------------------------------------------------
\RequirePackage[left=2cm,%
right=2cm,%
top=2.25cm,%
bottom=2.25cm,%
headheight=11pt,%
letterpaper]{geometry}%
%----------------------------------------------------------------------
% FIGURES AND TABLES CAPTIONS
%----------------------------------------------------------------------
\RequirePackage[labelfont={bf,sf,small},%
labelsep=period,%
justification=raggedright]{caption}
\setlength{\abovecaptionskip}{0pt}
\setlength{\belowcaptionskip}{0pt}
%----------------------------------------------------------------------
% PAGE HEADER
%----------------------------------------------------------------------
\RequirePackage{fancyhdr} % Needed to define custom headers/footers
\RequirePackage{lastpage} % Number of pages in the document
\pagestyle{fancy} % Enables the custom headers/footers
% Headers
\lhead{}%
\chead{}%
\rhead{\small\sffamily\bfseries\@PaperTitle\ --- \thepage/\pageref{LastPage}}
% Footers
\lfoot{}%
\cfoot{}%
\rfoot{}%
\renewcommand{\headrulewidth}{0pt}% % No header rule
\renewcommand{\footrulewidth}{0pt}% % No footer rule
%----------------------------------------------------------------------
% SECTION/SUBSECTION/PARAGRAPH SET-UP
%----------------------------------------------------------------------
\RequirePackage[explicit]{titlesec}
\titleformat{\section}
{\color{color1}\large\sffamily\bfseries}
{}
{0em}
{\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering\arabic{section}. #1}}}
[]
\titleformat{name=\section,numberless}
{\color{color1}\large\sffamily\bfseries}
{}
{0em}
{\colorbox{color2!10}{\parbox{\dimexpr\linewidth-2\fboxsep\relax}{\centering#1}}}
[]
\titleformat{\subsection}
{\color{color1}\sffamily\bfseries}
{\thesubsection}
{0.5em}
{#1}
[]
\titleformat{\subsubsection}
{\sffamily\small\bfseries}
{\thesubsubsection}
{0.5em}
{#1}
[]
\titleformat{\paragraph}[runin]
{\sffamily\small\bfseries}
{}
{0em}
{#1}
\titlespacing*{\section}{0pc}{3ex \@plus4pt \@minus3pt}{5pt}
\titlespacing*{\subsection}{0pc}{2.5ex \@plus3pt \@minus2pt}{0pt}
\titlespacing*{\subsubsection}{0pc}{2ex \@plus2.5pt \@minus1.5pt}{0pt}
\titlespacing*{\paragraph}{0pc}{1.5ex \@plus2pt \@minus1pt}{10pt}
%----------------------------------------------------------------------
% TABLEOFCONTENTS SET-UP
%----------------------------------------------------------------------
\newlength{\tocsep}
\setlength\tocsep{1.5pc} % Sets the indentation of the sections in the table of contents
\setcounter{tocdepth}{3} % Three levels in the table of contents section: sections, subsections and subsubsections
\usepackage{titletoc}
\contentsmargin{0cm}
\titlecontents{section}[\tocsep]
{\addvspace{4pt}\small\bfseries\sffamily}
{\contentslabel[\thecontentslabel]{\tocsep}}
{}
{\hfill\thecontentspage}
[]
\titlecontents{subsection}[\tocsep]
{\addvspace{2pt}\sffamily}
{\contentslabel[\thecontentslabel]{\tocsep}}
{}
{\ \titlerule*[.5pc]{.}\ \thecontentspage}
[]
\titlecontents*{subsubsection}[\tocsep]
{\footnotesize\sffamily}
{}
{}
{}
[\ \textbullet\ ]
%----------------------------------------------------------------------
% MULTIPLE AUTHOR SET
%----------------------------------------------------------------------
\newcount\@authcnt
\newcount\@tmpcnt\@tmpcnt\z@
\def\@affiliation{%
\ifnum\@tmpcnt<\@authcnt
\global\advance\@tmpcnt1
\raggedright \csname @auth\romannumeral\the\@tmpcnt\endcsname\hfill\\%
\let\next\@affiliation \vskip1pt
\else
\let\next\relax
\fi
\next}
\newcommand{\affiliation}[1]{%
\global\advance\@authcnt1
\expandafter\gdef\csname @auth\romannumeral\the\@authcnt\endcsname
{#1}}
%----------------------------------------------------------------------
% LIST CONTROL
%----------------------------------------------------------------------
\RequirePackage{enumitem}
%\setlist{nolistsep} % Uncomment to remove spacing between items in lists (enumerate, itemize)
%----------------------------------------------------------------------
% ABSTRACT+AUTHOR FRAME
%----------------------------------------------------------------------
\newcommand{\PaperTitle}[1]{\def\@PaperTitle{#1}}
\newcommand{\Archive}[1]{\def\@Archive{#1}}
\newcommand{\Authors}[1]{\def\@Authors{#1}}
\newcommand{\JournalInfo}[1]{\def\@JournalInfo{#1}}
\newcommand{\Abstract}[1]{\def\@Abstract{#1}}
\newcommand{\Keywords}[1]{\def\@Keywords{#1}}
% ---------------------------------------------------------------------
\renewcommand{\@maketitle}{%
\twocolumn[
{%
\thispagestyle{empty}%
\vskip-36pt%
{\raggedleft\small\sffamily\bfseries\@JournalInfo\\\@Archive\par}%
\vskip20pt%
{\raggedright\color{color1}\sffamily\bfseries\fontsize{20}{25}\selectfont \@PaperTitle\par}%
\vskip10pt%
%{\raggedright\color{color1}\sffamily\fontsize{12}{16}\selectfont \@Authors\par}%
\vskip18pt%
%\fcolorbox{color1}{white}{%
%\parbox{\textwidth-2\fboxsep-2\fboxrule}{\centering%
%\colorbox{color2!10}{%
%\parbox{\textwidth-4\fboxsep-2\fboxrule}{%
%\ifx\@Keywords\@empty%
%\sffamily\textbf{\abstractname}\\\@Abstract%
%\else%
%\sffamily\textbf{\abstractname}\\\@Abstract\\[4pt]%
%\textbf{\keywordname}\\\@Keywords%
%\fi%
%}%
%}%
%\vskip4pt%
%\begingroup%
%\raggedright\sffamily\small%
%\footnotesize\@affiliation\par%
%\endgroup%%
%}%
%}%
%\vskip25pt
}
]%
}%
%----------------------------------------------------------------------
% REFERENCES
%----------------------------------------------------------------------
% Remove brackets from numbering in List of References
\renewcommand{\@biblabel}[1]{\bfseries\color{color1}\textsuperscript{[#1]}}
%\setlength{\bibitemsep}{0cm}
\let\oldbibliography\thebibliography
\renewcommand{\thebibliography}[1]{%
\addcontentsline{toc}{section}{\refname}%
\oldbibliography{#1}%
\setlength\itemsep{0pt}}%
\section*{Introduction}
The cable equation is a nonlinear parabolic PDE that can be written in the form
\begin{equation}
c_m \pder{V}{t} = \frac{1}{2ar_{L}} \pder{}{x} \left( a^2 \pder{V}{x} \right) - i_m + i_e,
\end{equation}
where
\begin{itemize}
\item $V$ is the potential relative to the ECM $[mV]$
\item $a$ is the cable radius \todo{units}
\item $c_m$ is the {specific membrane capacitance}, approximately the same for all neurons $\approx 10~nF/mm^2$. Related to \emph{membrane capacitance} $C_m$ by the relationship $C_m=c_{m}A$, where $A$ is the surface area of the cell.
\item $i_m$ is the membrane current \todo{units}
\item $r_L$ is intracellular resistivity, typical value $1~k\Omega$
\end{itemize}
report.pdf : *.tex
pdflatex report.tex
force : report.pdf
pdflatex report.tex
clean :
rm -f *.pdf
rm -f *.log
rm -f *.out
rm -f *.aux
rm -f *.toc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Stylish Article
% LaTeX Template
% Version 2.0 (13/4/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Mathias Legrand (legrand.mathias@gmail.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[fleqn,10pt]{SelfArx} % Document font size and equations flushed left
\usepackage{xspace}
\usepackage{color}
%----------------------------------------------------------------------------------------
% COLUMNS
%----------------------------------------------------------------------------------------
\setlength{\columnsep}{0.55cm} % Distance between the two columns of text
\setlength{\fboxrule}{0.75pt} % Width of the border around the abstract
%----------------------------------------------------------------------------------------
% COLORS
%----------------------------------------------------------------------------------------
\definecolor{color1}{RGB}{0,0,90} % Color of the article title and sections
\definecolor{color2}{RGB}{0,20,20} % Color of the boxes behind the abstract and headings
%----------------------------------------------------------------------------------------
% PLOTTING and DRAWING
%----------------------------------------------------------------------------------------
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes,arrows,backgrounds,fit,shapes.geometric,calc}
\usetikzlibrary{pgfplots.groupplots}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
%----------------------------------------------------------------------------------------
% HYPERLINKS
%----------------------------------------------------------------------------------------
\usepackage{hyperref} % Required for hyperlinks
\hypersetup{hidelinks,colorlinks,breaklinks=true,urlcolor=color2,citecolor=color1,linkcolor=color1,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
%----------------------------------------------------------------------------------------
% CUSTOM COMMANDS
%----------------------------------------------------------------------------------------
\newcommand{\HWtwelve}{HW12\xspace}
\newcommand{\HWtwelves}{HW12$^*$\xspace}
\newcommand{\HWeight}{HW8\xspace}
\newcommand{\HWsix}{HW6\xspace}
\newcommand{\HWfour}{HW4\xspace}
\newcommand{\SBeight}{SB8\xspace}
\newcommand{\HWtwelvecode}{E5-2690v3\xspace}
\newcommand{\HWtwelvescode}{E5-2680v3\xspace}
\newcommand{\HWeightcode}{E5-1660v3\xspace}
\newcommand{\HWsixcode}{E5-1650v3\xspace}
\newcommand{\HWfourcode}{E5-1620v3\xspace}
\newcommand{\SBeightcode}{E5-2670\xspace}
\newcommand{\todo}[1]{\textbf{\textcolor{blue}{TODO: #1}}} % add a comment to the article
\newcommand{\tbl}[1]{\textbf{Table \ref{#1}}\xspace}
\newcommand{\fig}[1]{\textbf{Figure \ref{#1}}\xspace}
\newcommand{\eq}[1]{\textbf{(\ref{#1})}\xspace}
\newcommand{\ssec}[1]{\textbf{\S\ref{#1}}\xspace}
\newcommand{\pder}[2]{\frac{\partial{#1}}{\partial{#2}}}
%----------------------------------------------------------------------------------------
% ARTICLE INFORMATION
%----------------------------------------------------------------------------------------
\JournalInfo{CSCS} % name of "journal" on upper right corner
\Archive{working document}
\PaperTitle{Cable Equation}
%===============================================================================
\begin{document}
\flushbottom % Makes all text pages the same height
\maketitle % Print the title and authors
\tableofcontents
\thispagestyle{empty} % Removes page numbering from the first page
%------------------------------------------------
\input{formulation.tex}
\end{document}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment