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
    The question, I guess, is: how to remove that white margin? – Superuser27 Mar 8 '19 at 10:00
  • 1
    It is done, thank you – Abdelhak Elfengour Mar 8 '19 at 10:48
  • 1
    @AbdelhakElfengour If you have solved the issue yourself, you should add a self-answer. Good self-answers are always appreciated. – user156344 Mar 8 '19 at 12:10
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

|improve this answer|||||
  • Thank you @Ross, but if i add the option [column=0,span=4,row=0] the text will exceed the left margins, please see the new version of MWE. – Abdelhak Elfengour Mar 9 '19 at 10:11
  • 1
    @Abdelhak You are welcome. The new answer appears to be a satisfactory solution. – Ross Mar 9 '19 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.