GeneralWhy percent signs at the end of lines?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dl3fo3
Posts: 10
Joined: Mon Jan 05, 2009 4:35 pm

Why percent signs at the end of lines?

Post by dl3fo3 »

Some LaTeX codes I've seen have percent signs at the end of some lines. What does it do?

Here's an example in the KOMA-Script manual (look at the end of the second line).

Code: Select all

\makeatletter
\renewcommand*{\rightmark}{%
  \expandafter\@rightmark\botmark\@empty\@empty}
\makeatother

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: Why percent signs at the end of lines?

Post by nlct »

It comments out the end of line character to prevent an unwanted space.

Regards
Nicola Talbot
Post Reply