2

Using background for a poster using Xebaposter shows an empty space on the left margin as shown in figure1, this quetion is based on this anwer.

\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}

The answer to this issue lead to another issue witch is the text exceeds the left margins if i add the options [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}

enter image description here

1 Answers1

3

With the right to left design, there is something wrong setting the margins and posterbox layout. Rather than solve that, here is a pragmatic solution.

The class provides a key for the user to manually define the background, background=user, with the command \background added to the preamble, like this:

\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}
}

This is the same code used in the xebaposter class when the background is set with shadetb, modified to extend the shading to the corners of the page beyond the south-west corner set by the page geometry. [xshift=-1.5cm,yshift=-1cm] was found by trial and when the class option, margin=3cm was provided. The colors reddishyellow and lightblue come from the OP.

This is the MWE. I used the XB Yas font available here.

\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} 

This is the output:

enter image description here

Ross
  • 5,656
  • 2
  • 14
  • 38