I'm using LyX Version 1.5.2 on a PC with Windows XP. I'm copying 
expressions from MathType that have been appropriately translated to LaTeX 
and pasting them into LyX. These expressions always display correctly when 
pasted into LyX's Raw TeX Code field, but they don't always display 
correctly when pasted into a Raw TeX Code field that has been inserted 
inside LyX's equation structure.

Here is an example where the LaTeX code always display correctly. The 
following code was copied from MathType:

\left[ {\begin{array}{*{20}c}
   {a_b^c } & {a_b^c } & {a_b^c }  \\
   {a_b^c } & {a_b^c } & {a_b^c }  \\
   {a_b^c } & {a_b^c } & {a_b^c }  \\
\end{array}} \right]\left[ {\begin{array}{*{20}c}
   {x_b^c }  \\
   {x_b^c }  \\
   {x_b^c }  \\
\end{array}} \right] = \left[ {\begin{array}{*{20}c}
   {f_b^c }  \\
   {f_b^c }  \\
   {f_b^c }  \\
\end{array}} \right]

When inserted into LyX's Raw TeX Code field that was not in an equation 
field, it looks like this:

\left[ {\begin{array}{*{20}c}    {a_b^c } & {a_b^c } & {a_b^c }  \\ {a_b^c 
} & {a_b^c } & {a_b^c }  \\    {a_b^c } & {a_b^c } & {a_b^c }  \\ 
\end{array}} \right]\left[ {\begin{array}{*{20}c}    {x_b^c }  \\ {x_b^c } 
 \\    {x_b^c }  \\ \end{array}} \right] = \left[ {\begin{array}{*{20}c}  
{f_b^c }  \\    {f_b^c }  \\    {f_b^c }  \\ \end{array}} \right]

When inserted into LyX's Raw TeX Code field that was not in an equation 
field, it looks like this:

\left[{\begin{array}{ccc}
{m_{a}^{b}} & {m_{a}^{b}} & {m_{a}^{b}}\\
{m_{a}^{b}} & {m_{a}^{b}} & {m_{a}^{b}}\\
{m_{a}^{b}} & {m_{a}^{b}} & 
{m_{a}^{b}}\end{array}}\right]\left[{\begin{array}{c}
{x_{a}^{b}}\\
{x_{a}^{b}}\\
{x_{a}^{b}}\end{array}}\right]=\left[{\begin{array}{c}
{f_{a}^{b}}\\
{f_{a}^{b}}\\
{f_{a}^{b}}\end{array}}\right]

and the Preview source code matches that above. A single $ or a double $$ 
was inserted at each end of the Raw TeX Code when not in LyX's equation 
field for inline or display mode. Nothing was added to the above code when 
the Raw TeX Code field (C-L) was inserted into LyX's inline or display 
equation field.

Here is an example where the LaTeX code does not display correctly in all 
cases. The following code was copied from MathType:

x_{i + 1}  = x_i  - {{\left( {{1 \mathord{\left/
 {\vphantom {1 {x_i^2 }}} \right.
 \kern-\nulldelimiterspace} {x_i^2 }} - y} \right)} \mathord{\left/
 {\vphantom {{\left( {{1 \mathord{\left/
 {\vphantom {1 {x_i^2 }}} \right.
 \kern-\nulldelimiterspace} {x_i^2 }} - y} \right)} {\left( { - {2 
\mathord{\left/
 {\vphantom {2 {x_i^3 }}} \right.
 \kern-\nulldelimiterspace} {x_i^3 }}} \right)}}} \right.
 \kern-\nulldelimiterspace} {\left( { - {2 \mathord{\left/
 {\vphantom {2 {x_i^3 }}} \right.
 \kern-\nulldelimiterspace} {x_i^3 }}} \right)}} = \frac{{x_i }}{2}\left( 
{3 - x_i^2 y} \right)

When inserted into LyX's Raw TeX Code field that was not in an equation 
field, it looks like this:

x_{i + 1}  = x_i  - {{\left( {{1 \mathord{\left/  {\vphantom {1 {x_i^2 }}} 
\right.  \kern-\nulldelimiterspace} {x_i^2 }} - y} \right)} 
\mathord{\left/  {\vphantom {{\left( {{1 \mathord{\left/  {\vphantom {1 
{x_i^2 }}} \right.  \kern-\nulldelimiterspace} {x_i^2 }} - y} \right)} 
{\left( { - {2 \mathord{\left/  {\vphantom {2 {x_i^3 }}} \right. 
\kern-\nulldelimiterspace} {x_i^3 }}} \right)}}} \right. 
\kern-\nulldelimiterspace} {\left( { - {2 \mathord{\left/  {\vphantom {2 
{x_i^3 }}} \right.  \kern-\nulldelimiterspace} {x_i^3 }}} \right)}} = 
\frac{{x_i }}{2}\left( {3 - x_i^2 y} \right)

and the Preview source code matches that above. A single $ or a double $$ 
was inserted at each end of the Raw TeX Code when not in LyX's equation 
field for inline or display mode. Nothing was added when the Raw TeX Code 
field (C-L) was inserted into LyX's inline or display equation field.

When inserted into LyX's Raw TeX Code field (C-L) that was in an equation 
field, the pasted code became truncated as shown below:

x_{i+1}=x_{i}-{}

I haven't been able to find any way around this problem.

Any suggestions? Is this a bug?

Thank you,

Roger A. Wehage

Reply via email to