[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5900] allow @heading-series commands (but not other sectioning cmds) in
From: |
karl |
Subject: |
[5900] allow @heading-series commands (but not other sectioning cmds) inside environments |
Date: |
Wed, 29 Oct 2014 17:41:52 +0000 |
Revision: 5900
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5900
Author: karl
Date: 2014-10-29 17:41:51 +0000 (Wed, 29 Oct 2014)
Log Message:
-----------
allow @heading-series commands (but not other sectioning cmds) inside
environments
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/texinfo.tex
trunk/doc/texinfo.texi
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-10-29 14:05:05 UTC (rev 5899)
+++ trunk/ChangeLog 2014-10-29 17:41:51 UTC (rev 5900)
@@ -1,3 +1,16 @@
+2014-10-29 Karl Berry <address@hidden>
+
+ * doc/texinfo.tex (\chapmacro): \checkenv, since chapters
+ should presumably not appear inside environments.
+ (\sectionheading): allow @heading-series commands, but not others,
+ to appear inside environments. Report from Mahlon Smith,
+ 25 Aug 2014 09:42:16; original change made following
+ https://savannah.gnu.org/bugs/?15514.
+ * doc/texinfo.texi (@t{@@unnumberedsec @@appendixsec @@heading})
+ <@@heading>: @heading-series cannot appear literally "anywhere",
+ though they can appear inside most environments, unlike the
+ normal sectioning commands.
+
2014-10-29 Gavin Smith <address@hidden>
* info/session.c (gc_file_buffers_and_nodes): Keep on checking
Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex 2014-10-29 14:05:05 UTC (rev 5899)
+++ trunk/doc/texinfo.tex 2014-10-29 17:41:51 UTC (rev 5900)
@@ -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-05-20.16}
+\def\texinfoversion{2014-10-29.10}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5739,13 +5739,16 @@
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
+% Not used for @heading series.
%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
+\def\Yappendixkeyword{Yappendix}
\def\Yomitfromtockeyword{Yomitfromtoc}
-\def\Yappendixkeyword{Yappendix}
%
\def\chapmacro#1#2#3{%
+ \checkenv{}% chapters, etc., should not start inside an environment.
+ %
% Insert the first mark before the heading break (see notes for \domark).
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
@@ -5891,22 +5894,28 @@
% Print any size, any type, section title.
%
-% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
-% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
-% section number.
+% #1 is the text of the title,
+% #2 is the section level (sec/subsec/subsubsec),
+% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
+% #4 is the section number.
%
\def\seckeyword{sec}
%
\def\sectionheading#1#2#3#4{%
{%
- \checkenv{}% should not be in an environment.
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
%
+ % It is ok for the @heading series commands to appear inside an
+ % environment (it's been historically allowed, though the logic is
+ % dubious), but not the others.
+ \ifx\temptype\Yomitfromtockeyword\else
+ \checkenv{}% address@hidden should not be in an environment.
+ \fi
+ %
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
- \def\sectionlevel{#2}%
- \def\temptype{#3}%
- %
% Insert first mark before the heading break (see notes for \domark).
\let\prevsectiondefs=\lastsectiondefs
\ifx\temptype\Ynothingkeyword
Modified: trunk/doc/texinfo.texi
===================================================================
--- trunk/doc/texinfo.texi 2014-10-29 14:05:05 UTC (rev 5899)
+++ trunk/doc/texinfo.texi 2014-10-29 17:41:51 UTC (rev 5900)
@@ -4670,8 +4670,13 @@
command is used only within appendices.
@item @@heading
-You may use the @code{@@heading} command anywhere you wish for a
+You may use the @code{@@heading} command (almost) anywhere for a
section-style heading that will not appear in the table of contents.
+The @code{@@heading}-series commands can appear inside most
+environments, for example, though pathological and useless locations
+such as inside @code{@@titlepage}, as an argument to another command,
+etc., are not allowed.
+
@end table
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5900] allow @heading-series commands (but not other sectioning cmds) inside environments,
karl <=