Skip to main content
2 of 2
added 495 characters in body
Werner
  • 625k
  • 145
  • 1.5k
  • 2.4k

You can add \ShowCommand\lim to your preamble to see the definition of \lim. It'll show

> \lim=robust macro: ->\protect \lim . > \lim =\long macro: ->\mathop {\operator@font lim}. <argument> \lim l.3 \ShowCommand\lim 

You can then define something similar for \Lim or redefine \lim accordingly:

\makeatletter \NewDocumentCommand{\Lim}{}{\mathop{\operator@font Lim}}% Similar to \lim \RenewDocumentCommand{\lim}{}{\mathop{\operator@font Lim}}% Replace \lim (lim -> Lim) \makeatother 

Note that this default definition differs from how its defined by other packages. For example, with amsmath, the definition is

> \lim=\protected macro: ->\qopname \relax m{lim}. <argument> \lim l.4 \ShowCommand\lim 

where \qopname takes 3 arguments, the first of which is the operator text. You could

\NewDocumentCommand{\Lim}{}{\qopname{\relax}{m}{Lim}} \RenewDocumentCommand{\lim}{}{\qopname{\relax}{m}{Lim}} 

Best would be to use other tools (like mathtools), which help you define operators in a natural way:

\usepackage{mathtools} \let\lim\relax% Remove existing \lim definition \DeclareMathOperator*{\lim}{Lim}% (Re)define \lim \DeclareMathOperator*{\Lim}{Lim}% Define \Lim 

Here's a complete minimal example:

enter image description here

\documentclass{article} %\ShowCommand\lim %\makeatletter %\NewDocumentCommand{\Lim}{}{\mathop{\operator@font Lim}} %\RenewDocumentCommand{\lim}{}{\mathop{\operator@font Lim}} %\makeatother \usepackage{mathtools} \let\lim\relax \DeclareMathOperator*{\lim}{Lim} \DeclareMathOperator*{\Lim}{Lim} \begin{document} \[ \lim_{n \rightarrow \infty} S_n \qquad \Lim_{n \rightarrow \infty} S_n \] \end{document} 
Werner
  • 625k
  • 145
  • 1.5k
  • 2.4k