[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exdent
From: |
Eli Zaretskii |
Subject: |
Re: exdent |
Date: |
Sat, 18 May 2002 17:49:36 +0300 |
> From: Akim Demaille <address@hidden>
> Date: 30 Apr 2002 09:00:25 +0200
> >>
> >> If it is not, then the following question probably applies: I'm try
> >> to comment an @example, and I'm using exdented lines to put my
> >> comments.
> >>
> >> I believe this is a bug in @exdent and/or @example in 4.2 :(.
AFAICS, it never worked in HTML mode, since the HTML code ignores
indentation. (Note that @example isn't indented in HTML output.)
Just to be sure, I've ran Akim's example through every version of
makeinfo since v4.0, and none of them did what Akim wanted.
> Eli> Can you send a small example? I'd like to look at this.
>
> Sure. It's just the plain straightforward use of exdent and example.
Thanks. I think the changes below fix this problem without breaking
anything important. (You will see that some directives like <ul>
etc. are now indented in some cases, but the browsers I tried don't
seem to care.) Is this what you wanted, Akim?
However, I feel that we should test this change some more before
deciding whether it is good enough. Perhaps Werner (cc'ed) could run
the original and modified makeinfo in HTML mode against the Groff
manual and see if the change breaks something.
Thanks.
2002-05-18 Eli Zaretskii <address@hidden>
These changes make @example be indented in HTML output, and make
@exdent work inside an @example in HTML.
* makeinfo/insertion.c (begin_insertion) <example>: Insert spaces
after <pre> to produce indentation of the first line in HTML mode.
* makeinfo/makeinfo.c (indent): Do indent even in HTML mode.
--- makeinfo/insertion.c~ 2002-04-01 17:01:36.000000000 +0300
+++ makeinfo/insertion.c 2002-05-18 16:54:20.000000000 +0300
@@ -503,7 +503,16 @@ begin_insertion (type)
add_word ("<br><pre>");
if (type != format && type != smallformat)
- current_indent += default_indentation_increment;
+ {
+ int i;
+
+ current_indent += default_indentation_increment;
+ if (html)
+ /* Since we didn't put \n after <pre>, we need to insert
+ the indentation by hand. */
+ for (i = current_indent; i > 0; i--)
+ add_char (' ');
+ }
break;
case multitable:
--- makeinfo/makeinfo.c~1 2002-03-28 18:33:48.000000000 +0200
+++ makeinfo/makeinfo.c 2002-05-18 17:35:52.000000000 +0300
@@ -2861,9 +2861,6 @@ void
indent (amount)
int amount;
{
- if (html)
- return;
-
/* For every START_POS saved within the brace stack which will be affected
by this indentation, bump that start pos forward. */
adjust_braces_following (output_paragraph_offset, amount);
- Re: exdent,
Eli Zaretskii <=
- Re: exdent, Karl Eichwalder, 2002/05/19
- Re: exdent, Eli Zaretskii, 2002/05/19
- Re: exdent, Karl Eichwalder, 2002/05/19
- Re: exdent, Eli Zaretskii, 2002/05/19
- Re: exdent, Karl Eichwalder, 2002/05/20
- Re: exdent, Eli Zaretskii, 2002/05/20
- Re: exdent, Karl Eichwalder, 2002/05/20