在本文档中,我认为句号与盒子底部水平对齐看起来会更好。也许它也应该更粗一些。
如果您认为对齐是正确的,请说出来。
编辑:我的编辑同意@egreg的观点。我将保留句号。
平均能量损失
\documentclass{article}
\usepackage{xparse}
\DeclareDocumentCommand\gc{ s m }%
{%
\IfBooleanTF {#1}%
{%
\begin{center}
\framebox{#2} \ .
\end{center}
}
{%
\begin{center}
\framebox{#2}
\end{center}
}
}
\begin{document}
It's important to know how to do the calculation, but also important
to know how to ask someone to do it for you --- in this case, Google
(or Bing).
Enter
\gc{
12 miles per gallon in gallons per 10000 miles
}
in the search box. Google tells you
\gc*{
12 miles per gallon = 833.333333 US gallons per (10 000 miles)
}
\end{document}
答案1
正如 egreg 告诉你的那样,你想要的东西在印刷上是错误的。但是,如果你坚持,
\DeclareDocumentCommand\gc{ s m }%
{%
\IfBooleanTF {#1}%
{%
\begin{center}
\raisebox{\depth}{\framebox{#2}} \ .
\end{center}
}
{%
\begin{center}
\framebox{#2}
\end{center}
}
}