xypic:\varprojlim 和 \varinjlim 不起作用

xypic:\varprojlim 和 \varinjlim 不起作用

LyX 拒绝编译任何包含 \varprojlim $\varprojlim$ 和 \varinjlim $\varinjlim$ 的 xymatrix。(如何)可以修复此问题吗?

编辑:这是一个无效代码的示例。

% Preview source code

%% LyX 2.1.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,hebrew]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\usepackage[all]{xy}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}}{\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{amsmath}
\usepackage{braket}
\usepackage{graphicx}
\usepackage[a4paper]{geometry}
\usepackage{lmodern}
\usepackage{manfnt}
\usepackage{dsfont}
\usepackage{xcolor}
\usepackage{xypic}
\xyoption{2cell}
\UseAllTwocells
\usepackage{tensor}
\CompileMatrices

\def\mymathhyphen{{\hbox{-}}}

\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}

\newcommand{\naturalto}{%
  \mathrel{\vbox{\offinterlineskip
    \mathsurround=0pt
    \ialign{\hfil##\hfil\cr
      \normalfont\scalebox{1.2}{.}\cr
%      \noalign{\kern-.05ex}
      $\longrightarrow$\cr}
  }}%
}

\makeatother

\usepackage{babel}
\begin{document}

\title{קטגוריות}

\maketitle
    \L{
\[
\xymatrix{\varprojlim F\ar[rr]^{v} &  & F\ar[rr]^{u}\ar@{-}[dd] &  & \varinjlim                              F\ar@{-->}[dd]\\
\\
A\ar[rr]_{t}\ar@{-->}[uu] &  & F\ar[rr]_{\eta} &  & A
}
\]
}
\end{document}

答案1

我必须[hebrew]从您的示例中删除标题中的希伯来语文本,才能使其在我的 TeXlive 2013 安装中正常工作。我意识到您可能只需要在里面使用\protect\varinjlim和。以下方法对我有用:\protect\varprojlim\xymatrix

% Preview source code

%% LyX 2.1.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english
%,hebrew
]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\usepackage[all]{xy}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}}{\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{amsmath}
\usepackage{braket}
\usepackage{graphicx}
\usepackage[a4paper]{geometry}
\usepackage{lmodern}
\usepackage{manfnt}
\usepackage{dsfont}
\usepackage{xcolor}
\usepackage{xypic}
\xyoption{2cell}
\UseAllTwocells
\usepackage{tensor}
\CompileMatrices

\def\mymathhyphen{{\hbox{-}}}

\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}

\newcommand{\naturalto}{%
  \mathrel{\vbox{\offinterlineskip
    \mathsurround=0pt
    \ialign{\hfil##\hfil\cr
      \normalfont\scalebox{1.2}{.}\cr
%      \noalign{\kern-.05ex}
      $\longrightarrow$\cr}
  }}%
}

\makeatother

\usepackage{babel}
\begin{document}

\title{foobar}%{קטגוריות}

\maketitle
    \L{
\[
\xymatrix{\protect\varprojlim F\ar[rr]^{v} &  & F\ar[rr]^{u}\ar@{-}[dd] &  & \protect\varinjlim                              F\ar@{-->}[dd]\\
\\
A\ar[rr]_{t}\ar@{-->}[uu] &  & F\ar[rr]_{\eta} &  & A
}
\]
}
\end{document}

答案2

没问题。正如 egreg 所说,总是举个简单的例子。全知水晶球在现实生活中并不存在。

这对我来说很好

\documentclass[a4paper]{memoir}
\usepackage[all]{xy}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{equation*}
  \xymatrix{ 
    \varprojlim x  \ar[r] \ar[d] & \varinjlim  y  \ar[d] \\
    \varprojlim x  \ar[r] & \varinjlim  y \\
  }
\end{equation*}
\end{document}

相关内容