如何删除 Xebaposter 背景中的空白区域

如何删除 Xebaposter 背景中的空白区域

使用 Xebopaster 的海报背景在左边距显示一个空白区域,如图 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提供类选项 时。颜色reddishyellowlightblue来自 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} 

这是输出:

在此处输入图片描述

相关内容