A follow-up question of my question regarding \(...\), how can I add horizontal space (preferably \,) to the end of each inline mathmode triggered by $...$? Since the $ is used to enter and exit math mode, would this require tinkering to the inline math environment itself?



% CODE %


Text Here $a+b=c$and Text Here
  • Of course, this question is a search for a global configuration that does not require a writer to add \, at the end of every inline math-mode equation. – Paul Kim Jun 26 '19 at 1:27
  • 2
    The problem here is that there is no space after the "closing" $. What is more "normal" is for the input to be "Here $a+b+c$ and". I suspect that you would really want to allow a line break after the math expression, which \, would prevent. – barbara beeton Jun 26 '19 at 1:45
  • This would insert an incorrect space in The area is $\pi$. You could avoid the incorrect space with The area is $\pi.$, but semantically, the period is not a part of the math expression, so it shouldn't be inside the $. (Also, $\pi.$\, Next sentence would have the wrong spacing anyway.) Could you give an example from your work? It almost seems like you're trying to abuse math mode for something it wasn't meant to do. – Teepeemm Jun 26 '19 at 1:56
  • This action is meant to be used for another language that does not use latin alphabets. Most uses of the inline math equation in this language is used without a space after inline equations because our grammatical standards seem to perceive equations as part of a word instead of its own, independent self. However, due to the calligraphy of our language, it is my personal view that at least some form of spacing should append equations used in such manner. I'll add an example of an inline equation printed in my language as soon as possible. – Paul Kim Jun 26 '19 at 2:22
  • 1
    The information that this is to be used in a non-latin-alphabet language that has different spacing rules needs to be in your question. Without that information, you will not get correct or usable answers, and later readers won't be informed accurately. That said, setting \mathsurround as suggested by @frougon is the likely best approach. However, as implied in that suggestion, you need to consider whether the left side should be treated the same as the right; since you showed an input space in your example, it's likely that it should be. – barbara beeton Jun 26 '19 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.