2

I fear the answer to my question might be obvious to many of you, still I couldn't explain it to me.

Using a parbox in an fbox and changing the textcolor works out as desired. But I came across a weird behaviour.

Depending on how I arrange the code the appearance changes: For reasons of coding readability I like to put brackets into new lines sometimes. But this results in this very case to the fact that text is not centered any more but shifted a bit to the left.

Is this always the case? Is there a sensible reason for this behaviour? Should I just stop coding that way?

Thanks in advance for your ideas and hints! (fyi: I guess a mwe is not need so I just provide a screenshot of the code.

enter image description here)

MaK
  • 94

1 Answers1

5

If you expect

one
two
three

to typeset as

one two three

not

onetwothree

then you should expect

\fbox{
abc
}

to typeset as

| abc |

not

|abc|

Either don't add the white space, or comment it out.

\fbox{abc}

or

\fbox{%
abc%
}
David Carlisle
  • 757,742
  • 1
    Ha David! Now I finally get why these %-signs at the end of lines are added. Thank You very much! This really really gave me some enlightment! :D – MaK Mar 20 '16 at 13:54