\documentclass[a4paper]{article}

\newcommand{\Arg}[1]{\texttt{\emph{argument#1}}}
\newenvironment{genrcmd}[1]%
{\par\noindent\hrulefill\fbox{\texttt{#1}}\begin{small}}%
{\end{small}\medskip}

\begin{document}

\section*{\texttt{genr} commands}

\subsection*{Dollar accessors}

\begin{genrcmd}{\$nobs}
  \begin{description}
  \item[Number of arguments:] 0
  \item[Output:] scalar
  \end{description}
  Returns the number of observations in the currently selected sample.
\end{genrcmd}

\begin{genrcmd}{\$stopwatch}
  \begin{description}
  \item[Number of arguments:] 0
  \item[Output:] scalar
  \end{description}
  Must follow a \texttt{set stopwatch} command, which activates the
  measurement of CPU time, which stops the first time the accessor
  \texttt{\$stopwatch} is used, either in assigning it to a variable
  or simply by printing it. The accessor \texttt{\$stopwatch} will
  yield the seconds of CPU time that have elapsed between the set
  stopwatch statement and its invocation.
\end{genrcmd}

\subsection*{Ordinary functions}

\begin{genrcmd}{abs}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Absolute value.
\end{genrcmd}

\begin{genrcmd}{atan}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Arctangent.
\end{genrcmd}

\begin{genrcmd}{cos}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Cosine.
\end{genrcmd}

\begin{genrcmd}{diff}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] series
  \item[Output:] series
  \end{description}
  Computes first differences; starting values are set to \texttt{NA}.
\end{genrcmd}

\begin{genrcmd}{exp}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Exponential. Note: in case of matrices, the function acts
  element by element. For the matrix exponential function, see \texttt{mexp}.
\end{genrcmd}

\begin{genrcmd}{I}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar
  \item[Output:] square matrix
  \end{description}
  Returns an identity matrix with a number of rows given by \Arg{}.
\end{genrcmd}

\begin{genrcmd}{ln, log}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Natural logarithm; produces \texttt{NA} for non-positive values.
\end{genrcmd}

\begin{genrcmd}{log10}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Base-10 logarithm; produces \texttt{NA} for non-positive values.
\end{genrcmd}

\begin{genrcmd}{log2}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Base-2 logarithm; produces \texttt{NA} for non-positive values.
\end{genrcmd}

\begin{genrcmd}{mexp}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] square matrix
  \item[Output:] same as input
  \end{description}
  Matrix exponential.
\end{genrcmd}

\begin{genrcmd}{quantile}
  \begin{description}
  \item[Number of arguments:] 2
  \item[Argument 1:] series
  \item[Argument 2:] scalar between 0 and 1
  \item[Output:] scalar
  \end{description}
  Returns the quantile given by \Arg2, calculated
  on the data contained in \Arg1. For example, when \Arg2 is 0.5, the
  median is returned.
\end{genrcmd}

\begin{genrcmd}{sin}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Sine.
\end{genrcmd}

\begin{genrcmd}{sqrt}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Square root; produces \texttt{NA} for negative values.
\end{genrcmd}

\begin{genrcmd}{tan}
  \begin{description}
  \item[Number of arguments:] 1
  \item[Argument:] scalar, series or matrix
  \item[Output:] same as input
  \end{description}
  Tangent.
\end{genrcmd}

\end{document}

