mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 13:20:58 +00:00
9435dd6b52
This is a long standing issue, present since the new math macros inception in version 1.6. It manifests as a display issue when a macro with optional arguments appears in the optional argument of another macro. In this case the display is messed up and it is difficult, if not impossible, changing the arguments as they do not appear on screen as related to a specific macro instance. It also manifests as latex errors when compiling, even if the latex output is formally correct, due to limitations of the xargs package used to output the macros. Most probably, both aspects have the same root cause, as simply enclosing in braces the macro and its parameters solves both issues. However, when reloading a document, lyx strips the outer braces enclosing a macro argument, thus frustrating this possible workaround. This commit solves the display issue by correctly accounting for macros with optional arguments nested in the argument of another macro, and circumvents the xargs package limitations causing errors by enclosing in braces the macros with optional arguments appearing in the argument of an outer macro when they are output. This means that when loading an old document with such macros and saving it again, the macro representation is updated and will have these additional braces. However, as such braces are stripped by lyx on loading, there is no risk that they accumulate. See also this thread: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg197828.html |
||
---|---|---|
.. | ||
BUGS | ||
CMakeLists.txt | ||
CommandInset.cpp | ||
CommandInset.h | ||
InsetMath.cpp | ||
InsetMath.h | ||
InsetMathAMSArray.cpp | ||
InsetMathAMSArray.h | ||
InsetMathArray.cpp | ||
InsetMathArray.h | ||
InsetMathBig.cpp | ||
InsetMathBig.h | ||
InsetMathBoldSymbol.cpp | ||
InsetMathBoldSymbol.h | ||
InsetMathBox.cpp | ||
InsetMathBox.h | ||
InsetMathBrace.cpp | ||
InsetMathBrace.h | ||
InsetMathCancel.cpp | ||
InsetMathCancel.h | ||
InsetMathCancelto.cpp | ||
InsetMathCancelto.h | ||
InsetMathCases.cpp | ||
InsetMathCases.h | ||
InsetMathChar.cpp | ||
InsetMathChar.h | ||
InsetMathColor.cpp | ||
InsetMathColor.h | ||
InsetMathComment.cpp | ||
InsetMathComment.h | ||
InsetMathDecoration.cpp | ||
InsetMathDecoration.h | ||
InsetMathDelim.cpp | ||
InsetMathDelim.h | ||
InsetMathDiagram.cpp | ||
InsetMathDiagram.h | ||
InsetMathDiff.cpp | ||
InsetMathDiff.h | ||
InsetMathDots.cpp | ||
InsetMathDots.h | ||
InsetMathEnsureMath.cpp | ||
InsetMathEnsureMath.h | ||
InsetMathEnv.cpp | ||
InsetMathEnv.h | ||
InsetMathExFunc.cpp | ||
InsetMathExFunc.h | ||
InsetMathExInt.cpp | ||
InsetMathExInt.h | ||
InsetMathFont.cpp | ||
InsetMathFont.h | ||
InsetMathFontOld.cpp | ||
InsetMathFontOld.h | ||
InsetMathFrac.cpp | ||
InsetMathFrac.h | ||
InsetMathGrid.cpp | ||
InsetMathGrid.h | ||
InsetMathHull.cpp | ||
InsetMathHull.h | ||
InsetMathKern.cpp | ||
InsetMathKern.h | ||
InsetMathLefteqn.cpp | ||
InsetMathLefteqn.h | ||
InsetMathLim.cpp | ||
InsetMathLim.h | ||
InsetMathMatrix.cpp | ||
InsetMathMatrix.h | ||
InsetMathNest.cpp | ||
InsetMathNest.h | ||
InsetMathNumber.cpp | ||
InsetMathNumber.h | ||
InsetMathOverset.cpp | ||
InsetMathOverset.h | ||
InsetMathPar.cpp | ||
InsetMathPar.h | ||
InsetMathPhantom.cpp | ||
InsetMathPhantom.h | ||
InsetMathRef.cpp | ||
InsetMathRef.h | ||
InsetMathRoot.cpp | ||
InsetMathRoot.h | ||
InsetMathScript.cpp | ||
InsetMathScript.h | ||
InsetMathSideset.cpp | ||
InsetMathSideset.h | ||
InsetMathSize.cpp | ||
InsetMathSize.h | ||
InsetMathSpace.cpp | ||
InsetMathSpace.h | ||
InsetMathSpecialChar.cpp | ||
InsetMathSpecialChar.h | ||
InsetMathSplit.cpp | ||
InsetMathSplit.h | ||
InsetMathSqrt.cpp | ||
InsetMathSqrt.h | ||
InsetMathStackrel.cpp | ||
InsetMathStackrel.h | ||
InsetMathString.cpp | ||
InsetMathString.h | ||
InsetMathSubstack.cpp | ||
InsetMathSubstack.h | ||
InsetMathSymbol.cpp | ||
InsetMathSymbol.h | ||
InsetMathTabular.cpp | ||
InsetMathTabular.h | ||
InsetMathUnderset.cpp | ||
InsetMathUnderset.h | ||
InsetMathUnknown.cpp | ||
InsetMathUnknown.h | ||
InsetMathXArrow.cpp | ||
InsetMathXArrow.h | ||
InsetMathXYArrow.cpp | ||
InsetMathXYArrow.h | ||
InsetMathXYMatrix.cpp | ||
InsetMathXYMatrix.h | ||
MacroTable.cpp | ||
MacroTable.h | ||
MathAtom.cpp | ||
MathAtom.h | ||
MathAutoCorrect.cpp | ||
MathAutoCorrect.h | ||
MathCompletionList.h | ||
MathData.cpp | ||
MathData.h | ||
MathExtern.cpp | ||
MathExtern.h | ||
MathFactory.cpp | ||
MathFactory.h | ||
MathMacro.cpp | ||
MathMacro.h | ||
MathMacroArgument.cpp | ||
MathMacroArgument.h | ||
MathMacroTemplate.cpp | ||
MathMacroTemplate.h | ||
MathParser_flags.h | ||
MathParser.cpp | ||
MathParser.h | ||
MathStream.cpp | ||
MathStream.h | ||
MathSupport.cpp | ||
MathSupport.h | ||
README | ||
ReplaceData.h | ||
texify | ||
TextPainter.cpp | ||
TextPainter.h |
Inset 'Xyz' is implemented by 'MathXyzInset' in 'math_xyzinset.[hC]' Inset hierarchy: MathInset (abstract base) / | \ Dim Char Symbol, Space, ... (thing that need (for things formerly the width_/ascent_ known as characters) /descent_ cache) / \ Nest Dots, Func, ... (for thing with nested content) | \ Grid Decoration Delim Frac Macro Root Script Sqrt / \ Array Hull (base for eqnarray/align/...)