0

In this document I think the period would look better horizontally aligned with the floor of the box. Perhaps it should be bolder, too.

If you think the alignment is right as is please say so.

Edit: My editor agrees with @egreg. I will leave the period where it is.

enter image description here

MWE

\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}
  • 3
    Either on the baseline of the inner text or no period at all. – egreg Mar 17 '15 at 21:09
1

As egreg tells you, the thing you want is typographically wrong. However, if you insist,

\DeclareDocumentCommand\gc{ s m }%
{%
   \IfBooleanTF {#1}%
     {%
     \begin{center}
     \raisebox{\depth}{\framebox{#2}} \ .
     \end{center}
     }
     {%
     \begin{center}
     \framebox{#2}
     \end{center}
     }
}
  • +1 for the answer. I certainly don't insist, and will ask my editor what she wants. – Ethan Bolker Mar 17 '15 at 22:52

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.