# Spacing and font in \frac

When I write text in frac, it looks bad no space... bad font. How can I change it

\documentclass{article}
\begin{document}
$\frac{Lorem Ipsum}{abc dfe}$
\end{document}

• In math mode, letters are spaced like a product of variables. Ifyou really want text, load amsmath and use frac{\text{Lorem Ipsum}}{\text{abc def}}. – Bernard Aug 2 '20 at 22:05
• it is unrelated to \frac spaces are ignored in math mode try $abc def$ – David Carlisle Aug 2 '20 at 22:06

You could make the space character active in math mode to insert a thick muskip in its place. For this you will have to modify the definition of \obeyspaces (which I should probably propose to the LaTeX core) to make the expansion of the obeyed space overrideable. Then you just have to append \obeyspaces to \everymath and \everydisplay and you are all set to produce the most horrible-looking documents.

\documentclass{article}

\makeatletter
\def\obeyedspace{\space}
\def\@obeyedspace{\obeyedspace}
{\obeyspaces\global\let \@obeyedspace}
\makeatother

\renewcommand\obeyedspace{\;}
\everydisplay={\obeyspaces}
\everymath={\obeyspaces}

\begin{document}

$\frac{Lorem Ipsum}{abc dfe}$

\end{document}