I want to have something as follows: A word is left aligned, then an equation is central aligned in the same line

word              [\centering some equation]
  • 1
    Welcome to TeX SX! You can use the flalign environment (from amsmath). – Bernard May 4 '17 at 20:33
  • It should be noted that flalign is affected by the equation number and the size of each field. See tex.stackexchange.com/questions/365894/… for how to address the problem. – John Kormylo May 4 '17 at 21:50
  • @Bernard Won't that left-align it? – cfr May 4 '17 at 22:47
  • 1
    Centred relative to the rest of the line or centred relative to the whole line? Please provide a small, compilable document illustrating your set up. – cfr May 4 '17 at 22:48

One way of centering in the line, in the rest of the line or in any space between the text:


\def\reference{\dotfill center \dotfill}
\makebox[0pt][l]{Word}\hfil\(2+3\)\par% solution A
Word\hfil\(2+3\)\par% solution B
\leavevmode\phantom{Word}\reference\phantom{Anotherword}\par% reference
Word\hfill\(2+3\)\hfill Anotherword\par % solution C

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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