[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Sun, 10 Apr 2022 08:08:05 -0400 (EDT) |
branch: master
commit 1fd9d6baaf929c79ecf2210a443991760c0f3900
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Apr 10 13:02:54 2022 +0100
* doc/texinfo.texi (Conditional Commands, Conditional Not Commands)
(Raw Formatter Commands, Inline Conditionals):
Document conditionals for LaTeX.
(Raw Formatter Commands): Revise node. Remove duplicate @ifhtml etc.
index entries.
---
ChangeLog | 8 +++++++
doc/texinfo.texi | 71 ++++++++++++++++++++++++++++----------------------------
2 files changed, 43 insertions(+), 36 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e61dbdddfe..4445a63b49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-04-10 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * doc/texinfo.texi (Conditional Commands, Conditional Not Commands)
+ (Raw Formatter Commands, Inline Conditionals):
+ Document conditionals for LaTeX.
+ (Raw Formatter Commands): Revise node. Remove duplicate @ifhtml etc.
+ index entries.
+
2022-04-10 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.tex (@iflatex, @ifnotlatex, @latex): Implement.
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 9ecadbb42e..3e5eb9a4c6 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -12541,6 +12541,7 @@ output.
@findex ifdocbook
@findex ifhtml
+@findex iflatex
@findex ifplaintext
@findex iftex
@findex ifxml
@@ -12553,6 +12554,9 @@ Text to appear only in the DocBook output.
@item @@ifhtml @dots{} @@end ifhtml
Text to appear only in the HTML output.
+@item @@iflatex @dots{} @@end iflatex
+Text to appear only in the @LaTeX{} output.
+
@item @@ifplaintext @dots{} @@end ifplaintext
Text to appear only in the plain text output.
@@ -12584,6 +12588,9 @@ However, this text will appear only in Info and plain
text.
@@ifhtml
And this text will only appear in HTML.
@@end ifhtml
+@@iflatex
+Moreover, this text will only appear in @@LaTeX@{@}.
+@@end iflatex
@@ifplaintext
Whereas this text will only appear in plain text.
@@end ifplaintext
@@ -12607,6 +12614,9 @@ However, this text will appear only in Info and plain
text.
@ifhtml
And this text will only appear in HTML.
@end ifhtml
+@iflatex
+Morever, this text will only appear in @LaTeX{}.
+@end iflatex
@ifplaintext
Whereas this text will only appear in plain text.
@end ifplaintext
@@ -12639,6 +12649,7 @@ numbers which @code{@@errormsg} emits in @TeX{}.
@findex ifnotdocbook
@findex ifnothtml
@findex ifnotinfo
+@findex ifnotlatex
@findex ifnotplaintext
@findex ifnottex
@findex ifnotxml
@@ -12650,6 +12661,7 @@ than a given one with the @code{@@ifnot@dots{}}
environments:
@@ifnotdocbook @dots{} @@end ifnotdocbook
@@ifnothtml @dots{} @@end ifnothtml
@@ifnotinfo @dots{} @@end ifnotinfo
+@@ifnotlatex @dots{} @@end ifnotlatex
@@ifnotplaintext @dots{} @@end ifnotplaintext
@@ifnottex @dots{} @@end ifnottex
@@ifnotxml @dots{} @@end ifnotxml
@@ -12743,21 +12755,31 @@ $$ \chi^2 = \sum_{i=1}^N
@end tex
@cindex HTML, including raw
-@findex ifhtml
@findex html
-Analogously, you can use @code{@@ifhtml @dots{} @@end ifhtml} to
-delimit Texinfo source to be included in HTML output only, and
-@code{@@html @dots{} @@end html} for a region of raw HTML.
-
+@cindex @LaTeX{}, including raw
+@findex latex
@cindex XML, including raw
-@findex ifxml
@findex xml
-Likewise, you can use @code{@@ifxml @dots{} @@end ifxml} to delimit
-Texinfo source to be included in XML output only, and @code{@@xml
-@dots{} @@end xml} for a region of raw XML@. Regions of raw text in
-other formats will also be present in the XML output, but with
-protection of XML characters and within corresponding elements. For
-example, the raw HTML text:
+Analogously, you can use @code{@@html @dots{} @@end html} for a region of
+raw HTML, @code{@@docbook @dots{} @@end docbook} for a
+region of raw DocBook, @code{@@latex @dots{} @@end latex} for a
+region of raw @LaTeX{}, and @code{@@xml @dots{} @@end xml} for a
+region of raw XML@.
+
+The behavior of newlines in raw regions is unspecified.
+
+In all cases, in raw processing, @code{@@} retains the same meaning as
+in the remainder of the document. Thus, the Texinfo processors must
+recognize and even execute, to some extent, the contents of the raw
+regions, regardless of the final output format. Therefore, specifying
+changes that globally affect the document inside a raw region leads to
+unpredictable and generally undesirable behavior. For example, using
+the @code{@@kbdinputstyle} command inside a raw region is undefined.
+The remedy is simple: don't do that.
+
+The XML output will contain any regions of raw text in other formats,
+but with protection of XML characters and within corresponding
+elements. For example, the raw HTML text:
@example
@group
@@ -12778,29 +12800,6 @@ will be included in the XML output as:
@end group
@end example
-@cindex DocBook, including raw
-@findex ifdocbook
-@findex docbook
-Again likewise, you can use @code{@@ifdocbook @dots{} @@end ifdocbook}
-to delimit Texinfo source to be included in DocBook output only, and
-@code{@@docbook @dots{} @@end docbook} for a region of raw DocBook.
-
-The behavior of newlines in raw regions is unspecified.
-
-In all cases, in raw processing, @code{@@} retains the same meaning as
-in the remainder of the document. Thus, the Texinfo processors must
-recognize and even execute, to some extent, the contents of the raw
-regions, regardless of the final output format. Therefore, specifying
-changes that globally affect the document inside a raw region leads to
-unpredictable and generally undesirable behavior. For example, using
-the @code{@@kbdinputstyle} command inside a raw region is undefined.
-
-The remedy is simple: don't do that. Use the raw formatter commands
-for their intended purpose, of providing material directly in the
-underlying format. When you simply want to give different Texinfo
-specifications for different output formats, use the
-@code{@@if@dots{}} conditionals and stay in Texinfo syntax.
-
@node Inline Conditionals
@@ -12833,7 +12832,7 @@ Similar, but for raw @var{text} (@pxref{Raw Formatter
Commands}).
The supported @var{format} names are:
@example
-docbook html info plaintext tex xml
+docbook html info latex plaintext tex xml
@end example
For example,