TeX - LaTeX Asked on November 29, 2020
I noticed that the newtx font somehow makes the arrows in tikz-cd diagrams appear significantly bigger.
I wonder why that is and if there would be any way to solve this issue.
MWE below.
The code
documentclass[11pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{tikz-cd}
%usepackage{newtxtext}
%usepackage{newtxmath}
begin{document}
[begin{tikzcd}
X_0 rar & X_1 lar[shift left=1.5] lar[shift right=1.5] rar[shift right=1.5] rar[shift left=1.5] & X_2 larlar[shift right=3]lar[shift left=3] rar rar[shift left=3] rar[shift right=3] & dots lar[shift left=1.5]lar[shift left=4.5]lar[shift right=1.5]lar[shift right=4.5]
end{tikzcd}]
end{document}
yields the following picture :
but uncommenting the newtxtext and math will give me this :
I found a quick way to fix it by simply changing my arrow tips (allowing me to also match the arrow style of the newtx font). By simply adding
tikzset{>={Straight Barb[scale = 0.7]}}
tikzcdset{arrow style=tikz}
to my preamble I get this :
which already looks much nicer. I still wonder what causes the problem in the first place and would appreciate any insight.
It is in general better to make these changes local since they may affect other tikzpicture
s if they are not.
documentclass[11pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{tikz-cd}
usepackage{newtxtext}
usepackage{newtxmath}
tikzcdset{smaller arrows/.style={arrow style=tikz,every arrow/.append style={>={Straight Barb[scale = 0.7]}}}}
begin{document}
[begin{tikzcd}[smaller arrows]
X_0 rar & X_1 lar[shift left=1.5] lar[shift right=1.5] rar[shift right=1.5] rar[shift left=1.5] & X_2 larlar[shift right=3]lar[shift left=3] rar rar[shift left=3] rar[shift right=3] & dots lar[shift left=1.5]lar[shift left=4.5]lar[shift right=1.5]lar[shift right=4.5]
end{tikzcd}]
end{document}
Answered by ged on November 29, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP