1

I want to create something like this in word by MathType 6.9
enter image description here
But I have MikTex 2.9 and texmaker installed on my computer. Just to try out the code and see what is wrong with that, I've created the following document in LaTeX.

\documentclass[a4paper]{book}
\usepackage{amsmath}

\begin{document}
\begin{align}
T_4 &= \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle=
\left\langle 
\begin{bmatrix} 
\left|k_1\right|^2 & k_1k_2^* & k_1k_3^* & k_1k_4^*\\
k_2k_1^* & \left|k_2\right|^2 & k_2k_3^* & k_2k_4^*\\
k_3k_1^* & k_3k_2^* & \left|k_3\right|^2 & k_3k_4^*\\
k_4k_1^* & k_4k_2^* & k_4k_3^* & \left|k_4\right|^2
\end{bmatrix} 
\right\rangle
\\
&=\frac{1}{2}
\begin{split}
\left[\begin{matrix}
\langle|S_{XX}+S_{YY}|^2\rangle & 
\langle(S_{XX}+S_{YY})(S_{XX}-S_{YY})^*\rangle &\\
\langle(S_{XX}-S_{YY})(S_{XX}+S_{YY})^*\rangle & 
\langle|S_{XX}-S_{YY}|^2\rangle & \cdots\cdots\\
\langle(S_{XY}+S_{YX})(S_{XX}+S_{YY})^*\rangle& 
\langle(S_{XY}+S_{YX})(S_{XX}-S_{YY})^*\rangle & \cdots\cdots\\
\langle j(S_{XY}-S_{YX})(S_{XX}+S_{YY})^*\rangle & 
\langle j(S_{XY}-S_{YX})(S_{XX}-S_{YY})^*\rangle &
\end{matrix}\right.\\
\left.\begin{matrix}
& \langle(S_{XX}+S_{YY})(S_{XY}+S_{YX})^*\rangle 
& \langle -j(S_{XX}+S_{YY})(S_{XY}-S_{YX})^*\rangle\\
\cdots\cdots& \langle(S_{XX}-S_{YY})(S_{XY}+S_{YX})^*\rangle 
& \langle -j(S_{XX}-S_{YY})(S_{XY}-S_{YX})^*\rangle\\
\cdots\cdots& \langle|S_{XY}+S_{YX}|^2\rangle 
& \langle-j(S_{XY}+S_{YX})(S_{XY}-S_{YX})^*\rangle\\
& \langle j(S_{XY}-S_{YX})(S_{XY}+S_{YX})^*\rangle 
& \langle|S_{XY}-S_{YX}|^2\rangle
\end{matrix}\right]
\end{split}
\end{align}
\end{document}  

But there's a warning Overfull \hbox (213.43704pt too wide) in paragraph at lines 39--39.
Line 39 is \end{align}
and the created pdf is like this:
enter image description here
I also deleted the document parts and tried out the code from begin{align} to end{aline} in MathType 6.9 but there it is like this:

enter image description here

It seems that begin{split} and end{split} is making something wrong!!! What should I do?

  • 3
    the mathtype specific parts of the question are off topic for this forum, mathtype does not use tex. like many other tex-to-xx convertors it reads a small subset of tex-like syntax. there may be other sites in teh stackexchange network that are more suitable. – David Carlisle Aug 09 '15 at 20:13
  • @DavidCarlisle Can you suggest me a site in stack exchange where I can ask my mathtype related question? – Sepideh Abadpour Aug 09 '15 at 20:17
  • 1
    No sorry I know nothing about it at all, you could try the main stack overflow one, but it's not tex related – David Carlisle Aug 09 '15 at 20:20
  • 1
    Does multline exist in MathType? If so, try replacing align with multline, and remove \begin{split} and \end{split}. – Torbjørn T. Aug 10 '15 at 08:18

2 Answers2

2

enter image description here

\documentclass[a4paper]{book}
\usepackage{amsmath}

\begin{document}
{\setlength{\arraycolsep}{1.5pt}
$\begin{array}{rclc}
T_4 &=& \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle=
\left\langle 
\begin{bmatrix} 
\left|k_1\right|^2 & k_1k_2^* & k_1k_3^* & k_1k_4^*\\
k_2k_1^* & \left|k_2\right|^2 & k_2k_3^* & k_2k_4^*\\
k_3k_1^* & k_3k_2^* & \left|k_3\right|^2 & k_3k_4^*\\
k_4k_1^* & k_4k_2^* & k_4k_3^* & \left|k_4\right|^2
\end{bmatrix} 
\right\rangle
&(1)\\ \\[-.5em]
&=&\frac{1}{2}
\left[\begin{matrix}
\langle|S_{XX}+S_{YY}|^2\rangle & 
\langle(S_{XX}+S_{YY})(S_{XX}-S_{YY})^*\rangle &\\
\langle(S_{XX}-S_{YY})(S_{XX}+S_{YY})^*\rangle & 
\langle|S_{XX}-S_{YY}|^2\rangle & \cdots\\
\langle(S_{XY}+S_{YX})(S_{XX}+S_{YY})^*\rangle& 
\langle(S_{XY}+S_{YX})(S_{XX}-S_{YY})^*\rangle & \cdots\\
\langle j(S_{XY}-S_{YX})(S_{XX}+S_{YY})^*\rangle & 
\langle j(S_{XY}-S_{YX})(S_{XX}-S_{YY})^*\rangle &
\end{matrix}\right.
\\ &&&(2)\\[-.5em]
&&\hfill
\left.\begin{matrix}
\langle(S_{XX}+S_{YY})(S_{XY}+S_{YX})^*\rangle &
\langle -j(S_{XX}+S_{YY})(S_{XY}-S_{YX})^*\rangle\\
\langle(S_{XX}-S_{YY})(S_{XY}+S_{YX})^*\rangle &
\langle -j(S_{XX}-S_{YY})(S_{XY}-S_{YX})^*\rangle\\
\langle|S_{XY}+S_{YX}|^2\rangle &
\langle-j(S_{XY}+S_{YX})(S_{XY}-S_{YX})^*\rangle\\
\langle j(S_{XY}-S_{YX})(S_{XY}+S_{YX})^*\rangle &
\langle|S_{XY}-S_{YX}|^2\rangle
\end{matrix}\right]
\end{array}$}
\end{document}  
Tarass
  • 16,912
  • very nice answer for latex but not for mathtype an thus can not be entered in MS word as an equation – Sepideh Abadpour Aug 09 '15 at 18:01
  • 1
    I had a doubt if you are using MS word or latex. Could you crop the produced pdf and include it in your Word document ? – Tarass Aug 09 '15 at 18:04
  • that will be a photo of the equation. and as you know for scientific journals we should submit editable equations. Don't you know of any way other than Mathtype to import your latex code as an editable equation in MS word? Because right now I'm not very well in Latex and I can not write whole my thesis with Latex. So I need a way to enter equations written by latex in Ms word – Sepideh Abadpour Aug 09 '15 at 18:10
  • 1
    If you can use Libre Office instead of MS, you can install TexMaths here :http://extensions.libreoffice.org/extension-center/texmaths-1. Then double click on the pi icone and past the code between begin and end document. The result is perfect. I just Tried. See the new photo in my answer. – Tarass Aug 09 '15 at 18:20
  • Libre Office just works for Linux? or does it have a windows version? – Sepideh Abadpour Aug 09 '15 at 18:24
  • 1
    If you select the picture in LO, ans click the pi icone, you can edit again your code. I maybe exists something like that in MS word otherwise use LO. – Tarass Aug 09 '15 at 18:24
  • 1
    Both linux, Windows, Mac - what is both for three ? – Tarass Aug 09 '15 at 18:25
  • LO creates .docx format? – Sepideh Abadpour Aug 09 '15 at 20:51
  • can you chat for a minute? I have my final problem http://chat.stackexchange.com/rooms/26787/use-latex-in-ms-word – Sepideh Abadpour Aug 10 '15 at 09:16
  • @ Tarass can you? – Sepideh Abadpour Aug 10 '15 at 09:20
  • I'm on my cellphone. In one till now. – Tarass Aug 10 '15 at 10:24
  • I wait for you in the chat room you said. – Tarass Aug 10 '15 at 11:33
2

Using the aligned environment instead of split there is no problem, especially if you add the geometry package:

\documentclass[a4paper]{book}
\usepackage{geometry}
\usepackage{amsmath}

\begin{document}

\begin{align}
  T_4 &= \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle=
  \left\langle
  \begin{bmatrix}
  \left|k_1\right|^2 & k_1k_2^* & k_1k_3^* & k_1k_4^* \\
  k_2k_1^* & \left|k_2\right|^2 & k_2k_3^* & k_2k_4^* \\
  k_3k_1^* & k_3k_2^* & \left|k_3\right|^2 & k_3k_4^* \\
  k_4k_1^* & k_4k_2^* & k_4k_3^* & \left|k_4\right|^2
  \end{bmatrix}
  \right\rangle
  \\
  &=\frac{1}{2}
  \!\begin{aligned}[t]
  & \left[\begin{matrix}
  \langle|S_{XX}+S_{YY}|^2\rangle &
  \langle(S_{XX}+S_{YY})(S_{XX}-S_{YY})^*\rangle &\\
  \langle(S_{XX}-S_{YY})(S_{XX}+S_{YY})^*\rangle &
  \langle|S_{XX}-S_{YY}|^2\rangle & \cdots\cdots\\
  \langle(S_{XY}+S_{YX})(S_{XX}+S_{YY})^*\rangle&
  \langle(S_{XY}+S_{YX})(S_{XX}-S_{YY})^*\rangle & \cdots\cdots\\
  \langle j(S_{XY}-S_{YX})(S_{XX}+S_{YY})^*\rangle &
  \langle j(S_{XY}-S_{YX})(S_{XX}-S_{YY})^*\rangle &
  \end{matrix}\right.\\
  & \left.\begin{matrix}
  & \langle(S_{XX}+S_{YY})(S_{XY}+S_{YX})^*\rangle
  & \langle -j(S_{XX}+S_{YY})(S_{XY}-S_{YX})^*\rangle\\
  \cdots\cdots& \langle(S_{XX}-S_{YY})(S_{XY}+S_{YX})^*\rangle
  & \langle -j(S_{XX}-S_{YY})(S_{XY}-S_{YX})^*\rangle\\
  \cdots\cdots& \langle|S_{XY}+S_{YX}|^2\rangle
  & \langle-j(S_{XY}+S_{YX})(S_{XY}-S_{YX})^*\rangle\\
  & \langle j(S_{XY}-S_{YX})(S_{XY}+S_{YX})^*\rangle
  & \langle|S_{XY}-S_{YX}|^2\rangle
  \end{matrix}\right]
  \end{aligned}
\end{align}

\end{document} 

enter image description here

Bernard
  • 271,350
  • yes you are right. Both your code and Tarass's work in Latex environment but when I want to add them in MS word with the help of Mathtype they do not work. In fact it seems that Mathtype does not have the ability to parse some codes of Latex to equations of word. And my main problem is I need this MS word document and I should submit it to my professor. Do you know of any way other than Mathtype to directly enter latex equations into MS Word? – Sepideh Abadpour Aug 09 '15 at 19:19
  • 1
    But Mathtype doesn't parse simple amsmath code? – Bernard Aug 09 '15 at 19:49
  • seems that it does not. I'm now searching the site to find other way than mathtype or to export .doxc from latex and then copy-paste the equation into my thesis document – Sepideh Abadpour Aug 09 '15 at 19:52
  • both of you and Tarass's code are excellent. Especially when I add unpackage{geometry}, there's not even a warning. Both Mathtype doesn't parse :( – Sepideh Abadpour Aug 09 '15 at 20:01
  • 1
    Maybe Word would understand mathml? Or includig the equation as a .pdf image (so that it remains zoomable). – Bernard Aug 09 '15 at 20:02
  • and I don't understand mathml here's maybe the solution. what does it mean ran the .tex-Files through htlatex in the first answer with 40 votes which is answered by Habi – Sepideh Abadpour Aug 09 '15 at 20:08
  • 1
    htlatex is a script from TeX4ht that converts TeX files to html, using MathML. I don't know if you've seen this thread – Bernard Aug 09 '15 at 20:15
  • Judging by the screenshot upon which the OP came up with the sample code, I have a hunch that \cdot should be used instead of \,.\,. I also suspect that \underline{k}^{*^T} should be replaced with \underline{k}^{*T}. – Mico Aug 10 '15 at 10:39