texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @enumerate N


From: Gavin Smith
Subject: Re: @enumerate N
Date: Wed, 12 Aug 2015 17:35:56 +0100

On 11 August 2015 at 22:14, Karl Berry <address@hidden> wrote:
> Patrice or Gavin -- the makeinfo --html output is wrong for @enumerate
> with an argument:
>
> --------------------------
> \input texinfo
> @setfilename enum10.info
>
> @enumerate 10
> @item
> An item.
> @end enumerate
>
> @bye
> --------------------------
>
> A generic <ol> is evidently always output, hence the output starts at 1
> rather than 10.  Can also be seen in our manual online:
> https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#g_t_0040enumerate

Could the following be what we want?:

Index: Texinfo/Convert/HTML.pm
===================================================================
--- Texinfo/Convert/HTML.pm     (revision 6455)
+++ Texinfo/Convert/HTML.pm     (working copy)
@@ -2913,11 +2913,16 @@
   if ($self->in_string()) {
     return $content;
   }
-  if ($content ne '') {
-    return "<ol>\n" . $content . "</ol>\n";
-  } else {
+  if ($content eq '') {
     return '';
   }
+  if ($command->{'extra'}{'enumerate_specification'}
+      and $command->{'extra'}{'enumerate_specification'} =~ /^\d*/) {
+    return "<ol start=\"$command->{'extra'}{'enumerate_specification'}\">\n"
+           . $content . "</ol>\n";
+  } else {
+    return "<ol>\n" . $content . "</ol>\n";
+  }
 }

 $default_commands_conversion{'enumerate'} = \&_convert_enumerate_command;

Attachment: enum10.texi
Description: TeXInfo document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]