如何在同一行上左对齐和居中对齐

如何在同一行上左对齐和居中对齐

我想要的是如下内容:一个单词左对齐,然后一个方程式在同一行居中对齐

word              [\centering some equation]

答案1

在行中、在行的其余部分或在文本之间的任何空间中居中的一种方法:

姆韦

\documentclass[twocolumn]{article}
\setlength\parskip{2em}
\def\reference{\dotfill center \dotfill}
\begin{document}
\reference\par
\makebox[0pt][l]{Word}\hfil\(2+3\)\par% solution A
$\hphantom{Word}$\reference\par
Word\hfil\(2+3\)\par% solution B
\leavevmode\phantom{Word}\reference\phantom{Anotherword}\par% reference
Word\hfill\(2+3\)\hfill Anotherword\par % solution C
\end{document}

相关内容