%===============================================================================
% LaTeX style file for MOLCAS documents, September 1996
%===============================================================================
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{molcas}[1996/09/11]
\RequirePackage{graphicx}
%-------------------------------------------------------------------------------
% horisontal
\setlength\oddsidemargin  {5mm}
\setlength\evensidemargin {0mm}
\setlength\textwidth      {\paperwidth}
\addtolength\textwidth    {-2in}
\addtolength\textwidth    {-\oddsidemargin}
% vertical
\setlength\topmargin      {0mm}
%\setlength\headheight     {0mm}
%\setlength\headsep        {0mm}
%\setlength\topskip        {0mm}
%\setlength\footskip       {0mm}
%\setlength\footheight     {0mm}
\setlength\textheight     {\paperheight}
\addtolength\textheight   {-2in}
\addtolength\textheight   {-\topmargin}
\addtolength\textheight   {-\headheight}
\addtolength\textheight   {-\headsep}
%\addtolength\textheight   {-\footskip}
%-------------------------------------------------------------------------------
\hyphenation{molcas}
\hyphenation{cas-scf}
\hyphenation{ras-scf}
%-------------------------------------------------------------------------------
\parindent 0pt
\parskip .7em plus 2pt minus 2pt
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\def\@chapapp{Section}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{1}
\raggedbottom
%-------------------------------------------------------------------------------
\DeclareFontFamily{U}{cmtex}{}
\DeclareFontShape{U}{cmtex}{m}{n}{ <-> cmtex9 }{}
\def\inputfont{\usefont{U}{cmtex}{m}{n}}
\def\sourcefont{\usefont{U}{cmtex}{m}{n}}
\def\keyfont{\usefont{OT1}{cmr}{m}{sc}}
\def\cmndfont{\usefont{OT1}{cmss}{m}{n}}
\def\prgmfont{\usefont{OT1}{cmtt}{m}{n}}
\def\filefont{\usefont{OT1}{cmtt}{m}{sl}}
\def\varfont{\usefont{OT1}{cmr}{m}{n}}
\def\ftnfont{\usefont{OT1}{cmss}{m}{n}}
%-------------------------------------------------------------------------------
\def\logo[#1]{{\includegraphics[width=#1]{logo}}}
\def\namelist#1{\fbox{\inputfont\obeyspaces\catcode`\_=11\catcode`\&=11 #1}}
%\def\molcas{$\cal M\kern-0.10em O\kern-0.15em L\kern-0.00em C\kern-0.10em A\kern-0.05em S$}
\def\molcas{\textsc{Molcas}}
\def\molcasthis{\molcas\hbox{-\molcasversion}}
\def\molcasi{\molcas\hbox{-1}}
\def\molcasii{\molcas\hbox{-2}}
\def\molcasiii{\molcas\hbox{-3}}
\def\molcasiv{\molcas\hbox{-4}}
\def\molcasv{\molcas\hbox{-5}}
\def\molcasvi{\molcas\hbox{-6}}
\def\molcasvii{\molcas\hbox{-7}}
\def\molcasviii{\molcas\hbox{-8}}
\def\molcasxi{\molcas\hbox{-9}}
\def\keyword#1{{\keyfont #1}}
\def\program#1{{\tt\uppercase{#1}}}
\def\command#1{{\cmndfont #1}}
\def\file#1{{\filefont #1}}
\def\ftncode#1{{\tt #1}}
\def\flowchart#1{\includegraphics{tutorials/flow-#1}}
\def\myincludegraphics#1{\includegraphics{#1}}
%-------------------------------------------------------------------------------
% List of input decks
\newenvironment{inputlisting}%
{\noindent\vskip 6pt\begingroup%
\inputfont\baselineskip10pt\parskip=0pt\parindent=6pt%
\catcode`\&=11\catcode`\$=11\catcode`\_=11\catcode`\#=11%
\obeylines\catcode`\ =11%
\def\cc!{{\char18}}%
}%
{\endgroup\vskip 6pt}
%-------------------------------------------------------------------------------
% List of source code
\newenvironment{sourcelisting}%
{\noindent\vskip 6pt\begingroup%
\sourcefont\baselineskip10pt\parskip=0pt\parindent=6pt%
\catcode`\&=11\catcode`\$=11\catcode`\_=11\catcode`\#=11%
\obeylines\catcode`\ =11%
\def\cc!{{\inputfont\char18}}%
}%
{\endgroup\vskip 6pt}
%-------------------------------------------------------------------------------
% List of programs
\def\prgmmklab#1{\prgmfont#1\hfil}
\newenvironment{programlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it program}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\prgmmklab%
\item[\it Program]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of files
\def\filemklab#1{\filefont #1\hfil}
\newenvironment{filelist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it file}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\filemklab%
\item[\it File]{\it Contents}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of commands
\def\cmndmklab#1{\cmndfont #1\hfil}
\newenvironment{commandlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it command}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\cmndmklab%
\item[\it Command]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of variables
\def\cmndvarlab#1{\varfont #1\hfil}
\newenvironment{variablelist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it variable}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\cmndvarlab%
\item[\it Variable]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of keywords
\def\keymklab#1{\keyfont #1\hfil}
\newenvironment{keywordlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it keyword}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\keymklab%
\item[\it Keyword]{\it Meaning}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of subroutine syntax
\newif\ifarguments\argumentsfalse
\def\synmklab#1{\tt #1\hfil\global\argumentstrue}
\newenvironment{syntaxlist}[1]%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{---}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\synmklab%
\item[\bf Syntax:]{#1}\nopagebreak\medskip\nopagebreak%
\global\argumentsfalse%
\hrule\nopagebreak}%
{\ifarguments\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}%
\else\medskip\end{list}\fi}
%-------------------------------------------------------------------------------
% List of general items
\def\whatmklab#1{\currfont #1\hfil}
\newenvironment{whatnotlist}[3]%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{~}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\whatmklab%
\let\currfont=#1
\item[\it #2]{\it #3}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
\def\molcasversion{8.3}
\def\molcasversionnodots{83}
\def\MolcasEmail{\file{molcas@molcas.org}}
\def\MolcasWWW{\file{http://www.molcas.org}}
\def\GnuWWW{\file{http://www.gnu.org}}
\def\GnuMakeWWW{\file{https://www.gnu.org/software/make/}}
\def\CygwinWWW{\file{http://www.cygwin.com}}
%-------------------------------------------------------------------------------
% Define command \visiblespace
\makeatletter
\newsavebox{\@visiblespacebox}
\begin{lrbox}{\@visiblespacebox}
\verb*| |
\end{lrbox}
\def\visiblespace{\usebox{\@visiblespacebox}}
\makeatother
