mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
tex2lyx: parse \xymatrix
LyX's \xymatrix support relies on math therefore put it into math and parse its content
fixes bug #10638
(cherry picked from commit 1174279967
)
This commit is contained in:
parent
935442aaba
commit
c690e8880b
@ -705,7 +705,6 @@ $$
|
||||
\vspace{}
|
||||
\vspace*{}
|
||||
\whiledo{}{}
|
||||
\xymatrix{} % this is basically an array => the contents would be parsed badly (bug 8396)
|
||||
|
||||
% LaTeX environments.
|
||||
% They have always one extra "argument":
|
||||
|
@ -3407,6 +3407,19 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (t.cs() == "xymatrix") {
|
||||
// we must open a new math because LyX's xy support is in math
|
||||
context.check_layout(os);
|
||||
begin_inset(os, "Formula ");
|
||||
os << '$';
|
||||
os << "\\" << t.cs() << '{';
|
||||
parse_math(p, os, FLAG_ITEM, MATH_MODE);
|
||||
os << '}' << '$';
|
||||
end_inset(os);
|
||||
preamble.registerAutomaticallyLoadedPackage("xy");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (t.cs() == "includegraphics") {
|
||||
bool const clip = p.next_token().asInput() == "*";
|
||||
if (clip)
|
||||
|
@ -163,6 +163,8 @@ What's new
|
||||
|
||||
- Fix import of package options with comments (bug 5737).
|
||||
|
||||
- Fix import of xymatrix (bug 10638).
|
||||
|
||||
|
||||
* ADVANCED FIND AND REPLACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user