[Tex/LaTex] 6 authors, groups of 3 for a shared affiliation in ACM Sig-proc

acm

I must create a paper with 6 authors in total the first three share one affiliation, and likewise the second three share a common affiliation.

In accordance with the answer to this question I've been attempting to render it in an aesthetically appealing way, using this code:

    \numberofauthors{6} %  in this sample file, there are a *total*
    % of EIGHT authors. SIX appear on the 'first-page' (for formatting
    % reasons) and the remaining two appear in the \additionalauthors section.



    \author{
          \alignauthor Ben King\\      
          \email{king@cs.berkeley.edu}
    %
          \alignauthor Georgia Tobin\\     
          \email{tobin@cs.berkeley.edu}
    %
          \alignauthor Gerald Murray\\    
          \email{murrray@cs.berkeley.edu}
    %
          \sharedaffiliation
          \affaddr{Department of Electrical Engineering and Computer Science}  \\
          \affaddr{University of California, Berkeley }   \\
          \affaddr{Berkeley, CA 94720-1776 } \\
    % 
          \alignauthor Ben King\\      
          \email{king@cs.berkeley.edu}
    %
          \alignauthor Georgia Tobin\\     
          \email{tobin@cs.berkeley.edu}
    %
          \alignauthor Gerald Murray\\    
          \email{murrray@cs.berkeley.edu}
    %
          \sharedaffiliation
          \affaddr{Department of Electrical Engineering and Computer Science}  \\
          \affaddr{University of California, Berkeley }   \\
          \affaddr{Berkeley, CA 94720-1776 }
    }

However as you can see in the photo below the result is quite a mess.

How can I create this in an orderly way? i.e. well aligned and centred.

enter image description here

Best Answer

Changing this

\def\sharedaffiliation{%
\end{tabular}
\centering
\begin{tabular}{c}}

for this

\def\sharedaffiliation{%
\end{tabular}
\centering
\begin{tabular}{p{\linewidth}}\centering}

Solved the problem for me, for the second row of authors.