]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add \guilabel macro to mark labels that occur in user interfaces
authorFred Drake <fdrake@acm.org>
Fri, 23 Jan 2004 08:52:28 +0000 (08:52 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 23 Jan 2004 08:52:28 +0000 (08:52 +0000)
Doc/doc/doc.tex
Doc/html/style.css
Doc/perl/python.perl
Doc/texinputs/python.sty

index aacce2f6ea58299d47ec00c4a440772ec2de56e3..de6390a7a1e32b5cbd3480752e82b442ad2345d9 100644 (file)
@@ -1654,6 +1654,16 @@ This \UNIX\ is also followed by a space.
   The components of graphical interfaces will be assigned markup, but
   most of the specifics have not been determined.
 
+  \begin{macrodesc}{guilabel}{\p{label}}
+    Labels presented as part of an interactive user interface should
+    be marked using \macro{guilabel}.  This includes labels from
+    text-based interfaces such as those created using \code{curses} or
+    other text-based libraries.  Any label used in the interface
+    should be marked with this macro, including button labels, window
+    titles, field names, menu and menu selection names, and even
+    values in selection lists.
+  \end{macrodesc}
+
   \begin{macrodesc}{menuselection}{\p{menupath}}
     Menu selections should be marked using a combination of
     \macro{menuselection} and \macro{sub}.  This macro is used to mark
@@ -1673,6 +1683,10 @@ This \UNIX\ is also followed by a space.
     such as the ellipsis some operating systems use to indicate that
     the command opens a dialog, the indicator should be omitted from
     the selection name.
+
+    Individual selection names within the \macro{menuselection} should
+    not be marked using \macro{guilabel} since that's implied by using
+    \macro{menuselection}.
   \end{macrodesc}
 
   \begin{macrodesc}{sub}{}
index f585744702052502ca0dcb23375d3e00fac1b7cd..33a1380259f016a5c0fba66ee72d907d84cbd77f 100644 (file)
@@ -123,7 +123,7 @@ div.note .label         { margin-right: 0.5em;
 .newsgroup              { font-family: avantgarde, sans-serif; }
 .url                    { font-family: avantgarde, sans-serif; }
 .file                   { font-family: avantgarde, sans-serif; }
-.menuselection          { font-family: avantgarde, sans-serif; }
+.guilabel               { font-family: avantgarde, sans-serif; }
 
 .tableheader            { background-color: #99ccff;
                           font-family: avantgarde, sans-serif; }
index 89e12d58285c24309fe0974ccfee505d422bc59d..d5d000f664918564286b755015afef6e13d04cdf 100644 (file)
@@ -95,9 +95,12 @@ sub do_cmd_textless{ '&lt;' . $_[0]; }
 sub do_cmd_textunderscore{ '_' . $_[0]; }
 sub do_cmd_infinity{ '&infin;' . $_[0]; }
 sub do_cmd_plusminus{ '&plusmn;' . $_[0]; }
+sub do_cmd_guilabel{
+    return use_wrappers($_[0]. '<span class="guilabel">', '</span>'); }
 sub do_cmd_menuselection{
-    return use_wrappers($_[0], '<span class="menuselection">', '</span>'); }
-sub do_cmd_sub{ ' > ' . $_[0]; }
+    return use_wrappers($_[0], '<span class="guilabel">', '</span>'); }
+sub do_cmd_sub{
+    return '</span> &gt; <span class="guilabel">' . $_[0]; }
 
 
 # words typeset in a special way (not in HTML though)
index ff37ad9b3325287123b16dc7c64a10e92f82efd4..0e69587ec8ffa8824dc2566516a1fcb155c74fe5 100644 (file)
 \newcommand{\NULL}{\constant{NULL}}
 \newcommand{\infinity}{\ensuremath{\infty}}
 \newcommand{\plusminus}{\ensuremath{\pm}}
+
+% \guilabel{Start}
+\newcommand{\guilabel}[1]{\textsf{#1}}
 % \menuselection{Start \sub Programs \sub Python}
-\newcommand{\menuselection}[1]{\textsf{\def\sub{ \ensuremath{>} }#1}}
+\newcommand{\menuselection}[1]{\guilabel{{\def\sub{ \ensuremath{>} }#1}}}
 
 % Also for consistency: spell Python "Python", not "python"!