![如何抑制家谱树节点中的图像线条?](https://linux22.com/image/361333/%E5%A6%82%E4%BD%95%E6%8A%91%E5%88%B6%E5%AE%B6%E8%B0%B1%E6%A0%91%E8%8A%82%E7%82%B9%E4%B8%AD%E7%9A%84%E5%9B%BE%E5%83%8F%E7%BA%BF%E6%9D%A1%EF%BC%9F.png)
以下 mwe (如果我没记错的话,这是来自 genealogytree 手册的一个稍微修改过的示例)在为已婚人士添加照片时会产生一条丑陋的线条。
问题:是否可以只删除(或缩短)图片右侧的红线?如果可以,该怎么做?谢谢!
代码:
\documentclass[landscape,paper=a5]{scrartcl}
\usepackage[all]{genealogytree}
\usepackage{mwe}
\begin{document}
\newcommand{\treetitle}{Mr. X}
\begin{tcolorbox}[enhanced,sharp corners,boxrule=0.6pt,left=0pt,right=0pt,
colback=blue!50!black,interior style image=goldshade.png,
halign=center,center title,fonttitle=\bfseries,
title={\treetitle},
]
\begin{genealogypicture}[
processing=database,
database format=
%medium marriage below,
full marriage below,
node size=2.4cm,
level size=3.5cm,
level distance=6mm,
list separators hang,
name font=\bfseries,
surn code={\textcolor{red!50!black}{#1}},
place text={\newline}{},
date format=d.mon.yyyy,
tcbset={
male/.style={colframe=blue,colback=blue!5},
female/.style={colframe=red,colback=red!5}
},
box={fit basedim=7pt,boxsep=2pt,segmentation style=solid,
halign=flush left,before upper=\parskip1pt,
\gtrDBsex
,drop fuzzy shadow,
if image defined={add to width=25mm,right=25mm,
underlay={\begin{tcbclipinterior}\path[fill overzoom image=
\gtrDBimage
]
([xshift=-24mm]interior.south east) rectangle (interior.north east);
\end{tcbclipinterior}},
}{},
},
edges=rounded,
symbols record reset,
% after tree={\node[font=\scriptsize\itshape,text width=5cm,below left,
% fill=white,fill opacity=0.4,text opacity=1]
% at (current bounding box.north east) {
% \gtrSymbolsFullLegend
% };},
]
sandclock{
child{
g[id=JohnDoe1990]{
female,
name={\pref{John} \surn{Doe}},
birth={1990-01-01}{Springfield},
image={example-image-a},
marriage={2010-01-01}{Springfield}, %<- causes ugly line
}
}
}
\end{genealogypicture}
\end{tcolorbox}
\end{document}
答案1
使用键定义线条,您可以告诉它将线条缩短与底层代码中segmentation style
相同的量。这是一个完整的示例:xshift
\documentclass[landscape,paper=a5]{scrartcl}
\usepackage[all]{genealogytree}
\usepackage{mwe}
\begin{document}
\newcommand{\treetitle}{Mr. X}
\begin{tcolorbox}[enhanced,sharp corners,boxrule=0.6pt,left=0pt,right=0pt,
colback=blue!50!black,interior style image=goldshade.png,
halign=center,center title,fonttitle=\bfseries,
title={\treetitle},
]
\begin{genealogypicture}[
processing=database,
database format=
%medium marriage below,
full marriage below,
node size=2.4cm,
level size=3.5cm,
level distance=6mm,
list separators hang,
name font=\bfseries,
surn code={\textcolor{red!50!black}{#1}},
place text={\newline}{},
date format=d.mon.yyyy,
tcbset={
male/.style={colframe=blue,colback=blue!5},
female/.style={colframe=red,colback=red!5}
},
box={fit basedim=7pt,boxsep=2pt,
halign=flush left,before upper=\parskip1pt,segmentation style=solid,
\gtrDBsex
,drop fuzzy shadow,
if image defined={add to width=25mm,right=25mm,segmentation style={solid,shorten >=24mm},
underlay={\begin{tcbclipinterior}\path[fill overzoom image=
\gtrDBimage
]
([xshift=-24mm]interior.south east) rectangle (interior.north east);
\end{tcbclipinterior}},
}{},
},
edges=rounded,
symbols record reset,
% after tree={\node[font=\scriptsize\itshape,text width=5cm,below left,
% fill=white,fill opacity=0.4,text opacity=1]
% at (current bounding box.north east) {
% \gtrSymbolsFullLegend
% };},
]
sandclock{
child{
g[id=JohnDoe1990]{
female,
name={\pref{John} \surn{Doe}},
birth={1990-01-01}{Springfield},
image={example-image-a},
marriage={2010-01-01}{Springfield}, %<- causes ugly line
}
}
}
\end{genealogypicture}
\end{tcolorbox}
\end{document}