diff options
-rw-r--r-- | Doc/doc/doc.tex | 28 | ||||
-rw-r--r-- | Doc/texinputs/python.sty | 3 |
2 files changed, 29 insertions, 2 deletions
diff --git a/Doc/doc/doc.tex b/Doc/doc/doc.tex index 12beaa9..f67ba37 100644 --- a/Doc/doc/doc.tex +++ b/Doc/doc/doc.tex @@ -236,6 +236,18 @@ distribution, to create or maintain whole documents or sections. macros. This section contains the reference material for these 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}} \begin{macrodesc}{sectionauthor}{\p{author}\p{email}} @@ -567,6 +579,17 @@ distribution, to create or maintain whole documents or sections. acceptable. \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}} Strongly emphasized text; this will be presented using a bold font. @@ -588,8 +611,9 @@ distribution, to create or maintain whole documents or sections. \end{macrodesc} \begin{macrodesc}{version}{} - The version number for the documentation, as specified using - \macro{release} in the preamble. + The version number of the described software, as specified using + \macro{release} in the preamble. See also the + \macro{shortversion} macro. \end{macrodesc} \begin{macrodesc}{versionadded}{\p{version}} diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index fe5db27..feea3ef 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -975,10 +975,13 @@ % \newcommand{\py@release}{} \newcommand{\version}{} +\newcommand{\shortversion}{} \newcommand{\releasename}{Release} \newcommand{\release}[1]{% \renewcommand{\py@release}{\releasename\space\version}% \renewcommand{\version}{#1}} +\newcommand{\setshortversion}[1]{% + \renewcommand{\shortversion}{#1}} % Allow specification of the author's address separately from the % author's name. This can be used to format them differently, which |