| 1 |
%% |
| 2 |
%% This is file `xebaposter.cls' |
| 3 |
%% |
| 4 |
%% Copyright © 2015-2025 by Javad Razavian <[email protected]> |
| 5 |
%% This work may be distributed and/or modified under the |
| 6 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 7 |
%% of this license or (at your option) any later version. |
| 8 |
%% The latest version of this license is in |
| 9 |
%% http://www.latex-project.org/lppl.txt |
| 10 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 11 |
%% version 2005/12/01 or later. |
| 12 |
%% |
| 13 |
%% This work has the LPPL maintenance status `maintained'. |
| 14 |
%% |
| 15 |
%% This work is “author-maintained” (as per LPPL maintenance status) |
| 16 |
%% by Javad Razavian. |
| 17 |
%% The Current Maintainer of this work is Javad Razavian |
| 18 |
%% |
| 19 |
%% A relatively comfortable latex class to produce posters with a grid based |
| 20 |
%% layout. It comes with a number of combinable styles and is (maybe only for |
| 21 |
%% the writer) easy to extend, as all the graphics is based on pgf. |
| 22 |
%% |
| 23 |
%% |
| 24 |
%% Copyright (C) 2007-2011 Brian Amberg |
| 25 |
%% Copyright (C) 2011 Reinhold Kainhofer <[email protected]> |
| 26 |
%% Copyright (C) 2015-2025 Javad Razavian <[email protected]> |
| 27 |
%% |
| 28 |
\ProvidesClass{xebaposter}[2025/05/21 v2.54 xebaposter class] |
| 29 |
\NeedsTeXFormat{LaTeX2e}[1995/06/01] |
| 30 |
\LoadClass{article} |
| 31 |
\typeout{baposter: Brian Amberg, 2007, 2008, 2009, 2010, 2011 | https://web.archive.org/web/20230912095502/http://www.brian-amberg.de/uni/poster/} |
| 32 |
\typeout{baposter: Reinhold Kainhofer, 2011 | http://reinhold.kainhofer.com/} |
| 33 |
\typeout{xebaposter: Javad Razavian, 2015-2025 | https://github.com/javadr/xebaposter/} |
| 34 |
% |
| 35 |
%% Define lengths only once on inclusion, such that we can make multiple posters |
| 36 |
\newlength{\xebaposter@basepaperwidth}% |
| 37 |
\newlength{\xebaposter@basepaperheight}% |
| 38 |
\newlength{\xebaposter@basemargin}% |
| 39 |
\newlength{\xebaposter@finalpaperwidth}% |
| 40 |
\newlength{\xebaposter@finalpaperheight}% |
| 41 |
\newlength{\xebaposter@finalmargin}% |
| 42 |
\newlength{\headerheight}% |
| 43 |
\newlength{\colwidth}% |
| 44 |
\newlength{\colheight}% |
| 45 |
\newlength{\xebaposter@@colspacing}% |
| 46 |
\newlength{\xebaposter@box@@cornerradius}% |
| 47 |
\newlength{\xebaposter@box@@boxheaderheight}% |
| 48 |
\newlength{\xebaposter@box@@boxpadding}% |
| 49 |
\newlength{\boxstartx}% |
| 50 |
\newlength{\boxstarty}% |
| 51 |
\newlength{\boxwidth}% |
| 52 |
\newlength{\boxheight}% |
| 53 |
\newlength{\xebaposter@titleimage@left@width}% |
| 54 |
\newlength{\xebaposter@titleimage@right@width}% |
| 55 |
\newlength{\xebaposter@titleimage@textwidth}% |
| 56 |
\newbox\xebaposter@box@content% |
| 57 |
\newbox\xebaposter@titleimage@left% |
| 58 |
\newbox\xebaposter@titleimage@title% |
| 59 |
\newbox\xebaposter@titleimage@right% |
| 60 |
% |
| 61 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 62 |
% Packages |
| 63 |
%------------------------------------------------------------------------------- |
| 64 |
% The only ``weird'' dependency of this package is pgf. All the rest should be |
| 65 |
% installed on any decent system. |
| 66 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 67 |
\typeout{Use Packages}% |
| 68 |
\RequirePackage{xkeyval}% |
| 69 |
\RequirePackage{calc}% |
| 70 |
\RequirePackage[cmyk]{xcolor}% |
| 71 |
\RequirePackage{ifxetex} |
| 72 |
%\ifxetex |
| 73 |
% \def\pdftexversion{140}% |
| 74 |
% \def\pgfsysdriver{pgfsys-dvipdfm.def}% |
| 75 |
%\fi |
| 76 |
\RequirePackage{tikz}% |
| 77 |
\RequirePackage{pgf}% |
| 78 |
%\makeatletter |
| 79 |
%\def\pgfsys@papersize#1#2{% |
| 80 |
% \pdfpageheight#2\relax% |
| 81 |
% \pdfpagewidth#1\relax} |
| 82 |
%\makeatother |
| 83 |
\RequirePackage{ifthen}% |
| 84 |
\RequirePackage[T1]{fontenc}% |
| 85 |
%\RequirePackage{biditools} |
| 86 |
%\RequirePackage[l2tabu, orthodox]{nag}% |
| 87 |
\usetikzlibrary{decorations}% |
| 88 |
\usetikzlibrary{fadings}% |
| 89 |
\usetikzlibrary{snakes}% |
| 90 |
\usetikzlibrary{calc}% |
| 91 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 92 |
% Settings |
| 93 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 94 |
% |
| 95 |
% Choose a smaller value for larger fonts |
| 96 |
\newcommand{\xebaposter@fontscale}{0.292}% |
| 97 |
% |
| 98 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 99 |
% Zoom |
| 100 |
%------------------------------------------------------------------------------- |
| 101 |
% We scale the page from fontscale * papersize up to papersize |
| 102 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 103 |
% |
| 104 |
% |
| 105 |
%% Paper sizes |
| 106 |
\newif\if@landscape% |
| 107 |
\newif\if@geometryKnowsThisSize% |
| 108 |
\DeclareOptionX{landscape}{\@landscapetrue}% |
| 109 |
\DeclareOptionX{portrait}{}% |
| 110 |
% |
| 111 |
\newcommand{\xebaposter@setfinalpapersize}[2]{% |
| 112 |
\if@geometryKnowsThisSize% |
| 113 |
\setlength{\xebaposter@finalpaperwidth}{#1}% |
| 114 |
\setlength{\xebaposter@finalpaperheight}{#2}% |
| 115 |
\else% |
| 116 |
\if@landscape% |
| 117 |
% Transpose length, if geometry does not handle the papersize based on the key |
| 118 |
\setlength{\xebaposter@finalpaperwidth}{#2}% |
| 119 |
\setlength{\xebaposter@finalpaperheight}{#1}% |
| 120 |
\else% |
| 121 |
\setlength{\xebaposter@finalpaperwidth}{#1}% |
| 122 |
\setlength{\xebaposter@finalpaperheight}{#2}% |
| 123 |
\fi% |
| 124 |
\fi% |
| 125 |
}% |
| 126 |
% |
| 127 |
% Default paperwidth and paperheight = a0paper |
| 128 |
\DeclareOptionX{paperwidth}[841mm]{\setlength{\xebaposter@finalpaperwidth}{#1}}% |
| 129 |
\DeclareOptionX{paperheight}[1189mm]{\setlength{\xebaposter@finalpaperheight}{#1}}% |
| 130 |
\xebaposter@setfinalpapersize{841mm}{1189mm} |
| 131 |
\DeclareOptionX{archA} { \xebaposter@setfinalpapersize{9in}{12in}}% |
| 132 |
\DeclareOptionX{archB} { \xebaposter@setfinalpapersize{12in}{18in}}% |
| 133 |
\DeclareOptionX{archC} { \xebaposter@setfinalpapersize{18in}{24in}}% |
| 134 |
\DeclareOptionX{archD} { \xebaposter@setfinalpapersize{24in}{36in}}% |
| 135 |
\DeclareOptionX{archE} { \xebaposter@setfinalpapersize{36in}{48in}}% |
| 136 |
\DeclareOptionX{archE1} { \xebaposter@setfinalpapersize{30in}{42in}}% |
| 137 |
\DeclareOptionX{archE2} { \xebaposter@setfinalpapersize{26in}{38in}}% |
| 138 |
\DeclareOptionX{archE3} { \xebaposter@setfinalpapersize{27in}{39in}}% |
| 139 |
\DeclareOptionX{a0paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{841mm}{1189mm}}%g |
| 140 |
\DeclareOptionX{a1paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{594mm}{841mm}}%g |
| 141 |
\DeclareOptionX{a2paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{420mm}{594mm}}%g |
| 142 |
\DeclareOptionX{a3paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{297mm}{420mm}}%g |
| 143 |
\DeclareOptionX{a4paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{210mm}{297mm}}%g |
| 144 |
\DeclareOptionX{a5paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{148mm}{210mm}}%g |
| 145 |
\DeclareOptionX{a6paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{105mm}{148mm}}%g |
| 146 |
\DeclareOptionX{b0paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{1000mm}{1414mm}}%g |
| 147 |
\DeclareOptionX{b1paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{707mm}{1000mm}}%g |
| 148 |
\DeclareOptionX{b2paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{500mm}{707mm}}%g |
| 149 |
\DeclareOptionX{b3paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{353mm}{500mm}}%g |
| 150 |
\DeclareOptionX{b4paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{250mm}{353mm}}%g |
| 151 |
\DeclareOptionX{b5paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{176mm}{250mm}}%g |
| 152 |
\DeclareOptionX{b6paper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{125mm}{176mm}}%g |
| 153 |
\DeclareOptionX{ansiapaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{8.5in}{11in}}% |
| 154 |
\DeclareOptionX{ansibpaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{11in}{17in}}% |
| 155 |
\DeclareOptionX{ansicpaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{17in}{22in}}% |
| 156 |
\DeclareOptionX{ansidpaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{22in}{34in}}% |
| 157 |
\DeclareOptionX{ansiepaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{34in}{44in}}% |
| 158 |
\DeclareOptionX{letterpaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{8.5in}{11in}}% |
| 159 |
\DeclareOptionX{legalpaper} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{8.5in}{14in}}% |
| 160 |
\DeclareOptionX{executivepaper}{\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{7.25in}{10.5in}}% |
| 161 |
\DeclareOptionX{screen} {\@geometryKnowsThisSizetrue\xebaposter@setfinalpapersize{225mm}{180mm}}%g |
| 162 |
% |
| 163 |
% Margin |
| 164 |
\setlength{\xebaposter@finalmargin}{1.5cm}% |
| 165 |
\DeclareOptionX{fontscale}[0.292]{\renewcommand{\xebaposter@fontscale}{#1}}% |
| 166 |
\DeclareOptionX{margin} [1.5cm]{\setlength{\xebaposter@finalmargin}{#1}}% |
| 167 |
% |
| 168 |
% move text/poster body to the right (or to the left if negative) |
| 169 |
\newlength{\xebaposter@movebody}% |
| 170 |
\setlength{\xebaposter@movebody}{0cm}% |
| 171 |
\DeclareOptionX{movebody}[0cm]{\setlength{\xebaposter@movebody}{#1}}% |
| 172 |
% |
| 173 |
% |
| 174 |
\newif\if@debug% |
| 175 |
\DeclareOptionX{debug}{\@debugtrue}% |
| 176 |
%% Will be passed on to other packages (xcolor and geometry), still we don't want unused warnings |
| 177 |
\DeclareOptionX{table}{}% |
| 178 |
\DeclareOptionX{showframe}{}% |
| 179 |
% |
| 180 |
\newif\if@xebaposter@persian% |
| 181 |
\newif\if@xebaposter@latin% |
| 182 |
\DeclareOptionX{persian}{\@xebaposter@persiantrue}% |
| 183 |
\DeclareOptionX{latin}{\@xebaposter@latintrue}% |
| 184 |
% |
| 185 |
%\ExecuteOptionsX{ |
| 186 |
% portrait, |
| 187 |
% a0paper, |
| 188 |
%} |
| 189 |
% |
| 190 |
\ProcessOptionsX% |
| 191 |
% |
| 192 |
\if@debug% |
| 193 |
\newcommand{\debug}[1]{\typeout{#1}}% |
| 194 |
\else% |
| 195 |
\newcommand{\debug}[1]{}% |
| 196 |
\fi% |
| 197 |
% |
| 198 |
%%% when user didn't set persian/latin option, if he/she uses xepersian the default will be persian, otherwise default will be latin. |
| 199 |
\if@xebaposter@latin% |
| 200 |
\relax% |
| 201 |
\else% |
| 202 |
\if@xebaposter@persian% |
| 203 |
\relax% |
| 204 |
\else% |
| 205 |
\AtBeginDocument{\@ifpackageloaded{xepersian}{\@xebaposter@persiantrue}{}}% |
| 206 |
\fi% |
| 207 |
\fi% |
| 208 |
% |
| 209 |
\setlength{\xebaposter@basepaperwidth} {\xebaposter@fontscale\xebaposter@finalpaperwidth}% |
| 210 |
\setlength{\xebaposter@basepaperheight}{\xebaposter@fontscale\xebaposter@finalpaperheight}% |
| 211 |
\setlength{\xebaposter@basemargin} {\xebaposter@fontscale\xebaposter@finalmargin}% |
| 212 |
\newlength{\xebaposter@basemarginright}% |
| 213 |
\setlength{\xebaposter@basemarginright}{\xebaposter@basemargin}% |
| 214 |
\addtolength{\xebaposter@basemarginright}{-\xebaposter@fontscale\xebaposter@movebody}% |
| 215 |
\newlength{\xebaposter@basemarginleft}% |
| 216 |
\setlength{\xebaposter@basemarginleft}{\xebaposter@basemargin}% |
| 217 |
\addtolength{\xebaposter@basemarginleft}{\xebaposter@fontscale\xebaposter@movebody}% |
| 218 |
% |
| 219 |
\typeout{Paperwidth=\the\xebaposter@finalpaperwidth}% |
| 220 |
\typeout{Paperheight=\the\xebaposter@finalpaperheight}% |
| 221 |
\typeout{BasePaperwidth=\the\xebaposter@basepaperwidth}% |
| 222 |
\typeout{BasePaperheight=\the\xebaposter@basepaperheight}% |
| 223 |
\RequirePackage[% |
| 224 |
paperwidth=\xebaposter@basepaperwidth,% |
| 225 |
paperheight=\xebaposter@basepaperheight,% |
| 226 |
tmargin=\xebaposter@basemargin,% |
| 227 |
bmargin=\xebaposter@basemargin,% |
| 228 |
lmargin=\xebaposter@basemarginleft,% |
| 229 |
rmargin=\xebaposter@basemarginright,% |
| 230 |
]{geometry}% |
| 231 |
% |
| 232 |
\RequirePackage{pgfpages}% |
| 233 |
\if@landscape% |
| 234 |
\if@geometryKnowsThisSize% |
| 235 |
\pgfpagesuselayout{resize to}[physical paper width=\xebaposter@finalpaperheight,physical paper height=\xebaposter@finalpaperwidth]% |
| 236 |
\else% |
| 237 |
\pgfpagesuselayout{resize to}[physical paper width=\xebaposter@finalpaperwidth,physical paper height=\xebaposter@finalpaperheight]% |
| 238 |
\fi% |
| 239 |
\else% |
| 240 |
\pgfpagesuselayout{resize to}[physical paper width=\xebaposter@finalpaperwidth,physical paper height=\xebaposter@finalpaperheight]% |
| 241 |
\fi% |
| 242 |
% |
| 243 |
% |
| 244 |
% |
| 245 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 246 |
% Default functions for borders/backgrounds |
| 247 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 248 |
% |
| 249 |
%% These functions will all be redefined from the actual option values. In |
| 250 |
%% particular, they will be set to \xebaposter@optionname@optionvalue, which |
| 251 |
%% should do the actual work / setting for that particular optionvalue. |
| 252 |
% |
| 253 |
\newcommand{\xebaposterPosterDrawBackground}[2]{}% % Draw poster background |
| 254 |
% |
| 255 |
\newcommand{\xebaposterBoxGetShape}{}% % Returns path of text box shape |
| 256 |
\newcommand{\xebaposterBoxDrawBackground}[2]{}% % Draw bg of boxes |
| 257 |
\newcommand{\xebaposterBoxDrawBorder}[1]{}% % Draw border of individual boxes |
| 258 |
% |
| 259 |
\newcommand{\xebaposterHeaderGetShape}{}% % Returns path of text box shape |
| 260 |
\newcommand{\xebaposterHeaderSetShade}[3]{}% % Set bg style for box headers |
| 261 |
\newcommand{\xebaposterHeaderDrawBackground}[3]{}% % Draw background of box header |
| 262 |
\newcommand{\xebaposterHeaderDrawBorder}[1]{}% % Draw border of box header |
| 263 |
\newcommand{\xebaposterHeaderDrawText}[1]{}% % Draw text inside box header |
| 264 |
% |
| 265 |
\newcommand{\@@previousbox}{notset}% % stores the previously processed box for below=auto |
| 266 |
% |
| 267 |
% Function to set a user-defined background |
| 268 |
\newcommand{\xebaposter@backgroundCmd}{\error{No background command defined. Use \background{...} to define background}}% |
| 269 |
\newcommand{\background}[1]{\renewcommand{\xebaposter@backgroundCmd}{#1}}% |
| 270 |
% |
| 271 |
% |
| 272 |
% |
| 273 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 274 |
% Handle poster and box options |
| 275 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 276 |
% |
| 277 |
\debug{Handling keys}% |
| 278 |
% |
| 279 |
%% |
| 280 |
%% POSTER OPTIONS |
| 281 |
%% |
| 282 |
%% Store all poster options in variables of the form \xebaposter@option |
| 283 |
%% choose-keys also store the index in \xebaposter@optionnr |
| 284 |
%% choose-keys typically also assign a function |
| 285 |
\definecolor{xebaposter@silver}{cmyk}{0,0,0,0.7}% |
| 286 |
\define@boolkey[ba]{poster}[xebaposter@]{grid} [false] {}% |
| 287 |
\define@boolkey[ba]{poster}[xebaposter@]{eyecatcher} [true] {}% |
| 288 |
\define@cmdkey [ba]{poster}[xebaposter@]{headerheight} [0.1\textheight]{}% |
| 289 |
\define@cmdkey [ba]{poster}[xebaposter@]{columns} [{}] {}% |
| 290 |
\define@cmdkey [ba]{poster}[xebaposter@]{colspacing} [1em] {}% |
| 291 |
\define@cmdkey [ba]{poster}[xebaposter@]{bgColorOne} [xebaposter@silver]{}% |
| 292 |
\define@cmdkey [ba]{poster}[xebaposter@]{bgColorTwo} [green] {}% |
| 293 |
% |
| 294 |
% background can be one of: shadeLR, shadeTB, plain, user, none |
| 295 |
\define@choicekey*+[ba]{poster}{background}% |
| 296 |
[\xebaposter@background\xebaposter@backgroundnr]% |
| 297 |
{shadeLR, shadeTB, plain, user, none} [plain] {% |
| 298 |
\debug{Poster background: \xebaposter@background}% |
| 299 |
\renewcommand{\xebaposterPosterDrawBackground}[2]{% |
| 300 |
\csname xebaposter@background@\xebaposter@background\endcsname{##1}{##2}}% |
| 301 |
}{% |
| 302 |
\PackageWarning{xebaposter}{Unknown background `\xebaposter@background' (use |
| 303 |
shadeLR, shadeTB, plain, none, or user). If user is used, you also |
| 304 |
have to define \background{...}.}% |
| 305 |
\renewcommand{\xebaposterPosterDrawBackground}[2]{\xebaposter@background@none{##1}{##2}}% |
| 306 |
}% |
| 307 |
% |
| 308 |
% |
| 309 |
%% |
| 310 |
%% BOX OPTIONS |
| 311 |
%% |
| 312 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{cornerradius} [1em] {}% |
| 313 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{boxheaderheight} [2em] {}% |
| 314 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{boxpadding} [0.5em] {}% |
| 315 |
% |
| 316 |
% |
| 317 |
% textborder can be one of: none, bars, coils, triangles, rectangle, rounded, |
| 318 |
% roundedleft, roundedsmall, faded; UNIMPLEMENTED: roundedright |
| 319 |
\edef\xebaposter@box@textborder@validvalues{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedsmall,faded}% |
| 320 |
\define@choicekey*+[ba]{posterbox}{textborder}% |
| 321 |
[\xebaposter@box@textborder\xebaposter@box@textbordernr]% |
| 322 |
{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedright,roundedsmall,faded} [rectangle] {% |
| 323 |
\debug{Text border: \xebaposter@box@textborder}% |
| 324 |
\renewcommand{\xebaposterBoxGetShape}{% |
| 325 |
\csname xebaposter@box@boxshape@\xebaposter@box@textborder\endcsname}% |
| 326 |
\renewcommand{\xebaposterBoxDrawBorder}[1]{% |
| 327 |
\csname xebaposter@box@drawborder@\xebaposter@box@textborder\endcsname{##1}}% |
| 328 |
}{% |
| 329 |
\PackageWarning{xebaposter}{Unknown text-border style `\xebaposter@box@textborder'. |
| 330 |
Edit your file to choose a valid option (\xebaposter@box@textborder@validvalues).}% |
| 331 |
\renewcommand{\xebaposterBoxGetShape}{\xebaposter@boxshape@rectangle}% |
| 332 |
\renewcommand{\xebaposterBoxDrawBorder}[1]{\xebaposter@drawborder@rectangle{##1}}% |
| 333 |
}% |
| 334 |
% |
| 335 |
% boxshade can be one of: shadelr, shaderl, shadetb, plain, none |
| 336 |
\define@choicekey*+[ba]{posterbox}{boxshade}% |
| 337 |
[\xebaposter@box@boxshade\xebaposter@box@boxshadenr]% |
| 338 |
{shadelr,shaderl,shadetb,plain,none} [none] {% |
| 339 |
\debug{Box shade: \xebaposter@box@boxshade}% |
| 340 |
\renewcommand{\xebaposterBoxDrawBackground}[2]{% |
| 341 |
\csname xebaposter@box@drawbackground@\xebaposter@box@boxshade\endcsname{##1}{##2}}% |
| 342 |
}{% |
| 343 |
\PackageWarning{xebaposter}{Unknown boxshade style `\xebaposter@boxshade'. |
| 344 |
Edit your file to choose a valid option.}% |
| 345 |
\renewcommand{\xebaposterBoxDrawBackground}[2]{\xebaposter@box@drawbackground@none{##1}{##2}}% |
| 346 |
}% |
| 347 |
% |
| 348 |
% headershade can be one of: shadelr,shaderl, shadetb, shadetbinverse, plain |
| 349 |
\define@choicekey*+[ba]{posterbox}{headershade}% |
| 350 |
[\xebaposter@box@headershade\xebaposter@box@headershadenr]% |
| 351 |
{shadelr,shaderl, shadetb, shadetbinverse, plain} [shadelr] {% |
| 352 |
\debug{Header shade: \xebaposter@box@headershade}% |
| 353 |
\renewcommand{\xebaposterHeaderSetShade}[3]{% |
| 354 |
\csname xebaposter@box@headershade@\xebaposter@box@headershade\endcsname{##1}{##2}{##3}} |
| 355 |
}{% |
| 356 |
\PackageWarning{xebaposter}{Unknown headershade style `\xebaposter@box@headershade'. |
| 357 |
Edit your file to choose a valid option.}% |
| 358 |
\renewcommand{\xebaposterHeaderSetShade}[3]{\xebaposter@box@headershade@none{##1}{##2}{##3}}% |
| 359 |
}% |
| 360 |
% |
| 361 |
% headershape can be one of: rectangle, rounded, smallrounded, roundedleft, roundedright |
| 362 |
\define@choicekey*+[ba]{posterbox}{headershape}% |
| 363 |
[\xebaposter@box@headershape\xebaposter@box@headershapenr]% |
| 364 |
{rectangle,rounded,smallrounded,roundedleft,roundedright} [roundedright] {% |
| 365 |
\debug{Header shape: \xebaposter@box@headershape}% |
| 366 |
\renewcommand{\xebaposterHeaderGetShape}{% |
| 367 |
\csname xebaposter@box@headershape@\xebaposter@box@headershape\endcsname}% |
| 368 |
\renewcommand{\xebaposterHeaderDrawText}[1]{% |
| 369 |
\csname xebaposter@box@headerdrawtext@\xebaposter@box@headershape\endcsname{##1}}% |
| 370 |
\renewcommand{\xebaposterHeaderDrawBorder}[1]{% |
| 371 |
\csname xebaposter@box@headerdrawborder@\xebaposter@box@headershape\endcsname{##1}}% |
| 372 |
}{% |
| 373 |
\PackageWarning{xebaposter}{Unknown headershape style `\xebaposter@headershape'. |
| 374 |
Edit your file to choose a valid option.}% |
| 375 |
\renewcommand{\xebaposterHeaderGetShape}{\xebaposter@box@headershape@rectangle}% |
| 376 |
\renewcommand{\xebaposterHeaderDrawText}[1]{\xebaposter@box@headerdrawtext@rectangle{##1}}% |
| 377 |
\renewcommand{\xebaposterHeaderDrawBorder}[1]{\xebaposter@box@headerdrawborder@rectangle{##1}}% |
| 378 |
}% |
| 379 |
% |
| 380 |
% headerborder can be one of: open, closed, none |
| 381 |
\define@choicekey*+[ba]{posterbox}{headerborder}% |
| 382 |
[\xebaposter@box@headerborder\xebaposter@box@headerbordernr]% |
| 383 |
{open,closed,none} [open] {% |
| 384 |
\debug{Header border: \xebaposter@box@headerborder}% |
| 385 |
% \renewcommand{\xebaposterHeaderBorder}{ |
| 386 |
% \csname xebaposter@headerborder@\xebaposter@box@headerborder\endcsname} |
| 387 |
}{% |
| 388 |
\PackageWarning{xebaposter}{Unknown headerborder style `\xebaposter@headerborder'. |
| 389 |
Edit your file to choose a valid option.}% |
| 390 |
% \renewcommand{\xebaposterHeaderBorder}{\xebaposter@box@headerborder@rectangle} |
| 391 |
}% |
| 392 |
% |
| 393 |
% |
| 394 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{borderColor} [yellow] {}% |
| 395 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{headerColorOne} [red] {}% |
| 396 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{headerColorTwo} [brown] {}% |
| 397 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{headerFontColor} [black] {}% |
| 398 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{boxColorOne} [magenta] {}% |
| 399 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{boxColorTwo} [cyan] {}% |
| 400 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{headerfont} [\scshape\Large] {}% |
| 401 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{textfont} [{}] {}% |
| 402 |
% |
| 403 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{linewidth} [2pt] {}% |
| 404 |
% |
| 405 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{below} [notset]{}% |
| 406 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{above} [notset]{}% |
| 407 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{aligned}[notset]{}% |
| 408 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{bottomaligned}[notset]{}% |
| 409 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{column} [0] {}% |
| 410 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{row} [0] {}% |
| 411 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{span} [1] {}% |
| 412 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{height} [auto] {}% |
| 413 |
\define@cmdkey[ba]{posterbox}[xebaposter@box@]{name} [noname]{}% |
| 414 |
% |
| 415 |
% Set some default values, the poster and posterbox environments can override: |
| 416 |
\setkeys[ba]{poster}{% |
| 417 |
% Debug grid |
| 418 |
grid=false,% |
| 419 |
% Is there an eyecatcher image |
| 420 |
eyecatcher=true,% |
| 421 |
columns={},% |
| 422 |
% Colours |
| 423 |
bgColorOne=xebaposter@silver,% |
| 424 |
bgColorTwo=green,% |
| 425 |
% |
| 426 |
colspacing=1em,% |
| 427 |
headerheight=0.1\textheight,% |
| 428 |
background=shadeLR,% |
| 429 |
}{}% |
| 430 |
\setkeys[ba]{posterbox}{% |
| 431 |
% Position |
| 432 |
column=0,row=0,span=1,% |
| 433 |
below=notset,above=notset,% |
| 434 |
bottomaligned=notset,% |
| 435 |
aligned=notset,% |
| 436 |
height=auto,% |
| 437 |
% Name |
| 438 |
name=noname,% |
| 439 |
% Box design: border: |
| 440 |
linewidth=2pt,% |
| 441 |
borderColor=yellow,% |
| 442 |
cornerradius=1em,% |
| 443 |
% text box: |
| 444 |
textfont={},% |
| 445 |
boxshade=plain,% |
| 446 |
boxColorOne=magenta,% |
| 447 |
boxColorTwo=cyan,% |
| 448 |
textborder=faded,% |
| 449 |
boxpadding=0.5em,% |
| 450 |
% header |
| 451 |
headerfont=\scshape\Large,% or headerfont=\color{white}\textsf\textbf |
| 452 |
headerFontColor=black,% |
| 453 |
headerColorOne=red,% |
| 454 |
headerColorTwo=brown,% |
| 455 |
headershape=rectangle,% |
| 456 |
headershade=shadelr,% |
| 457 |
headerborder=none,% |
| 458 |
boxheaderheight=2em,% |
| 459 |
}{}% |
| 460 |
% |
| 461 |
% |
| 462 |
% |
| 463 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 464 |
%%% Background options and functions (one function for each possible value) |
| 465 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 466 |
% |
| 467 |
\newcommand{\xebaposter@background@shaderl}[2]{% |
| 468 |
\debug{xebaposter: Using shade right left background.}% |
| 469 |
\begin{tikzpicture}[remember picture,overlay]% |
| 470 |
\shade [shading=axis,left color=#2,right color=#1] (current page.north east)% |
| 471 |
rectangle(current page.south west);% |
| 472 |
\end{tikzpicture}% |
| 473 |
}% |
| 474 |
\newcommand{\xebaposter@background@shadelr}[2]{% |
| 475 |
\debug{xebaposter: Using shade left right background.}% |
| 476 |
\begin{tikzpicture}[remember picture,overlay]% |
| 477 |
\shade [shading=axis,left color=#1,right color=#2] (current page.north west)% |
| 478 |
rectangle(current page.south east);% |
| 479 |
\end{tikzpicture}% |
| 480 |
}% |
| 481 |
\newcommand{\xebaposter@background@shadetb}[2]{% |
| 482 |
\debug{xebaposter: Using shade top to bottom background.}% |
| 483 |
\begin{tikzpicture}[remember picture,overlay]% |
| 484 |
\shade [shading=axis,top color=#1,bottom color=#2] (current page.north west)% |
| 485 |
rectangle(current page.south east);% |
| 486 |
\end{tikzpicture}% |
| 487 |
}% |
| 488 |
\newcommand{\xebaposter@background@plain}[2]{% |
| 489 |
\debug{xebaposter: Using plain background.}% |
| 490 |
\begin{tikzpicture}[remember picture,overlay]% |
| 491 |
\fill [#1] {(current page.north west) rectangle (current page.south east)};% |
| 492 |
\end{tikzpicture}% |
| 493 |
}% |
| 494 |
\newcommand{\xebaposter@background@user}[2]{% |
| 495 |
\debug{xebaposter: Using user background.}% |
| 496 |
{\xebaposter@backgroundCmd}% |
| 497 |
}% |
| 498 |
\newcommand{\xebaposter@background@none}[2]{% |
| 499 |
\debug{xebaposter: Using no background.}% |
| 500 |
}% |
| 501 |
% |
| 502 |
% |
| 503 |
% |
| 504 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 505 |
%%% Return shape path of text box (depending on the box shape) |
| 506 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 507 |
% |
| 508 |
\newcommand{\xebaposter@box@boxshape@none}{\xebaposter@box@boxshape@rectangle}% |
| 509 |
\newcommand{\xebaposter@box@boxshape@bars}{% |
| 510 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name sw) % |
| 511 |
(\xebaposter@box@name se) -- (\xebaposter@box@name tne)% |
| 512 |
}% |
| 513 |
\newcommand{\xebaposter@box@boxshape@coils}{\xebaposter@box@boxshape@bars}% |
| 514 |
\newcommand{\xebaposter@box@boxshape@triangles}{\xebaposter@box@boxshape@bars}% |
| 515 |
\newcommand{\xebaposter@box@boxshape@rectangle}{% |
| 516 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name sw) -- % |
| 517 |
(\xebaposter@box@name se) -- (\xebaposter@box@name tne)% |
| 518 |
}% |
| 519 |
\newcommand{\xebaposter@box@boxshape@faded}{% |
| 520 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name sw) % |
| 521 |
(\xebaposter@box@name tne) -- (\xebaposter@box@name se)% |
| 522 |
}% |
| 523 |
\newcommand{\xebaposter@box@boxshape@rounded}{% |
| 524 |
[rc] \xebaposter@box@boxshape@rectangle% |
| 525 |
}% |
| 526 |
\newcommand{\xebaposter@box@boxshape@roundedsmall}{% |
| 527 |
[src] \xebaposter@box@boxshape@rectangle% |
| 528 |
}% |
| 529 |
\newcommand{\xebaposter@box@boxshape@roundedleft}{% |
| 530 |
(\xebaposter@box@name tnw) {[rc]-- (\xebaposter@box@name sw)} -- % |
| 531 |
(\xebaposter@box@name se) -- (\xebaposter@box@name tne)% |
| 532 |
}% |
| 533 |
\newcommand{\xebaposter@box@boxshape@roundedright}{% |
| 534 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name sw) {[rc]-- % |
| 535 |
(\xebaposter@box@name se)} -- (\xebaposter@box@name tne)% |
| 536 |
}% |
| 537 |
% |
| 538 |
% |
| 539 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 540 |
%%% Draw box background (one function for each possible value) |
| 541 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 542 |
% |
| 543 |
% These functions take no arguments |
| 544 |
\newcommand{\xebaposter@box@drawbackground@none}[2]{% |
| 545 |
\tikzstyle{box colors}=[]% |
| 546 |
}% |
| 547 |
\newcommand{\xebaposter@box@drawbackground@plain}[2]{% |
| 548 |
\tikzstyle{box colors}=[fill=#1]% |
| 549 |
\fill[box colors] \xebaposterBoxGetShape;% |
| 550 |
}% |
| 551 |
\newcommand{\xebaposter@box@drawbackground@shadelr}[2]{% |
| 552 |
\tikzstyle{box colors}=[shading=axis, left color=#1, right color=#2]% |
| 553 |
\fill[box colors] \xebaposterBoxGetShape;% |
| 554 |
}% |
| 555 |
\newcommand{\xebaposter@box@drawbackground@shaderl}[2]{% |
| 556 |
\tikzstyle{box colors}=[shading=axis, left color=#2, right color=#1]% |
| 557 |
\fill[box colors] \xebaposterBoxGetShape;% |
| 558 |
}% |
| 559 |
\newcommand{\xebaposter@box@drawbackground@shadetb}[2]{% |
| 560 |
\tikzstyle{box colors}=[shading=axis, top color=#1, bottom color=#2]% |
| 561 |
\fill[box colors] \xebaposterBoxGetShape;% |
| 562 |
}% |
| 563 |
% |
| 564 |
% |
| 565 |
% |
| 566 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 567 |
%%% Draw box border |
| 568 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 569 |
% |
| 570 |
% These functions take two arguments: borderColor |
| 571 |
\newcommand{\xebaposter@box@drawborder@none}[1]{}% |
| 572 |
\newcommand{\xebaposter@box@drawborder@bars}[1]{% |
| 573 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 574 |
}% |
| 575 |
\newcommand{\xebaposter@box@drawborder@coils}[1]{% |
| 576 |
\draw[color=#1,segment amplitude=0.35em,segment length=0.4em,snake=coil] \xebaposterBoxGetShape;% |
| 577 |
}% |
| 578 |
\newcommand{\xebaposter@box@drawborder@triangles}[1]{% |
| 579 |
\draw[color=#1,segment amplitude=0.2em,segment length=0.4em,snake=triangles] \xebaposterBoxGetShape;% |
| 580 |
}% |
| 581 |
\newcommand{\xebaposter@box@drawborder@rectangle}[1]{% |
| 582 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 583 |
}% |
| 584 |
\newcommand{\xebaposter@box@drawborder@rounded}[1]{% |
| 585 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 586 |
}% |
| 587 |
\newcommand{\xebaposter@box@drawborder@roundedleft}[1]{% |
| 588 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 589 |
}% |
| 590 |
\newcommand{\xebaposter@box@drawborder@roundedright}[1]{% |
| 591 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 592 |
}% |
| 593 |
\newcommand{\xebaposter@box@drawborder@faded}[1]{% |
| 594 |
% This is the right way to do it, but it does not work with evince, and has problems during printing, so instead we do |
| 595 |
%\draw[color=#1,path fading=south] \xebaposterBoxGetShape;% |
| 596 |
% this |
| 597 |
\foreach \x in {0,1,...,90} \draw[color=#1!\x] ($(\xebaposter@box@name tnw)!{(100-\x)/100}!(\xebaposter@box@name sw)$) -- ($(\xebaposter@box@name tnw)!{(100-(\x+10))/100}!(\xebaposter@box@name sw)$);% |
| 598 |
\foreach \x in {0,1,...,90} \draw[color=#1!\x] ($(\xebaposter@box@name tne)!{(100-\x)/100}!(\xebaposter@box@name se)$) -- ($(\xebaposter@box@name tne)!{(100-(\x+10))/100}!(\xebaposter@box@name se)$);% |
| 599 |
}% |
| 600 |
\newcommand{\xebaposter@box@drawborder@roundedsmall}[1]{% |
| 601 |
\draw[color=#1] \xebaposterBoxGetShape;% |
| 602 |
}% |
| 603 |
% |
| 604 |
% |
| 605 |
% |
| 606 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 607 |
%%% Return shape path of text box (depending on the box shape) |
| 608 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 609 |
% |
| 610 |
% These functions take no arguments |
| 611 |
% TODO: For headerborder==none, use (\xebaposter@box@name outer tnw) instead! |
| 612 |
\newcommand{\xebaposter@box@headershape@rectangle}{% |
| 613 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name nw) -- % |
| 614 |
(\xebaposter@box@name ne) -- (\xebaposter@box@name tne)% |
| 615 |
}% |
| 616 |
\newcommand{\xebaposter@box@headershape@smallrounded}{% |
| 617 |
(\xebaposter@box@name tnw) {[src] -- (\xebaposter@box@name nw) -- % |
| 618 |
(\xebaposter@box@name ne)} -- (\xebaposter@box@name tne)% |
| 619 |
}% |
| 620 |
\newcommand{\xebaposter@box@headershape@roundedright}{% |
| 621 |
(\xebaposter@box@name tnw) -- (\xebaposter@box@name nw) {[rc] -- % |
| 622 |
(\xebaposter@box@name ne)} -- (\xebaposter@box@name tne)% |
| 623 |
}% |
| 624 |
\newcommand{\xebaposter@box@headershape@roundedleft}{% |
| 625 |
(\xebaposter@box@name tnw) {[rc]-- (\xebaposter@box@name nw)} -- % |
| 626 |
(\xebaposter@box@name ne) -- (\xebaposter@box@name tne)% |
| 627 |
}% |
| 628 |
\newcommand{\xebaposter@box@headershape@rounded}{% |
| 629 |
(\xebaposter@box@name tnw) {[rc] -- (\xebaposter@box@name nw) -- % |
| 630 |
(\xebaposter@box@name ne) } -- (\xebaposter@box@name tne)% |
| 631 |
}% |
| 632 |
% |
| 633 |
% |
| 634 |
% |
| 635 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 636 |
%%% Header text drawing (one function for each possible value of headershape) |
| 637 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 638 |
% |
| 639 |
% These functions take one argument: the header text |
| 640 |
\newcommand{\xebaposter@box@headerdrawtext@rectangle}[1]{% |
| 641 |
\if@xebaposter@persian |
| 642 |
\path (\xebaposter@box@name ne) +(0em,-0.5\xebaposter@box@@boxheaderheight) node[anchor=east,inner sep=0.4em] {#1};% |
| 643 |
\else |
| 644 |
\path (\xebaposter@box@name nw) +(0em,-0.5\xebaposter@box@@boxheaderheight) node[anchor=west,inner sep=0.4em] {#1};% |
| 645 |
\fi |
| 646 |
}% |
| 647 |
\newcommand{\xebaposter@box@headerdrawtext@smallrounded}[1]{% |
| 648 |
\path (\xebaposter@box@name nw) +(0.5\boxwidth,-0.5\xebaposter@box@@boxheaderheight) node[anchor=center] {#1};% |
| 649 |
}% |
| 650 |
\newcommand{\xebaposter@box@headerdrawtext@roundedright}[1]{% |
| 651 |
\if@xebaposter@persian |
| 652 |
\path (\xebaposter@box@name ne) +(0em,-0.5\xebaposter@box@@boxheaderheight)% |
| 653 |
node[anchor=east,inner sep=0.4em,text depth=0.4em] {#1};% |
| 654 |
\else |
| 655 |
\path (\xebaposter@box@name nw) +(0em,-0.5\xebaposter@box@@boxheaderheight)% |
| 656 |
node[anchor=west,inner sep=0.4em,text depth=0.4em] {#1};% |
| 657 |
\fi |
| 658 |
}% |
| 659 |
\newcommand{\xebaposter@box@headerdrawtext@roundedleft}[1]{% |
| 660 |
\if@xebaposter@persian |
| 661 |
\path (\xebaposter@box@name ne) +(0em,-0.5\xebaposter@box@@boxheaderheight)% |
| 662 |
node[anchor=east,inner sep=0.4em] {#1};% |
| 663 |
\else |
| 664 |
\path (\xebaposter@box@name nw) +(0em,-0.5\xebaposter@box@@boxheaderheight)% |
| 665 |
node[anchor=west,inner sep=0.4em] {#1};% |
| 666 |
\fi |
| 667 |
}% |
| 668 |
\newcommand{\xebaposter@box@headerdrawtext@rounded}[1]{% |
| 669 |
\path (\xebaposter@box@name nw) +(0.5\boxwidth,-0.5\xebaposter@box@@boxheaderheight) node[anchor=center] {#1};% |
| 670 |
}% |
| 671 |
% |
| 672 |
% |
| 673 |
% |
| 674 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 675 |
%%% Header shade options and functions (one function for each possible value) |
| 676 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 677 |
% |
| 678 |
% These functions take two arguments: headerColorOne, headerColorTwo and borderColor |
| 679 |
\newcommand{\xebaposter@box@headershade@shadelr}[3]{% |
| 680 |
\debug{Header-Shade: Shade Left - Right}% |
| 681 |
\tikzstyle{header colors}=[% |
| 682 |
color=#3,% |
| 683 |
shading=axis,% |
| 684 |
left color=#1,% |
| 685 |
right color=#2% |
| 686 |
]% |
| 687 |
}% |
| 688 |
\newcommand{\xebaposter@box@headershade@shaderl}[3]{% |
| 689 |
\debug{Header-Shade: Shade Right - Left}% |
| 690 |
\tikzstyle{header colors}=[% |
| 691 |
color=#3,% |
| 692 |
shading=axis,% |
| 693 |
left color=#2,% |
| 694 |
right color=#1% |
| 695 |
]% |
| 696 |
}% |
| 697 |
\newcommand{\xebaposter@box@headershade@shadetb}[3]{% |
| 698 |
\debug{Header-Shade: Shade Top - Bottom}% |
| 699 |
\tikzstyle{header colors}=[% |
| 700 |
color=#3,% |
| 701 |
shading=axis,% |
| 702 |
top color=#1,% |
| 703 |
bottom color=#2% |
| 704 |
]% |
| 705 |
}% |
| 706 |
\newcommand{\xebaposter@box@headershade@shadetbinverse}[3]{% |
| 707 |
\debug{Header-Shade: Shade Top - Bottom - Inverse }% |
| 708 |
\tikzstyle{header colors}=[% |
| 709 |
color=#3,% |
| 710 |
% top color=#1!75!#2,% |
| 711 |
% bottom color=#2!100!#1,% |
| 712 |
top color=#2,% |
| 713 |
bottom color=#1,% |
| 714 |
shading angle=20% |
| 715 |
]% |
| 716 |
\colorlet{xebaposterHeaderFontColor}{white}% |
| 717 |
}% |
| 718 |
\newcommand{\xebaposter@box@headershade@plain}[3]{% |
| 719 |
\debug{Header-Shade: Plain}% |
| 720 |
\tikzstyle{header colors}=[% |
| 721 |
color=#3,% |
| 722 |
fill=#1% |
| 723 |
]% |
| 724 |
}% |
| 725 |
\newcommand{\xebaposter@box@headershade@none}[3]{% |
| 726 |
\debug{Header-Shade: none}% |
| 727 |
\tikzstyle{header colors}=[]% |
| 728 |
}% |
| 729 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 730 |
%%% The main poster environment |
| 731 |
%%% \begin{xebaposter}{settings}{Eye Catcher}{Title}{Author}{University Logo} |
| 732 |
%%%----------------------------------------------------------------------------- |
| 733 |
%%% The settings are |
| 734 |
%%% - grid=true,[false]:Show grid to help with alignment |
| 735 |
%%% - colspacing=0.7em: Column spacing |
| 736 |
%%% - columns=4: number of columns (default 4 in landscape and 3 in portrait format) (maximum number is 6) |
| 737 |
%%% - color=[orange]: xcolor color definition used as the main color of the poster |
| 738 |
%%% - colortwo=[white]: The other color for gradient based layouts |
| 739 |
%%% - textborder=none,bars,coils,triangles,rectangle,rounded,roundedsmall,roundedleft,roundedright,[faded] |
| 740 |
%%% The style of the box around the text area |
| 741 |
%%% - headerborder=none,closed,open |
| 742 |
%%% No extra border around box header, full border around box header or border that is open below. |
| 743 |
%%% - headershape=rectangle,rounded,roundedleft,roundedright |
| 744 |
%%% Shape of the box-header region |
| 745 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 746 |
\newenvironment{poster}[5]{% BEGIN poster begin |
| 747 |
\thispagestyle{empty}% Suppress Page Number |
| 748 |
\debug{Poster Starts}% |
| 749 |
% This setkeys call parses all provided options and depending on the option |
| 750 |
% value, assigns different handler functions to the \xebaposter(Box|Header)* |
| 751 |
% functions. Once that is done, we don't have to care about particular |
| 752 |
% values for border, shading, etc. All we have to do is call the |
| 753 |
% handler functions and let them do their job. |
| 754 |
% This also allows the user to override the poster-wide defaults on a per-box |
| 755 |
% basis. |
| 756 |
\setkeys[ba]{posterbox,poster}{#1}% |
| 757 |
% |
| 758 |
% TODO: Move all those assignments to the key macros! |
| 759 |
% Parse Keys% |
| 760 |
\colorlet{bgColorOne}{\xebaposter@bgColorOne}% |
| 761 |
\colorlet{bgColorTwo}{\xebaposter@bgColorTwo}% |
| 762 |
% |
| 763 |
%% Boxes% |
| 764 |
\setlength{\headerheight}{\xebaposter@headerheight}% |
| 765 |
\setlength{\colheight}{\textheight-\xebaposter@headerheight}% |
| 766 |
\renewcommand{\@@previousbox}{notset}% |
| 767 |
% |
| 768 |
\debug{Format}% |
| 769 |
% Set default for columns if unset (4 for landscape, 3 for portrait) |
| 770 |
\ifthenelse{\equal{\xebaposter@columns}{}}{% |
| 771 |
\renewcommand{\xebaposter@columns}{\if@landscape4\else3\fi}% |
| 772 |
}{}% |
| 773 |
% |
| 774 |
\debug{Columns: \xebaposter@columns}% |
| 775 |
\setlength{\xebaposter@@colspacing}{\xebaposter@colspacing}% |
| 776 |
\setlength{\colwidth}{\textwidth}% |
| 777 |
\addtolength{\colwidth}{\xebaposter@@colspacing*(1-\xebaposter@columns)}% |
| 778 |
\ifcase\xebaposter@columns\relax% |
| 779 |
\error{You need to have at least one column!}% |
| 780 |
\or % 1 |
| 781 |
\setlength{\colwidth}{\colwidth}% |
| 782 |
\or % 2 |
| 783 |
\setlength{\colwidth}{0.5\colwidth}% |
| 784 |
\or % 3 |
| 785 |
\setlength{\colwidth}{0.3333333333333\colwidth}% |
| 786 |
\or % 4 |
| 787 |
\setlength{\colwidth}{0.25\colwidth}% |
| 788 |
\or % 5 |
| 789 |
\setlength{\colwidth}{0.2\colwidth}% |
| 790 |
\or % 6 |
| 791 |
\setlength{\colwidth}{0.16666666666\colwidth}% |
| 792 |
\else % >6 |
| 793 |
\error{You do not want so many columns}% |
| 794 |
\fi% |
| 795 |
% |
| 796 |
\newcommand{\xebaposter@reference}{north west}% |
| 797 |
% |
| 798 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 799 |
% A box with a header and some content. The basic unit of the poster% |
| 800 |
%---------------------------------------------------------------------------% |
| 801 |
% Each box has a name and can be placed absolutely or relatively.% |
| 802 |
% The only inconvenience is that you can only specify a relative position % |
| 803 |
% towards an already declared box. So if you have a box attached to the % |
| 804 |
% bottom, one to the top and a third one which should be inbetween, you % |
| 805 |
% have to specify the top and bottom boxes before you specify the middle % |
| 806 |
% box.% |
| 807 |
%% |
| 808 |
% below= name of other node% |
| 809 |
% above= name of other node% |
| 810 |
% aligned=name of other node% |
| 811 |
% bottomaligned=name of other node% |
| 812 |
% column= [0] % |
| 813 |
% row= [0] % |
| 814 |
% span= [1] % |
| 815 |
% height= <size in percent of column height>,[auto]% |
| 816 |
% name= [noname]% |
| 817 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 818 |
% |
| 819 |
% Backward-compatibility definition (\headerbox command uses posterbox env): |
| 820 |
\newcommand{\headerbox}[3]{% |
| 821 |
\begin{posterbox}[##2]{##1}% |
| 822 |
##3% |
| 823 |
\end{posterbox}% |
| 824 |
}% |
| 825 |
% |
| 826 |
\newenvironment{posterbox}[2][]{% |
| 827 |
\debug{Poster box options: ##1}% |
| 828 |
% Override the poster-wide defaults on a per-box basis |
| 829 |
\setkeys[ba]{posterbox}{##1}% |
| 830 |
% |
| 831 |
\if@xebaposter@persian |
| 832 |
\def\xebaposter@box@title{\rl{##2}}% |
| 833 |
\else |
| 834 |
\def\xebaposter@box@title{{##2}}% |
| 835 |
\fi |
| 836 |
% |
| 837 |
\colorlet{borderColor}{\xebaposter@box@borderColor}% |
| 838 |
\colorlet{headerColorOne}{\xebaposter@box@headerColorOne}% |
| 839 |
\colorlet{headerColorTwo}{\xebaposter@box@headerColorTwo}% |
| 840 |
\colorlet{headerFontColor}{\xebaposter@box@headerFontColor}% |
| 841 |
\colorlet{boxColorOne}{\xebaposter@box@boxColorOne}% |
| 842 |
\colorlet{boxColorTwo}{\xebaposter@box@boxColorTwo}% |
| 843 |
% |
| 844 |
\setlength{\xebaposter@box@@cornerradius}{\xebaposter@box@cornerradius}% |
| 845 |
\setlength{\xebaposter@box@@boxheaderheight}{\xebaposter@box@boxheaderheight}% |
| 846 |
\setlength{\xebaposter@box@@boxpadding}{\xebaposter@box@boxpadding}% |
| 847 |
% |
| 848 |
% |
| 849 |
%% The columns is always given absolute |
| 850 |
\if@xebaposter@persian |
| 851 |
% boxstartx = (columns-column-span) * colwidth + (columns-column-span) * colspacing |
| 852 |
% \setlength{\boxstartx}{(\xebaposter@columns+-\xebaposter@box@column+-\xebaposter@box@span)*\colwidth+(\xebaposter@columns+-\xebaposter@box@column+-\xebaposter@box@span)*\xebaposter@@colspacing}% |
| 853 |
\setlength{\boxstartx}{\xebaposter@columns\colwidth}% |
| 854 |
\addtolength{\boxstartx}{-\xebaposter@box@column\colwidth}% |
| 855 |
\addtolength{\boxstartx}{-\xebaposter@box@span\colwidth}% |
| 856 |
\addtolength{\boxstartx}{\xebaposter@columns\xebaposter@@colspacing}% |
| 857 |
\addtolength{\boxstartx}{-\xebaposter@box@column\xebaposter@@colspacing}% |
| 858 |
\addtolength{\boxstartx}{-\xebaposter@box@span\xebaposter@@colspacing}% |
| 859 |
\else |
| 860 |
% boxstartx = column * colwidth + column * colspacing |
| 861 |
\setlength{\boxstartx}{(\colwidth+\xebaposter@@colspacing)*\xebaposter@box@column}% |
| 862 |
\fi |
| 863 |
% |
| 864 |
%% The width is gvien absolute |
| 865 |
% Box Width = span * colwidth + (span-1) * colspacing |
| 866 |
\setlength{\boxwidth}{\xebaposter@box@span\colwidth}% |
| 867 |
\addtolength{\boxwidth}{\xebaposter@@colspacing*(\xebaposter@box@span-1)}% |
| 868 |
% |
| 869 |
%% Measure the content of the box% |
| 870 |
\setbox\xebaposter@box@content=\hbox\bgroup% |
| 871 |
\begin{pgfinterruptpicture}% |
| 872 |
\begin{minipage}[t]{\boxwidth-\xebaposter@box@@boxpadding*2}% |
| 873 |
\if@xebaposter@persian% |
| 874 |
\persian% |
| 875 |
\fi |
| 876 |
\xebaposter@box@textfont\bgroup% |
| 877 |
}% End of posterbox preamble |
| 878 |
%%% HERE COME THE ACTUAL CONTENTS OF THE POSTERBOX ENVIRONMENT |
| 879 |
{% posterbox handling after contents (i.e. drawing everything) |
| 880 |
\egroup% |
| 881 |
\end{minipage}% |
| 882 |
\end{pgfinterruptpicture}% |
| 883 |
\egroup% |
| 884 |
\setlength{\boxheight}{\ht\xebaposter@box@content}% |
| 885 |
\addtolength{\boxheight}{\dp\xebaposter@box@content}% |
| 886 |
\addtolength{\boxheight}{\xebaposter@box@@boxheaderheight}% Header% |
| 887 |
\addtolength{\boxheight}{2\xebaposter@box@@boxpadding}% Inner Sep |
| 888 |
% |
| 889 |
\ifthenelse{\equal{\xebaposter@box@height}{bottom}}{% |
| 890 |
}{\ifthenelse{\equal{\xebaposter@box@height}{auto}}{% |
| 891 |
}{ % Neither auto nor bottom% |
| 892 |
\setlength{\boxheight}{\xebaposter@box@height\colheight}% |
| 893 |
}}% |
| 894 |
% |
| 895 |
%% Determine the box position% |
| 896 |
\debug{Setting Coordinates}% |
| 897 |
\debug{Upper Right}% |
| 898 |
\debug{\xebaposter@box@name}% |
| 899 |
% |
| 900 |
%%% Upper Right Corner% |
| 901 |
% if below=auto, set it to the previous box |
| 902 |
% TODO: We should generalize this to the previous box of the used column, |
| 903 |
% currently we use the previous box, which might be in a different column |
| 904 |
\ifthenelse{\equal{\xebaposter@box@below}{auto}}{% |
| 905 |
\edef\xebaposter@box@below{\@@previousbox}% |
| 906 |
\debug{Box \xebaposter@box@name has below=auto, placing it below box \xebaposter@box@below.}% |
| 907 |
}{}% |
| 908 |
\xdef\@@previousbox{\xebaposter@box@name}% |
| 909 |
% |
| 910 |
\ifthenelse{\not\equal{\xebaposter@box@below}{notset}}{% |
| 911 |
%% Below% |
| 912 |
\debug{Below}% |
| 913 |
\path[shape=coordinate] (\boxstartx,0pt |- \xebaposter@box@below se) ++(0pt,-\xebaposter@@colspacing) coordinate(\xebaposter@box@name nw);% |
| 914 |
}{% |
| 915 |
\ifthenelse{\not\equal{\xebaposter@box@aligned}{notset}}{% |
| 916 |
%% Aligned% |
| 917 |
\debug{Aligned: \xebaposter@box@aligned}% |
| 918 |
\path[shape=coordinate] (\boxstartx,0pt |- \xebaposter@box@aligned nw) coordinate(\xebaposter@box@name nw);% |
| 919 |
}{% |
| 920 |
%% Fixed% |
| 921 |
\debug{Fixed}% |
| 922 |
\setlength{\boxstarty}{\xebaposter@box@row\colheight}% |
| 923 |
\path[shape=coordinate] (\boxstartx,\colheight-\boxstarty) coordinate (\xebaposter@box@name nw);% |
| 924 |
}}% |
| 925 |
% |
| 926 |
%% Lower Left Corner% |
| 927 |
\debug{Lower Left}% |
| 928 |
\ifthenelse{\equal{\xebaposter@box@above}{bottom}}{% |
| 929 |
%% Above = Bottom% |
| 930 |
\debug{Above bottom}% |
| 931 |
\ifthenelse{\equal{\xebaposter@box@below}{notset} \and \equal{\xebaposter@box@aligned}{notset}}{% |
| 932 |
\path[shape=coordinate] (\boxstartx,\boxheight) coordinate (\xebaposter@box@name nw);% |
| 933 |
}{}% |
| 934 |
\path[shape=coordinate] (\boxstartx+\boxwidth,0pt) coordinate (\xebaposter@box@name se);% |
| 935 |
}{\ifthenelse{\not \equal{\xebaposter@box@bottomaligned}{notset}}{% |
| 936 |
\path[shape=coordinate] (\boxstartx+\boxwidth,0pt |- \xebaposter@box@bottomaligned se) coordinate (\xebaposter@box@name se);% |
| 937 |
}{{\ifthenelse{\not \equal{\xebaposter@box@above}{notset}}{% |
| 938 |
%% Above = Node% |
| 939 |
\path[shape=coordinate] (\boxstartx+\boxwidth,0pt |- \xebaposter@box@above nw) +(0pt,\xebaposter@@colspacing) coordinate(\xebaposter@box@name se);% |
| 940 |
}{% |
| 941 |
%% Above = notset% |
| 942 |
\debug{Above=not set}% |
| 943 |
\ifthenelse{\equal{\xebaposter@box@height}{bottom}}{% |
| 944 |
%% height=bottom% |
| 945 |
\debug{height=bottom}% |
| 946 |
\path[shape=coordinate] (\boxstartx+\boxwidth,0pt) coordinate(\xebaposter@box@name se);% |
| 947 |
}{ %% height=auto or fixed% |
| 948 |
\debug{height=auto or fixed}% |
| 949 |
\path[shape=coordinate] (\xebaposter@box@name nw) ++(\boxwidth,-\boxheight) coordinate (\xebaposter@box@name se);% |
| 950 |
}}}}}% |
| 951 |
% |
| 952 |
% |
| 953 |
% Set coordinates relative to nw,se% |
| 954 |
\debug{Fixing Coordinates}% |
| 955 |
\path[shape=coordinate]% |
| 956 |
(\xebaposter@box@name nw) +(0pt,-\xebaposter@box@@boxheaderheight) coordinate(\xebaposter@box@name tnw)% |
| 957 |
(\xebaposter@box@name nw |- \xebaposter@box@name se) coordinate(\xebaposter@box@name sw)% |
| 958 |
(\xebaposter@box@name se |- \xebaposter@box@name nw) coordinate(\xebaposter@box@name ne)% |
| 959 |
(\xebaposter@box@name ne) +(0pt,-\xebaposter@box@@boxheaderheight) coordinate(\xebaposter@box@name tne)% |
| 960 |
% |
| 961 |
(\xebaposter@box@name nw) +(-0.025em,0pt) coordinate(\xebaposter@box@name outer nw)% |
| 962 |
(\xebaposter@box@name tnw) +(-0.025em,0pt) coordinate(\xebaposter@box@name outer tnw)% |
| 963 |
(\xebaposter@box@name sw) +(-0.025em,0pt) coordinate(\xebaposter@box@name outer sw)% |
| 964 |
% |
| 965 |
(\xebaposter@box@name ne) +( 0.025em,0pt) coordinate(\xebaposter@box@name outer ne)% |
| 966 |
(\xebaposter@box@name tne) +( 0.025em,0pt) coordinate(\xebaposter@box@name outer tne)% |
| 967 |
(\xebaposter@box@name se) +( 0.025em,0pt) coordinate(\xebaposter@box@name outer se);% |
| 968 |
% |
| 969 |
%% Setting the bg colors of the box header |
| 970 |
\xebaposterHeaderSetShade{headerColorOne}{headerColorTwo}{borderColor}% |
| 971 |
% |
| 972 |
\tikzstyle{rc}=[rounded corners=\xebaposter@box@@cornerradius]% |
| 973 |
\tikzstyle{src}=[rounded corners=0.5em]% |
| 974 |
% |
| 975 |
%% Now that everything is set up, draw the actual box, with bg and header |
| 976 |
\begin{scope}[line width=\xebaposter@box@linewidth]% |
| 977 |
%% Header% |
| 978 |
\debug{Header}% |
| 979 |
\debug{Header-Shape: \xebaposter@box@headershape, header-border: \xebaposter@box@headerborder (\xebaposter@box@headerbordernr)}% |
| 980 |
% TODO: Also turn this last ifcase construct into a handler function |
| 981 |
% We only need to determine (fill|shade)(draw|)... |
| 982 |
\xebaposterHeaderDrawBackground{bgColorOne}{bgColorTwo}{borderColor}% |
| 983 |
\xebaposterHeaderDrawBorder{}%{borderColor}% |
| 984 |
\ifcase\xebaposter@box@headerbordernr\relax% |
| 985 |
% open |
| 986 |
\ifthenelse{\equal{\xebaposter@box@headershade}{plain}}{% |
| 987 |
\filldraw [style=header colors] \xebaposterHeaderGetShape;% |
| 988 |
}{% |
| 989 |
\shadedraw [style=header colors] \xebaposterHeaderGetShape;% |
| 990 |
}% |
| 991 |
\or% |
| 992 |
% closed |
| 993 |
\ifthenelse{\equal{\xebaposter@box@headershade}{plain}}{% |
| 994 |
\filldraw [style=header colors] \xebaposterHeaderGetShape -- cycle;% |
| 995 |
}{% |
| 996 |
\shadedraw [style=header colors] \xebaposterHeaderGetShape -- cycle;% |
| 997 |
}% |
| 998 |
\or% |
| 999 |
% none |
| 1000 |
\ifthenelse{\equal{\xebaposter@box@headershade}{plain}}{% |
| 1001 |
\fill [style=header colors] \xebaposterHeaderGetShape;% |
| 1002 |
}{% |
| 1003 |
\shade [style=header colors] \xebaposterHeaderGetShape;% |
| 1004 |
}% |
| 1005 |
\fi% |
| 1006 |
% |
| 1007 |
%% Draw the text inside the box header: |
| 1008 |
%%% %%% %%% %%% %%% buggy part because of color!! %%% %%% %%% %%% %%% %%% |
| 1009 |
\xebaposterHeaderDrawText{\hbox{{\color{headerFontColor}\xebaposter@box@headerfont% |
| 1010 |
{\xebaposter@box@title}}}}% |
| 1011 |
% |
| 1012 |
%% Text borders (border around boxes) |
| 1013 |
\debug{Poster boxes}% |
| 1014 |
% First set box shade |
| 1015 |
\xebaposterBoxDrawBackground{boxColorOne}{boxColorTwo}% |
| 1016 |
\xebaposterBoxDrawBorder{borderColor}% |
| 1017 |
%% |
| 1018 |
%% Text Box% |
| 1019 |
\debug{Drawing Text}% |
| 1020 |
\path (\xebaposter@box@name tnw) node(text) [anchor=north west,% |
| 1021 |
outer sep=-0.000em,text width=\boxwidth-2\xebaposter@box@@boxpadding,inner sep=\xebaposter@box@@boxpadding,% |
| 1022 |
text justified] {{\usebox{\xebaposter@box@content}}};% |
| 1023 |
\end{scope}% |
| 1024 |
% |
| 1025 |
% Finally store the box name as the previous box for the next call |
| 1026 |
% \xdef\@@previousbox{\xebaposter@box@name}% |
| 1027 |
}% END of posterbox definition |
| 1028 |
% |
| 1029 |
%% Poster Background% |
| 1030 |
\xebaposterPosterDrawBackground{bgColorOne}{bgColorTwo}% |
| 1031 |
%% Poster header/title |
| 1032 |
\hspace{-1.5em}% |
| 1033 |
\begin{tikzpicture}[inner sep=0pt,outer sep=0pt,line width=0.05em,align=right]% |
| 1034 |
\useasboundingbox (0em,0em) rectangle(\textwidth,\textheight);% |
| 1035 |
\path[shape=coordinate]% |
| 1036 |
(0pt,\colheight) coordinate(north west) (\textwidth,\colheight) coordinate(north east)% |
| 1037 |
(0pt,0pt) coordinate(south west) (\textwidth,0pt) coordinate(south east);% |
| 1038 |
% |
| 1039 |
\ifxebaposter@eyecatcher% Has eye catcher |
| 1040 |
\debug{Eyecatcher found!}% |
| 1041 |
\setbox\xebaposter@titleimage@left=\hbox{#2}% |
| 1042 |
\else% Has no eye catcher% |
| 1043 |
\setbox\xebaposter@titleimage@left=\hbox{}% |
| 1044 |
\fi% |
| 1045 |
\setlength{\xebaposter@titleimage@left@width}{\wd\xebaposter@titleimage@left}% |
| 1046 |
\setbox\xebaposter@titleimage@right=\hbox{#5}% |
| 1047 |
\setlength{\xebaposter@titleimage@right@width}{\wd\xebaposter@titleimage@right}% |
| 1048 |
\setlength{\xebaposter@titleimage@textwidth}{\textwidth}% |
| 1049 |
\addtolength{\xebaposter@titleimage@textwidth}{-\xebaposter@titleimage@left@width}% |
| 1050 |
\addtolength{\xebaposter@titleimage@textwidth}{-\xebaposter@titleimage@right@width}% |
| 1051 |
% |
| 1052 |
\debug{#3}% |
| 1053 |
% |
| 1054 |
% |
| 1055 |
% % Draw Header% |
| 1056 |
\draw (north west) +(0em,1em+0.5\headerheight) node(image)[anchor=west] {{\usebox{% |
| 1057 |
\if@xebaposter@persian% |
| 1058 |
\xebaposter@titleimage@right% |
| 1059 |
\else% |
| 1060 |
\xebaposter@titleimage@left% |
| 1061 |
\fi}}};% |
| 1062 |
\draw (north east) +(0em,1em+0.5\headerheight) node(logo) [anchor=east] {{\usebox{% |
| 1063 |
\if@xebaposter@persian% |
| 1064 |
\xebaposter@titleimage@left% |
| 1065 |
\else% |
| 1066 |
\xebaposter@titleimage@right% |
| 1067 |
\fi}}};% |
| 1068 |
% |
| 1069 |
\ifxebaposter@eyecatcher% Has eye catcher% |
| 1070 |
\draw (image.east) node(title)[anchor=west,text width=\xebaposter@titleimage@textwidth]{% |
| 1071 |
\begin{minipage}{\xebaposter@titleimage@textwidth}% |
| 1072 |
\begin{center}% |
| 1073 |
\if@xebaposter@persian% |
| 1074 |
\textbf{\Huge\rl{#3}}\\% |
| 1075 |
{\Large\rl{#4}}% |
| 1076 |
\else% |
| 1077 |
\textbf{\Huge #3}\\% |
| 1078 |
{\Large #4}% |
| 1079 |
\fi% |
| 1080 |
\end{center}% |
| 1081 |
\end{minipage}% |
| 1082 |
};% |
| 1083 |
\else% Has no eye catcher |
| 1084 |
\draw (image.east) node(title)[anchor=west] {{\begin{minipage}{\xebaposter@titleimage@textwidth} |
| 1085 |
\if@xebaposter@persian% |
| 1086 |
\persian{\bfseries\Huge\rl{#3}}\\{\Large\rl{#4}}% |
| 1087 |
\else% |
| 1088 |
{\bfseries\Huge #3}\\{\Large #4}% |
| 1089 |
\fi% |
| 1090 |
\end{minipage}}};% |
| 1091 |
\fi% |
| 1092 |
}% END poster begin |
| 1093 |
% The body |
| 1094 |
{% BEGIN poster end |
| 1095 |
% The end, draw gridlines if neccesary |
| 1096 |
\ifxebaposter@grid% |
| 1097 |
\newdimen{\gridpos}% |
| 1098 |
\pgfmathsetmacro{\z}{\xebaposter@columns-1}% |
| 1099 |
\foreach \y in {0,...,\z}% |
| 1100 |
{% |
| 1101 |
\setlength{\gridpos}{\y\colwidth+\y\xebaposter@@colspacing}% |
| 1102 |
\draw[draw=green,draw opacity=0.7] (\gridpos,0pt) -- (\gridpos,\colheight)% |
| 1103 |
(\gridpos+\colwidth,0pt) -- (\gridpos+\colwidth,\colheight);% |
| 1104 |
}% |
| 1105 |
% Horizontal lines, every 0.1: |
| 1106 |
%% Explicitly list all percentages, because with {0.0, 0.1, ..., 1.0} we |
| 1107 |
%% get rounding errors in the displayed numbers! |
| 1108 |
\foreach \y in {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}% |
| 1109 |
{\if@xebaposter@persian% |
| 1110 |
\draw[draw=green,draw opacity=0.7] (\textwidth,\colheight-\y\colheight) --% |
| 1111 |
(0pt,\colheight-\y\colheight) node[anchor=east] {\y};% |
| 1112 |
\else% |
| 1113 |
\draw[draw=green,draw opacity=0.7] (0pt,\colheight-\y\colheight) --% |
| 1114 |
(\textwidth,\colheight-\y\colheight) node[anchor=west] {\y};% |
| 1115 |
\fi|}% |
| 1116 |
\fi% |
| 1117 |
\end{tikzpicture}% |
| 1118 |
% \xkvview{} |
| 1119 |
\par% |
| 1120 |
}% END poster end |