1

I would like to define a command \laxcolim which renders the same as \varinjlim does, except with two "l"'s instead of one. But I still want the usual \varinjlim command to be available to me. (Similarly, I want a command \laxlim which is like \varprojlim but with an extra "l".)

I tried modifying this solution to the following:

\documentclass[ a4paper, leqno]{article}

\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb, amsfonts, mathtools}

\makeatletter\def\varlim@#1#2{% \vtop{\m@th\ialign{##\cr \hfil$#1\operator@font llim$\hfil\cr \noalign{\nointerlineskip\kern1.5\ex@}#2\cr \noalign{\nointerlineskip\kern-\ex@}\cr}}% } \makeatother

\begin{document}

[ \varinjlim( E_{α},f_{α,β}),\quad\varprojlim( E_{α},f_{β,α}),]%

\end{document}​

The result looks great except that it changes the \varinjlim command itself, whereas I need both the usual \varinjlim command and my modified one to be available to me.

To address this issue, I made the following changes. I don't actually know what I'm doing, but the intention is to define a new command \varllim rather than overwriting the \varlim command, and then to copy the usual definition of \varinjlim, but with \varllim used in place of \varlim.

\documentclass[ a4paper, leqno]{article}

\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb, amsfonts, mathtools}

\makeatletter\def\varllim@#1#2{% \vtop{\m@th\ialign{##\cr \hfil$#1\operator@font llim$\hfil\cr \noalign{\nointerlineskip\kern1.5\ex@}#2\cr \noalign{\nointerlineskip\kern-\ex@}\cr}}% } \makeatother

\def\laxcolim{% \mathop{\mathpalette\varllim@{\rightarrowfill@\textstyle}}\nmlimits@ } \def\laxlim{% \mathop{\mathpalette\varllim@{\leftarrowfill@\textstyle}}\nmlimits@ }

\begin{document}

[ \varinjlim( E_{\alpha},f_{\alpha,\beta}),\quad\varprojlim( E_{\alpha},f_{\beta,\alpha}),]% [ \laxcolim( E_{\alpha},f_{\alpha,\beta}),\quad\laxlim( E_{\alpha},f_{\beta,\alpha}),]% \end{document}​

I get an error saying that that \varllim is an undefined control sequence. I think I am missing something very basic!

tcamps
  • 229

1 Answers1

2

Rather than reimplementing the whole thing, it's simpler to do a couple of patches:

\documentclass[ a4paper, leqno]{article}
\usepackage{amsmath}
\usepackage{xpatch}

\NewCommandCopy{\laxcolim}{\varinjlim} \makeatletter \NewCommandCopy{\varllim@}{\varlim@} \xpatchcmd{\laxcolim}{\varlim@}{\varllim@}{}{} \xpatchcmd{\varllim@}{lim}{llim}{}{} \makeatother

\begin{document}

[ \varinjlim( E_{\alpha},f_{\alpha,\beta}), \quad \laxcolim( E_{\alpha},f_{\beta,\alpha}), ]

\end{document}

enter image description here

Another possible strategy:

\documentclass[ a4paper, leqno]{article}
\usepackage{amsmath}

\makeatletter \newcommand{\genericinjlim}[1]{% \mathop{\mathpalette\varlim@{{#1}{\rightarrowfill@\textstyle}}}\nmlimits@ } \def\varlim@#1#2{\varlim@@#1#2} \def\varlim@@#1#2#3{% \vtop{\m@th\ialign{##\cr \hfil$#1\operator@font #2$\hfil\cr \noalign{\nointerlineskip\kern1.5\ex@}#3\cr \noalign{\nointerlineskip\kern-\ex@}\cr}}% } \makeatother

\renewcommand{\varinjlim}{\genericinjlim{lim}} \newcommand{\laxcolim}{\genericinjlim{llim}}

\begin{document}

[ \varinjlim( E_{\alpha},f_{\alpha,\beta}), \quad \laxcolim( E_{\alpha},f_{\beta,\alpha}), ]

\end{document}

You can supplement this with

\newcommand{\genericprojlim}[1]{%
  \mathop{\mathpalette\varlim@{{#1}{\leftarrowfill@\textstyle}}}\nmlimits@
}

for projective limits.

In order to get better arrows, one can use old-arrows.

\documentclass[a4paper,leqno]{article}
\usepackage{amsmath}
\usepackage[old]{old-arrows}

\makeatletter \newcommand{\genericinjlim}[1]{% \mathop{\mathpalette\varlim@{{#1}{\varrightarrowfill@\textstyle}}}\nmlimits@ } \newcommand{\genericprojlim}[1]{% \mathop{\mathpalette\varlim@{{#1}{\varleftarrowfill@\textstyle}}}\nmlimits@ } \def\varrightarrowfill@{\arrowfill@\relbar\relbar\varrightarrow} \def\varleftarrowfill@{\arrowfill@\varleftarrow\relbar\relbar}

\def\varlim@#1#2{\varlim@@#1#2} \def\varlim@@#1#2#3{% \vtop{\m@th\ialign{##\cr \hfil$#1\operator@font #2$\hfil\cr \noalign{\nointerlineskip\kern1.5\ex@}#3\cr \noalign{\nointerlineskip\kern-\ex@}\cr}}% } \makeatother

\renewcommand{\varinjlim}{\genericinjlim{lim}} \renewcommand{\varprojlim}{\genericprojlim{lim}} \newcommand{\laxcolim}{\genericinjlim{llim}}

\newcommand{\elts}{\genericinjlim{\mathsf{elts}}}

\begin{document}

[ \varinjlim( E_{\alpha},f_{\alpha,\beta}) \quad \laxcolim( E_{\alpha},f_{\beta,\alpha}) \quad \varprojlim( E_{\alpha},f_{\beta,\alpha}) \quad \elts(F) ]

\end{document}

enter image description here

egreg
  • 1,121,712