-5
$\begingroup$

How do I prevent $\mathcal{MathJax}$ from putting excessive amounts of space around quotation marks?

$\mathtt{"Hello" + "World"}$ denotes the string $\mathtt{"Hello World"}$.

Let $A = \begin{Bmatrix}\mathtt{"Apple"} , \mathtt{"Orange"}, \mathtt{"Kiwi"}\end{Bmatrix}$.

The Source Code is Shown Below

$\mathtt{"Hello" + "World"}$ denotes the string $\mathtt{"Hello World"}$.  

Let $A = \begin{Bmatrix}\mathtt{"Apple"} , \mathtt{"Orange"}, \mathtt{"Kiwi"}\end{Bmatrix}$.    
$\endgroup$
1
  • 8
    $\begingroup$ tex.stackexchange.com/q/127574 Essentially, you are asking \mathtt do do something it isn't meant to do. Better to use \texttt (e.g. $\left\{ \texttt{"hello"}, \texttt{"world"} \right\}$ renders as $\left\{ \texttt{"hello"}, \texttt{"world"} \right\}$. $\endgroup$
    – Xander Henderson Mod
    Sep 19, 2022 at 21:32

1 Answer 1

5
$\begingroup$

A hack would be $A=\{“\mathtt{abcde}”,“\mathtt{12345}”,“\mathtt{!?$@*}”\}$ where I used the Unicode characters “ ” for the quotations.

$\endgroup$
1
  • $\begingroup$ Your solution made me laugh. I have had problem for many years trying to compile code which contained left double quotes or right double quotes. Most compilers require ASCII straight double quotes. You have to write print("hello world") instead of “print()”. However, in $\mathcal{MathJax}$ the quotation marks “ ” are useful. In, $\LaTeX$ left-double back-tick gives you a left-quote, but back-ticks are stack exchange mark-up language for BEGIN MONOSPACED TELETYPE CODE BLOCK $\endgroup$ Apr 6, 2023 at 1:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .