# Appendix suddenly right aligned?

I am writing a thesis using a template I didn't create myself, which worked great so far. But when I put some text in the appendix, it suddenly is right aligned, with a ragged left side. I have found nothing in the preamble that looks even remotely relevant for this. Anyone knows what the cause of the problem might be?

This is roughly what happens before:

\mainmatter
\input{content/1-Intro}
\bibliography{bib/BibtexDatabase}
\appendix
\input{content/Za-Anhang}


The content files simply start with \chapter{Bla}

• Suddenly? LaTeX is not Quantum Physics ;-) You should show us what you have! – user31729 Mar 2 '15 at 13:57
• Ok, you are right, "suddenly" = "I just tried it for the first time and have no idea why it is happening". Ironically, my thesis is about quantum physics ;D – Maxim Moloshenko Mar 2 '15 at 14:06
• Usually this happens when a command is forgotten to be scoped and leaks to all chapters that comes after it. Try to find at least where it starts by moving the \end{document} all the way up and slowly pushing it to the end until you get an idea which macro etc. – percusse Mar 2 '15 at 14:09
• Oh wow, this was actually a great tip! I use a \flushright command to sign the declaration of own work, and apparently it is still turned on afterwards. How do I turn it off again? putting {} around it also leaves it without effect on the line that I want to force to the right. – Maxim Moloshenko Mar 2 '15 at 14:16
• Group with an extra pair of braces {\flushright contents\par} or instead of \flushright use the environment \begin{raggedleft} contents \end{raggedleft}. – Gonzalo Medina Mar 2 '15 at 14:18

A comment by percusse (no idea how to link users, is it possible at all?) put me in the right direction. The problem was the \flushright command that I used on the very last line of the document to force the place and date to the right

\flushright Ulm, \today


Replacing it with \hfill solved the problem

\hfill Ulm, \today


For the record: Putting {} around the line made the appendix left aligned again, but had no effect on the line itself. Same for putting it in the raggedleft environment.

• flushright is an environment, while \raggedleft is a declaration. – egreg Mar 2 '15 at 14:44