\ProvidesPackage{latexian}[2010/09/14]

% Created by J. McKenzie Alexander <jalex[at]lse.ac.uk>
% sept. 2010 version 0.32a

\newcount\latexian@pass
\latexian@pass=1

\xdef\LaTeXianPass{\the\latexian@pass}

\gdef\set@latexian@pass#1{%
  \latexian@pass=#1\relax
  \global\advance\latexian@pass by 1\relax
  \xdef\LaTeXianPass{\the\latexian@pass}}

\IfFileExists{\jobname.txn}{%
  \message{Inputing: \jobname.txn}%
  \input \jobname.txn}{}
  
\newwrite\latexian@outfile
\immediate\openout\latexian@outfile=\jobname.txn
\immediate\write\latexian@outfile{\noexpand\set@latexian@pass{\the\latexian@pass}}
\immediate\closeout\latexian@outfile

\gdef\OnLaTeXianPass#1#2{%
  \ifnum\LaTeXianPass=#1\relax#2\fi}

