]> git.lyx.org Git - lyx.git/commit
Introduce the notion of math class
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 30 May 2016 08:33:35 +0000 (10:33 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Nov 2016 14:21:52 +0000 (15:21 +0100)
commit361bd53bc36da61c6abfc2e0b7b7c7294800bbd9
treeb0bb5000e5127b2f7841fa1f54052150160812e4
parent0872bb78b412d6d8ec571e935f33fda16e42bf01
Introduce the notion of math class

This done according to the TeXbook. This class replaces the individual
isMathXXX() methods. The mathClass() method (currently unused) is
provided for the following insets:

 * InsetMathChar (with a revised list of affected characters)
 * InsetMathSymbol: the class is given by the `extra' field
   Operators defined in lib/symbols (e.g. \log) are MC_OP
 * InsetMathFrac is MC_INNER (except nicefrac and units)
 * InsetDelimiters is MC_INNER
 * InsetStackrel is MC_REL
 * The class of InsetScript is the class of the last element of its
   nucleus (yes, it is a hack, but doing it right is more work).

Remove the explicit spacing that was done in the different insets. The spacing
will be reintroduced properly in a forthcoming commit.
19 files changed:
src/Makefile.am
src/mathed/InsetMath.cpp
src/mathed/InsetMath.h
src/mathed/InsetMathChar.cpp
src/mathed/InsetMathChar.h
src/mathed/InsetMathDelim.cpp
src/mathed/InsetMathDelim.h
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathFrac.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathScript.cpp
src/mathed/InsetMathScript.h
src/mathed/InsetMathStackrel.cpp
src/mathed/InsetMathStackrel.h
src/mathed/InsetMathSymbol.cpp
src/mathed/InsetMathSymbol.h
src/mathed/MathClass.cpp [new file with mode: 0644]
src/mathed/MathClass.h [new file with mode: 0644]
src/mathed/MathSupport.cpp