[l2h] Can no longer have newlines in \author address

Julius Smith jos at w3k.org
Tue Sep 30 12:55:17 CEST 2003


The replacement below for do_cmd_author seems to fix this problem.
In two places,

             ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author);

is replaced by

             @authspec = split (/\s*<BR>s*/, $t_author);
             $t_author = shift $authspec;
             $t_affil = shift $authspec;
             $t_address = join("<BR>", at authspec);

Julius

sub do_cmd_author {
     local($_) = @_;
     &get_next_optional_argument;
     my $next;
     $next = &missing_braces unless (
         (s/$next_pair_pr_rx/$next = $2;''/seo)
         ||(s/$next_pair_rx/$next = $2;''/seo));
     local($after) = $_;
     if ($next =~ /\\and/) {
         my @author_list = split(/\s*\\and\s*/, $next);
         my $t_author, $t_affil, $t_address;
         foreach (@author_list) {
             $t_author = &translate_environments($_);
             $t_author =~ s/\s+/ /g;
             $t_author = &simplify(&translate_commands($t_author));
#           ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author);
             @authspec = split (/\s*<BR>s*/, $t_author);
             $t_author = shift $authspec;
             $t_affil = shift $authspec;
             $t_address = join("<BR>", at authspec);
             push @authors, $t_author;
             push @affils, $t_affil;
             push @addresses, $t_address;
         }
     } else {
         $_ = &translate_environments($next);
         $next = &translate_commands($_);
         ($t_author) = &simplify($next);
#       ($t_author,$t_affil,$t_address) = split (/\s*<BR>s*/, $t_author);
         @authspec = split (/\s*<BR>s*/, $t_author);
         $t_author = shift $authspec;
         $t_affil = shift $authspec;
         $t_address = join("<BR>", at authspec);
         push @authors, $t_author;
         push @affils, $t_affil if $t_affil;
         push @addresses, $t_address if $t_address;
     }
     $after;
}

At 09:13 AM 9/29/2003 -0700, Julius Smith wrote:
>In latex2html-2002-2-1, one can no longer have '\\' in the author's 
>address.  I am pretty sure this worked fine in latex2html-2002-1.  A 
>workaround I have found is to keep the entire address on one line (as far 
>as l2h is concerned):
>
>\author{%
>My Name\\
>My Address, Line 1
>\latexhtml{\\}{\begin{rawhtml}<BR>\end{rawhtml}}
>My Address, Line 2
>%etc.
>}
>
>Without doing this, the third line gets flushed left and typeset 
>differently, and any later lines are suppressed.
>
>The relevant changes appear to be in sub do_cmd_author() in latex2html, 
>where new support for multiple authors separated by \and has been added.
>
>Note that LaTeX explicitly supports '\\' anywhere in the \author command 
>(Lamport, p. 169).
>
>Julius
>
>_______________________________________________
>latex2html mailing list
>latex2html at tug.org
>http://tug.org/mailman/listinfo/latex2html

_____________________________
Julius O. Smith III <jos at ccrma.stanford.edu>
Assoc. Prof. of Music and (by courtesy) Electrical Engineering
CCRMA, Stanford University
http://www-ccrma.stanford.edu/~jos/



More information about the latex2html mailing list