我正在制作一个由三列和随机旋转的图片组成的图库:
\usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{rotating, graphicx}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikz-timing}
\usepackage{makecell, tabularx, multirow}
\usepackage{multirow,hhline,graphicx,array}
%https://tex.stackexchange.com/questions/696930/intended-random-rotation-of-figures
\ExplSyntaxOn
\cs_new:Npn \random { \int_rand:nn {-10} {10} }
\cs_new:Npn \randomsize { \int_rand:nn {3} {6} }
\ExplSyntaxOff
\begin{document}
\begin{center}
\foreach \s in {1,...,200}{%
\IfFileExists{D:/folder 1/folder 2\s.jpg}%
{\begin{tikzpicture}%
\def\ig{%
\includegraphics[width=.245\textwidth,keepaspectratio,angle=\random]{example-image-duck}
}%
\node [inner sep=0pt](mypicture) at (0,0) {\phantom{\ig}};%
\clip[rounded corners=0mm] ($(mypicture.south west)+(1mm,1mm)$) rectangle ($(mypicture.north east)-(1mm,1mm)$);%
\node[inner sep=0pt](mypicture) at (0,0) {\ig};%
\end{tikzpicture}
}}
\end{center}
一切都运行良好,除了图片的一些角被切掉,但我喜欢重叠。 是否有可能避免每张图片的角被“切掉”? 有人能帮我吗? 提前谢谢!