[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);


sub do_cmd_author {
     local($_) = @_;
     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;

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):
>My Name\\
>My Address, Line 1
>My Address, Line 2
>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).
>latex2html mailing list
>latex2html at tug.org

Julius O. Smith III <jos at ccrma.stanford.edu>
Assoc. Prof. of Music and (by courtesy) Electrical Engineering
CCRMA, Stanford University

More information about the latex2html mailing list