调整交换图中标签的位置

调整交换图中标签的位置

我想调整下图中标签的位置,使其位于箭头的中间。非常感谢您的建议。

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}
\usepackage{xypic}
\xyoption{all}

\begin{document}

\title{Title}
\author{Author}
\date{Today}
\maketitle

\begin{figure}
\[
\xymatrixcolsep{1.5pc} \xymatrix{
\text{LTDS}  \ar@{=>}[d]^{\text{RRA}} \ar@{-->}[r] & \text{RRA} \ar@{=>}[d]^{\text{FxTS of ODEs}}_{\text{FxTS of TDSs}}
\\
\text{An LTI without delays} \ar@{=>}[d]_{\text{Equivalent}}^{\text{Transformations}}  
& {\begin{smallmatrix} \text{Equivalence of FxTS} \\ \text{between LTDS and LTI} \end{smallmatrix}} 
\ar@{-->}@/^4pc/[dddl] 
\\
\text{An LTI with a single input} \ar@{=>}[d]_{\text{FxTS of ODEs}}^{\text{Backstepping}} &
\\
\text{FxTC for LTI} \ar@{=>}[d]_{\text{Linear}}^{\text{Transformations}}
\\
\text{FxTC for LTDS}
}
\]
\caption{Schematic diagram of the proposed methodology}\label{fainait figure 1}
\end{figure}

\end{document}

在此处输入图片描述

答案1

我不确定这是否就是您所说的将标签放在箭头中间的意思——这对我来说看起来很奇怪。但这里有一个解决方案tikz-cd

在此处输入图片描述

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}
\usepackage{tikz-cd}

\begin{document}

\begin{figure}
\[
\begin{tikzcd}[row sep=1cm]
\text{LTDS}\arrow[r, dashed]\arrow[d, Rightarrow, "\text{RRA}" description] & \text{RRA}\arrow[d, Rightarrow, "\text{FxTS of TDSs FxTS of ODEs}" description]\\
\text{An LTI with a single input}\arrow[d, Rightarrow, "\text{Equivalent Transformations}" description] & \begin{smallmatrix} \text{Equivalence of FxTS} \\ \text{between LTDS and LTI} \end{smallmatrix}\arrow[dddl, controls={+(0,-3) and +(3,0)}, dashed]\\
\text{An LTI with a single input}\arrow[d, Rightarrow, "\text{FxTS of ODEs Backstepping}" description]\\
\text{FxTC for LTI}\arrow[d, Rightarrow, "\text{Linear Transformations}" description]\\
\text{FxTC for LTDS}
\end{tikzcd}
\]
\caption{Schematic diagram of the proposed methodology}\label{fainait figure 1}
\end{figure}

\end{document}

description键将标签放在箭头的中间。

如果必须使用 执行此操作,则可以使用键(而不是或 )xymatrix将标签放置在箭头中间。但我认为使用 的标签看起来比 更糟糕。这是图像(后面有代码)。|^_xymatrixtikz-cdxy

在此处输入图片描述

\xymatrixcolsep{1.5pc} \xymatrix{
\text{LTDS}  \ar@{=>}[d]|{\text{RRA}} \ar@{-->}[r] & \text{RRA} \ar@{=>}[d]|{\text{FxTS of ODEs FxTS of TDSs}}
\\
\text{An LTI without delays} \ar@{=>}[d]|{\text{Equivalent Transformations}}  
& {\begin{smallmatrix} \text{Equivalence of FxTS} \\ \text{between LTDS and LTI} \end{smallmatrix}} 
\ar@{-->}@/^4pc/[dddl] 
\\
\text{An LTI with a single input} \ar@{=>}[d]|{\text{FxTS of ODEs Backstepping}} &
\\
\text{FxTC for LTI} \ar@{=>}[d]|{\text{Linear Transformations}}
\\
\text{FxTC for LTDS}
}

答案2

标签用^设置在箭头的左边,用_设置在右边;用|则放置在中间。

我做了一些调整,也许可以用 Xy-pic 方法完成,但是……

进行调整是为了使标签稍微大一些,并隐藏主条目中的降部。

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}
\usepackage[all,cmtip]{xypic}

\newcommand{\ltext}[1]{\text{\fboxrule=0pt\fboxsep=2pt\fbox{#1}}}
\newcommand{\stext}[1]{\smash[b]{\text{#1}}}

\begin{document}

\begin{figure}[htp]
\[
\xymatrix@C=1.5pc{
\text{LTDS}  \ar@{=>}[d]|(0.45){\ltext{RRA}} \ar@{-->}[r] &
\text{RRA} \ar@{=>}[d]^(0.45){\ltext{FxTS of ODEs}}_(0.45){\ltext{FxTS of TDSs}}
\\
\stext{An LTI without delays} \ar@{=>}[d]|(0.45){\ltext{Equivalent Transformations}} &
{\begin{smallmatrix} \text{Equivalence of FxTS} \\ \text{between LTDS and LTI} \end{smallmatrix}} 
\ar@{-->}@/^4pc/[dddl] 
\\
\stext{An LTI with a single input} \ar@{=>}[d]|(0.45){\ltext{FxTS of ODEs Backstepping}} &
\\
\text{FxTC for LTI} \ar@{=>}[d]|(0.45){\ltext{Linear Transformations}}
\\
\text{FxTC for LTDS}
}
\]
\caption{Schematic diagram of the proposed methodology}\label{fainait figure 1}
\end{figure}

\end{document}

在此处输入图片描述

请注意,cmtip我认为这个选项对于获得合适的箭头来说是必需的。

相关内容