如何抑制家谱树节点中的图像线条?

如何抑制家谱树节点中的图像线条?

以下 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}

代码输出

相关内容