我在用着安德鲁·史黛西的精彩的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 或更高版本)引入了更多样式可能性。本质上,共边路径的任何部分都可以单独设置样式。