TeX - LaTeX Asked by Alec Rhea on July 5, 2021
Is there a package that allows for vertical in-line diagrams, like the one below?
I’ve tried the following code inline using 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}
with the following result
but I was hoping for a method that didn’t disturb the line-height placement of the next line down, like in the example above.
You can simply use raisebox{<up/down shift>}{content to shift}
For example
bla bla bla raisebox{0pt}{$begin{matrix}mathcal{E}downarrowmathcal{B}end{matrix}$} bla bla
will produce
Here how raisebox{}
works:
in the middle of the text....
raisebox{0pt}{
$begin{matrix}
mathcal{E}downarrowmathcal{B}end{matrix}$
}
at the top of the text...
raisebox{10pt}{
$begin{matrix}mathcal{E}downarrowmathcal{B}end{matrix}$
}
at the bottom of the text....
raisebox{-10pt}{
$begin{matrix}mathcal{E}downarrowmathcal{B}end{matrix}$
}
Upgrade for labeled arrows
Using a two column matrix is it easy (maybe not so pretty) to label the vertical line. Eg
$
setlength{arraycolsep}{0pt}
begin{matrix}
mathcal{E}&
downarrow&F
mathcal{B}&
end{matrix}$
Correct answer by Colo on July 5, 2021
I propose this variant approach, using only the stackengine
package and basic latex commands:
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}
Answered by Bernard on July 5, 2021
Here there are two approaches:
amsmath
and amssymb
.$overset{mathbb{E}}{underset{mathbb{B}}{scriptstyle downarrow}} scriptscriptstyle F$
xy
package which contains (xy-pic
).You here can see the different approaches in the screenshot.
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}
Answered by Sebastiano on July 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP