I am trying to create a .cls file for use by multiple users for generating \documentclass{article} documents. Inside this class, I want a macro/script to be able to automatically generate a signature line for every entry in the \author{} field. I know \@author contains the information; how do I read the size of \@author to know how many lines to create (or is this the wrong path to be going down)?
EDIT:
Upon further review of TEX.SX questions, I learned where \and was defined and consequently how redefining \and could include the \vspace and \rule for additional authors. My successful solution is listed below.
MWE:
\documentclass{newclass}
\author{Neil Armstrong\\Commander
\and
Buzz Aldrin\\Lunar Module Pilot
\and
Michael Collins\\Command Module Pilot}
\begin{document}
\end{document}
using newclass.cls
\ProvidesClass{newclass}
\LoadClass{article}
\def\and{% % \begin{tabular}
\end{tabular}%
\vspace{2ex}\\
and\\
\vspace{0.5in}
\rule{4cm}{0.4pt}\\
\begin{tabular}[t]{c}}% % \end{tabular}
and\\and the spaces? Can't you just append the code for the rule? – Johannes_B Aug 19 '16 at 06:36\andparameter within\authorto include the new lines and\rule. I need to edit this subject\question, as I am now curious if I can include the\def\andin the .cls file rather than the .tex file's preamble. – Fox Aug 19 '16 at 15:31\parbetween the different parts to avoid warnings about underful boxes. – Johannes_B Aug 19 '16 at 16:05\parcomment, can you expand? Are you saying replace the\vspaceinstances? Currently, I do not have underfill errors (but I have only ranged between 1-5 signature lines). – Fox Aug 19 '16 at 16:21\authorin white text colour and underline it with another colour, see e.g. http://tex.stackexchange.com/questions/57070/how-to-color-over-underline-or-other-ways-to-highlight-substituted-expressions. This should give you lines corresponding to the author content. – samcarter_is_at_topanswers.xyz Aug 19 '16 at 16:55