TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 want something like this: enter image description here

two narrow equations/words equally distributed along the linewidth. I used next code:

\begin{block}{My block}
\hfill$a+a=a$\hfill$a\cdot a=a$\hfill\phantom{.}

As you can see I've used a \phantom{.} to force end of line \hfill. My question is do you know a better solution? Probably Werner's answer in Standard math environment for equally-spaced columns of expressions? is a better way to do it, but I think it's to much code.

share|improve this question
up vote 5 down vote accepted

TeX removes a glue item at the end of a paragraph, so

\hfill$a+a=a$\hfill$a\cdot a=a$\hfill

doesn't work. You have to use space that doesn't disappear:

\hspace*{\fill}$a+a=a$\hfill$a\cdot a=a$\hspace*{\fill}

(The one at the start might be \hfill, but it's good practice to use \hspace* when one really wants space at the beginning and at the end of a line).

share|improve this answer
Just what I wanted! – Ignasi Feb 3 '12 at 17:16

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.