我想在 LaTeX 中展示带有 tikz 图片的旧数字化资料,用于私人目的,类似于 Google 展示的路德资料,您可以在此处看到:https://artsandculture.google.com/exhibit/3wIyuklRxxPJJQ(无法直接链接)。
我特别感兴趣的是重新创建如下图所示的演示文稿(没有右下角的白色框和左右箭头):
在第二个中(没有左右箭头):
我尝试过一些方法,但用 tikz 重新创建演示风格对我来说非常困难。您可以找到我目前的代码。您可以随意使用您自己的任何示例图像,也可以使用类似这。
\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
第一幅图像的可能实现。方法是绘制一个节点,其中包含图像和非常粗的 2cm 边框。然后,绘制第二个节点,其中包含描述。此描述具有白色文本,其左侧位于图像节点的左侧,距离中间 5cm,它具有黑色透明背景,但文本不透明。里面是一个固定宽度的框,左对齐。
代码:
\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}
结果:
使用淡入淡出和更详细的定位进行编辑:
\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 (...)}};
结果:
资料来源: