Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to get the following expression from mathematica to latex:

\begin{bmatrix} E_{\parallel} \\ E_{\perp} \end{bmatrix}

I have tried to use inbuilt 'symbol' character from the special characters window but get an error:

error

So I thought maybe I can just type in \parallel and \perp so when I convert it to tex it will be there and work, but I get different errors:

more erros

Any way to achive what I want?

Thanks

share|improve this question

1 Answer 1

up vote 8 down vote accepted

The following Mathematica construction translates to $\TeX$ just fine:

Mathematica graphics

\left(
\begin{array}{c}
     e_{\bot } \\
     e_{\parallel } \\
    \end{array}
\right)

Which looks like this in StackExchange's MathJax:

$\left( \begin{array}{c} e_{\bot } \\ e_{\parallel } \\ \end{array} \right)$

The key issue is to enter the initial Mathematica construction correctly. That is done as follows.

The $\bot$ character is Mathematica's symbol \[UpTee] which is interpreted as the UpTee function which takes two arguments. This is part of the cause of the error messages you got. You haven't provided those.

You can type Esc+null+Esc for the first argument (which is nothing thanks to the null), followed by Esc+uT+Esc and Esc+null+Esc again for the second argument.

The same goes for the $\parallel$ character, Mathematica's DoubleVerticalBar symbol and (undefined) function which can be entered as Esc+Space+||+Esc.

Alternatively, you can just use

TeXForm@{{Subscript[E,\[Null]\[UpTee]\[Null]]},{Subscript[E,\[Null]\[DoubleVerticalBar]\[Null]]}}

to generate your TeX code. If you want square brackets you may want to change the \left( to \left[ and \right( to \right[. Additionally, since Mathematica interprets E as Euler's number it ends up as a lower case e in the TeX code. You may want to change that back to an uppercase E manually afterwards, or use a \[CapitalEpsilon] in Mathematica. This gets translated as E in the TeX code.

share|improve this answer
    
Absolutely perfect, thanks. I would have never figured that out. –  Steve Hatcher Apr 22 at 8:45
    
I used this today - thanks! Too bad it doesn't look so good in the notebook, but... –  Mark McClure Apr 29 at 18:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.