When I wrote following lines:
\section{Introduction}{
Content in introduction ...
}
Unwanted space comes before Content
as warned.
I understand it's due to some technical decision in tex. But I wonder the reasons behind this decision.
At the beginning of text tags in HTML, literal spaces do not get rendered. I actually prefer behavior like this, because it makes my handcrafted code more readable.
By the way, can I have tex ignore spaces between {
and Content
of this code?
\institute{}
.{%
then start a newline. If you skip the 'philosophical' reasons, it is just a matter of getting used to how TeX works --- and knowing when and where and why braces are needed. (Why in this case relates to the number of arguments a command like\section
needs, not 'why' whitespace is important in macros.) I would also imagine any workaround would be a lot more trouble than it's worth to implement, and probably quite fragile to boot.{%
works. But I don't understand the behavior here. Does that mean%
in first line comments out spaces in second line?%
, tells TeX to treat the rest of the line as a comment, and spaces are skipped at the start of an input line. (Line ends, however, is one place where spurious spaces can creep in.)