% Circuit_macros.tex
\documentclass{article}
\usepackage{verbatim,url}
\usepackage{amssymb}
\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}
\usepackage{boxdims}
\usepackage{multicol}
\usepackage{xspace}
\input mode
\usepackage{ifpdf}
\usepackage{bookmark}
\usepackage{pdfcomment}
% The followowing seems to cure the problem of missing underscores:
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\usepackage{textcomp}
\usepackage{microtype}
%\DisableLigatures{encoding=T1,family=tt*}
%
\addtolength{\textwidth}{3cm}
\addtolength{\hoffset}{-1.5cm}
\addtolength{\textheight}{4cm}
\addtolength{\voffset}{-1in}
\setcounter{topnumber}{3}

% Exdented captions
\makeatletter
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\hskip-3em{\bf #1:} #2}%
  \ifdim \wd\@tempboxa >\hsize
    \hskip-3em{\bf #1:} #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

%%\@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
%%            optional * [ALTHEADING]{HEADING}

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\Large\bfseries%
\let\@@tmp\@svsec\def\@svsec{\llap{\@@tmp}}%
}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries%
\let\@@tmp\@svsec\def\@svsec{\llap{\@@tmp}}%
}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries%
\let\@@tmp\@svsec\def\@svsec{\llap{\@@tmp}}%
}}

\renewcommand\contentsname{Contents, \Version}

\makeatother

\hypersetup{
 pdflang=English,
 unicode=true,
 colorlinks=true,
 linkcolor=purple,
 citecolor=purple}

\begin{document}
%\pagenumbering{roman}
\title{M4 Macros for Electric Circuit Diagrams in \LaTeX\ Documents}
\author{Dwight Aplevich}
\enlargethispage{\baselineskip}
\date{%
%\input Version%
%\footnote{This document is best displayed with a reader that shows bookmarks.}
\vspace*{-\baselineskip}
}
\maketitle
  \pdfbookmark[section]{\contentsname}{toc}
% \pdfbookmark[section]{Contents}{toc}
\begin{multicols}{2}
  \tableofcontents
\end{multicols}

%\pagebreak
%\pagenumbering{arabic}

\input body

%\pdfbookmark[section]{\refname}{refs}
\bibliographystyle{plain}
\makeatletter
\addcontentsline{toc}{section}{References\ \unhbox \voidb@x
%\cleaders \hbox to0.44em{\hss .\hss }\hfill \kern \z@ }
%\cleaders \hbox{\hss \hss }\hfill \kern \z@ }
 \cleaders \hbox{\hss .$\;$\hss }\hfill \kern \z@ }
\makeatother
\bibliography{Circuit_macros}
   \end{document}
