LaTeX Length \mathsurround — Adjust the extra spacing between inline math environment and text
Nov. 15, 2025 in Buffalo, United States • Updated Nov. 14, 2025
1
2
3
4
5
6
7
8
9
10
11
12
\documentclass{article}
\usepackage{lipsum}
\usepackage{amsmath}
\begin{document}
\lipsum[1][1-2] $a=b+c$ (default extra spacing, 0pt)
\setlength{\mathsurround}{30pt}
\lipsum[1][1-2] $a=b+c$ (adjusted as 10pt)
\end{document}

References
- LaTeX入门, 刘海洋编著, p. 282.