1

With regards to this two questions Tikz - three pictures in two pages in landscape mode and Tikz - highlight text in an image, I struggle to put the given solutions together (which work otherwise fine for me) to highlight a part in picture A.

The context is that I have two pages (A4 in landscape mode) with three pictures on them, while one in the middle spane over both pages. Now I would like to highlight a part of the first picture, but fail to highlighted the desired part and have the rest reduced to an opaque black.

This is my code:

\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}

I presume that I do not manage to highlight parts of the image as it is not in a minipage environment. What can I do?

Til Hund
  • 1,181
  • Sorry, but currently I fail to compile your example. It says ! Package pgf Error: No shape named image is known.. – L. F. Feb 21 '19 at 10:32

1 Answers1

0

If I add the missing node name (image), I get

\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}

enter image description here

As my crystal ball got stolen, I do not know if that's the part you wanted to highlight. ;-)