使用 Xebaposter 為海報使用背景會在左邊距顯示空白區域,如圖 1 所示,此問題基於這個答案。
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\RequirePackage[cmyk]{xcolor}
\RequirePackage{pgf-cmykshadings}
\documentclass[a0paper,landscape,persian]{xebaposter}
\usepackage{ptext}
\usepackage{xepersian}
\settextfont{Yas}
\definecolor{reddishyellow}{cmyk}{0,0.22,1.0,0.0}
\definecolor{lightblue}{cmyk}{0.68,0.25,0.0,0.0}
%\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\begin{document}
\begin{poster}{
borderColor=reddishyellow,
headerColorOne=black,
headerColorTwo=lightblue,
headerborder=closed,
headershape=roundedleft,
headerfont=\Large,
background=shadetb,%user,%plain,none ,shadetb,
%background=none
}{}{}{}
\begin{posterbox}{جداسازی}
\ptext[6]
\end{posterbox}
\end{poster}
\end{document}
這個問題的答案會導致另一個問題,如果我添加選項 [column=0,span=4,row=0],文本就會超出左邊距:
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\RequirePackage[cmyk]{xcolor}
\RequirePackage{pgf-cmykshadings}
\documentclass[margin=0cm,a0paper,landscape,persian]{xebaposter} % <- added margin
\usepackage{ptext}
\usepackage{xepersian}
\settextfont{XB Yas}
\setlength{\parindent}{0pt} % <- added 0pt \parindent
\definecolor{reddishyellow}{cmyk}{0,0.22,1.0,0.0}
\definecolor{lightblue}{cmyk}{0.68,0.25,0.0,0.0}
%\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\begin{document}
\vspace*{-1\baselineskip} % <- added negative baselineskip
\begin{poster}{
borderColor=reddishyellow,
headerColorOne=black,
headerColorTwo=lightblue,
headerborder=closed,
headershape=roundedleft,
headerfont=\Large,
background=shadetb,%user,%plain,none ,shadetb,
%background=none
}{}{}{}
\begin{posterbox}[column=0,span=4,row=0]{جداسازی}
\ptext[6]
\end{posterbox}
\end{poster}
\end{document}
答案1
對於從右到左的設計,設定邊距和海報框佈局有問題。這裡不是解決這個問題,而是務實的解決方案。
該類別為使用者提供了手動定義背景的鍵,background=user
並將命令\background
添加到序言中,如下所示:
\background{
\begin{tikzpicture}[remember picture,overlay]
\shade [shading=axis,top color=reddishyellow,bottom color=lightblue] (current page.north east)%
rectangle ([xshift=-1.5cm,yshift=-1cm]current page.south west);%
\end{tikzpicture}
}
這與使用 設定背景時在 xebaposter 類別中使用的程式碼相同shadetb
,經過修改以將陰影擴展到頁面幾何形狀設定的西南角之外的頁面角落。[xshift=-1.5cm,yshift=-1cm]
透過試驗發現,並在margin=3cm
提供課程選項時。顏色reddishyellow
來自lightblue
OP。
這是 MWE。我使用了可用的 XB Yas 字體這裡。
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\RequirePackage[cmyk]{xcolor}
\RequirePackage{pgf-cmykshadings}
\documentclass[margin=3cm,a0paper,landscape,persian,showframe]{xebaposter} % <- added margin
\usepackage{ptext}
\usepackage{xepersian}
\settextfont{XB Yas}
\definecolor{reddishyellow}{cmyk}{0,0.22,1.0,0.0}
\definecolor{lightblue}{cmyk}{0.68,0.25,0.0,0.0}
%\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\background{
\begin{tikzpicture}[remember picture,overlay]
\shade [shading=axis,top color=reddishyellow,bottom color=lightblue] (current page.north east)%
rectangle ([xshift=-1.5cm,yshift=-1cm]current page.south west);%
\end{tikzpicture}
}
\begin{document}
\begin{poster}{
borderColor=reddishyellow,
headerColorOne=black,
headerColorTwo=lightblue,
headerborder=closed,
headershape=roundedleft,
headerfont=\Large,
columns=4,
background=user,%user,%plain,none ,shadetb,
%background=none
}{}{}{}
\begin{posterbox}[column=0,span=4,row=0]{جداسازی}
\ptext[6]
\end{posterbox}
\end{poster}
\end{document}
這是輸出: