[Tex/LaTex] How to center text without adding space AND not altering alignment of surrounding text

horizontal alignment

In normal text, how do I center part of a sentence (it happens to be the end of a sentence) but leave the text in the rest of the paragraph unaltered? Also, no vertical space should be added before or after the centered text.

In a word processor, I would add a new line just before the text to be centered and then "center" the text on the next line. I tried doing things similar to this with various LaTeX commands, but nothing worked.

This is what I want it to look like:

This is a really long sentence as an example.  The second half of this
                               sentence should be centered.

Best Answer

How about this:

\documentclass{article}

\begin{document}

This is a really long sentence as an example.  The second have of this\\
\centerline{sentence should be centered.}
\end{document}
Related Question