我想显示前页、后页的其他边距。(前页 = 奇数页,后页 = 偶数页)
两面页面内容相同。
例如我需要:
正面奇数页边距:横向,左=1.0cm,右=0.3cm,上=0.5cm,下=0.5cm
偶数页后边距:横向,左=0.4cm,右=1.5cm,上=0.5cm,下=0.5cm
最少编码:
\documentclass[a5paper,twoside,8pt]{article}
\usepackage[a5paper,landscape,left=1.0cm,right=0.3cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage{tcolorbox}
\tcbuselibrary{poster}
\usepackage{tikz,everypage}
\usepackage[absolute,overlay]{textpos}
\usepackage{filecontents}
\begin{filecontents*}{product.tex}
%Type =1,2...10
No,Type,Name,Description
1,1,A1,D1
2,1,A1,D2
10,1,A4,D249
11,2,A10,D1000
12,2,A2,D11
18,3,A43,D318
19,3,A44,D319
\end{filecontents*}
\usepackage{datatool}
\DTLloaddb[autokeys=false]{products}{product.tex}
\newcommand{\printtype}[1]{%
\DTLforeach*
[\DTLiseq{\Type}{#1}]% Condition
{products}% Database
{\No=No,\Type=Type,\Name=Name,\Description=Description}{%
\noindent
\begin{tcbposter}[
poster = {
columns=1,
rows=2,
spacing=3mm,
height=14cm,
width=12cm,
},
]
%Box A
\posterbox[
colframe = red,
width=14cm, height= 10cm
]{xshift=3 cm,yshift=0cm}{\includegraphics[height=2cm]{example-image-a}
\\
\noindent \No
}
%Box B
\posterbox[
colframe = red,
width=5cm, height= 5cm
]{xshift=10 cm,yshift=-1cm }{\includegraphics[height=3cm]{example-image-b}}
\end{tcbposter}
\newpage
}%
}
\begin{document}
\printtype{1}
\printtype{2}
\end{document}
预先感谢。