]> git.lyx.org Git - features.git/commit
Fix lyx2lyx math package defaults (bug #9069)
authorGeorg Baum <baum@lyx.org>
Fri, 25 Apr 2014 20:39:22 +0000 (22:39 +0200)
committerGeorg Baum <baum@lyx.org>
Fri, 25 Apr 2014 20:39:22 +0000 (22:39 +0200)
commit52d258861317dca2b6dde349bf44abe3e281c772
treed8ea5748c2a844092b785b342c25d2f329b24448
parent5710f68c340dc459e538e62972b7322b6a9027b8
Fix lyx2lyx math package defaults (bug #9069)

lyx2lyx sets all new math packages to off when converting from old formats.
This is correct if any command which would cause an automatic package loading
exists in the document. However, it is wrong if no command exists: This leads
to problems if later a command is added (bug #9069), which is especially
annoying for templates.
The fix consists of two parts:
1) convert_use_package() considers now the used commands like
   revert_use_package(), and uses them to decide whether to set the package to
   auto or off.
2) convert_undertilde() and revert_undertilde() use a slightly adjusted copy of
   convert_use_package() and revert_use_package(), so that the bug is also
   fixed for undertilde. We cannot use the latter functions directly, because
   of "\usepackage undertilde" vs. "\use_undertilde".
lib/lyx2lyx/lyx_2_1.py