Skip to main content
added 288 characters in body
Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphicsMathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange where it says

\phantom inserts an empty box with the same dimensions (horizontal as well as vertical) as the argument

But if you think it is not doing what it should, I would suggest asking at https://tex.stackexchange.com

Update

What you want is \hphantom and not \phantom

m1=Inset[MaTeX["\\sqrt{\\hphantom{a^2}b}",Magnification->5],{0,0}] m2=Inset[MaTeX["\\sqrt{a^2b}",Magnification->5],{0,0}] 

Mathematica graphics

Graphics[{m1,m2}] 

Mathematica graphics

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange where it says

\phantom inserts an empty box with the same dimensions (horizontal as well as vertical) as the argument

But if you think it is not doing what it should, I would suggest asking at https://tex.stackexchange.com

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange where it says

\phantom inserts an empty box with the same dimensions (horizontal as well as vertical) as the argument

But if you think it is not doing what it should, I would suggest asking at https://tex.stackexchange.com

Update

What you want is \hphantom and not \phantom

m1=Inset[MaTeX["\\sqrt{\\hphantom{a^2}b}",Magnification->5],{0,0}] m2=Inset[MaTeX["\\sqrt{a^2b}",Magnification->5],{0,0}] 

Mathematica graphics

Graphics[{m1,m2}] 

Mathematica graphics

link
Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange. where it says

\phantom inserts an empty box with the same dimensions (horizontal as well as vertical) as the argument

But if you think it is not doing what it should, I would suggest asking at https://tex.stackexchange.com

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange.

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange where it says

\phantom inserts an empty box with the same dimensions (horizontal as well as vertical) as the argument

But if you think it is not doing what it should, I would suggest asking at https://tex.stackexchange.com

Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396

The same sizes show up using pure Latex.

\documentclass[11pt]{article} \begin{document} \Huge \[ \sqrt{\phantom{a^2}b} \] \[ \sqrt{a^2b} \] \end{document} 

Gives (compiled with pdflatex)

Mathematica graphics

And this is inside Mathematica:

Mathematica graphics

I do not see any difference. But I think your question is really about Latex itself and not Matex, which just compiles using Latex.

You could see this how-do-i-create-an-invisible-character on Tex Exchange.