Tikz - 在非小页面环境中突出显示部分图像

Tikz - 在非小页面环境中突出显示部分图像

关于这两个问题Tikz - 横向模式下两页中有三张图片Tikz - 突出显示图像中的文本,我努力将给出的解决方案放在一起(对我来说效果很好)以突出显示图片 A 中的某个部分。

背景是,我有两页(横向 A4 纸),每页上有三张图片,而中间有一张图片横跨两页。现在我想突出显示第一张图片的一部分,但无法突出显示所需的部分,其余部分被缩小为不透明的黑色。

这是我的代码:

\documentclass{article}
\usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
\pagestyle{empty}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[overlay,remember picture]
\pgfmathsetmacro{\mywidth}{2*\paperwidth/3-1cm} % kept local
\node at ([xshift=-\paperwidth/6-1cm]current page.center){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-a}};
    \begin{scope}[x={(image.south east)},y={(image.north west)}]
        \fill[even odd rule,opacity=0.4]
        (0.11,0.4) -- (0.37,0.404) --  (0.37,0.414) -- (0.11,0.41) -- cycle
        (0,0) rectangle (1,1);
    \end{scope}
\node at (current page.east){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-b}};
\end{tikzpicture}
~
\clearpage
\begin{tikzpicture}[overlay,remember picture]
\pgfmathsetmacro{\mywidth}{2*\paperwidth/3-1cm} % kept local
\node (image) at ([xshift=\paperwidth/6+1cm]current page.center){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-c}};
\node at (current page.west){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-b}};
\end{tikzpicture}
\end{document}

我估计我无法突出显示图像的某些部分,因为它不在小页面环境中。我该怎么办?

答案1

如果我添加缺少的节点名称(image),我会得到

\documentclass{article}
\usepackage[margin=0cm, top=0cm, bottom=0cm, outer=0cm, inner=0cm, landscape, a4paper]{geometry}
\pagestyle{empty}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[overlay,remember picture]
\pgfmathsetmacro{\mywidth}{2*\paperwidth/3-1cm} % kept local
\node (image) at ([xshift=-\paperwidth/6-1cm]current page.center){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-a}};
    \begin{scope}[x={(image.south east)},y={(image.north west)}]
        \fill[even odd rule,opacity=0.4]
        (0.11,0.4) -- (0.37,0.404) --  (0.37,0.414) -- (0.11,0.41) -- cycle
        (0,0) rectangle (1,1);
    \end{scope}
\node at (current page.east){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-b}};
\end{tikzpicture}
~
\clearpage
\begin{tikzpicture}[overlay,remember picture]
\pgfmathsetmacro{\mywidth}{2*\paperwidth/3-1cm} % kept local
\node (image) at ([xshift=\paperwidth/6+1cm]current page.center){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-c}};
\node at (current page.west){%
    \includegraphics[width=\mywidth pt,height=\paperheight]{example-image-b}};
\end{tikzpicture}
\end{document}

在此处输入图片描述

作为我的水晶球被盗了,我不知道这是否是您想要强调的部分。;-)

相关内容