为什么不是所有线条都覆盖在气泡上?我特别指的是从“normal”到“adsf”的线条。
免责声明:我实际上想在工作中做的是,让下面的线条出现,但实际上没有(当然,层的顺序是相反的)。但是,我无法以某种方式重现 MWE,所以我想,如果可以按照此处显示的方式解决问题,我应该能够在实际工作中正确解决它。
\documentclass[a2paper]{tikzposter} % See Section 3
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains,positioning,calc,trees,mindmap,backgrounds}
\pgfdeclarelayer{mindmaplayer}
\pgfdeclarelayer{linelayer}
\pgfsetlayers{backgroundlayer,main,notelayer,mindmaplayer,linelayer}
\title{Title} \institute{Inst} % See Section 4.1
\author{Auth} \titlegraphic{Logo}
\usetheme{Basic} % See Section 5
\tikzset{
isNode/.style args = {color#1connected to#2}{concept, concept color=#1, alias=this,
append after command = {\pgfextra{ \begin{pgfonlayer}{linelayer} \draw[dashed,ultra thick,red] (this)--(#2); \end{pgfonlayer} }}
},
toNode/.style = {concept, concept color=#1},
%
isConc/.style = {concept, concept color=orange},
toConc/.style = {concept, concept color=orange},
is6/.style = {isNode = color blue connected to othernode},
to6/.style = {toNode = blue}
}
\begin{document}
\maketitle
\block{BlocktitleA}{
\begin{tikzpicture}
\begin{pgfonlayer}{mindmaplayer}
\node[fill=red, circle] (othernode) at (7,7) {adsf};
\path[mindmap, isConc] (0,0cm) node[isConc] {Statistic} [clockwise from=90]
child[toConc] { node[isConc] {general theory}
child[to6] { node[is6] {intro} }
child[to6] { node[is6] {outro} }
}
child[toConc] { node[isConc] {distributions} [clockwise from=-30]
child[to6] { node[is6] {normal} }
child[to6, sibling angle=-60] { node[is6] {binomial} }
}
;
\end{pgfonlayer}
\end{tikzpicture}
}
\end{document}
使用(this.center)--(#2.center);
我得到(“adsf”现在为绿色)
文件列表
*File List*
tikzposter.cls 2014/01/15 v2.0 LaTeX document class for Posters
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
ae.sty 2001/02/12 1.3 Almost European Computer Modern
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
t1aer.fd 1997/11/16 Font definitions for T1/aer.
xstring.sty 2013/10/13 v1.7c String manipulations (C Tellechea)
etoolbox.sty 2011/01/03 v2.1 e-TeX tools for LaTeX
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76)
pgf.sty 2008/01/15 v2.10 (rcs-revision 1.12)
pgfrcs.sty 2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
pgfsys.sty 2010/06/30 v2.10 (rcs-revision 1.37)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2008/07/18 (rcs-revision 1.7)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v2.10 (rcs-revision 1.1)
pgffor.sty 2010/03/23 v2.10 (rcs-revision 1.18)
pgfkeys.sty
pgfkeys.code.tex
pgffor.code.tex
tikz.code.tex
extarticle.cls 1996/10/08 v1.0 Non Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
exscale.sty 2007/10/29 v2.1h Standard LaTeX package exscale
geometry.sty 2010/09/12 v5.6 Page Geometry
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
a0size.sty 2004/01/31 v1.22b a0poster class (GK, MW)
tikzposterColorpalettes.tex
tikzposterColorstyles.tex
tikzposterBackgroundstyles.tex
tikzposterTitlestyles.tex
tikzposterBlockstyles.tex
tikzposterInnerblockstyles.tex
tikzposterNotestyles.tex
tikzposterLayoutthemes.tex
supp-pdf.mkii
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
***********
答案1
它们全部都在气泡上方,因为您将它们绘制在最上层linelayer
。但是当您用\draw[dashed,ultra thick,red] (this)--(#2);
所有线条绘制它们时,它们都会停止在气泡边界处,就像节点连接一样。如果您想在气泡中心之间绘制这些线条并测试所有线条都在气泡上方,请使用\draw[dashed,ultra thick,red] (this.center)--(#2.center);
或
\draw[dashed,ultra thick,red] (this.center)--(#2);
用于获取:
完整代码及版本列表:
\documentclass[a2paper]{tikzposter} % See Section 3
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains,positioning,calc,trees,mindmap,backgrounds}
\pgfdeclarelayer{mindmaplayer}
\pgfdeclarelayer{linelayer}
\pgfsetlayers{backgroundlayer,main,notelayer,mindmaplayer,linelayer}
\title{Title} \institute{Inst} % See Section 4.1
\author{Auth} \titlegraphic{Logo}
\usetheme{Basic} % See Section 5
\tikzset{
isNode/.style args = {color#1connected to#2}{concept, concept color=#1, alias=this,
append after command = {\pgfextra{ \begin{pgfonlayer}{linelayer} \draw[dashed,ultra thick,red] (this.center)--(#2); \end{pgfonlayer} }}
},
toNode/.style = {concept, concept color=#1},
%
isConc/.style = {concept, concept color=orange},
toConc/.style = {concept, concept color=orange},
is6/.style = {isNode = color blue connected to othernode},
to6/.style = {toNode = blue}
}
\listfiles
\begin{document}
\maketitle
\block{BlocktitleA}{
\begin{tikzpicture}
\begin{pgfonlayer}{mindmaplayer}
\node[fill=red, circle] (othernode) at (7,7) {adsf};
\path[mindmap, isConc] (0,0cm) node[isConc] {Statistic} [clockwise from=90]
child[toConc] { node[isConc] {general theory}
child[to6] { node[is6] {intro} }
child[to6] { node[is6] {outro} }
}
child[toConc] { node[isConc] {distributions} [clockwise from=-30]
child[to6] { node[is6] {normal} }
child[to6, sibling angle=-60] { node[is6] {binomial} }
}
;
\end{pgfonlayer}
\end{tikzpicture}
}
\end{document}
*File List*
tikzposter.cls 2014/01/15 v2.0 LaTeX document class for Posters
xkeyval.sty 2014/12/03 v2.7a package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
calc.sty 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
ae.sty 2001/02/12 1.3 Almost European Computer Modern
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
t1aer.fd 1997/11/16 Font definitions for T1/aer.
xstring.sty 2013/10/13 v1.7c String manipulations (C Tellechea)
etoolbox.sty 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
tikz.sty 2015/08/07 v3.0.1a (rcs-revision 1.151)
pgf.sty 2015/08/07 v3.0.1a (rcs-revision 1.15)
pgfrcs.sty 2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v3.0.1a (rcs-revision 1.7)
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
pgfsys.sty 2014/07/09 v3.0.1a (rcs-revision 1.48)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v3.0.1a (rcs-revision 1.1)
pgffor.sty 2013/12/13 v3.0.1a (rcs-revision 1.25)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
extarticle.cls 1996/10/08 v1.0 Non Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
exscale.sty 2014/09/29 v2.1h Standard LaTeX package exscale
geometry.sty 2010/09/12 v5.6 Page Geometry
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
a0size.sty 2004/01/31 v1.22b a0poster class (GK, MW)
tikzposterColorpalettes.tex
tikzposterColorstyles.tex
tikzposterBackgroundstyles.tex
tikzposterTitlestyles.tex
tikzposterBlockstyles.tex
tikzposterInnerblockstyles.tex
tikzposterNotestyles.tex
tikzposterLayoutthemes.tex
supp-pdf.mkii
***********