[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert),
From: |
Patrice Dumas |
Subject: |
branch master updated: * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert), doc/texinfo.texi (@code{@@definfoenclose}): in DocBook, replace definfoenclose defined @-command by its argument as-is (as in LaTeX). This is consistent with DocBook formatting in general, which matches better with printed output. |
Date: |
Sun, 24 Jul 2022 13:37:14 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new a47d19f474 * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert),
doc/texinfo.texi (@code{@@definfoenclose}): in DocBook, replace definfoenclose
defined @-command by its argument as-is (as in LaTeX). This is consistent with
DocBook formatting in general, which matches better with printed output.
a47d19f474 is described below
commit a47d19f4748a0d829e068b57404eb82df2d65b40
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jul 24 19:36:57 2022 +0200
* NEWS, tp/Texinfo/Convert/DocBook.pm (_convert),
doc/texinfo.texi (@code{@@definfoenclose}): in DocBook,
replace definfoenclose defined @-command by its argument
as-is (as in LaTeX). This is consistent with DocBook formatting
in general, which matches better with printed output.
---
ChangeLog | 8 ++++++++
NEWS | 2 ++
doc/texinfo.texi | 17 ++++++++++-------
tp/Texinfo/Convert/DocBook.pm | 16 +---------------
tp/t/08misc_commands.t | 1 +
tp/t/results/misc_commands/definfoenclose.pl | 20 +++++++++++++++++---
6 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 56af8bd90f..23af39be3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-07-24 Patrice Dumas <pertusus@free.fr>
+
+ * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert),
+ doc/texinfo.texi (@code{@@definfoenclose}): in DocBook,
+ replace definfoenclose defined @-command by its argument
+ as-is (as in LaTeX). This is consistent with DocBook formatting
+ in general, which matches better with printed output.
+
2022-07-24 Patrice Dumas <pertusus@free.fr>
Avoid Texinfo processor name when not needed, prefere texi2any
diff --git a/NEWS b/NEWS
index 4d769f2df0..77eca7c394 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,8 @@ See the manual for detailed information.
. do not output Top node nor text before the first @node or sectioning
@-command. NO_TOP_NODE_OUTPUT can be set to false to output Top node
for now.
+ . replace @definfocenlose defined @-commands by the argument as-is
+ to be more consistent with printed output.
. HTML/DocBook output:
. meaning of USE_NUMERIC_ENTITY changed to be using numeric entities in
priority. former effect is now always on.
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index c6556ec29d..676900ea25 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -14015,7 +14015,7 @@ letters.
@findex definfoenclose
An @code{@@definfoenclose} command may be used to define a
-highlighting command for all the non-printed output formats. A command
+highlighting command for online output formats. A command
defined using @code{@@definfoenclose} marks text by enclosing it in
strings that precede and follow the text.
@@ -14048,9 +14048,9 @@ For example, you can write:
@noindent
near the beginning of a Texinfo file to define @code{@@phoo} as an Info
-formatting command that inserts `//' before and `\\' after the argument
-to @code{@@phoo}. You can then write @code{@@phoo@{bar@}} wherever you
-want `//bar\\' highlighted in Info.
+and HTML formatting command that inserts `//' before and `\\' after the
+argument to @code{@@phoo}. You can then write @code{@@phoo@{bar@}}
+wherever you want `//bar\\' highlighted in Info and HTML.
For @TeX{} formatting, you could write
@@ -14065,12 +14065,15 @@ to define @code{@@phoo} as a command that causes
@TeX{} to typeset the
argument to @code{@@phoo} in italics.
Each definition applies to its own formatter: one for @TeX{}, the
-other for everything else. The @TeX{} definitions need to be in
+other for online formats. The @TeX{} definitions need to be in
@samp{@@iftex}. @code{@@definfoenclose} command need not be within
@samp{@@ifinfo} unless you want to use different definitions for
-different output formats.
+different online output formats. @code{@@definfoenclose} defined
+commands have no effect in DocBook and @LaTeX{} output, their
+argument is output as-is. An @code{@@alias} could also be used
+for these formats.
-@samp{@@definfoenclose} definitions must not be recursive, directly or
+@code{@@definfoenclose} definitions must not be recursive, directly or
indirectly.
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index c51df5def8..920a6dbad3 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -969,22 +969,8 @@ sub _convert($$;$)
} elsif ($element->{'type'}
and $element->{'type'} eq 'definfoenclose_command') {
- my $in_monospace_not_normal;
- if (defined($default_args_code_style{$element->{'cmdname'}})
- and $default_args_code_style{$element->{'cmdname'}}->[0]) {
- $in_monospace_not_normal = 1;
- } elsif ($regular_font_style_commands{$element->{'cmdname'}}) {
- $in_monospace_not_normal = 0;
- }
- push @{$self->{'document_context'}->[-1]->{'monospace'}},
- $in_monospace_not_normal
- if (defined($in_monospace_not_normal));
my $arg = $self->_convert($element->{'args'}->[0]);
- $result .= $self->xml_protect_text($element->{'extra'}->{'begin'}).$arg
- .$self->xml_protect_text($element->{'extra'}->{'end'});
- pop @{$self->{'document_context'}->[-1]->{'monospace'}}
- if (defined($in_monospace_not_normal));
-
+ $result .= $arg;
} elsif ($element->{'args'}
and
exists($Texinfo::Common::brace_commands{$element->{'cmdname'}})) {
diff --git a/tp/t/08misc_commands.t b/tp/t/08misc_commands.t
index 3339597a39..5440c5391d 100644
--- a/tp/t/08misc_commands.t
+++ b/tp/t/08misc_commands.t
@@ -569,6 +569,7 @@ my %latex_tests = (
'noindent_indent' => 1,
'kbdinputstyle' => 1,
'kbdinputstyle_in_table' => 1,
+ 'definfoenclose' => 1,
);
foreach my $test (@converted_test_cases) {
diff --git a/tp/t/results/misc_commands/definfoenclose.pl
b/tp/t/results/misc_commands/definfoenclose.pl
index f0069345e4..45e2a4ebbe 100644
--- a/tp/t/results/misc_commands/definfoenclose.pl
+++ b/tp/t/results/misc_commands/definfoenclose.pl
@@ -464,15 +464,29 @@ $result_converted{'html_text'}->{'definfoenclose'} = '
$result_converted{'docbook'}->{'definfoenclose'} = '
<para>definfoenclose phoo,//,\\ </para>
-<para>//bar\\
+<para>bar
</para>
<para>definfoenclose phi,:,: </para>
-<para>:bar:
+<para>bar
</para>
<para><emphasis role="bold">very strong</emphasis>
</para>
-<para>(strong: is it really strong? :)
+<para> is it really strong?
</para>';
+
+$result_converted{'latex'}->{'definfoenclose'} = '
+definfoenclose phoo,//,\\textbackslash{}
+bar
+
+definfoenclose phi,:,:
+bar
+
+\\textbf{very strong}
+
+
+\\textbf{ is it really strong? }
+';
+
1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert), doc/texinfo.texi (@code{@@definfoenclose}): in DocBook, replace definfoenclose defined @-command by its argument as-is (as in LaTeX). This is consistent with DocBook formatting in general, which matches better with printed output.,
Patrice Dumas <=