I am trying to write my own class and I don't quite understand the use of percent signs. For example, I have this snippet of code in my .cls file:
\renewcommand{\maketitle}{
\begin{center}
\huge\bfseries{foo}
\end{center}
}
However, scanning through examples online, I have noticed the use of percent signs:
\renewcommand{\maketitle}{%
\begin{center}
\huge\bfseries{foo}
\end{center}%
}
These two bits of code seem to work exactly the same. I'm wondering, is there any difference between the two (I'm guessing the % sign does not have the same meaning that is has in .tex files)?
%sign has the same meaning that it has in.texfiles, to comment characters till the end of current line, including the end-of-line character. – muzimuzhi Z Jul 30 '20 at 23:16