7

Sorry if this is a too-simple question, but anyway.

Is there a simple way of writing in LaTeX projective and inductive limits that begin with uppercase (Lim)?

This is what we usually have https://pbelmans.ncag.info/blog/2010/10/02/direct-and-inverse-limit-in-latex/.

3
  • 1
    \DeclareMathOperator\Lim{Lim} ? Feb 27, 2022 at 23:25
  • Thanks but see the example linked. Proj and Ind limits have an arrow below. I need the same but beginning with uppercase. Feb 27, 2022 at 23:32
  • 2
    You only asked about the case, the arrows are same as normal \Lim_{\rightarrow} (or \leftarrow) or \Lim\limits_{\rightarrow} if you want to force that position even in inline math. Feb 27, 2022 at 23:36

1 Answer 1

11

You can patch \varinjlim and \varprojlim to use “Lim” instead of “lim” and to this end it's sufficient to patch the internal macro \varlim@.

\documentclass{article}
\usepackage{amsmath}
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\varlim@}{lim}{Lim}{}{}
\makeatother

\begin{document}

\[
\varinjlim \quad \varprojlim
\]

\end{document}

enter image description here

You may also take the opportunity to make the arrows a bit smaller:

\documentclass{article}
\usepackage{amsmath}
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\varlim@}{lim}{Lim}{}{}
\xpatchcmd{\varinjlim}{\textstyle}{\scriptstyle}{}{}
\xpatchcmd{\varprojlim}{\textstyle}{\scriptstyle}{}{}
\makeatother

\begin{document}

\[
\varinjlim \quad \varprojlim
\]

\end{document}

enter image description here

If you want to keep the old commands, you can patch copies thereof.

\documentclass{article}
\usepackage{amsmath}
\usepackage{xpatch}

\makeatletter
\NewCommandCopy\varLim@\varlim@
\NewCommandCopy\varinjLim\varinjlim
\NewCommandCopy\varprojLim\varprojlim
\xpatchcmd{\varinjLim}{\varlim@}{\varLim@}{}{}
\xpatchcmd{\varprojLim}{\varlim@}{\varLim@}{}{}
\xpatchcmd{\varLim@}{lim}{Lim}{}{}
% smaller arrows
\xpatchcmd{\varinjlim}{\textstyle}{\scriptstyle}{}{}
\xpatchcmd{\varinjLim}{\textstyle}{\scriptstyle}{}{}
\xpatchcmd{\varprojlim}{\textstyle}{\scriptstyle}{}{}
\xpatchcmd{\varprojLim}{\textstyle}{\scriptstyle}{}{}
\makeatother

\begin{document}

\[
\varinjLim \quad \varprojLim
\quad
\varinjlim \quad \varprojlim
\]

\end{document}

enter image description here

4
  • Thanks! Is there a way from moving from this limit to the former in the document? "Something Lim but after lim". Feb 28, 2022 at 15:14
  • 1
    @hansficter Yes, it's possible. See edit.
    – egreg
    Feb 28, 2022 at 15:24
  • Many thanks!! For some reason "\NewCommandCopy" appears as undefined. I have used "\let" instead, and works smoothly. Feb 28, 2022 at 15:53
  • 1
    @hansficter Better update your TeX distribution…
    – egreg
    Feb 28, 2022 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .