
我在用著安德魯史黛西的精彩的TQFT封裝建立共邊圖片。但我在邊界方面遇到了麻煩:
\documentclass{article}
\usepackage{tikz}
\usepackage{tqft}
\begin{document}
\begin{tikzpicture}
\node[draw,tqft/reverse pair of pants,boundary lower style={draw,dashed}] (A) {};
\node[label={below:should be solid}] at (A.outgoing boundary 1) {};
\end{tikzpicture}
\end{document}
我對配邊的繪圖約定是,由配邊覆蓋的邊界是虛線,所有可見的都應該是實線。上面是我走了多遠 - 幾乎所有圓圈都正確顯示,但底部圓圈應該完全實心。是否有一個鍵僅用於設定傳出下邊界的樣式?
答案1
lower boundary
您可以為via鍵定義全域設定every ...
。所以你需要覆蓋它。
\documentclass{standalone}
\usepackage{tikz}
\usepackage{tqft}
\begin{document}
\begin{tikzpicture}[every tqft/.style={draw,boundary lower style={draw,dashed}}]% DASHED!!!
\node[tqft/pair of pants] (A) {};
\node[tqft/reverse pair of pants,anchor=incoming boundary 1,
boundary lower style={draw,solid}% SOLID AGAIN HERE !!
] (B) at (A.outgoing boundary 1) {};
\node[label={below:should be solid}] at (B.outgoing boundary 1) {};
\end{tikzpicture}
\end{document}
答案2
可以透過在褲子上畫一個額外的邊界圓來解決這個問題(感謝 Andrew Stacey 指出了這一點):
\documentclass{article}
\usepackage{tikz}
\usepackage{tqft}
\begin{document}
\begin{tikzpicture}
\node[draw,tqft/reverse pair of pants,boundary lower style={draw,dashed}] (A) {};
\node[tqft boundary circle,draw] at (A.outgoing boundary 1) {};
\node[label={below:should be solid}] at (A.outgoing boundary 1) {};
\end{tikzpicture}
\end{document}
答案3
我已(2014 年 4 月 7 日)將新版本的軟體包上傳tqft
到 CTAN。一旦它在整個系統中傳播,下面就會達到預期的結果。
\documentclass{article}
%\url{http://tex.stackexchange.com/q/167836/86}
\usepackage{tikz}
\usetikzlibrary{tqft}
\begin{document}
\begin{tikzpicture}
\pic[
draw,
tqft/reverse pair of pants,
every lower boundary component/.style={draw},
every incoming lower boundary component/.style={dashed},
every outgoing lower boundary component/.style={solid},
name=A
];
\node[label={below:is solid}] at (A-outgoing boundary 1) {};
\end{tikzpicture}
\end{document}
此版本(需要 TikZ3.0 或更高版本)引入了更多的樣式可能性。本質上,任何配邊路徑段都可以單獨設計樣式。