TeX - LaTeX Asked by Yan King Yin on February 12, 2021
I want to produce a "turnstile" ie vdash
style arrow in tikz-cd.
I can do it with option [maps to, no head]
but then the vertical bar appears too short:
documentclass{article}
usepackage{tikz-cd}
tikzcdset{arrow style=tikz}
usepackage{tikz}
begin{document}
begin{equation}
begin{tikzcd}
A arrow[r, maps to, no head, "F"] & B
end{tikzcd}
end{equation}
end{document}
What is the simplest way to add a longer vertical bar to the tail?
You were quite close, I changed maps to
to tail
, not a huge difference in the result, but in my case you're just saying "I want the tail" rather than "I want this arrow". We will be keeping the no head
.
The major change, or rather addition, I did was to add a style to tikzcdset
.
documentclass[margin=10pt]{standalone}
usepackage{tikz-cd} % no need to load tikz, since tikz-cd already loads it
% usetikzlibrary{arrows.meta} % you can uncomment this if you want more arrow types
tikzcdset{
arrow style=tikz,
diagrams={>={|[scale=2]}}
}
begin{document}
begin{tikzcd}
A arrow[r, tail, no head,"F"] & B
end{tikzcd}
end{document}
Answered by Alenanno on February 12, 2021
I found a simpler solution, combining ideas from this answer:
begin{tikzcd}[| /.tip = {Bar[scale=2]}]
A arrow[r, |-] B
end{tikzcd}
Also, the first answer has the problem that it changes all diagrams in the document, but this one affects only the current diagram.
Answered by Yan King Yin on February 12, 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