Suppose I have the following in a test1.tex file:
\documentclass{article}
\begin{document}
\section{A section with a very long title which goes beyond seventy-two columns in text editor}
\end{document}
Now suppose, for the sake of clean code, I would like to break up the long section title and corresponding brackets into separate lines with a max width of 72 columns as shown in test2.tex:
\documentclass{article}
\begin{document}
\section{
A section with a very long title which goes beyond seventy-two
columns in text editor
}
\end{document}
The resulting pdf from latexmk -pdflatex test1.tex is different than the resulting pdf from latexmk -pdflatex test2.tex. test2.tex contains additional whitespace.
I understand why this occurs, but then how can I enforce good code style without causing extraneous whitespace like this?
\section{%to kill the leading space – Phelype Oleinik Mar 25 '22 at 21:41\section{%intest2.tex– Simon Dispa Mar 25 '22 at 21:41\fbox{x}is not the same as\fbox{ x }white space is just added where you added white space. – David Carlisle Mar 25 '22 at 21:59