TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently writing on my masters thesis and I have a question about matrices at the end of a sentence.

I write my matrix as a pmatrix in an align environment. Actually the matrix is at the end of a sentence and I want to end this sentence with a "." being directly next to my matrix, not in the next line. But as the matrix is written in align environment, the point is being set in the middle of the matrix.

What can I do to set the point in heights of the last line of the matrix?

share|improve this question
My opinion is that the period should be where LaTeX puts it (in the center). – egreg Apr 29 '12 at 12:14
The instructions \end{pmatrix}. \end{align} -- put the sentence-ending period after the right-hand parenthesis but on the same line (not on a new line by itself). Is this what you're looking for? – Mico Apr 29 '12 at 12:21
Yes, despite my answer below, I would agree that in the normal case, this is usually as good as anywhere (and logically the baseline of the equation is the right place for sentence punctuation). – David Carlisle Apr 29 '12 at 12:24
I do this with caution and generally try to avoid it since a matrix should not be appering as inline math in my opinion but if I have to then I use \smallmatrix environment. I sometimes even draw it with TikZ if the spacing is not tight enough. Here is one example that I uploaded to imgur. EDIT : Ah, you mean not inline but the last word of a sentence. Sorry for the confusion. – percusse Apr 29 '12 at 12:47
But can't I force to put the punctuation at the baseline of the matrix! Sorry for the confusion! – maad Apr 29 '12 at 13:12

There doesn't seem to be any good way of automatically fitting sentence punctuation to a displayed equation, all ways seem to require manual adjustment. Often it's worth re-phrasing the sentence so it doesn't end at the display. AMS matrices are always vertically centred, but you might get away with something like

.....   & 1.0\rlap{\hspace{5em}.}\end{pmatrix}

ie just attaching the fullstop to the entry in the last cell (so it doesn't mess up the spacing) but move it some arbitrary amount to the right so that it visually moves past the closing bracket of the matrix.

share|improve this answer
Thanks, worked perfectly! – maad Apr 29 '12 at 13:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.