TeX - LaTeX Asked by mattecapu on May 10, 2021
I’m typesetting a diagram in beamer
. It renders like this:
EDIT: the problem appears to be just the background color of the arrow. It’s white and not transparent, therefore stands out on the black background.
This is the result I want:
Here’s a MWE:
documentclass[10pt, notheorems]{beamer}
usepackage{tikz}
usetikzlibrary{cd, arrows, decorations.pathmorphing}
definecolor{colornormaltext}{HTML}{e5e8f8}
definecolor{colorbg}{HTML}{101316}
definecolor{colorgold}{HTML}{db9a46}
setbeamercolor{background canvas}{bg=colorbg}
setbeamercolor{normal text}{fg=colornormaltext}
begin{document}
begin{frame}
begin{equation*}
begin{tikzcd}[ampersand replacement=&]
Sh_ W &[-3ex] &[-3ex] Sh_ V
& Msbl
arrow[""{name=0, anchor=center, inner sep=0}, "{f_*}"', shift right=2, from=1-1, to=1-3]
arrow[""{name=1, anchor=center, inner sep=0}, "{f^*}"', shift right=2, from=1-3, to=1-1]
arrow["{O_W}", from=2-2, to=1-1]
arrow[""{name=2, anchor=center, inner sep=0}, "{O_V}"', from=2-2, to=1-3]
arrow["dashv"{anchor=center, rotate=-90}, draw=none, from=1, to=0]
arrow[shift left=2, Rightarrow, "hat f", from=2, to=1-1]
end{tikzcd}
end{equation*}
end{frame}
end{document}
The incriminated arrow is the very last one in the code:
arrow[shift left=2, Rightarrow, "hat f", from=2, to=1-1]
Found the answer in a different thread.
The tikz-cd environment has a setting for the background color, which you would need to set to black in your case, i.e. simply change
begin{tikzcd}[ampersand replacement=&]
to
begin{tikzcd}[ampersand replacement=&, background color=black]
and it gives the desired result.
Correct answer by kitsune on May 10, 2021
I am not going to create MWE but have you tried adding usetikzlibrary{arrows.meta}
to your preamble? Then, try this:
arrow[""{name=0, anchor=center, inner sep=0,latex-}, "{f_*}"', shift right=2, from=1-1, to=1-3]
Answered by NIck Bennett on May 10, 2021
documentclass{beamer}
usepackage{tikz-cd}
usetikzlibrary{arrows.meta}
begin{document}
begin{frame}[fragile]
frametitle{tikz-cd diagram}
[
begin{tikzcd}[
row sep = large,
arrow style = tikz,
> = {Straight Barb[scale=0.8]}
]
Sh_{mathrm{a.e.}}W_{infty} ar[rr,shift right=0.5em, "1_t*" ', "bot"]
& & Sh_{mathrm{a.e.}}W_t ar[ll,shift right=0.5em,"1^*_t" ']
& mathsf{Msbl} ar[ul, "mathcal{O}_{infty}"]
ar[ur, "mathcal{O}_t" ']
&
end{tikzcd}
]
end{frame}
end{document}
Addendum:
It is still (unfortunately) not clear where arrow in the middle of diagram should be. Also if it need to be Rightarrow
In case that it need to cross arrows from node 2-2
to 1-3
result can be ugly (to my opinion). So below are two examples of:
documentclass{beamer}
usepackage{tikz-cd}
usetikzlibrary{arrows.meta}
begin{document}
begin{frame}[fragile]
frametitle{tikz-cd diagram}
[
begin{tikzcd}[
row sep = large,
arrow style = tikz,
> = {Straight Barb[scale=0.8]},
]
Sh_{mathrm{a.e.}}W_{infty} ar[rr,shift right=0.5em, "1_t*" ', "bot"]
& & Sh_{mathrm{a.e.}}W_t ar[ll,shift right=0.5em,"1^*_t" ']
& mathsf{Msbl} ar[ul, "mathcal{O}_{infty}"]
ar[ur, ""{name=Ot,right}]
ar[ur, "mathcal{O}_t" ']
ar[dashrightarrow, from=Ot, to=1-1,yshift=-1ex]
&
end{tikzcd}
]
end{frame}
end{document}
or (only diagram code):
Sh_{mathrm{a.e.}}W_{infty} ar[rr,shift right=0.5em, "1_t*" ', "bot"]
& & Sh_{mathrm{a.e.}}W_t ar[ll,shift right=0.5em,"1^*_t" ']
& mathsf{Msbl} ar[ul, "mathcal{O}_{infty}"]
ar[ur, draw=none, ""{name=Ot,right}]
ar[ur, "mathcal{O}_t" ']
ar[Rightarrow, crossing over, from=Ot, to=1-1,yshift=-1ex]
&
or with Rightarrow
inside diagram:
Sh_{mathrm{a.e.}}W_{infty} ar[rr,shift right=0.5em, "1_t*" ', "bot"]
& & Sh_{mathrm{a.e.}}W_t ar[ll,shift right=0.5em,"1^*_t" ']
& mathsf{Msbl} ar[ul, "mathcal{O}_{infty}"]
ar[ur, "mathcal{O}_t" ', ""{name=Ot}]
ar[Rightarrow, from=Ot, to=1-1,yshift=-1ex]
&
Answered by Zarko on May 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP