0

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)?

fresh
  • 413
  • The % sign has the same meaning that it has in .tex files, to comment characters till the end of current line, including the end-of-line character. – muzimuzhi Z Jul 30 '20 at 23:16
  • the highest ranked question if you search for "percent" is https://tex.stackexchange.com/questions/7453/what-is-the-use-of-percent-signs-at-the-end-of-lines-why-is-my-macro-creat – David Carlisle Jul 30 '20 at 23:20

0 Answers0