[LyX/master] Implement properly \limits and \nolimits
Enrico Forestieri
forenr at lyx.org
Wed Sep 9 09:00:12 UTC 2020
On Wed, Sep 09, 2020 at 10:33:44AM +0200, Jean-Marc Lasgouttes wrote:
> Le 09/09/2020 à 01:41, Enrico Forestieri a écrit :
> > > No, you did it right. My point was that the other patch was only hiding
> > > the problem.
> >
> > In the absence of comments from JMarc, I committed the patch at fcd14df2.
>
> Sorry for not responding earlier. For me the fact that macros take their
> dependencies from their contents is a feature, because this is what we want
> in general: with the spacing code introduced in 2.3, it is almost always
> possible to use the real macro definition. In the case of \int, all we have
> to do is to impose requirements to \oint.
>
> Do you have a concrete case in mind where deriving requirements from the
> contents of the macro goes wrong? Note that in this case, we could decide
> that the requirements given to the macro override whatever is decided from
> its contents.
The point is that the macros defined in the symbols file are only used
for on-screen representation. Their definition will never appear in the
output. So, if \int is defined in the symbols file as
\def\int{\intop\nolimits} esint|amsmath
meaning that it requires either esint or masmath, the requirements for
\intop should not be taken into account because \intop will never
appear in the latex file. Here, the definition of \int is only used
for representing it on the screen. For example, if you define
\def\int{\vcentcolon} esint|amsmath
because you like to see \vcentcolon instead of \int on screen, then
you would get the package mathtools as a requirement. But \vcentcolon
does not really appear in the output and that requirement is bogus.
More clear now?
--
Enrico
More information about the lyx-devel
mailing list