# Lower the period following a display style fraction

I dislike the look of the output of the following code because the period mark following the fraction looks confused (to my eyes, at least), almost like it's trying to be a degree symbol. I wish that it was sitting on the same (invisible horizontal) line that the denominators are sitting on, only I don't want it to be inside of the denominator (that is, I don't want to write $$\frac{S}{D} = \frac{x}{360.}$$ rather than $$\frac{S}{D} = \frac{x}{360}.$$), because that would awkwardly extend the fraction line above the period.

How can I place the period on the outside of the fraction such that it is at the same vertical level as the period in $$\frac{S}{D} = \frac{x}{360.}$$?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Suppose I have something like $$\frac{S}{D} = \frac{x}{360}.$$

\end{document}


(Note: A closely related question is raised at Vertical position of punctuation following fractions in display-style equations, but there is no talk there of dropping the period to the floor, which is what I want.)

• Quick and dirty hack: \raisebox{-1.6ex}{.} Commented Jun 12, 2023 at 22:55
• Another quick and dirty hack: \frac{x}{300\rlap{\,.}}. But really, the period should be on the main baseline. That is what a copyeditor for a math publisher would require. Commented Jun 12, 2023 at 23:28
• What if the displayed equation ends with a double fraction, i.e., something like \frac{\frac{a}{b}}{\frac{c}{d}}? Should the period be placed on the baseline of the denominator of the denominator? (I hope not...)
– Mico
Commented Jun 12, 2023 at 23:29

I see nothing wrong in the second example (just normal punctuation), but also the third example may be appealing (thin space before the period).

I can see no reason for lowering the period, like in the first example: it's definitely out of place there.

\documentclass{article}
\usepackage{amsmath}

\newlength{\lowerpunct}
\newcommand{\finalfrac}[3]{%
% #1 = numerator, #2 = denominator, #3 = punctuation
\settodepth{\lowerpunct}{$\displaystyle\frac{#1}{#2}$}%
\frac{#1}{#2}%
\raisebox{-\lowerpunct}{#3}%
}

\begin{document}

Suppose I have something like
$\frac{S}{D} = \finalfrac{x}{360}{.}$

Suppose I have something like
$\frac{S}{D} = \frac{x}{360}.$

Suppose I have something like
$\frac{S}{D} = \frac{x}{360}\,.$

\end{document}