Skip to main content
edited tags
Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
added code from comment
Source Link
Syed
  • 59.3k
  • 5
  • 40
  • 95

Recently I need to convert a lot of expressions containing dot products into Latex code. To my annoyance, the mathematica system will always leave literal dots (".") in the latex code, but in reality the dot is mostly omitted in Latex code.

For example, I need to convert this matrix into its latex code:

MatrixForm[{{Transpose[X] . X, Transpose[X] . Subscript[x, 0]}, {Transpose[Subscript[x, 0]] . X, Transpose[Subscript[x, 0]] . Subscript[x, 0]}}]

enter image description here

(Sorry I have to add a picture of the code since the web site keeps notifying me that "Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. " and prevented me from posting if I contain the original code. I have tried to follow the instructions but nothing has done the trick.)

What I get from directly converting it into Latex code:

enter image description here

But generally, the dot "." generated from dot product is not needed in Latex, what I want is:

enter image description here

Then, how can I tell Mathematica not to generate the dot "." when convert a dot product into its Latex code?

Recently I need to convert a lot of expressions containing dot products into Latex code. To my annoyance, the mathematica system will always leave literal dots (".") in the latex code, but in reality the dot is mostly omitted in Latex code.

For example, I need to convert this matrix into its latex code:

enter image description here

(Sorry I have to add a picture of the code since the web site keeps notifying me that "Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. " and prevented me from posting if I contain the original code. I have tried to follow the instructions but nothing has done the trick.)

What I get from directly converting it into Latex code:

enter image description here

But generally, the dot "." generated from dot product is not needed in Latex, what I want is:

enter image description here

Then, how can I tell Mathematica not to generate the dot "." when convert a dot product into its Latex code?

Recently I need to convert a lot of expressions containing dot products into Latex code. To my annoyance, the mathematica system will always leave literal dots (".") in the latex code, but in reality the dot is mostly omitted in Latex code.

For example, I need to convert this matrix into its latex code:

MatrixForm[{{Transpose[X] . X, Transpose[X] . Subscript[x, 0]}, {Transpose[Subscript[x, 0]] . X, Transpose[Subscript[x, 0]] . Subscript[x, 0]}}]

enter image description here

(Sorry I have to add a picture of the code since the web site keeps notifying me that "Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. " and prevented me from posting if I contain the original code. I have tried to follow the instructions but nothing has done the trick.)

What I get from directly converting it into Latex code:

enter image description here

But generally, the dot "." generated from dot product is not needed in Latex, what I want is:

enter image description here

Then, how can I tell Mathematica not to generate the dot "." when convert a dot product into its Latex code?

Source Link
AlbertLew
  • 483
  • 2
  • 7

How can I convert dot product into Latex code without dot?

Recently I need to convert a lot of expressions containing dot products into Latex code. To my annoyance, the mathematica system will always leave literal dots (".") in the latex code, but in reality the dot is mostly omitted in Latex code.

For example, I need to convert this matrix into its latex code:

enter image description here

(Sorry I have to add a picture of the code since the web site keeps notifying me that "Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. " and prevented me from posting if I contain the original code. I have tried to follow the instructions but nothing has done the trick.)

What I get from directly converting it into Latex code:

enter image description here

But generally, the dot "." generated from dot product is not needed in Latex, what I want is:

enter image description here

Then, how can I tell Mathematica not to generate the dot "." when convert a dot product into its Latex code?