Ekkehart Schlicht wrote:
> Hi,
>
> I just found out that Lyx does not know the Latex command \limits which
> produces the limits of integrals etc. above and below the integral
> operator. Maybe it is worthwhile to implement it. With regard to tex2lyx
> it may be useful as well, as \intop which is an alias for \int\limits.
This patch adds support for \intop and \ointop. It goes in later if nobody
objects.
Jean-Marc, also for 1.4? I think it is safe.
Georg
Index: lib/symbols
===================================================================
--- lib/symbols (Revision 14180)
+++ lib/symbols (Arbeitskopie)
@@ -238,12 +238,14 @@ biguplus cmex 85 0 m
bigcap cmex 84 0 mathop x
bigcup cmex 83 0 mathop x
int cmex 82 242 mathop ∫
+intop cmex 82 242 mathop ∫
prod cmex 81 213 mathop x
sum cmex 80 229 mathop x
bigotimes cmex 78 0 mathop x
bigoplus cmex 76 0 mathop x
bigodot cmex 74 0 mathop x
oint cmex 72 0 mathop x
+ointop cmex 72 0 mathop x
bigsqcup cmex 70 0 mathop x
smallint cmsy 115 0 mathop x
triangleleft cmm 47 0 mathbin x
Index: src/mathed/math_scriptinset.C
===================================================================
--- src/mathed/math_scriptinset.C (Revision 14180)
+++ src/mathed/math_scriptinset.C (Arbeitskopie)
@@ -292,10 +292,14 @@ bool MathScriptInset::hasLimits() const
if (!nuc().back()->isScriptable())
return false;
- // per default \int has limits beside the \int even in displayed formulas
- if (nuc().back()->asSymbolInset())
+ if (nuc().back()->asSymbolInset()) {
+ // \intop is an alias for \int\limits, \ointop == \oint\limits
+ if (nuc().back()->asSymbolInset()->name().find("intop") != string::npos)
+ return true;
+ // per default \int has limits beside the \int even in displayed formulas
if (nuc().back()->asSymbolInset()->name().find("int") != string::npos)
return false;
+ }
// assume "real" limits for everything else
return true;