内联垂直图

内联垂直图

是否有一个允许垂直内联图的包,像下面这个?

我已经尝试使用 xy-pic 内联以下代码

\documentclass{article}
\usepackage[all,cmtip,2cell]{xy}
\begin{document}
This is an example. This is an example. This is an example. This is an example. This is an example. This is an example. $\xymatrixrowsep{.1mm}\xymatrix{\mathcal{E} \ar[dd] \\ \ \ \ F \\ \mathcal{B}}$ This is an example. This is an example. This is an example. This is an example. This is an example. This is an example. 
\end{document}

结果如下

但我希望找到一种不会干扰下一行行高位置的方法,如上面的例子所示。

答案1

你可以简单地使用\raisebox{<up/down shift>}{content to shift}

例如

 bla bla bla \raisebox{0pt}{$\begin{matrix}\mathcal{E}\\\downarrow\\\mathcal{B}\end{matrix}$} bla bla

将产生

在此处输入图片描述

工作原理如下\raisebox{}

 in the middle of the text....
 \raisebox{0pt}{
 $\begin{matrix}
 \mathcal{E}\\\downarrow\\\mathcal{B}\end{matrix}$
 }
 at the top of the text...
 \raisebox{10pt}{
 $\begin{matrix}\mathcal{E}\\\downarrow\\\mathcal{B}\end{matrix}$
 }
 at the bottom of the text....
 \raisebox{-10pt}{
 $\begin{matrix}\mathcal{E}\\\downarrow\\\mathcal{B}\end{matrix}$
 }
 

在此处输入图片描述

升级标记箭头

使用两列矩阵很容易(也许不是那么漂亮)标记垂直线。例如

 $
 \setlength{\arraycolsep}{0pt}
 \begin{matrix}
 \mathcal{E}&\\
 \downarrow&F \\
 \mathcal{B}&
 \end{matrix}$

在此处输入图片描述

答案2

我建议使用这种变体方法,仅使用stackengine包和基本的乳胶命令:

\documentclass{article}
\usepackage[usestackEOL]{stackengine}

\begin{document}

This is an example. This is an example. This is an example. This is an example. This is an example. This is an example.\setstackgap{L}{2.2ex}$\Vectorstack{\mathcal{E}\\ \phantom{\scriptstyle F\!}\downarrow {\!\scriptstyle F} \\ \mathcal{B}}$ This is an example. This is an example. This is an example. This is an example. This is an example. This is an example.

\end{document}

在此处输入图片描述

答案3

这里有两种方法:

  1. 第一是使用amsmath和的常用命令amssymb

$\overset{\mathbb{E}}{\underset{\mathbb{B}}{\scriptstyle \downarrow}} \scriptscriptstyle F$

  1. 使用xy包含(xy-pic)的包。

您可以在屏幕截图中看到不同的方法。

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage[all,cmtip]{xy}
\usepackage{parskip}
\begin{document}
Et sem luctus quisque porta viverra hymenaeos consequat et ridiculus commodo platea mollis sem erat quam sollicitudin, luctus arcu lacus vestibulum nam Pharetra purus ullamcorper nam cursus sollicitudin nec risus $\xymatrix@C=.2pt{
\mathcal{E} \ar[d]^F& \\
\mathcal{B} &
}\hspace{-.25cm}$ lipsum $\overset{\mathcal{E}}{\underset{\mathcal{B}}{\scriptstyle \downarrow}}$. Sit volutpat etiam. Dapibus. Dictumst quisque. Suspendisse pulvinar dignissim. Natoque volutpat dui sodales viverra volutpat lacus $\overset{\mathbb{E}}{\underset{\mathbb{B}}{\scriptstyle \downarrow}} \scriptscriptstyle F$. Fusce pede proin rutrum enim. Velit, diam taciti. Praesent hymenaeos consequat, libero cum accumsan.
\end{document}

在此处输入图片描述

相关内容