Thank you for your solution.
Along with your solution, I obtained a solution to change massive arrays including vertical lines.
Some suggestions regarding to vertical/horizontal lines in arrays are:
1. horizontal lines can be input in arrays directly with \hline
at the first cell of the row, while lefting the vertical lines to be added
later;
2. when the file is almost done, (or you are sure you will not modify
the array any more), take the following steps to add vertical lines.
Step 1: backup the lyx file
and then open the *.lyx file in a common text editor;
Step 2: find the arrays
which vertical lines should be added;
Step 3: add | into the alignment
string, for example, ccc|c means vertical line lies between col. 3 and
col. 4.
Step 4: replace the
\begin_inset Formula before the array as \latex
latex;
replace the \end_inset
after the array as \latex default;
This step can be done with search/replace function. So you will not feel
too troublesome.
3. dashed lines can also be done in a similar way, but package arydshln
should be used.
When lyx re-open the file, the arrays will be displayed as latex code (red), when it is saved, \ is changed to \backslash. Hence, backing up the file before processing is recommended.
I have also checked with multi-line equations, it works!
Dekel Tsur <[EMAIL PROTECTED]> told me that the math editor is currently being re-written, hope the lines will be supported soon.
Best wishes,
Qingchang
Herbert Voss wrote:
Qingchang Zhong wrote:> I cannot do so because I have many many matrices like this, some of them are 10x10! Please try to help me, I have spent too much time to solve this problem.
>
> Do you think this is a bug?yes and no, because lyx doesn't support this any more.
so lets try to make it run. .. :-)here comes a part of your lyx-file:
------------------
> \layout Standard
>
> \begin_inset Formula \( \left[ \begin{array}{c|c}
> A & 0\\
> \hline0 & B
> \end{array}\right] \)
> \end_inset
>
> \the_end
--------------------it's easy to find this formulas with any simple texteditor.
search for c|c, so you find it anyway.
now delete at first: \begin_inset Formula
and than: \end_insetyour lyx-text looks now
\( \left[ \begin{array}{c|c}
> A & 0\\
> \hline0 & B
> \end{array}\right] \)so far so good. save the text and open it with lyx. the
whole formula now appears as text in one line:\( \left[\begin{array}{cc|c}A & 0 & \\0 & A & \\\hline0 & 0 &
A\end{array}\right] \)mark this whole line with the mouse and hit the tex-button.
now your text is okay, while the formula is real latex (in red).try it with a short file.
hope this helps.Herbert