texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5945] documentation and TeX implementation of new commands @sub and @su


From: karl
Subject: [5945] documentation and TeX implementation of new commands @sub and @sup
Date: Wed, 03 Dec 2014 00:38:33 +0000

Revision: 5945
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5945
Author:   karl
Date:     2014-12-03 00:38:31 +0000 (Wed, 03 Dec 2014)
Log Message:
-----------
documentation and TeX implementation of new commands @sub and @sup

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/NEWS
    trunk/doc/refcard/txirefcard-a4.pdf
    trunk/doc/refcard/txirefcard.pdf
    trunk/doc/refcard/txirefcard.tex
    trunk/doc/texinfo.tex
    trunk/doc/texinfo.texi

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-11-27 18:33:36 UTC (rev 5944)
+++ trunk/ChangeLog     2014-12-03 00:38:31 UTC (rev 5945)
@@ -1,3 +1,18 @@
+2014-11-28  Karl Berry  <address@hidden>
+
+       * doc/texinfo.tex (\sub, \sup, \mathopsup): new commands @sub and @sup.
+       (\ptexsp, \ptexsup): save and restore in \tex.
+       (\finishsub, \finishsup): helper macros.
+       * NEWS,
+       * doc/refcard/txirefcard.tex,
+       * doc/texinfo.texi (Inserting Subscripts and Superscripts),
+       (HTML Xref Command Expansion),
+       (Command Summary): document them.
+       (Inserting Math): \mathopsup exception for plain TeX's \sup.
+       
+       * doc/txirefcard.tex: alphabetize some of the command lists,
+       when other orderings aren't preferable.
+
 2014-11-27  Karl Berry  <address@hidden>
 
        * doc/texinfo.texi (Comments): must not be followed by -.

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS  2014-11-27 18:33:36 UTC (rev 5944)
+++ trunk/NEWS  2014-12-03 00:38:31 UTC (rev 5945)
@@ -12,7 +12,7 @@
 
 *** NEWS FOR ALL AUTHORS OF TEXINFO MANUALS ***
 
-As of version 4.2, Texinfo has a new command @copying to define the
+As of version 4.2, Texinfo has a command @copying to define the
 copyright and copying permissions for a manual.  If you haven't already,
 please switch to using it in your next release, because the historical
 method of doing copyright permissions using @ifinfo failed to output
@@ -23,6 +23,9 @@
 
 -------------------------------------------------------------------------------
 
+* Language:
+  . new commands @sub and @sup, for textual subscripts and superscripts.
+
 * texinfo.tex:
   . @url/@uref output now the same in PDF as in DVI, showing the url
     even if the second argument is given, not just as link target.

Modified: trunk/doc/refcard/txirefcard-a4.pdf
===================================================================
(Binary files differ)

Modified: trunk/doc/refcard/txirefcard.pdf
===================================================================
(Binary files differ)

Modified: trunk/doc/refcard/txirefcard.tex
===================================================================
--- trunk/doc/refcard/txirefcard.tex    2014-11-27 18:33:36 UTC (rev 5944)
+++ trunk/doc/refcard/txirefcard.tex    2014-12-03 00:38:31 UTC (rev 5945)
@@ -533,37 +533,39 @@
 
 \subsection{Markup for regular text}
 
address@hidden a general abbreviation, such as `Comput.'}
address@hidden an acronym written in all capital letters, such as 
`\acro{NASA}'.}
address@hidden the introductory or defining use of a technical term.}
 address@hidden \var{text}, by using italics where possible, and enclosing in 
asterisks in Info.}
 address@hidden \var{text} even more strongly, by using bold where possible; 
still enclosed in asterisks in Info.}
address@hidden \var{text} as a subscript.}
address@hidden \var{text} as a superscript.}
 address@hidden a meta variable (a name that stands for another piece of text).}
address@hidden the introductory or defining use of a technical term.}
address@hidden an acronym written in all capital letters, such as 
`\acro{NASA}'.}
address@hidden a general abbreviation, such as `Comput.'}
 
 \subsection{Markup for literal text}
 
 address@hidden an expression, a syntactically complete token, or a program 
name. Unquoted in Info output.}
address@hidden the name of a file, buffer, node, directory, etc.}
 address@hidden a system command name, such as \code{ls}.}
address@hidden, \rmbrack[displayed-text]}}{Indicate an email address.}
 address@hidden an environment variable name, such as \code{PATH}.}
address@hidden a command-line option, such as \code{-v} and \code{--help}.}
address@hidden the name of a file, buffer, node, directory, etc.}
address@hidden a uniform resource locator, but without creating any hyperlink.}
 address@hidden characters of input to be typed by users.}
 address@hidden the name of a key on a keyboard.}
address@hidden, \rmbrack[displayed-text]}}{Indicate an email address.}
address@hidden a uniform resource locator, but without creating any hyperlink.}
address@hidden a command-line option, such as \code{-v} and \code{--help}.}
 address@hidden a sequence of literal characters, in general. Quoted in Info 
output.}
 address@hidden literal-text delimchar}}{Output \var{literal-text}, delimited 
by the single character \var{delimchar}, exactly as is, including any 
whitespace or Texinfo special characters. Example: address@hidden|@ 
@\rbracechar|}}.}
 
 \subsection{GUI sequences}
 
address@hidden a right arrow glyph, $\rightarrow$.}
 address@hidden address@hidden \var{action} \dots}}{Represent a sequence of 
\acro{GUI} actions or clicks.}
 address@hidden a single `click' in a address@hidden
 address@hidden@}cmd}{Execute address@hidden for each address@hidden; default 
is address@hidden Empty braces usually following address@hidden are omitted 
here.}
address@hidden a right arrow glyph, $\rightarrow$.}
 
 \subsection{Math}
 
address@hidden the given math (inline); \bschar{} becomes an escape character, 
and all \TeX\ math is available.}
address@hidden the given math (inline); \bschar{} becomes an escape character, 
and all plain \TeX\ math is available.}
 address@hidden a minus sign, `$-$'.}
 address@hidden address@hidden, insert a math backslash, $\backslash$.}
 address@hidden a greater-than-or-equal sign, $\geq$.}
@@ -571,12 +573,12 @@
 
 \subsection{Explicit font selection}
 
address@hidden \var{text} in a bold font.}
address@hidden \var{text} in an italic font.}
address@hidden \var{text} in the regular roman font.}
address@hidden \var{text} in a sans serif font if possible.}
 address@hidden \var{text} in a small caps font in printed output, and 
uppercase in Info.  No other font command has any effect in Info.}
address@hidden \var{text} in the regular roman font.}
address@hidden \var{text} in an italic font.}
 address@hidden \var{text} in a slanted (oblique) font if possible.}
address@hidden \var{text} in a bold font.}
address@hidden \var{text} in a sans serif font if possible.}
 address@hidden \var{text} in a fixed-width, typewriter-like font.}
 
 
@@ -586,10 +588,10 @@
 its own and continue through the following lines of input until the
 corresponding address@hidden \var{envname}} is seen.
 
address@hidden a block of text by drawing a box with rounded corners around it. 
Pair with address@hidden cartouche}. No effect in Info.}
address@hidden \var{line-of-text} without any indentation.}
address@hidden normal paragraph indentation.}
 address@hidden the normal indentation when starting a new paragraph; often 
used after environments.}
address@hidden normal paragraph indentation.}
address@hidden \var{line-of-text} without any indentation.}
address@hidden a block of text by drawing a box with rounded corners around it. 
Pair with address@hidden cartouche}. No effect in Info.}
 
 \subsection{Normally-filled displays using regular text fonts}
 
@@ -607,10 +609,10 @@
 
 In these environments, each line of input is a line of output.
 
address@hidden displayed text: do not fill, but indent text on left; retain 
normal text font. Pair with address@hidden display}.}
address@hidden address@hidden, but select a smaller (text) font where possible. 
 Pair with address@hidden smalldisplay}.}
 address@hidden formatted text: do not fill, retain normal margins and normal 
text font.  Pair with address@hidden format}.}
 address@hidden address@hidden, but select a smaller (text) font where 
possible.  Pair with address@hidden smallformat}.}
address@hidden displayed text: do not fill, but indent text on left; retain 
normal text font. Pair with address@hidden display}.}
address@hidden address@hidden, but select a smaller (text) font where possible. 
 Pair with address@hidden smalldisplay}.}
 address@hidden justify lines, leaving the right end ragged: do not fill text, 
retain normal margins and normal text font. Pair with address@hidden 
flushleft}.}
 address@hidden justify lines, leaving the left end ragged: do not fill text, 
retain normal margins and normal text font. Pair with address@hidden 
flushright}.}
 
@@ -658,12 +660,12 @@
 
 address@hidden entry to the index of concepts.}
 address@hidden entry to the index of functions.}
address@hidden entry to the index of variables.}
 address@hidden entry to the index of keys.}
 address@hidden entry to the index of programs.}
 address@hidden entry to the index of data types.}
address@hidden entry to the index of variables.}
address@hidden a new index and its indexing command. Format entries as regular 
text.}
 address@hidden a new index and its indexing command (namely, address@hidden). 
Format entries in this index with address@hidden
address@hidden a new index and its indexing command. Format entries as regular 
text.}
 address@hidden to-index}{Merge the contents of \var{from-index} into 
\code{to-index}, formatting the entries in \var{from-index} with address@hidden
 address@hidden to-index}{Merge the contents of \var{from-index} into 
\var{to-index}; no special formatting.}
 address@hidden an alphabetized index (using two columns in a printed manual).}
@@ -728,18 +730,18 @@
 
 \subsection{Other text characters and logos}
 
address@hidden the \LaTeX\ logo.}
address@hidden the \TeX\ logo.}
 address@hidden a large round dot, $\bullet$ (\samp{*} in Info).}
address@hidden the copyright symbol, \copyright.}
 address@hidden an ellipsis, `\dots'.}
 address@hidden an end-of-sentence ellipsis, `\dots' (more following space in 
\TeX.)}
 address@hidden the Euro currency sign, \euro.}
address@hidden @guillemetright\ttbraced{} @guillemotleft\ttbraced{} 
@guillemotright @guilsinglleft\ttbraced{} @guilsinglright\ttbraced{} 
@quotedblbase\ttbraced{} @quotedblleft @quotedblright\ttbraced{} 
@quoteleft\ttbraced{} @quoteright\ttbraced{} 
@quotesinglbase\ttbraced{}}{}{Insert various quotation marks: \guillemetleft\ 
\guillemetright\ \guillemotleft\ \guillemotright\ \guilsinglleft\ 
\guilsinglright\ \quotedblbase\ \quotedblleft\ \quotedblright\ \quoteleft\ 
\quoteright\ \quotesinglbase.}
 address@hidden the pounds sterling currency sign, {\it\$}.}
address@hidden the registered symbol, \registeredsymbol.}
 address@hidden the degree symbol, \raise.8ex\hbox{$\circ$}.}
address@hidden the copyright symbol, \copyright.}
address@hidden the registered symbol, \registeredsymbol.}
address@hidden the \TeX\ logo.}
address@hidden the \LaTeX\ logo.}
 address@hidden the current date, in `1 Jan 2000' style.}
address@hidden @guillemetright\ttbraced{} @guillemotleft\ttbraced{} 
@guillemotright @guilsinglleft\ttbraced{} @guilsinglright\ttbraced{} 
@quotedblbase\ttbraced{} @quotedblleft @quotedblright\ttbraced{} 
@quoteleft\ttbraced{} @quoteright\ttbraced{} 
@quotesinglbase\ttbraced{}}{}{Insert various quotation marks: \guillemetleft\ 
\guillemetright\ \guillemotleft\ \guillemotright\ \guilsinglleft\ 
\guilsinglright\ \quotedblbase\ \quotedblleft\ \quotedblright\ \quoteleft\ 
\quoteright\ \quotesinglbase.}
 
 \subsection{Glyphs for code examples}
 
@@ -763,10 +765,10 @@
 
 \subsection{Vertical space}
 
address@hidden@end group}}{In \TeX\ output, disallow page breaks in enclosed 
text; ignored otherwise.}
address@hidden a new page in a printed manual if fewer than \var{mils} 
thousandths of an inch remain on the current page. Ignored in other formats.}
address@hidden a new page in a printed manual. Ignored in other formats.}
 address@hidden \var{n} blank lines.}
address@hidden a new page in a printed manual. Ignored in other formats.}
address@hidden a new page in a printed manual if fewer than \var{mils} 
thousandths of an inch remain on the current page. Ignored in other formats.}
address@hidden@end group}}{In \TeX\ output, disallow page breaks in enclosed 
text; ignored otherwise.}
 address@hidden a printed manual, insert whitespace \var{amount}.  Ignored in 
other formats.}
 
 
@@ -800,23 +802,23 @@
 address@hidden data-type name}{Like address@hidden, but for typed entities.}
 address@hidden name}{Like address@hidden, but for typed entities; equivalent 
to address@hidden Variable \dots}.}
 
-\subsection{Types}
+\subsection{Type definitions}
 
 address@hidden name attributes}{Format a description for a data type.  Its 
arguments are the \var{category}, the \var{name} of the type (e.g., 
\samp{int}), and then the \var{attributes} of objects of that type.}
 
 \subsection{Object-oriented entities, untyped}
 
address@hidden class name arguments}{Format a description for an operation in 
object-oriented programming.   Its arguments are the \var{category} of the 
variable, the \var{class} to which it belongs, its \var{name}, and any 
\var{arguments}.}
address@hidden name arguments}{Format a description for method \var{name}; 
equivalent to address@hidden \ttbraced{Method on} \dots}.}
 address@hidden class name}{Format a description for a variable associated with 
a class in object-oriented programming.}
 address@hidden name}{Format a description for an instance variable \var{name} 
in object-oriented programming; equivalent to  address@hidden 
\ttbraced{Instance Variable of} \dots}.}
address@hidden name arguments}{Format a description for method \var{name}; 
equivalent to address@hidden \ttbraced{Method on} \dots}.}
address@hidden class name arguments}{Format a description for an operation in 
object-oriented programming.   Its arguments are the \var{category} of the 
variable, the \var{class} to which it belongs, its \var{name}, and any 
\var{arguments}.}
 
 \subsection{Object-oriented entities, typed}
 
address@hidden class data-type name arguments}{Format a description for a typed 
operation in object-oriented programming.}
address@hidden data-type name arguments}{Format a description for a typed 
method in object-oriented programming; equivalent to address@hidden 
\ttbraced{Method on} \dots}.}
 address@hidden class datatype name}{Like address@hidden, but for typed class 
variables.}
 address@hidden data-type name}{Like address@hidden, but for typed instance 
variables.}
address@hidden data-type name arguments}{Format a description for a typed 
method in object-oriented programming; equivalent to address@hidden 
\ttbraced{Method on} \dots}.}
address@hidden class data-type name arguments}{Format a description for a typed 
operation in object-oriented programming.}
 
 
 \section{Conditionally (in)visible text}
@@ -836,7 +838,7 @@
 address@hidden @ifnothtml @ifnotplaintext @ifnottex @address@hidden 
ifnot\var{format}}}{Begin text to be ignored in one output format but no 
others: address@hidden text is omitted from \acro{HTML} output, etc.}
 address@hidden@end ifnotinfo}}{Like the other address@hidden commands, but 
omit from plain text output as well as Info.}
 address@hidden, text}}{Include Texinfo \var{text} only in \var{format} output.}
address@hidden, then-text, else-text}}{Include either \var{then-text} or 
\var{else-text} according to whether \var{format} is being output.}
address@hidden, then-text, else-text}}{Include either \var{then-text} or 
\var{else-text} according to whether \var{format} is output.}
 
 \subsection{Raw formatter text}
 

Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex       2014-11-27 18:33:36 UTC (rev 5944)
+++ trunk/doc/texinfo.tex       2014-12-03 00:38:31 UTC (rev 5945)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2014-11-14.07}
+\def\texinfoversion{2014-12-02.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -96,7 +96,9 @@
 \let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
+\let\ptexsp=\sp
 \let\ptexstar=\*
+\let\ptexsup=\sup
 \let\ptext=\t
 \let\ptextop=\top
 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
@@ -2081,12 +2083,9 @@
  \endgroup
 }
 
-
 % In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families.  Since
-% texinfo doesn't allow for producing subscripts and superscripts except
-% in the main text, we don't bother to reset \scriptfont and
-% \scriptscriptfont (which would also require loading a lot more fonts).
+% we have to define the \textfont of the standard families.  We don't
+% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
 %
 \def\resetmathfonts{%
   \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
@@ -2100,8 +2099,8 @@
 % \tenSTYLE to set the current font.
 %
 % Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used in
-% the LaTeX logo and acronyms.
+% and \lllsize (three sizes lower).  These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
 %
 % This all needs generalizing, badly.
 %
@@ -2842,6 +2841,8 @@
   \let\v=\check
   \let\~=\tilde
   \let\dotaccent=\dot
+  % have to provide another name for sup operator
+  \let\mathopsup=\sup
   $\finishmath
 }
 \def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
@@ -2865,6 +2866,18 @@
   }
 }
 
+% for @sub and @sup, if in math mode, just do a normal sub/superscript.
+% If in text, use math to place as sub/superscript, but switch
+% into text mode, with smaller fonts.  This is a different font than the
+% one used for real math sub/superscripts (8pt vs. 7pt), but let's not
+% fix it (significant additions to font machinery) until someone notices.
+%
+\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
+\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}%
+%
+\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
+\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}%
+
 % ctrl is no longer a Texinfo command, but leave this definition for fun.
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
@@ -6335,6 +6348,7 @@
   % other math active characters (just in case), to plain's definitions.
   \mathactive
   %
+  % Inverse of the list at the beginning of the file.
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6350,7 +6364,9 @@
   \let\+=\tabalign
   \let\}=\ptexrbrace
   \let\/=\ptexslash
+  \let\sp=\ptexsp
   \let\*=\ptexstar
+  %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
   \let\t=\ptext
   \expandafter \let\csname top\endcsname=\ptextop  % we've made it outer
   \let\frenchspacing=\plainfrenchspacing

Modified: trunk/doc/texinfo.texi
===================================================================
--- trunk/doc/texinfo.texi      2014-11-27 18:33:36 UTC (rev 5944)
+++ trunk/doc/texinfo.texi      2014-12-03 00:38:31 UTC (rev 5945)
@@ -439,6 +439,7 @@
 * Inserting Space::             Inserting the right amount of whitespace.
 * Inserting Accents::           Inserting accents and special characters.
 * Inserting Quotation Marks::   Inserting quotation marks.
+* Inserting Subscripts and Superscripts:: Inserting sub/superscripts.
 * Inserting Math::              Formatting mathematical expressions.
 * Glyphs for Text::             Inserting Dots, bullets, currencies, etc.
 * Glyphs for Programming::      Indicating results of evaluation,
@@ -10800,8 +10801,9 @@
 * Inserting Space::             Inserting the right amount of whitespace.
 * Inserting Accents::           Inserting accents and special characters.
 * Inserting Quotation Marks::   Inserting quotation marks.
+* Inserting Subscripts and Superscripts:: Inserting sub/superscripts.
 * Inserting Math::              Formatting mathematical expressions.
-* Glyphs for Text::             Inserting Dots, bullets, currencies, etc.
+* Glyphs for Text::             Inserting dots, bullets, currencies, etc.
 * Glyphs for Programming::      Indicating results of evaluation,
                                  expansion of macros, errors, etc.
 @end menu
@@ -11593,6 +11595,55 @@
 @end example
 
 
address@hidden Inserting Subscripts and Superscripts
address@hidden @code{@@sub} and @code{@@sup}: Inserting Subscripts and 
Superscripts
+
address@hidden sub
address@hidden sup
address@hidden Subscripts and superscripts, text
+
+You can insert subscripts and superscripts, in either text or math,
+with the @code{@@sub} and @code{@@sup} commands.  (For other
+mathematical expressions, see the next section.)  For example, here is
+a purely textual subscript and superscript:
+
address@hidden
+here@@address@hidden@}@@address@hidden@}
address@hidden example
+
address@hidden produces:
+
address@hidden
address@hidden@sup{above}
address@hidden display
+
address@hidden Math italic font
+Inside @code{@@math}, @code{@@sub} and @code{@@sup} produce
+mathematical subscripts and superscripts.  This uses a different font
+in the @TeX{} output (math italic instead of text italic); it makes no
+difference in the other output formats.  Here's an example:
+
address@hidden
+@@address@hidden@@address@hidden@address@hidden
address@hidden example
+
address@hidden produces:
+
address@hidden
address@hidden@sup{x}}
address@hidden display
+
+In Info and plain text, regardless of being used inside @code{@@math},
address@hidden@@address@hidden@address@hidden is output as 
@address@hidden@address@hidden and
address@hidden@@address@hidden@address@hidden as 
@address@hidden@address@hidden, including the
+literal braces (to mark the beginning and end of the ``script'' text
+to the reader).
+
+When the output format (and display program) permit (@TeX{} math,
+HTML), the superscript is set above the subscript when both commands
+are given consecutively.
+
+
 @node Inserting Math
 @section @code{@@math}: Inserting Mathematical Expressions
 
@@ -11605,14 +11656,14 @@
 command.  Write the mathematical expression between braces, like this:
 
 @example
-@@address@hidden(a + b)(a + b) = a^2 + 2ab + address@hidden
+@@address@hidden(a + b) = (b + a)@}
 @end example
 
 @iftex
 @noindent This produces the following in @TeX{}:
 
 @display
address@hidden(a + b)(a + b) = a^2 + 2ab + b^2}
address@hidden(a + b) = (b + a)}
 @end display
 
 @noindent and the following in other formats:
@@ -11622,30 +11673,40 @@
 @end ifnottex
 
 @example
-(a + b)(a + b) = a^2 + 2ab + b^2
+(a + b) = (b + a)
 @end example
 
address@hidden MathML, not used
 The @code{@@math} command has no special effect on the Info and HTML
-output.  @command{makeinfo} expands any @@-commands as usual,
-but it does not try to produce good mathematical formatting in any
-way.
+output.  @command{makeinfo} expands any @@-commands as usual, but it
+does not try to use produce good mathematical formatting in any way
+(no use of MathML, etc.).  The HTML output is enclosed by
address@hidden<em>...</em>}, but nothing more.
 
address@hidden \mathopsup
 However, as far as the @TeX{} output is concerned, plain @TeX{}
 mathematical commands are allowed in @code{@@math}, starting with
address@hidden, and the plain @TeX{} math characters like @samp{^} and
address@hidden are also recognized.  In essence, @code{@@math} drops you
-into plain @TeX{} math mode.
address@hidden  In essence, @code{@@math} switches into plain @TeX{} math
+mode.  (Exception: the plain @TeX{} command @code{\sup}, which
+typesets the mathematical operator name `sup', must be accessed as
address@hidden, due to the conflict with Texinfo's @code{@@sup}
+command.)
 
-This allows you to conveniently write superscripts and subscripts (as
-in the above example), and also to use all the plain @TeX{} math
-control sequences for symbols, functions, and so on, and thus get
-proper formatting in the @TeX{} output, at least.
+This allows you to use all the plain @TeX{} math control sequences for
+symbols, functions, and so on, and thus get proper formatting in the
address@hidden output, at least.
 
+The @code{@@sub} and @code{@@sup} commands described in the previous
+section produce subscripts and superscripts in HTML output as well as
address@hidden; the plain @TeX{} characters @code{_} and @code{^} for
+subscripts and superscripts are recognized by @TeX{} inside
address@hidden@@math}, but do nothing special in HTML or other output formats.
+
 It's best to use @samp{\} instead of @samp{@@} for any such
 mathematical commands; otherwise, @command{makeinfo} will complain.
-On the other hand, @command{makeinfo} allows input with matching (but
-unescaped) braces, such as @address@hidden@}}, although it complains
-about such bare braces in regular input.
+On the other hand, @command{makeinfo} does allow input with matching
+(but unescaped) braces, such as @address@hidden@}}; it complains about
+such bare braces in regular input.
 
 Here's an example:
 
@@ -11659,7 +11720,7 @@
 @math{\sin 2\pi \equiv \cos 3\pi}
 @end display
 
address@hidden and
address@hidden but
 @end iftex
 @noindent which looks like the input in Info and HTML:
 @example
@@ -20122,7 +20183,7 @@
 @result{} A-node-_002d_002d_002d-with-_005f_0027_0025
 @end example
 
-Notice in particular:
+Example translations of common characters:
 
 @itemize @bullet
 @item @samp{_} @result{} @samp{_005f}
@@ -20157,7 +20218,8 @@
 @example
 @@asis @@b @@cite @@code @@command @@dfn @@dmn @@dotless
 @@emph @@env @@file @@i @@indicateurl @@kbd @@key
-@@samp @@sansserif @@sc @@slanted @@strong @@t @@var @@verb @@w
+@@samp @@sansserif @@sc @@slanted @@strong @@sub @@sup
+@@t @@var @@verb @@w
 @end example
 
 @noindent For @code{@@sc}, any letters are capitalized.
@@ -21574,6 +21636,9 @@
 @strong{boldface} where possible; enclosed in asterisks in Info.
 @xref{emph & strong, , Emphasizing Text}.
 
address@hidden @@sub @address@hidden@}
+Set @var{text} as a subscript.  @xref{Inserting Subscripts and Superscripts}.
+
 @item @@subheading @var{title}
 Print an unnumbered subsection-like heading, but omit from the table
 of contents of a printed manual.  In Info, the title is underlined
@@ -21605,6 +21670,9 @@
 Print a short table of contents.  Synonym for @code{@@shortcontents}.
 @xref{Contents, , Generating a Table of Contents}.
 
address@hidden @@sup @address@hidden@}
+Set @var{text} as a superscript.  @xref{Inserting Subscripts and Superscripts}.
+
 @item @@syncodeindex @var{from-index} @var{to-index}
 Merge the index named in the first argument into the index named in
 the second argument, formatting the entries from the first index with




reply via email to

[Prev in Thread] Current Thread [Next in Thread]