[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/Paragraph.pm t/...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/Paragraph.pm t/... |
Date: |
Sat, 28 Jul 2012 22:39:41 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 12/07/28 22:39:41
Modified files:
tp : TODO
tp/Texinfo/Convert: Paragraph.pm
tp/t : plaintext_tests.t
tp/t/results/coverage_braces: verb_in_xref.pl
Added files:
tp/t/results/plaintext_tests: multiline_verb_after_space.pl
Log message:
Multiline directly output in para (happens rarely, in @verb only?) adds
the space before the word now.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.281&r2=1.282
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Paragraph.pm?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/plaintext_tests.t?cvsroot=texinfo&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/verb_in_xref.pl?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/multiline_verb_after_space.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.281
retrieving revision 1.282
diff -u -b -r1.281 -r1.282
--- TODO 24 Jul 2012 23:42:45 -0000 1.281
+++ TODO 28 Jul 2012 22:39:40 -0000 1.282
@@ -41,6 +41,7 @@
@example
@heading A heading
@end example
+Example in heading/heading_in_example.
Image on sectioning command line haven't their length ignored correctly.
Not sure it is a big deal. An example in sectioning/at_commands_in_refs.
@@ -53,9 +54,6 @@
warn nested footnotes.
-coverage_braces/verb_in_xref there should certainly be an error
-message, and the *Note is stuck with the following word.
-
converters_tests/things_before_setfilename there is no error
for anchor and footnote before setfilename. It is not completly
clear that there should be, though.
@@ -145,61 +143,6 @@
DocBook
=======
-Instead of synopsis it might seem to be relevant to use specialized synopsis,
-funcsynopsis/funcprototype for deftype* and some def*, and other for object
-oriented. There are many issues such that this possibility do not appear
-appealing at all.
-
-1) there is no possibility to have a category. So the category must be
- added somewhere as a role= or in the *synopsisinfo, or this should only
- be used for specialized @def, like @defun.
-
-2) @defmethod and @deftypemethod cannot really be mapped to methodsynopsis
- as the class name is not associated with the method as in Texinfo, but
- instead the method should be in a class in docbook.
-
-3) From the docbook reference for funcsynopsis
- "For the most part, the processing application is expected to
- generate all of the parentheses, semicolons, commas, and so on
- required in the rendered synopsis. The exception to this rule is
- that the spacing and other punctuation inside a parameter that is a
- pointer to a function must be provided in the source markup."
-
- So this mean it is language specific (C, as said in the docbook doc)
- and one have to remove the parentheses, semicolons, commas.
-
- See also the mails from Per Bothner bug-texinfo, Sun, 22 Jul 2012 01:45:54.
-
-specialized @def, without a need for category:
address@hidden and @deftypefun
-<funcsynopsis><funcprototype><funcdef>TYPE
<function>NAME</function><paramdef><parameter>args</parameter></paramdef></funcprototype></funcsynopsis>
-
-specialized @def, without a need for category, but without DocBook synopsis
-because of missing class:
address@hidden, @deftypemethod: methodsynopsis cannot be used since the class
-is not available
address@hidden and @deftypeivar: fieldsynopsis cannot be used since the class
-is not available
-
-Generic @def with a need for a category
-For deffn deftypefn (and defmac?, defspec?), the possibilities of
-funcsynopsis, with a category added could be used:
- <funcsynopsis><funcprototype><funcdef role=...>TYPE
<function>NAME</function></funcdef><paramdef>PARAMTYPE
<parameter>PARAM</parameter></paramdef></funcprototype></funcsynopsis>
-
-Alternatively, use funcsynopsisinfo for the category.
-
-Generic @def with a need for a category, but without DocBook synopsis because
-of missing class:
address@hidden and @deftypeop: methodsynopsis cannot be used since the class
-is not available
-defcv, deftypecv: fieldsynopsis cannot be used since the class
-is not available
-
-Remaining @def without DocBook synopsis because there is no equivalent,
-and requires a category
-defvr (defvar, defopt), deftypevr (deftypevar)
-deftp
-
deftypevr, deftypecv: use type and not returnvalue for the type
also informalfigure in @float
@@ -211,7 +154,7 @@
what about @titlefont in docbook?
maybe use simpara instead of para. Indeed, simpara is for paragraph without
- block elent within, and it should be that way in generated output.
+ block element within, and it should be that way in generated output.
put <title> in <articleinfo>?
@@ -300,13 +243,74 @@
tests .init file not relevant since indices cannot be split anymore
indices/index_test.init
+Use of specialized synopsis in DocBook is not a priority and it is not even
+obvious that it is interesting to do so. The following notes explain the
+possibilities and issues extensively.
+
+Instead of synopsis it might seem to be relevant to use specialized synopsis,
+funcsynopsis/funcprototype for deftype* and some def*, and other for object
+oriented. There are many issues such that this possibility do not appear
+appealing at all.
+
+1) there is no possibility to have a category. So the category must be
+ added somewhere as a role= or in the *synopsisinfo, or this should only
+ be used for specialized @def, like @defun.
+
+2) @defmethod and @deftypemethod cannot really be mapped to methodsynopsis
+ as the class name is not associated with the method as in Texinfo, but
+ instead the method should be in a class in docbook.
+
+3) From the docbook reference for funcsynopsis
+ "For the most part, the processing application is expected to
+ generate all of the parentheses, semicolons, commas, and so on
+ required in the rendered synopsis. The exception to this rule is
+ that the spacing and other punctuation inside a parameter that is a
+ pointer to a function must be provided in the source markup."
+
+ So this mean it is language specific (C, as said in the docbook doc)
+ and one have to remove the parentheses, semicolons, commas.
+
+ See also the mails from Per Bothner bug-texinfo, Sun, 22 Jul 2012 01:45:54.
+
+specialized @def, without a need for category:
address@hidden and @deftypefun
+<funcsynopsis><funcprototype><funcdef>TYPE
<function>NAME</function><paramdef><parameter>args</parameter></paramdef></funcprototype></funcsynopsis>
+
+specialized @def, without a need for category, but without DocBook synopsis
+because of missing class:
address@hidden, @deftypemethod: methodsynopsis cannot be used since the class
+is not available
address@hidden and @deftypeivar: fieldsynopsis cannot be used since the class
+is not available
+
+Generic @def with a need for a category
+For deffn deftypefn (and defmac?, defspec?), the possibilities of
+funcsynopsis, with a category added could be used:
+ <funcsynopsis><funcprototype><funcdef role=...>TYPE
<function>NAME</function></funcdef><paramdef>PARAMTYPE
<parameter>PARAM</parameter></paramdef></funcprototype></funcsynopsis>
+
+Alternatively, use funcsynopsisinfo for the category.
+
+Generic @def with a need for a category, but without DocBook synopsis because
+of missing class:
address@hidden and @deftypeop: methodsynopsis cannot be used since the class
+is not available
+defcv, deftypecv: fieldsynopsis cannot be used since the class
+is not available
+
+Remaining @def without DocBook synopsis because there is no equivalent,
+and requires a category
+defvr (defvar, defopt), deftypevr (deftypevar)
+deftp
+
Missing test outputs as files in t/
===================================
output files split (node or not split) could be interesting +texi2html
-style for
+style for some tests. However, the test suite is already too long to
+run so such additions should be done with caution.
+
t/30sectioning.t
chapter_between_nodes (more_nodes_than_sections renamed)
more_sections_than_nodes
Index: Texinfo/Convert/Paragraph.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Paragraph.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- Texinfo/Convert/Paragraph.pm 7 Nov 2011 22:20:17 -0000 1.28
+++ Texinfo/Convert/Paragraph.pm 28 Jul 2012 22:39:41 -0000 1.29
@@ -212,6 +212,8 @@
$paragraph->{'word'} .= $word;
$paragraph->{'underlying_word'} .= $underlying_word unless($transparent);
if ($word =~ /\n/) {
+ $result .= $paragraph->{'space'};
+ $paragraph->{'space'} = '';
$result .= $paragraph->{'word'};
$paragraph->_end_line();
$paragraph->{'word_counter'} = 0;
@@ -221,8 +223,17 @@
$paragraph->{'word_counter'} += length($word);
}
if ($paragraph->{'DEBUG'}) {
- print STDERR "WORD+ $word -> $paragraph->{'word'}\n";
- print STDERR "UNDERLYING_WORD+ $underlying_word ->
$paragraph->{'underlying_word'}\n";
+ my $para_word = 'UNDEF';;
+ if (defined($paragraph->{'word'})) {
+ $para_word = $paragraph->{'word'};
+ }
+ my $para_underlying_word = 'UNDEF';;
+ if (defined($paragraph->{'underlying_word'})) {
+ $para_underlying_word = $paragraph->{'word'};
+ }
+
+ print STDERR "WORD+ $word -> $para_word\n";
+ print STDERR "UNDERLYING_WORD+ $underlying_word ->
$para_underlying_word\n";
}
# The $paragraph->{'counter'} != 0 is here to avoid having an
# additional line output when the text is longer than the max.
@@ -319,7 +330,7 @@
if ($text =~ s/^(\s+)//) {
my $spaces = $1;
$underlying_text =~ s/^(\s+)//;
- print STDERR "SPACES($paragraph->{'counter'})\n" if
($paragraph->{'DEBUG'});
+ print STDERR "SPACES($paragraph->{'counter'}) `$spaces'\n" if
($paragraph->{'DEBUG'});
#my $added_word = $paragraph->{'word'};
if ($paragraph->{'protect_spaces'}) {
$paragraph->{'word'} .= $spaces;
Index: t/plaintext_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/plaintext_tests.t,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- t/plaintext_tests.t 28 Jul 2012 17:55:24 -0000 1.32
+++ t/plaintext_tests.t 28 Jul 2012 22:39:41 -0000 1.33
@@ -526,6 +526,10 @@
@code{in code @var{in var}}
@end display
'],
+['multiline_verb_after_space',
+'AA @verb{*aa
+bb*}.
+'],
);
my $insert_copying_and_paragraph =
Index: t/results/coverage_braces/verb_in_xref.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/coverage_braces/verb_in_xref.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- t/results/coverage_braces/verb_in_xref.pl 14 May 2012 23:56:11 -0000
1.3
+++ t/results/coverage_braces/verb_in_xref.pl 28 Jul 2012 22:39:41 -0000
1.4
@@ -254,7 +254,7 @@
-$result_converted{'plaintext'}->{'verb_in_xref'} = '*Notewith
+$result_converted{'plaintext'}->{'verb_in_xref'} = '*Note with
verb
ggg : Top.
Index: t/results/plaintext_tests/multiline_verb_after_space.pl
===================================================================
RCS file: t/results/plaintext_tests/multiline_verb_after_space.pl
diff -N t/results/plaintext_tests/multiline_verb_after_space.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/plaintext_tests/multiline_verb_after_space.pl 28 Jul 2012
22:39:41 -0000 1.1
@@ -0,0 +1,83 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'multiline_verb_after_space'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'AA '
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'aa
+',
+ 'type' => 'raw'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'bb',
+ 'type' => 'raw'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'verb',
+ 'contents' => [],
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {},
+ 'type' => '*'
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'multiline_verb_after_space'}{'contents'}[0];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'args'}[0];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'args'}[0]{'parent'}
= $result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'multiline_verb_after_space'}{'contents'}[0];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'contents'}[2]{'parent'}
= $result_trees{'multiline_verb_after_space'}{'contents'}[0];
+$result_trees{'multiline_verb_after_space'}{'contents'}[0]{'parent'} =
$result_trees{'multiline_verb_after_space'};
+
+$result_texis{'multiline_verb_after_space'} = 'AA @verb{*aa
+bb*}.
+';
+
+
+$result_texts{'multiline_verb_after_space'} = 'AA aa
+bb.
+';
+
+$result_errors{'multiline_verb_after_space'} = [];
+
+
+
+$result_converted{'plaintext'}->{'multiline_verb_after_space'} = 'AA aa
+bb.
+';
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Convert/Paragraph.pm t/...,
Patrice Dumas <=