texi2html-bug
[Top][All Lists]
Advanced

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

Re: [Texi2html-bug] Some more questions about texi2html


From: Reinhold Kainhofer
Subject: Re: [Texi2html-bug] Some more questions about texi2html
Date: Tue, 25 Mar 2008 16:21:01 +0100
User-agent: KMail/1.9.9

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...


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;
      }
   }

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").

Also, I'm currently looking at that "unknown" function reference. It seems 
that in texi2html.init, you missed the third parameter... In texi2html.pl you 
call unknown as:

      &$Texi2HTML::Config::unknown($macro, $line, $pass, $stack,$state);

but in the .init file you define:

sub t2h_default_unknown($$$$)
{
    my $macro = shift;
    my $line = shift;
    my $stack = shift;
    my $state = shift;

I suppose that should be five $ and "my $pass = shift;"?


> I added this. With variables USE_ACCESSKEY, USE_REL_REV and also added
> support for <link> with USE_LINKS. 

Thanks a lot, I'll have a look when I find the time.


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? 

Also, there is a small typo in texi2html.pl and the changelog: already is 
misspelt as allready in several places.

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/




reply via email to

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