texinfo-commits
[Top][All Lists]
Advanced

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

texinfo NEWS doc/texinfo.tex doc/texinfo.txi do...


From: Karl Berry
Subject: texinfo NEWS doc/texinfo.tex doc/texinfo.txi do...
Date: Mon, 26 Dec 2011 01:19:15 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Karl Berry <karl>       11/12/26 01:19:15

Modified files:
        .              : NEWS 
        doc            : texinfo.tex texinfo.txi 
        doc/refcard    : txirefcard.tex 

Log message:
        @inlinefmt and @inlineraw

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/NEWS?cvsroot=texinfo&r1=1.206&r2=1.207
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/texinfo.tex?cvsroot=texinfo&r1=1.356&r2=1.357
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/texinfo.txi?cvsroot=texinfo&r1=1.402&r2=1.403
http://cvs.savannah.gnu.org/viewcvs/texinfo/doc/refcard/txirefcard.tex?cvsroot=texinfo&r1=1.20&r2=1.21

Patches:
Index: NEWS
===================================================================
RCS file: /sources/texinfo/texinfo/NEWS,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -b -r1.206 -r1.207
--- NEWS        23 Dec 2011 17:14:43 -0000      1.206
+++ NEWS        26 Dec 2011 01:19:14 -0000      1.207
@@ -1,4 +1,4 @@
-$Id: NEWS,v 1.206 2011/12/23 17:14:43 karl Exp $
+$Id: NEWS,v 1.207 2011/12/26 01:19:14 karl Exp $
 This NEWS file records noteworthy changes, very tersely.
 See the manual for detailed information.
 
@@ -24,6 +24,7 @@
 -------------------------------------------------------------------------------
 
 * Language:
+  . new commands @inlinefmt and @inlineraw for brace-delimited conditionals.
   . new command @part for a group of chapters.
   . new environments @raggedright and @smallquotation.
   . new commands @codequoteundirected and @codequotebacktick,

Index: doc/texinfo.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.356
retrieving revision 1.357
diff -u -b -r1.356 -r1.357
--- doc/texinfo.tex     25 Dec 2011 01:06:56 -0000      1.356
+++ doc/texinfo.tex     26 Dec 2011 01:19:14 -0000      1.357
@@ -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{2011-12-24.11}
+\def\texinfoversion{2011-12-25.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2836,20 +2836,48 @@
   }
 }
 
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+% 
+\def\outfmtnametex{tex}
+%
+\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\def\doinlinefmt#1,#2,\finish{%
+  \def\inlinefmtname{#1}%
+  \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely.  Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored.  But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too.  We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+% 
+\def\inlineraw{\tex \doinlineraw}
+\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+  \def\inlinerawname{#1}%
+  \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+  \endgroup % close group opened by \tex.
+}
+
 
 \message{glyphs,}
 % and logos.
 
-% @@ prints an @.
+% @@ prints an @, as does @atchar{}.
 address@hidden }
+\let\atchar=\@
 
-% Used to generate quoted braces.  Unless we're in typewriter, use
-% \ecfont because the CM text fonts do not have braces, and we don't
-% want to switch into math.
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
 \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
 \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
 \begingroup
   % Definitions to produce \{ and \} commands for indices,
   % and @{ and @} for the aux/toc files.
@@ -9781,14 +9809,15 @@
 
 % In texinfo, backslash is an active character; it prints the backslash
 % in fixed width font.
-\catcode`\\=\active
address@hidden@address@hidden@backslashcurfont}}
+\catcode`\\=\active  % @ for escape char from now on.
address@hidden@address@hidden @backslashcurfont}}
address@hidden@backslashchar = @normalbackslash % @backslashchar{} is for user 
documents.
+
 % On startup, @fixbackslash assigns:
 %  @let \ = @normalbackslash
-
 % \rawbackslash defines an active \ to do \backslashcurfont.
 % \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other.  We switch back and forth between these.
 @address@hidden@address@hidden
 @address@hidden@address@hidden
 

Index: doc/texinfo.txi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -b -r1.402 -r1.403
--- doc/texinfo.txi     23 Dec 2011 17:14:44 -0000      1.402
+++ doc/texinfo.txi     26 Dec 2011 01:19:14 -0000      1.403
@@ -1,5 +1,5 @@
 \input texinfo.tex    @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.402 2011/12/23 17:14:44 karl Exp $
address@hidden $Id: texinfo.txi,v 1.403 2011/12/26 01:19:14 karl Exp $
 @c Ordinarily, Texinfo files have the extension .texi.  But texinfo.texi
 @c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
 
@@ -550,6 +550,7 @@
 * Conditional Commands::        Text for a given format.
 * Conditional Not Commands::    Text for any format other than a given one.
 * Raw Formatter Commands::      Using raw formatter commands.
+* Inline Conditional Commands:: Brace-delimited conditional text.
 * set clear value::             Variable tests and substitutions.
 * Conditional Nesting::         Using conditionals inside conditionals.
 
@@ -917,7 +918,7 @@
 @cindex DVI output
 @pindex dvips
 @pindex xdvi
-(Generated via @command{texi2dvi}.)  This DeVice Independent binary
+(Generated via @command{texi2dvi}.)  This DeVIce Independent binary
 format is output by the @TeX{} typesetting program
 (@uref{http://tug.org}).  This is then read by a DVI `driver', which
 writes the actual device-specific commands that can be viewed or
@@ -5041,7 +5042,7 @@
 the `Next', `Previous', and `Up' nodes.  The HTML also uses the
 @code{accesskey} attribute with the values @samp{n}, @samp{p}, and
 @samp{u} respectively.  This allows people using web browsers to
-follow the nagivation using (typically) @address@hidden, e.g.,
+follow the navigation using (typically) @address@hidden, e.g.,
 @kbd{M-n} for the `Next' node, from anywhere within the node.
 
 You may insert spaces before each name on the @code{@@node} line if
@@ -13392,12 +13393,12 @@
 Commands specific to an output format (Info, @TeX{}, HTML, @dots{}).
 
 @item
-Commands specific to any output format @emph{other} than a given
-one (not Info, not @TeX{}, @dots{}).
+Commands specific to any output format @emph{excluding} a given
+one (e.g., not Info, not @TeX{}, @dots{}).
 
 @item
 `Raw' formatter text for any output format, passed straight
-through with no interpretation of @@-commands.
+through with (almost) no interpretation of @@-commands.
 
 @item
 Format-independent variable substitutions, and testing if a variable
@@ -13409,6 +13410,7 @@
 * Conditional Commands::        Text for a given format.
 * Conditional Not Commands::    Text for any format other than a given one.
 * Raw Formatter Commands::      Using raw formatter commands.
+* Inline Conditional Commands:: Brace-delimited conditional text.
 * set clear value::             Variable tests and substitutions.
 * Conditional Nesting::         Using conditionals inside conditionals.
 @end menu
@@ -13570,7 +13572,7 @@
 Ordinarily, the @code{@@address@hidden conditionals just described must be
 used only with normal Texinfo source.  However, for historical reasons
 there is an exception for @code{@@iftex}---you can embed a few raw
address@hidden commands, just chaning @samp{\} to @samp{@@}.  For example, in
address@hidden commands, just changing @samp{\} to @samp{@@}.  For example, in
 the @code{@@titlepage} section of a Texinfo file, you can use the
 @TeX{} command @code{@@vskip} to format the copyright page.  (The
 @code{@@titlepage} command causes Info to ignore the region
@@ -13657,6 +13659,50 @@
 recognized.
 
 
address@hidden Inline Conditional Commands
address@hidden Inline Conditional Commands: @code{@@inline}, @code{@@inlineraw}
address@hidden inlinefmt
address@hidden inlineraw
address@hidden Inline conditional commands
address@hidden Conditional commands, inline
address@hidden Brace-delimited conditional text
address@hidden Newlines, avoiding in conditionals
address@hidden Whitespace, controlling in conditionals
+
+Texinfo provides two conditional commands with arguments given within
+braces:
+
address@hidden @code
address@hidden @@address@hidden@var{format}, @address@hidden
+Process the Texinfo @var{text} if @var{format} output is being
+generated.
+
address@hidden @@address@hidden@var{format}, @address@hidden
+Similar, but for raw @var{text} (@pxref{Raw Formatter Commands}).
address@hidden table
+
+For example,
+
address@hidden
+@@address@hidden, @@address@hidden address@hidden@}
address@hidden example
+
address@hidden is nearly equivalent to
+
address@hidden
+@@ifhtml
+@@address@hidden address@hidden
+@@end ifhtml
address@hidden example
+
address@hidden except that no whitespace is added, as happens in the latter
+(environment) case.
+
+In these commands, whitespace is ignored after the comma separating
+the two arguments, as usual, but is @emph{not} ignored at the end of
address@hidden
+
+
 @node set clear value
 @section @code{@@set}, @code{@@clear}, and @code{@@value}
 
@@ -17125,7 +17171,7 @@
 to the name of the program launched, with a trailing @samp{.pl} removed.
 
 @item PROGRAM_NAME_IN_FOOTER
-For address@hidden  If set, output the program name and miscellanous related
+For address@hidden  If set, output the program name and miscellaneous related
 information in the page footers.
 
 @item RENAMED_NODES_FILE
@@ -20017,6 +20063,11 @@
 Make a cross reference to an Info file for which there is no printed
 manual.  @xref{inforef,, Cross references using @code{@@inforef}}.
 
address@hidden @@address@hidden@var{fmt}, @address@hidden
address@hidden @@address@hidden@var{fmt}, @address@hidden
+Insert (raw) @var{text} only if the output format is @var{fmt}.
address@hidden Conditional Commands}.
+
 @item \input @var{macro-definitions-file}
 Use the specified macro definitions file.  This command is used only
 in the first line of a Texinfo file to cause @TeX{} to make use of the
@@ -21208,7 +21259,7 @@
 (@url{http://www.gnu.org/software/rcs}) version control systems, which
 expand it into a string such as:
 @example
-$Id: texinfo.txi,v 1.402 2011/12/23 17:14:44 karl Exp $
+$Id: texinfo.txi,v 1.403 2011/12/26 01:19:14 karl Exp $
 @end example
 (This is useful in all sources that use version control, not just manuals.)
 You may wish to include the @samp{$Id:} comment in the @code{@@copying}
@@ -21279,7 +21330,7 @@
 
 @verbatim
 \input texinfo   @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.402 2011/12/23 17:14:44 karl Exp $
address@hidden $Id: texinfo.txi,v 1.403 2011/12/26 01:19:14 karl Exp $
 @comment %**start of header
 @setfilename sample.info
 @include version.texi

Index: doc/refcard/txirefcard.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/refcard/txirefcard.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- doc/refcard/txirefcard.tex  23 Dec 2011 17:14:44 -0000      1.20
+++ doc/refcard/txirefcard.tex  26 Dec 2011 01:19:15 -0000      1.21
@@ -1,5 +1,5 @@
 % Texinfo reference card.
-% $Id: txirefcard.tex,v 1.20 2011/12/23 17:14:44 karl Exp $
+% $Id: txirefcard.tex,v 1.21 2011/12/26 01:19:15 karl Exp $
 %
 %**start of header
 % This file can be printed with 1, 2, or 3 columns per page (see below).
@@ -804,40 +804,42 @@
 \section{Conditionally (in)visible text}
 
 address@hidden a comment in Texinfo. The rest of the line is not visible in 
any output.}
address@hidden for address@hidden  \code{DEL} also starts a comment.}
address@hidden text that will not appear in any output. Pair with 
address@hidden ignore}.}
address@hidden for address@hidden  \code{DEL} also starts a comrment.}
address@hidden@end ignore}}{Text that will not appear in any output.}
 
 \subsection{Output formats}
 
address@hidden text to appear only in Docbook output. Pair with address@hidden 
ifdocbook}.}
address@hidden text to appear only in HTML output. Pair with address@hidden 
ifhtml}.}
address@hidden text to appear in both Info and (for historical compatibility) 
plain text output. Pair with address@hidden ifinfo}.}
address@hidden text to appear only in plain text output. Pair with 
address@hidden ifplaintext}.}
address@hidden text to appear only in the \TeX\ output. Pair with 
address@hidden iftex}.}
address@hidden text that will appear only in the XML output. Pair with \tt @end 
ifxml.}
address@hidden @ifnothtml @ifnotplaintext @ifnottex @ifnotxml}{}{Begin text to 
be ignored in one output format but not the others: address@hidden text is 
omitted from HTML output, etc.  Pair with the corresponding address@hidden 
ifnot\var{format}}.}
address@hidden the other address@hidden commands, but omit from plain text 
output as well as Info. Pair with address@hidden ifnotinfo}.}
address@hidden@end ifdocbook}}{Texinfo text to appear only in Docbook output.}
address@hidden@end ifhtml}}{Text to appear only in \acro{HTML} output.}
address@hidden@end ifinfo}}{Text to appear in both Info and (for historical 
compatibility) plain text output.}
address@hidden@end ifplaintext}}{Text to appear only in plain text output.}
address@hidden@end iftex}}{Text to appear only in the \TeX\ output.}
address@hidden@end ifxml}}{Text to appear only in \acro{XML} output.}
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.}
 
 \subsection{Raw formatter text}
 
address@hidden Docbook completely. Pair with address@hidden docbook}.}
address@hidden \acro{HTML} completely. Pair with address@hidden html}.}
address@hidden \TeX\  completely (e.g., \bschar\ becomes an escape character). 
Pair with address@hidden tex}.}
address@hidden \acro{XML} completely. Pair with address@hidden xml}.}
address@hidden@end docbook}}{Enter Docbook completely.}
address@hidden@end html}}{Enter \acro{HTML} completely.}
address@hidden@end tex}}{Enter \TeX\  completely (e.g., \bschar\ becomes an 
escape character).}
address@hidden@end xml}}{Enter \acro{XML} completely.}
address@hidden, text}}{Include raw \var{text} only in \var{format} output.}
 
 \subsection{Document variables}
 
 address@hidden \rmbrack[string]}{Define the Texinfo variable \var{name}, 
optionally to the value \var{string}.}
 address@hidden the Texinfo variable \var{name}.}
 address@hidden the value of the Texinfo variable \var{name}.}
address@hidden the Texinfo variable \var{name} is set, format the following 
text.  Pair with address@hidden ifset}.}
address@hidden the Texinfo variable \var{name} is not set, format the following 
text.  Pair with address@hidden ifclear}.}
address@hidden address@hidden ifset}}{If the Texinfo variable \var{name} is 
set, format the enclosed text.}
address@hidden address@hidden ifclear}}{If the Texinfo variable \var{name} is 
not set, format the enclosed text.}
 
 
 \section{Defining new Texinfo commands}
 
 address@hidden the command address@hidden a synonym for the existing command 
address@hidden
address@hidden \ttbraced{\var{params}}}{Define a new Texinfo command  
address@hidden  Pair with address@hidden macro}.}
address@hidden \ttbraced{\var{params}} address@hidden macro}}{Define a new 
Texinfo command address@hidden
 address@hidden address@hidden if it is defined.}
 address@hidden,} before\code{,} after}{Can only be used within address@hidden; 
create a new command that encloses its argument in the \var{before} and 
\var{after} strings.}
 



reply via email to

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