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'm using the semantic package to write inference rules and I have trouble with the following:


  \inference{ expr }{ \begin{aligned} long_expr1 \\ long_expr2 \end{aligned} }

In this code, I want long_expr1 and long_expr2 to be centered. However, the aligned environment aligns them on the right. How can I fix this?

share|improve this question

Answering my own question, the problem is solved with the gathered environment.

  \inference{ expr }{ \begin{gathered} long_expr1 \\ long_expr2 \end{gathered} }
share|improve this answer

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.