TeX - LaTeX Asked on April 21, 2021
As illustrated by the pictures below, some options appear not to be constrained by their scope (e.g., line thickness and dashing) while others do. (Using the backgrounds
package.) What is the rule? Separately, note the odd consequences for the arrowhead size.
documentclass{article}
usepackage{tikz}
usetikzlibrary{backgrounds}
begin{document}
begin{tikzpicture}[x=1in,y=1in]
draw[ultra thick,blue] (0,1) -- (2,1);
begin{scope}[on background layer]
draw (0,2) -- (2,0);
end{scope}
begin{scope}[on background layer={ultra thick,red,dashed,->,>=latex}]
draw (0,0) -- (2,2);
end{scope}
end{tikzpicture}
%
begin{tikzpicture}[x=1in,y=1in]
draw[ultra thick,blue] (0,1) -- (2,1);
begin{scope}[on background layer={red,dashed,ultra thick}]
draw (0,0) -- (2,2);
end{scope}
begin{scope}[on background layer={->,>=latex}]
draw (0,2) -- (2,0);
end{scope}
end{tikzpicture}
end{document}
documentclass{article}
usepackage{tikz}
usetikzlibrary{backgrounds}
begin{document}
begin{tikzpicture}[x=1in,y=1in]
draw[ultra thick,blue] (0,1) -- (2,1);
begin{scope}[on background layer]
draw (0,2) -- (2,0);
end{scope}
begin{scope}[on background layer={ultra thick,red,dashed,->,>=latex}]
draw (0,0) -- (2,2);
end{scope}
end{tikzpicture}
%
begin{tikzpicture}[x=1in,y=1in]
draw[ultra thick,blue] (0,1) -- (2,1);
begin{scope}[on background layer={red,dashed,ultra thick}]
draw (0,0) -- (2,2);
end{scope}
begin{scope}[on background layer={ultra thick,dashed,->,>=latex}]
draw (0,2) -- (2,0);
end{scope}
end{tikzpicture}
end{document}
Answered by js bibra on April 21, 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