Text FormattingSpace being inserted between math and comma

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Nifty77PMP
Posts: 3
Joined: Wed Jan 07, 2015 3:27 pm

Space being inserted between math and comma

Post by Nifty77PMP »

I am using Textures. When I enter the following:

Now since $e^{mx} > 0$ for all values of $x$, we must have

a space is appearing between the math mode and the comma. I am getting

...for all values of x , we must have

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Space being inserted between math and comma

Post by Johannes_B »

Hi and welcome,

please give us some compilable example reproducing the behaviour.

Code: Select all

\documentclass{article}
\begin{document}
Now since $e^{mx} > 0$ for all values of $x$, we must have 
\end{document}
Hint: Click on »open in Writelatex« just at the top of the code box to see what i see.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Nifty77PMP
Posts: 3
Joined: Wed Jan 07, 2015 3:27 pm

Space being inserted between math and comma

Post by Nifty77PMP »

Code: Select all

\documentclass{book}

 Now since $e^{mx}  > 0$  for all values of
$x$, we must have $m = 2$ and
$m = 3$ therefore $y = e^{2x} $
 and $y = e^{3x} $ are solutions.

\end{document}
If I move the comma inside the $ there is no space ($x,$). Also, if I use $x$\!, it closes up the space.
Nifty77PMP
Posts: 3
Joined: Wed Jan 07, 2015 3:27 pm

Re: Space being inserted between math and comma

Post by Nifty77PMP »

Problem solved. I rebooted the computer and it still happened.

I shut it down for 5 min and restarted. It's working fine now.
Post Reply