From 92350b3a1f7446e561305bfaa101efeb08286bcc Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 9 Oct 2001 18:01:23 +0000 Subject: New markup: \note{...} and \warning{...} --- Doc/doc/doc.tex | 17 +++++++++++++++++ Doc/perl/python.perl | 10 ++++++++++ Doc/texinputs/python.sty | 3 +++ Doc/tools/sgmlconv/conversion.xml | 6 ++++++ 4 files changed, 36 insertions(+) diff --git a/Doc/doc/doc.tex b/Doc/doc/doc.tex index 85eb3f3..00a465f 100644 --- a/Doc/doc/doc.tex +++ b/Doc/doc/doc.tex @@ -859,6 +859,14 @@ This \UNIX\ is also followed by a space. The name of a Usenet newsgroup. \end{macrodesc} + \begin{macrodesc}{note}{\p{text}} + An especially important bit of information about an API that a + user should be aware of when using whatever bit of API the + note pertains to. This should be the last thing in the + paragraph as the end of the note is not visually marked in + any way. + \end{macrodesc} + \begin{macrodesc}{pep}{\p{number}} A reference to a Python Enhancement Proposal. This generates appropriate index entries. The text \samp{PEP \var{number}} is @@ -989,6 +997,15 @@ This \UNIX\ is also followed by a space. explanation makes sense and may vary as needed. \end{macrodesc} + \begin{macrodesc}{warning}{\p{text}} + An important bit of information about an API that a user should + be very aware of when using whatever bit of API the warning + pertains to. This should be the last thing in the paragraph as + the end of the warning is not visually marked in any way. This + differs from \macro{note} in that it is recommended over + \macro{note} for information regarding security. + \end{macrodesc} + \subsection{Module-specific Markup \label{module-markup}} diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 13e7aac..10dcdd0 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -236,6 +236,16 @@ sub do_cmd_textbf{ return use_wrappers(@_[0], '', ''); } sub do_cmd_textit{ return use_wrappers(@_[0], '', ''); } +sub do_cmd_note{ + return use_wrappers( + @_[0], + "Note:\n", + ''); } +sub do_cmd_warning{ + return use_wrappers( + @_[0], + "Warning:\n", + ''); } sub do_cmd_moreargs{ return '...' . @_[0]; } diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 9fa56cd..0244466 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -881,6 +881,9 @@ \end{center} } +\newcommand{\note}[1]{\strong{Note:} #1} +\newcommand{\warning}[1]{\strong{Warning:} #1} + % Deprecation stuff. % Should be extended to allow an index / list of deprecated stuff. But % there's a lot of stuff that needs to be done to make that automatable. diff --git a/Doc/tools/sgmlconv/conversion.xml b/Doc/tools/sgmlconv/conversion.xml index 1944b1f..248c9c1 100644 --- a/Doc/tools/sgmlconv/conversion.xml +++ b/Doc/tools/sgmlconv/conversion.xml @@ -55,6 +55,12 @@ + + + + + +