\documentclass{article}
\usepackage{tikz-cd,amsmath}
\usepackage{amsfonts}
\begin{document}
\[\begin{tikzcd}%[column sep=large]
E|_U:=\pi^{-1}(U)\arrow[rr,"\Phi" ]\arrow[dr,swap,"\pi" ]& & U\times \mathbb{R}^k \arrow[dl,"\pi_1" ] \\
& U &
\end{tikzcd}
\]
\end{document}
我希望将 $\pi$ 的大小增加到这个大小,
\begin{center}
\begin{tikzpicture}
\node (E) at (0,0) {$E_1$};
\node[right=of E] (F) {$E_2$};
\draw[->] (E)--(F) node [midway,above] (phi) {$h$};
\node[below= 1cm of phi] (A) {$\mathcal{M}$};
\draw[->] (E)--(A.north west) node [midway,below] {$\pi_1$};
\draw[->] (F)--(A.north east) node [midway,right] {$\pi_2$};
\end{tikzpicture}
\end{center}
答案1
您可能希望将语句参数中的\pi
、\pi_1
和分别替换为、和。\Phi
\arrow
\textstyle\pi
\textstyle\pi_1
\textstyle\Phi
\documentclass{article}
\usepackage{tikz-cd,amsmath,amsfonts}
\begin{document}
\[\begin{tikzcd}%[column sep=large]
E|_U:=\pi^{-1}(U) \arrow[rr,"\textstyle\Phi" ]
\arrow[dr,swap,"\textstyle\pi" ]
& & U\times \mathbb{R}^k
\arrow[dl,"\textstyle\pi_1" ] \\
& U &
\end{tikzcd}
\]
\end{document}
答案2
我不确定您是否想这样做:查看精美书籍中的交换图,您会注意到标签通常按照上标的大小排版。
您可以更改添加到标签的选定标签的大小\textstyle
,如 Mico 的回答中所示,但如果您想对所有标签都执行此操作,这会很无聊并且容易出错。
\documentclass{article}
\usepackage{tikz-cd,amsmath}
\usepackage{amsfonts}
\begin{document}
This is the best style, in my opinion, which is used
in most commutative diagrams in papers and books
\[
\begin{tikzcd}
E|_U:=\pi^{-1}(U)\arrow[rr,"\Phi" ]\arrow[dr,swap,"\pi" ] &&
U\times \mathbb{R}^k \arrow[dl,"\pi_1" ] \\
& U
\end{tikzcd}
\]
You can change the behavior locally
\[
\begin{tikzcd}[labels={font=\everymath\expandafter{\the\everymath\textstyle}}]
E|_U:=\pi^{-1}(U)\arrow[rr,"\Phi" ]\arrow[dr,swap,"\pi" ] &&
U\times \mathbb{R}^k \arrow[dl,"\pi_1" ] \\
& U
\end{tikzcd}
\]
or globally%
\tikzcdset{labels={font=\everymath\expandafter{\the\everymath\textstyle}}}
\[
\begin{tikzcd}
E|_U:=\pi^{-1}(U)\arrow[rr,"\Phi" ]\arrow[dr,swap,"\pi" ] &&
U\times \mathbb{R}^k \arrow[dl,"\pi_1" ] \\
& U
\end{tikzcd}
\]
\end{document}
“本地方式”仅适用于指定选项的图表。\tikzcd
如果您决定使用“全局方式”,则应将其放在序言中;我仅通过显示示例将其放在文档正文中。