Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0f6d12

Browse files
committed
add \guilabel macro to mark labels that occur in user interfaces
1 parent 226f697 commit f0f6d12

4 files changed

Lines changed: 24 additions & 4 deletions

File tree

Doc/doc/doc.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,16 @@ \subsection{Graphical Interface Components \label{gui-markup}}
16541654
The components of graphical interfaces will be assigned markup, but
16551655
most of the specifics have not been determined.
16561656

1657+
\begin{macrodesc}{guilabel}{\p{label}}
1658+
Labels presented as part of an interactive user interface should
1659+
be marked using \macro{guilabel}. This includes labels from
1660+
text-based interfaces such as those created using \code{curses} or
1661+
other text-based libraries. Any label used in the interface
1662+
should be marked with this macro, including button labels, window
1663+
titles, field names, menu and menu selection names, and even
1664+
values in selection lists.
1665+
\end{macrodesc}
1666+
16571667
\begin{macrodesc}{menuselection}{\p{menupath}}
16581668
Menu selections should be marked using a combination of
16591669
\macro{menuselection} and \macro{sub}. This macro is used to mark
@@ -1673,6 +1683,10 @@ \subsection{Graphical Interface Components \label{gui-markup}}
16731683
such as the ellipsis some operating systems use to indicate that
16741684
the command opens a dialog, the indicator should be omitted from
16751685
the selection name.
1686+
1687+
Individual selection names within the \macro{menuselection} should
1688+
not be marked using \macro{guilabel} since that's implied by using
1689+
\macro{menuselection}.
16761690
\end{macrodesc}
16771691

16781692
\begin{macrodesc}{sub}{}

Doc/html/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ div.note .label { margin-right: 0.5em;
123123
.newsgroup { font-family: avantgarde, sans-serif; }
124124
.url { font-family: avantgarde, sans-serif; }
125125
.file { font-family: avantgarde, sans-serif; }
126-
.menuselection { font-family: avantgarde, sans-serif; }
126+
.guilabel { font-family: avantgarde, sans-serif; }
127127

128128
.tableheader { background-color: #99ccff;
129129
font-family: avantgarde, sans-serif; }

Doc/perl/python.perl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ sub do_cmd_let{
9595
sub do_cmd_textunderscore{ '_' . $_[0]; }
9696
sub do_cmd_infinity{ '∞' . $_[0]; }
9797
sub do_cmd_plusminus{ '±' . $_[0]; }
98+
sub do_cmd_guilabel{
99+
return use_wrappers($_[0]. '<span class="guilabel">', '</span>'); }
98100
sub do_cmd_menuselection{
99-
return use_wrappers($_[0], '<span class="menuselection">', '</span>'); }
100-
sub do_cmd_sub{ ' > ' . $_[0]; }
101+
return use_wrappers($_[0], '<span class="guilabel">', '</span>'); }
102+
sub do_cmd_sub{
103+
return '</span> &gt; <span class="guilabel">' . $_[0]; }
101104

102105

103106
# words typeset in a special way (not in HTML though)

Doc/texinputs/python.sty

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,11 @@
821821
\newcommand{\NULL}{\constant{NULL}}
822822
\newcommand{\infinity}{\ensuremath{\infty}}
823823
\newcommand{\plusminus}{\ensuremath{\pm}}
824+
825+
% \guilabel{Start}
826+
\newcommand{\guilabel}[1]{\textsf{#1}}
824827
% \menuselection{Start \sub Programs \sub Python}
825-
\newcommand{\menuselection}[1]{\textsf{\def\sub{ \ensuremath{>} }#1}}
828+
\newcommand{\menuselection}[1]{\guilabel{{\def\sub{ \ensuremath{>} }#1}}}
826829

827830
% Also for consistency: spell Python "Python", not "python"!
828831

0 commit comments

Comments
 (0)