“xymatrix”箭头标签编译不正确或无法编译

“xymatrix”箭头标签编译不正确或无法编译

更新:根据@Christoph Frings 的评论添加详细信息!

我正在尝试使用 xymatrix 绘制交换式图表,但找不到详细介绍我遇到的相同问题的帖子。

\usepackage[all,cmtip]{xy}我在前言中使用了:来移植该软件包。这是我的前言:

\documentclass[a4paper,11pt]{article}
\usepackage{geometry}
\geometry{a4paper, top=1.0cm, left=2.5cm, right=2.5cm, bottom=1.5cm, includehead, includefoot}
\title{x}
\author{y}
\date{}
\setcounter{section}{-1}
\usepackage[all,cmtip]{xy}
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage[numbers]{natbib}
\bibliographystyle{alpha}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{xcolor}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{bbm}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{array}
\usepackage{amsthm}
\usepackage{breqn}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section] 
\newtheorem{lem}[thm]{Lemma} 
\newtheorem{prop}[thm]{Proposition} 
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{exmp}{Example}[section]
\newtheorem{rmk}{Remark}[section]
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\dee}{\mathrm{d}}
\newcommand{\Dee}{\mathrm{D}}
\newcommand{\pee}{\mathrm{p}}
\newcommand{\arr}{\mathrm{r}}
\newcommand{\Gal}{\mathrm{Gal}}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}

我正在尝试绘制以下内容:在此处输入图片描述

并根据米尔恩的指南,我写道:

\begin{document}
\xymatrix{
    (\Z/n\Z)^\times \ar[dr]_{\mod f} \ar[rr]^{\chi} & & \C \\
    & (\Z/f\Z)^\times \ar[ur]_{\tilde{\chi}} & }
\end{document}

并且这不会编译,引用多个上标/下标的错误。

我能输出的最接近该图的是以下内容,它似乎将 mod 标签放在了完全错误的位置,使用以下代码:

\begin{document}
\xymatrix{
(\Z/n\Z)^\times \ar[dr]_{\mod f} \ar[rr] & & \C \\
& (\Z/f\Z)^\times \ar[ur] & }
\end{document}

在此处输入图片描述

我该如何修复这个错误并希望让这个包正常工作?!

我提前非常感谢您,如果这是一个愚蠢的问题,我深感抱歉!

答案1

我已经减少了你的长代码,并且我已经完成了一个可以正常工作的 MWE 来获得第一张图片。

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{mathpazo}
\usepackage[all]{xy}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\C}{\mathbb{C}}

\begin{document}
\xymatrix{
    (\Z/n\Z)^{\ast} \ar[dr]_{\mod f} \ar[rr]^{\chi} & & \C \\
    & (\Z/f\Z)^{\ast}\ar[ur]_{\tilde{\chi}} & }
\end{document}

在此处输入图片描述

我的建议:您检查是否有更新的版本LaTeX并逐一删除该包以查看最终的问题。

相关内容