Hi,
@ifset/@ifclear works differently than other conditionnals.
Indeed the following lead to an error about @end unmatched:
@iftex
@iftex
@end iftex
@end iftex
whereas
@ifset my_var1
@ifset my_var2
@end ifset
@end ifset
don't trigger an error. It's understandable, however as it should be possible
to set my_var1 and still have valid texinfo. This difference is documented,
not in the brief description, but in the ifset ifclear @node:
When a FLAG is set, the Texinfo formatting commands format
text between subsequent pairs of [EMAIL PROTECTED] FLAG' and [EMAIL
PROTECTED] ifset'
commands.
I think the important word is pair here. I think it should be stated a bit
more precisely, ,in the summary and with an example. So I did a patch for
texinfo.txi, that I attached. Don't take it too seriously, if you have other
ideas they are likely to be better, but I think a precision is in order.
--
Pat
Index: texinfo.txi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.147
diff -u -3 -p -w -u -r1.147 texinfo.txi
--- texinfo.txi 6 Jul 2005 00:34:16 -0000 1.147
+++ texinfo.txi 17 Aug 2005 20:24:45 -0000
@@ -12935,6 +12935,9 @@ is ignored. If @var{flag} is clear, tex
@code{@@end ifclear} command is formatted.
@end table
+When nesting @code{@@ifclear} and/or @code{@@ifset}, the text is formatted
+or ignored until the @code{@@end} at the same nesting level.
+
@menu
* set value:: Expand a flag variable to a string.
* ifset ifclear:: Format a region if a flag is set.
@@ -13097,6 +13100,18 @@ command looks like this:
@@ifclear @var{flag}
@end example
+When nesting @code{@@ifclear} and/or @code{@@ifset} the nesting is
+taken into account when ignoring some text. For example the following
+code is valid, and if @code{a_flag} is unset the text is ignored up
+to the second @code{@@end ifset} and not up to the first.
+
[EMAIL PROTECTED]
+@@ifset a_flag
+@@ifset another_flag
+This text is output if both flags are set.
+@@end ifset
+@@end ifset
[EMAIL PROTECTED] example
@node value Example
@subsection @code{@@value} Example
_______________________________________________
Texinfo home page: http://www.gnu.org/software/texinfo/
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-texinfo