2

I would like to present old digitalised sources with tikz picture in LaTeX for private purposes similar to the presentation of Luther's sources by Google, which you can see here: https://artsandculture.google.com/exhibit/3wIyuklRxxPJJQ (no direct link possible).

I am particularly interested in re-creating a presentation as in the following picture (without the white box in the lower right-hand corner and the arrows left and right):

enter image description here

and in the in this second one (without the arrows left and right):

enter image description here

I have tried a bit around, but it is very difficult for me to recreate the presentation style with tikz. You can find the code I have so far. Feel free, to use any example image of your own or you can use one like this.

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

\usepackage{polyglossia}
\newfontfamily\Libertine[Ligatures={NoCommon}]{Linux Libertine O}

\usepackage{graphicx}
\usepackage{tikz,tikzscale}
\usetikzlibrary{
shapes.geometric,
quotes,
arrows,
arrows.meta,
calc,
backgrounds,
positioning,
decorations.pathreplacing,
bending}

\begin{document}

\begin{tikzpicture}[remember picture, overlay, background rectangle/.style={fill=black}, show background rectangle]
\node[opacity=0.88,inner sep=0pt] at (current page.center){\includegraphics[scale=.9]{image}};
\draw (1,10) node[text=white] {\fontsize{10}{10}\textit{\Libertine{Source description}}} {};
\node [shading = axis, path fading=north, fill=black, opacity=0.25, rectangle, shading angle=0, anchor=south, minimum width=\paperwidth, minimum height=5cm] (box) at (current page.south){};
\end{tikzpicture}

% I am not even quite sure how to write the second image in tikz code. :/
\begin{minipage}{.45\linewidth}
    Text here on several lines.
\end{minipage}\hfill
\begin{minipage}{.45\linewidth}
    \begin{tikzpicture}
        \includegraphics[scale=.5]{image}; % or crop pic
        \node [shading = axis, path fading=north, fill=black, opacity=0.25, rectangle, shading angle=0, anchor=south, minimum width=\paperwidth, minimum height=5cm] (box) at (current page.south){};
    \end{tikzpicture}
\end{minipage}

\end{document}
  • 1
  • 1
    Thank you, Marijn, for commenting. I would rather not call Martin Luther a Cthulhu-worshipping madman as your link suggests, although I guess that many church members would have agreed back then. I guess that my question was somewhat misleading. I am not interested in recreating an image with tikz, I have real sources just like the one in the examples above, however, I am interested in achieving to display them with tikz in the above shown manner. I added a link to an example image: oberhofprediger.de/files/imgs/leichenpredigt.jpg – Til Hund Feb 19 at 13:18
  • 2
    So, just to understand, you have images and you want to portray the image as if it is a page in an old book, that is opened to that page? OR is it that you merely wish to display a given image, with modern text offset to one side or inset into the image? – Steven B. Segletes Feb 19 at 13:24
  • Hi, Steven, I have an image (see link above your comment), which I would like to display in a (horizontal) PDF so that you can see a black background/border around the image and, like can be seen in the first image above, some descriptive lines in the lower left corner in white with a subtitle black background which shifts towards opacity. It does not matter if the whole image I have can only seen partially. This is what I mean when I write to recreate the display of an old source. The same is with the second image, which is another way of presenting it I would like to have in tikz. – Til Hund Feb 19 at 13:27
1

A possible implementation of the first image. The approach is to draw a node with the image in it and a very thick 2cm border. Then, draw a second node with the description. This description has white text, is positioned with its left side on the left side of the image node, 5cm down from the middle, it has a black transparent background but the text is not transparent. Inside is a box of fixed width which is left-aligned.

Code:

\documentclass{article}
\usepackage{tikz}
    \usetikzlibrary{positioning}

\tikzset{
  image/.style={
    path picture={
      \node[anchor=center] at (path picture bounding box.center) {
        \includegraphics[width=6cm]{leichenpredigt}};}},
  node/.style={
  rectangle, minimum width=8cm, minimum height=11cm, line width=2cm, draw =black!100, node distance = 26mm}
}

\begin{document}
\begin{tikzpicture}
    \node[node,image] (bookpage) {};
    \node[text=white,below = 5cm of bookpage.west,anchor=west, fill=black,opacity=0.4,text opacity=1] {\parbox{4cm}{\raggedright Sophie Amalie of Brunswick-L\"{u}neburg (24 March 1628 -- 20 February 1685) was queen of Denmark and Norway as the consort of the King Frederick III of Denmark.}};
\end{tikzpicture}
\end{document}

Result:

enter image description here

EDIT using fading and more detailed positioning:

\usetikzlibrary{fadings}
\tikzfading[name=fade up,
  bottom color=transparent!0, top color=transparent!100]
\begin{tikzpicture}
    \node[node,image] (bookpage) {};
    \node[text=white,minimum width=9cm,below = 4cm of bookpage.west,anchor=west, fill=black,path fading=fade up] {\hspace{-1cm}\parbox{7cm}{\vspace{5mm}\tiny\raggedright Sophie Amalie of Brunswick-L\"{u}neburg (...)}};

Result:

enter image description here

Sources:

Tikz node background image not centered when using right= of

Increase the thickness of node border in TikZ

tikz text location within node

How can I align two nodes to the left in TikZ?

Transparent node with opaque text?

Tikz fade with transparency so background is visible in beamer?

  • Hi Marijn, almost perfect. Can you please make the transparent border page width? Does this code function in landscape mode? – Til Hund Feb 19 at 16:05
  • 1
    @TilHund you can resize it and use landscape mode as usual, the code should work in such a situation as well. – Marijn Feb 19 at 16:33
  • I made the code run on my machine. Is it possible for you to adjust the transparent box so that a shade or fade effect is visible like in the example picture below? – Til Hund Feb 20 at 12:59
  • How can I add a bit of space between the text and the border of the page like with \hspace{10pt} for example? hspace unfortunately only adjust the first line. – Til Hund Feb 20 at 13:23
  • @TilHund see edit. – Marijn Feb 20 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.