我有一个definition
环境,其中有两个 tikzcd 图表,我希望文本环绕它们。具体来说,我希望图表位于文本的右侧,但如下面的屏幕截图所示,图表没有贴在页面的右侧。这在帖子中有效将文本环绕在 tikz-cd 图表周围时将其向上移动,这就是我的尝试所基于的。
以下是完整的tex
源代码:
\documentclass[14pt, a4paper]{extarticle}
% font & text-related
\usepackage{sansmathfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[charter, uppercase=upright]{mathdesign}
% so the compilation does not give a warning
\let\circledS\undefined % here - PS
% math environment/symbol related
\usepackage{amsmath, amssymb, amsthm}
\usepackage{gensymb}
\usepackage{tikz-cd}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{wrapfig}
% for including q.uiver.app diagrams:
\usepackage{quiver}
% paper dimensions, margins
\usepackage{geometry}
\usepackage{babel}
\usepackage[shortlabels, inline]{enumitem}
\usepackage{extsizes}
\geometry{margin=.7in, bottom=.8in, top=.6in}
% disables enum separation with enumitem
\setenumerate{noitemsep}
% theorem, proof, example environments
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}
\begin{document}
Returning to our previous constructions, we wish to generalize
their definitional pattern as much as possible. The third condition
is already in a categorical state, but the first two conditions may be
generalized, which is what we will do now.
\begin{definition}[Cone I]
\begin{wrapfigure}{r}{.3\textwidth}
\begin{tikzcd}[ampersand replacement=\&]
\& c \\
\\
Fj \&\& Fk
\arrow["{\lambda_j}"', from=1-2, to=3-1]
\arrow["{\lambda_k}", from=1-2, to=3-3]
\arrow["F\alpha"', from=3-1, to=3-3]
\end{tikzcd}
\end{wrapfigure}
Let $F: J\to C$ be a diagram. a cone over $F$ (or simply a cone of $F$) is
an object $c\in C$, together with a collection of morphisms
$(\lambda_j: c\to Fj)_{j\in J}$ such that given any pair of objects $j, k\in J$
and any morphism $\alpha: j\to k \in J$, the following diagram commutes
\begin{wrapfigure}{r}{.3\textwidth}
\begin{tikzcd}[ampersand replacement=\&]
Fj \&\& Fk \\
\\
\& {c'}
\arrow["{\varepsilon_j}"', from=1-1, to=3-2]
\arrow["{\varepsilon_k}", from=1-3, to=3-2]
\arrow["F\alpha", from=1-1, to=1-3]
\end{tikzcd}
\end{wrapfigure}
Similarly, a cone under $F$ (or simply a \emph{cocone} of $F$) is an object $c'\in C$,
along with a collection of morphisms $(\varepsilon_j: Fj\to c')_{j\in J} \in C$
such that given any pair of objects and morphisms from $J$ the following diagram again commutes:
\end{definition}
\end{document}
答案1
正如@Qrrbrbirlbel 在评论中所述,wrapfigure
在列表中不起作用。但定理、定义等被定义为列表。
一种可能的解决方法是将定义和图表放在相邻的minipage
位置。
\documentclass[14pt, a4paper]{extarticle}
% font & text-related
\usepackage{sansmathfonts}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[charter, uppercase=upright]{mathdesign}
% so the compilation does not give a warning
\let\circledS\undefined % here - PS
% math environment/symbol related
\usepackage{amsmath, amssymb, amsthm}
\usepackage{gensymb}
\usepackage{tikz-cd}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{wrapfig}
% for including q.uiver.app diagrams:
%\usepackage{quiver}
% paper dimensions, margins
\usepackage{geometry}
\usepackage{babel}
\usepackage[shortlabels, inline]{enumitem}
\usepackage{extsizes}
\geometry{margin=.7in, bottom=.8in, top=.6in}
% disables enum separation with enumitem
\setenumerate{noitemsep}
% theorem, proof, example environments
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}
\begin{document}
Returning to our previous constructions, we wish to generalize
their definitional pattern as much as possible. The third condition
is already in a categorical state, but the first two conditions may be
generalized, which is what we will do now.
\noindent\begin{minipage}{.6\textwidth}\begin{definition}[Cone I]
Let $F: J\to C$ be a diagram. a cone over $F$ (or simply a cone of $F$) is
an object $c\in C$, together with a collection of morphisms
$(\lambda_j: c\to Fj)_{j\in J}$ such that given any pair of objects $j, k\in J$
and any morphism $\alpha: j\to k \in J$, the following diagram commutes:
Similarly, a cone under $F$ (or simply a \emph{cocone} of $F$) is an object $c'\in C$,
along with a collection of morphisms $(\varepsilon_j: Fj\to c')_{j\in J} \in C$
such that given any pair of objects and morphisms from $J$ the following diagram again commutes:
\end{definition}
\end{minipage}
\begin{minipage}{.4\textwidth}\centering
\begin{tikzcd}[ampersand replacement=\&]
\& c \\
\\
Fj \&\& Fk
\arrow["{\lambda_j}"', from=1-2, to=3-1]
\arrow["{\lambda_k}", from=1-2, to=3-3]
\arrow["F\alpha"', from=3-1, to=3-3]
\end{tikzcd}
\begin{tikzcd}[ampersand replacement=\&]
Fj \&\& Fk \\
\\
\& {c'}
\arrow["{\varepsilon_j}"', from=1-1, to=3-2]
\arrow["{\varepsilon_k}", from=1-3, to=3-2]
\arrow["F\alpha", from=1-1, to=1-3]
\end{tikzcd}
\end{minipage}
\end{document}