[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texi2html-bug] Some more questions about texi2html
From: |
Patrice Dumas |
Subject: |
Re: [Texi2html-bug] Some more questions about texi2html |
Date: |
Tue, 25 Mar 2008 19:26:19 +0100 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Tue, Mar 25, 2008 at 04:21:01PM +0100, Reinhold Kainhofer wrote:
> Am Sonntag, 23. März 2008 schrieb Patrice Dumas:
> > You can now use the 'unknown' function reference in pass 1 and pass 2.
> > This should be enough, though you may need to use/set data directly from
> > the main program. I can give you more help if you want to.
>
> Thanks! It seems I really need more help. In particular, if I add any
> definition for the macro @translationof, then the unknown function is never
> called on it. And if I leave out a definition of @translationof, then the
> file is not a valid texi file any more and e.g. does not work with
> makeinfo...
Indeed, unknown is not called in the macro expansion phase... And yes,
this is desirable to be able to do strange things in the first pass.
It is fixed now.
But could you please send a piece of texinfo code explaining what you
want to do?
If you want to do something specifc in texi2html you can use
@ifset texi2html
....
@end ifset
> Also, what is the exact meaning of the return values and how should things be
> handled?
> Is the following code appropriate to set the translationof field for the
> current element. I'll then check for the existence of that field in the
> element_file_name function.
>
> if ($pass ==1 and $macro eq "translationof") {
> if (ref($state->{'element'})=='HASH') {
> $state->{'element'}->{'translationonf'} = $line;
> }
> }
Looks good.
The return values are documented as
$RESULT is a boolean. If it is true then the other return
values are taken into account otherwise the default actions are
used. In case $RESULT is true, $RESULT_LINE is the new line to be
processed further, $RESULT_TEXT is the resulting formatted text
and $MESSAGE, if defined is a message outputted to the output with
line number added by `texi2html'.
So since you want to remove the line, you should return
return ('', 1, undef, undef);
> However, the $line contains also spaces and a newline. What is the correct
> way
> to get the same as the $$element{'texi'} field holds? I.e. if I have
> @section Blah blah
> @translationof Blah blah
> I want to get "Blah blah" for the translationof, too. ($line holds " Blah
> blah\n").
Your code looks ok. You can do a
main::normalise_space($line);
> I suppose that should be five $ and "my $pass = shift;"?
Indeed. Thanks, fixed.
> BTW, why are the generated files translations.pl and doc/texi2html.html in
> CVS? Every time I do a cvs up, I get a conflict... Since they are
> automatically created by make, wouldn't it be better to remove them from CVS?
You should ask Derek about such issues.
> Also, there is a small typo in texi2html.pl and the changelog: already is
> misspelt as allready in several places.
Ok, I fixed it.
--
Pat
- Re: [Texi2html-bug] Some more questions about texi2html, (continued)
- Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/19
- Re: [Texi2html-bug] Some more questions about texi2html, Reinhold Kainhofer, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Reinhold Kainhofer, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Reinhold Kainhofer, 2008/03/20
- Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/20
Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/23
Re: [Texi2html-bug] Some more questions about texi2html, Patrice Dumas, 2008/03/23