Commit af2b7146 authored by Fred Drake's avatar Fred Drake

\shortversion,

\setshortversion:  New markup to help deal with Python having a "real"
                   version number and an abbreviated version number
                   used to create pathnames to the library installation.
parent 1fe3b823
...@@ -236,6 +236,18 @@ distribution, to create or maintain whole documents or sections. ...@@ -236,6 +236,18 @@ distribution, to create or maintain whole documents or sections.
macros. This section contains the reference material for these macros. This section contains the reference material for these
facilities. facilities.
\subsection{Markup for the Preamble \label{preamble-info}}
\begin{macrodesc}{release}{\p{ver}}
Set the version number for the software described in the
document.
\end{macrodesc}
\begin{macrodesc}{setshortversion}{\p{sver}}
Specify the ``short'' version number of the documented software
to be \var{sver}.
\end{macrodesc}
\subsection{Meta-information Markup \label{meta-info}} \subsection{Meta-information Markup \label{meta-info}}
\begin{macrodesc}{sectionauthor}{\p{author}\p{email}} \begin{macrodesc}{sectionauthor}{\p{author}\p{email}}
...@@ -567,6 +579,17 @@ distribution, to create or maintain whole documents or sections. ...@@ -567,6 +579,17 @@ distribution, to create or maintain whole documents or sections.
acceptable. acceptable.
\end{macrodesc} \end{macrodesc}
\begin{macrodesc}{shortversion}{}
The ``short'' version number of the documented software, as
specified using the \macro{setshortversion} macro in the
preamble. For Python, the short version number for a release is
the first three characters of the \code{sys.version} value. For
example, versions 2.0b1 and 2.0.1 both have a short version of
2.0. This may not apply for all packages; if
\macro{setshortversion} is not used, this produces an empty
expansion. See also the \macro{version} macro.
\end{macrodesc}
\begin{macrodesc}{strong}{\p{text}} \begin{macrodesc}{strong}{\p{text}}
Strongly emphasized text; this will be presented using a bold Strongly emphasized text; this will be presented using a bold
font. font.
...@@ -588,8 +611,9 @@ distribution, to create or maintain whole documents or sections. ...@@ -588,8 +611,9 @@ distribution, to create or maintain whole documents or sections.
\end{macrodesc} \end{macrodesc}
\begin{macrodesc}{version}{} \begin{macrodesc}{version}{}
The version number for the documentation, as specified using The version number of the described software, as specified using
\macro{release} in the preamble. \macro{release} in the preamble. See also the
\macro{shortversion} macro.
\end{macrodesc} \end{macrodesc}
\begin{macrodesc}{versionadded}{\p{version}} \begin{macrodesc}{versionadded}{\p{version}}
......
...@@ -975,10 +975,13 @@ ...@@ -975,10 +975,13 @@
% %
\newcommand{\py@release}{} \newcommand{\py@release}{}
\newcommand{\version}{} \newcommand{\version}{}
\newcommand{\shortversion}{}
\newcommand{\releasename}{Release} \newcommand{\releasename}{Release}
\newcommand{\release}[1]{% \newcommand{\release}[1]{%
\renewcommand{\py@release}{\releasename\space\version}% \renewcommand{\py@release}{\releasename\space\version}%
\renewcommand{\version}{#1}} \renewcommand{\version}{#1}}
\newcommand{\setshortversion}[1]{%
\renewcommand{\shortversion}{#1}}
% Allow specification of the author's address separately from the % Allow specification of the author's address separately from the
% author's name. This can be used to format them differently, which % author's name. This can be used to format them differently, which
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment