%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plplot.sty
% Maurice LeBrun
% 19 May 1994
%
% This file contains macro definitions used in building the latex version
% of the PLplot document.  For each macro added here, there must be a
% corresponding elisp support function in plplot-fmt.el, used when the
% info version of the doc is built.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Multi-purpose name and description environments.

\newenvironment{ename}%
	{\list{}{\setlength{\leftmargin}{0pc}}\item[]}%
	{\endlist}

\newenvironment{edescr}%
	{\list{}{\setlength{\leftmargin}{4pc}\setlength{\topsep}{0pc}}\item[]}%
	{\endlist}

% Macros for various ways of displaying a function specification.
%
% name		set off a function specification
% bname		same as ``name'', but wraps a box around it
% bnameC	same as ``bname'', but adds a (C) to indicate C binding
% bnameF	same as ``bname'', but adds a (F) to indicate Fortran binding
% bnameCF	same as ``bname'', but puts C and Fortran bindings in one box

\newcommand{\name}[1]%
	{\begin{ename}\code{#1}\end{ename}}

\newcommand{\bname}[1]%
	{\pagebreak[2]%
	\begin{ename}
		\fbox{\code{#1}}%
	\end{ename}%
	\nopagebreak}

\newcommand{\bnameC}[1]%
	{\pagebreak[2]%
	\begin{ename}%
		\fbox{\code{#1}}\qquad(C)%
	\end{ename}%
	\nopagebreak}

\newcommand{\bnameF}[1]%
	{\pagebreak[2]%
	\begin{ename}%
		\fbox{\code{#1}}\qquad(Fortran)%
	\end{ename}%
	\nopagebreak}

\newcommand{\bnameCF}[4]%
	{\pagebreak[2]%
	\begin{ename}%
		\fbox{\code{#1}}\qquad#2\\
		\fbox{\code{#3}}\qquad#4%
	\end{ename}%
	\nopagebreak}

% descr is for printing function descriptions

\newcommand{\descr}[1]%
	{\begin{edescr}#1\end{edescr}}

% This is used when referring to a function for the first time.
% It uses \tt font and generates a reference to the function's definition.

\newcommand{\rou}[1]%
	{\code{#1} (page~\pageref{#1})}

% These have no use in the LaTeX document (only used by latexinfo).

\newcommand{\namend}{}

% Turns out you can't just comment out an input statement with \c since
% latexinfo still wants to include them.  Hence, this definition.

\newcommand{\noinput}{}

% Macros for nicely formatting argument specifications and descriptions

\newenvironment{eargn}%
	{\list{}{\setlength{\leftmargin}{2pc}}\item[]}%
	{\endlist}

\newenvironment{eargd}%
	{\list{}{\setlength{\leftmargin}{2pc}%
		 \setlength{\topsep}{0pc}%
		 \setlength{\parskip}{0pc}}\item[]}%
	{\endlist}

\newcommand{\argu}[2]%
	{\pagebreak[2]%
	\begin{eargn}#1:\nopagebreak\begin{eargd}#2\end{eargd}\end{eargn}}
