Changeset 560 in ETALON


Ignore:
Timestamp:
Apr 27, 2016, 12:53:08 PM (8 years ago)
Author:
hodnevuc
Message:
 
Location:
papers/2016_IPAC/IPAC16_CLIO/poster
Files:
12 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • papers/2016_IPAC/IPAC16_CLIO/poster/baposter.cls

    r521 r560  
    1   %%
    2   %% This is file `baposter.cls'
    3   %%
    4   %% An relatively comfortable latex class to produce posters with a grid based
    5   %% layout. It comes with a number of combinable styles and is (maybe only for
    6   %% the writer) easy to extend, as all the graphics is based on pgf.
    7   %%
    8   %% It is meant to be used with pdftex, but might also work with pslatex if you
    9   %% are not interested in things like transparency.
    10   %%
    11   %% Copyright (C) 2007 Brian Amberg
    12   %%
    13   %% 11. December 2010: Fixed "Empty Second Page" bug
    14   %%     - A second empty page was introduced when a document ended with
    15   %%           \end{poster}
    16   %%         \end{document}
    17   %%       This was fixed thanks to a suggestion by Martin Aulbach
    18   %%     - Added
    19   %%         \thispagestyle{empty}
    20   %%       to suppress page numbers, which became visible when the margins are large.
    21   %%       The underlying problem of page-size handling has not yet been solved.
    22   %% 30. September 2010: Border Bugfixes
    23   %%     - Correct background color with textborder=rounded-small, Thanks to Ke Chen for the bugreport and patch
    24   %%     - Correctly draw rectangular text boxes, Thanks to abenkst for the bugreport and fix
    25   %% 10. June 2010: Added option to set the number of columns
    26   %%     - added a class option to set the number of columns
    27   %%         - columns=5: sets the number of columns to 5, possible values are 1..6, default is 3 in portrait and 4 in landscape format
    28   %% 29. April 2009: Incorporated Patches by Arne Henningsen
    29   %%     - added some class options
    30   %%        - a4shrink: shrink the paper to A4 size (for printing drafts or handouts)
    31   %%        - movebody=Xpt: move the text/poster body Xpt to the right
    32   %%                    (or to the left if Xpt is negative),
    33   %%                    e.g. for manually centering the poster on the page
    34   %%        - showframe: use the "showframe" option of the "geometry" package
    35   %%        - a0paper (default): set paper size to A0
    36   %%        - archE: set paper size to Arch E
    37   %%     - setting "background" can be "none" now (otherwise the "showframe"
    38   %%          option has no effect)
    39   %%     - the page number has been removed (it was mostly not visible before)
    40   %%     - the "margin=" option works now
    41   %% 04. December 2008
    42   %%     - Mainly an update to the landscape example
    43   %% 14. November 2008
    44   %%     - Actually center the title when eyecatcher is used.
    45   %% 04. November 2008
    46   %%     - Fixed bug with eyecatcher not working.
    47   %% 26. June 2008
    48   %%     - Fixed bug with plain background mode.
    49   %% 14. June 2008
    50   %%     - Support for portrait/landscape switching.
    51   %%     - Some smaller bugfixes.
    52   %% 01. June 2007
    53   %%     - First version released.
    54   %%
    55   %% Use this class with pdflatex
    56   %%
    57   %% I have confirmed that this package works with
    58   %%   - texlive 2007 and
    59   %%   - miktex 2.7
    60   %%
    61   %% It does not seem to work with
    62   %%   - miktex 2.2
    63   %%   - some old versions of tetex
    64   %%
    65   %% Licence: GPL
    66   \ProvidesClass{baposter}[2010/06/10 v1.04 baposter class]
    67   \NeedsTeXFormat{LaTeX2e}[1995/06/01]
    68   \LoadClass{article}
    69   \typeout{baposter: Brian Amberg, 2007, 2008, 2009 | http://www.brian-amberg.de/uni/poster/}
    70 
    71   %% Define lengths only once on inclusion, such that we can make multiple posters
    72   \newlength{\baposter@basepaperwidth} 
    73   \newlength{\baposter@basepaperheight}
    74   \newlength{\baposter@basemargin}   
    75   \newlength{\headerheight}%
    76   \newlength{\colwidth}%
    77   \newlength{\colheight}%
    78   \newlength{\baposter@@colspacing}%
    79   \newlength{\boxstartx}%
    80   \newlength{\boxstarty}%
    81   \newlength{\boxwidth}%
    82   \newlength{\boxheight}%
    83   \newlength{\baposter@titleimage@left@width}%
    84   \newlength{\baposter@titleimage@right@width}%
    85   \newlength{\baposter@titleimage@textwidth}%
    86   \newbox\baposter@content%
    87   \newbox\baposter@titleimage@left%
    88   \newbox\baposter@titleimage@title%
    89   \newbox\baposter@titleimage@right%
    90 
    91   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    92   % Packages
    93   %-------------------------------------------------------------------------------
    94   % The only ``weird'' dependency of this package is pgf. All the rest should be
    95   % installed on any decent system.
    96   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    97   \typeout{Use Packages}
    98   \usepackage{xkeyval}
    99   \usepackage{calc}
    100   \usepackage[cmyk]{xcolor}
    101   \usepackage{tikz}
    102   \usepackage{pgf}
    103   \usepackage{ifthen}
    104   \usepackage[T1]{fontenc}
    105 
    106   \usetikzlibrary{decorations}
    107 
    108   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    109   % Settings
    110   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    111   % TODO: Add package options
    112   \typeout{Setup}
    113 
    114   % Choose a smaller value for larger fonts
    115   \newcommand{\baposter@fontscale}{0.292}
    116   % Landscape versus portrait
    117   \newcommand{\baposter@format}{}
    118   % default paper size
    119   \newcommand{\baposter@papersize}{a0paper}
    120   % use the ``showframe'' option of the ``geometry'' package?
    121   \newcommand{\baposter@showframe}{false}
    122 
    123   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    124   % Zoom
    125   %-------------------------------------------------------------------------------
    126   % We scale the page from fontscale * a0 up to a0
    127   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    128   \typeout{Zoom}
    129 
    130   \DeclareOption{landscape}{\renewcommand{\baposter@format}{landscape}}
    131   \DeclareOption{portrait}{\renewcommand{\baposter@format}{}}
    132 \DeclareOption{archE}{\renewcommand{\baposter@papersize}{archE}}
    133 \DeclareOption{a0paper}{\renewcommand{\baposter@papersize}{a0paper}}
    134 \DeclareOption{a4shrink}{\newcommand{\baposter@finalpapersize}{a4paper}}
    135 \DeclareOption{showframe}{\renewcommand{\baposter@showframe}{true}}
    136 \ProcessOptions
    137 
    138 \ifthenelse{\equal{\baposter@papersize}{archE}}{
    139    \setlength{\baposter@basepaperwidth} {91.44cm}
    140    \setlength{\baposter@basepaperheight}{121.92cm}
    141    \setlength{\baposter@basemargin}{1.5cm}
    142 }{
    143    \setlength{\baposter@basepaperwidth} {83.96cm}
    144    \setlength{\baposter@basepaperheight}{118.82cm}
    145    \setlength{\baposter@basemargin}{1.5cm}
    146 }
    147 \ifthenelse{\equal{\baposter@format}{landscape}}{
    148   \setlength{\baposter@basepaperwidth} {118.82cm}
    149   \setlength{\baposter@basepaperheight}{83.96cm}
    150   \setlength{\baposter@basemargin}{1.5cm}
    151 }{
    152   \setlength{\baposter@basepaperwidth} {83.96cm}
    153   \setlength{\baposter@basepaperheight}{118.82cm}
    154   \setlength{\baposter@basemargin}{1.5cm}
    155 }
    156 
     1%%
     2%% This is file `baposter.cls'
     3%%
     4%% A relatively comfortable latex class to produce posters with a grid based
     5%% layout. It comes with a number of combinable styles and is (maybe only for
     6%% the writer) easy to extend, as all the graphics is based on pgf.
     7%%
     8%% It is meant to be used with pdftex, but might also work with pslatex if you
     9%% are not interested in things like transparency.
     10%%
     11%% Copyright (C) 2007-2011 Brian Amberg
     12%% Copyright (C) 2011      Reinhold Kainhofer <reinhold@kainhofer.com>
     13%%
     14%% 29. September 2011:
     15%%     - Finally fixed confusion with paper size handling and landscape. This required seperate handling of papersizes
     16%%       known to the geometry package and other packages.
     17%% 26. September 2011:
     18%%     - Reverted drawing of faded borders to manual method, as the current result does not work with evince,
     19%%       and produced spurious colored boxes with okular and acroread.
     20%%     - Added one more example due to popular request
     21%% 16. September 2011:
     22%%     - Removed nag package, such that it compiles on older systems
     23%%     - Added more examples
     24%% 15. September 2011:
     25%%     - Merged fork by (rk) back into mainline, essentially taking over all the great improvements that Reinhold Kainhofer coded.
     26%%       We call this version 2, as it breaks the interface in some small points. Essentially watch out for this:
     27%%       - no/yes keys are now false/true
     28%%       - the shade-lr etc. keys have the hypen removed, and are now called shadelr etc.
     29%      - Added more examples, which are all adapted to work with the current version
     30%% 27. August 2011 (rk):
     31%%     - Completely factored out all drawing commands to handler functions, assigned via choice keys
     32%%     - Added cornerradius, boxheaderheight, boxpadding options
     33%%     - Added missing roundedright
     34%% 26. August 2011 (rk):
     35%%     - Turned headerbox cmd into posterbox environment (allows verbatim)
     36%%     - pass several options to packages
     37%%     - added debug cls option to reduce default output
     38%%     - rewrote several loops and ifthenelse
     39%%     - Use boolean and choice keys for all options
     40%%     - Changed all choice options to set a global function to
     41%%       \baposter@OPTION@OPTIONVALUE, which are a functions that execute the
     42%%       option's setting (drawing routine, color setting for tikz, etc.)
     43%%     - Add a5paper
     44%% 07. April 2011: Fixed paper size handling
     45%%     - Fixed Paper Size handling, you can now specify all page sizes using paperwidth=, paperheight= class options.
     46%%     - Added rudimentary documentation of the available keys.
     47%% 11. December 2010: Fixed "Empty Second Page" bug
     48%%     - A second empty page was introduced when a document ended with
     49%%           \end{poster}
     50%%         \end{document}
     51%%       This was fixed thanks to a suggestion by Martin Aulbach
     52%%     - Added
     53%%         \thispagestyle{empty}
     54%%       to suppress page numbers, which became visible when the margins are large.
     55%%       The underlying problem of page-size handling has not yet been solved.
     56%% 30. September 2010: Border Bugfixes
     57%%     - Correct background color with textborder=rounded-small, Thanks to Ke Chen for the bugreport and patch
     58%%     - Correctly draw rectangular text boxes, Thanks to abenkst for the bugreport and fix
     59%% 10. June 2010: Added option to set the number of columns
     60%%     - added a class option to set the number of columns
     61%%         - columns=5: sets the number of columns to 5, possible values are 1..6, default is 3 in portrait and 4 in landscape format
     62%% 29. April 2009: Incorporated Patches by Arne Henningsen
     63%%     - added some class options
     64%%        - a4shrink: shrink the paper to A4 size (for printing drafts or handouts)
     65%%        - movebody=Xpt: move the text/poster body Xpt to the right
     66%%                    (or to the left if Xpt is negative),
     67%%                    e.g. for manually centering the poster on the page
     68%%        - showframe: use the "showframe" option of the "geometry" package
     69%%        - a0paper (default): set paper size to A0
     70%%        - archE: set paper size to Arch E
     71%%     - setting "background" can be "none" now (otherwise the "showframe"
     72%%          option has no effect)
     73%%     - the page number has been removed (it was mostly not visible before)
     74%%     - the "margin=" option works now
     75%% 04. December 2008
     76%%     - Mainly an update to the landscape example
     77%% 14. November 2008
     78%%     - Actually center the title when eyecatcher is used.
     79%% 04. November 2008
     80%%     - Fixed bug with eyecatcher not working.
     81%% 26. June 2008
     82%%     - Fixed bug with plain background mode.
     83%% 14. June 2008
     84%%     - Support for portrait/landscape switching.
     85%%     - Some smaller bugfixes.
     86%% 01. June 2007
     87%%     - First version released.
     88%%
     89%% Use this class with pdflatex
     90%%
     91%% I have confirmed that this package works with
     92%%   - texlive 2007 and
     93%%   - miktex 2.7
     94%%
     95%% It does not seem to work with
     96%%   - miktex 2.2
     97%%   - some old versions of tetex
     98%%
     99%%
     100%% TODO:
     101%% -) Rename backgrounds back to shaded-tb shade-lr
     102%% -) Rename textborder back to rounded-small (consistent naming needed!)
     103%% -) Rename headershade back to shade-lr, shade-tb, shade-tb-inverse
     104%% -) Rename headershape back to small-rounded
     105%% -) Option value consistency (small-rounded vs. rounded-small; missing ones)
     106%% -) Rename \baposterHeaderSetShade, \baposterHeaderDrawText to include @ and verb
     107%%
     108%%
     109%% Licence: GPL
     110\ProvidesClass{baposter}[2011/11/26 v2.0 baposter class]
     111\NeedsTeXFormat{LaTeX2e}[1995/06/01]
     112\LoadClass{article}
     113\typeout{baposter: Brian Amberg, 2007, 2008, 2009, 2010, 2011 | http://www.brian-amberg.de/uni/poster/}
     114\typeout{baposter: Reinhold Kainhofer, 2011 | http://reinhold.kainhofer.com/}
     115
     116%% Define lengths only once on inclusion, such that we can make multiple posters
     117\newlength{\baposter@basepaperwidth}
     118\newlength{\baposter@basepaperheight}
     119\newlength{\baposter@basemargin}
     120\newlength{\baposter@finalpaperwidth}
     121\newlength{\baposter@finalpaperheight}
     122\newlength{\baposter@finalmargin}
     123\newlength{\headerheight}%
     124\newlength{\colwidth}%
     125\newlength{\colheight}%
     126\newlength{\baposter@@colspacing}%
     127\newlength{\baposter@box@@cornerradius}%
     128\newlength{\baposter@box@@boxheaderheight}%
     129\newlength{\baposter@box@@boxpadding}%
     130\newlength{\boxstartx}%
     131\newlength{\boxstarty}%
     132\newlength{\boxwidth}%
     133\newlength{\boxheight}%
     134\newlength{\baposter@titleimage@left@width}%
     135\newlength{\baposter@titleimage@right@width}%
     136\newlength{\baposter@titleimage@right@height}%
     137\newlength{\baposter@titleimage@textwidth}%
     138\newbox\baposter@box@content%
     139\newbox\baposter@titleimage@left%
     140\newbox\baposter@titleimage@title%
     141\newbox\baposter@titleimage@right%
     142
     143%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     144% Packages
     145%-------------------------------------------------------------------------------
     146% The only ``weird'' dependency of this package is pgf. All the rest should be
     147% installed on any decent system.
     148%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     149\typeout{Use Packages}
     150\RequirePackage{xkeyval}
     151\RequirePackage{calc}
     152\RequirePackage[cmyk]{xcolor}
     153\RequirePackage{tikz}
     154\RequirePackage{pgf}
     155\RequirePackage{ifthen}
     156\RequirePackage[T1]{fontenc}
     157%\RequirePackage[l2tabu, orthodox]{nag}
     158\usetikzlibrary{decorations}
     159\usetikzlibrary{fadings}
     160\usetikzlibrary{snakes}
     161\usetikzlibrary{calc}
     162
     163
     164
     165%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     166% Settings
     167%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     168
     169% Choose a smaller value for larger fonts
     170\newcommand{\baposter@fontscale}{0.265}
     171
     172%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     173% Zoom
     174%-------------------------------------------------------------------------------
     175% We scale the page from fontscale * papersize up to papersize
     176%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     177
     178
     179%% Paper sizes
     180\newif\if@landscape
     181\newif\if@geometryKnowsThisSize
     182\DeclareOptionX{landscape}{\@landscapetrue}
     183\DeclareOptionX{portrait}{}
     184
     185\newcommand{\baposter@setfinalpapersize}[2]{%
     186\if@geometryKnowsThisSize
     187  \setlength{\baposter@finalpaperwidth}{#1}%
     188  \setlength{\baposter@finalpaperheight}{#2}%
     189\else
     190\if@landscape
     191% Transpose length, if geometry does not handle the papersize based on the key
     192  \setlength{\baposter@finalpaperwidth}{#2}%
     193  \setlength{\baposter@finalpaperheight}{#1}%
     194\else
     195  \setlength{\baposter@finalpaperwidth}{#1}%
     196  \setlength{\baposter@finalpaperheight}{#2}%
     197\fi
     198\fi
     199}
     200
     201% Default paperwidth and paperheight = a0paper
     202\DeclareOptionX{paperwidth}[841mm]{\setlength{\baposter@finalpaperwidth}{#1}}
     203\DeclareOptionX{paperheight}[1189mm]{\setlength{\baposter@finalpaperheight}{#1}}
     204\DeclareOptionX{archA}         {                           \baposter@setfinalpapersize{9in}{12in}}%
     205\DeclareOptionX{archB}         {                           \baposter@setfinalpapersize{12in}{18in}}%
     206\DeclareOptionX{archC}         {                           \baposter@setfinalpapersize{18in}{24in}}%
     207\DeclareOptionX{archD}         {                           \baposter@setfinalpapersize{24in}{36in}}%
     208\DeclareOptionX{archE}         {                           \baposter@setfinalpapersize{36in}{48in}}%
     209\DeclareOptionX{archE1}        {                           \baposter@setfinalpapersize{30in}{42in}}%
     210\DeclareOptionX{archE2}        {                           \baposter@setfinalpapersize{26in}{38in}}%
     211\DeclareOptionX{archE3}        {                           \baposter@setfinalpapersize{27in}{39in}}%
     212\DeclareOptionX{a0paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{841mm}{1189mm}}%g
     213\DeclareOptionX{a1paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{594mm}{841mm}}%g
     214\DeclareOptionX{a2paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{420mm}{594mm}}%g
     215\DeclareOptionX{a3paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{297mm}{420mm}}%g
     216\DeclareOptionX{a4paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{210mm}{297mm}}%g
     217\DeclareOptionX{a5paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{148mm}{210mm}}%g
     218\DeclareOptionX{a6paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{105mm}{148mm}}%g
     219\DeclareOptionX{b0paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{1000mm}{1414mm}}%g
     220\DeclareOptionX{b1paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{707mm}{1000mm}}%g
     221\DeclareOptionX{b2paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{500mm}{707mm}}%g
     222\DeclareOptionX{b3paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{353mm}{500mm}}%g
     223\DeclareOptionX{b4paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{250mm}{353mm}}%g
     224\DeclareOptionX{b5paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{176mm}{250mm}}%g
     225\DeclareOptionX{b6paper}       {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{125mm}{176mm}}%g
     226\DeclareOptionX{ansiapaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{11in}}%
     227\DeclareOptionX{ansibpaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{11in}{17in}}%
     228\DeclareOptionX{ansicpaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{17in}{22in}}%
     229\DeclareOptionX{ansidpaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{22in}{34in}}%
     230\DeclareOptionX{ansiepaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{34in}{44in}}%
     231\DeclareOptionX{letterpaper}   {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{11in}}%
     232\DeclareOptionX{legalpaper}    {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{14in}}%
     233\DeclareOptionX{executivepaper}{\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{7.25in}{10.5in}}%
     234\DeclareOptionX{screen}        {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{225mm}{180mm}}%g
     235
     236% Margin
     237\setlength{\baposter@finalmargin}{1.5cm}
    157238\DeclareOptionX{fontscale}[0.292]{\renewcommand{\baposter@fontscale}{#1}}
    158 \DeclareOptionX{margin}   [1.5cm]  {\setlength{\baposter@basemargin}{#1}}
     239\DeclareOptionX{margin}   [1.5cm]{\setlength{\baposter@finalmargin}{#1}}
     240
    159241% move text/poster body to the right (or to the left if negative)
    160242\newlength{\baposter@movebody}
    161243\setlength{\baposter@movebody}{0cm}
    162244\DeclareOptionX{movebody}[0cm]{\setlength{\baposter@movebody}{#1}}
     245
     246
     247\newif\if@debug
     248\DeclareOptionX{debug}{\@debugtrue}
     249%% Will be passed on to other packages (xcolor and geometry), still we don't want unused warnings
     250\DeclareOptionX{table}{}
     251\DeclareOptionX{showframe}{}
     252
    163253\ProcessOptionsX
    164254
    165 \setlength{\baposter@basepaperwidth} {\baposter@fontscale\baposter@basepaperwidth }
    166 \setlength{\baposter@basepaperheight}{\baposter@fontscale\baposter@basepaperheight}
    167 \setlength{\baposter@basemargin}     {\baposter@fontscale\baposter@basemargin}
     255\if@debug
     256\newcommand{\debug}[1]{\typeout{#1}}
     257\else
     258\newcommand{\debug}[1]{}
     259\fi
     260
     261
     262
     263\setlength{\baposter@basepaperwidth} {\baposter@fontscale\baposter@finalpaperwidth }
     264\setlength{\baposter@basepaperheight}{\baposter@fontscale\baposter@finalpaperheight}
     265\setlength{\baposter@basemargin}     {\baposter@fontscale\baposter@finalmargin}
    168266\newlength{\baposter@basemarginright}
    169267\setlength{\baposter@basemarginright}{\baposter@basemargin}
     
    173271\addtolength{\baposter@basemarginleft}{\baposter@fontscale\baposter@movebody}
    174272
     273\typeout{Paperwidth=\the\baposter@finalpaperwidth}
     274\typeout{Paperheight=\the\baposter@finalpaperheight}
     275\typeout{BasePaperwidth=\the\baposter@basepaperwidth}
     276\typeout{BasePaperheight=\the\baposter@basepaperheight}
    175277\usepackage[
    176278   paperwidth=\baposter@basepaperwidth,
     
    180282   lmargin=\baposter@basemarginleft,
    181283   rmargin=\baposter@basemarginright,
    182    showframe=\baposter@showframe]{geometry}
    183 
    184 \ifthenelse{ \isundefined\baposter@finalpapersize }{
    185    \newcommand{\baposter@finalpapersize}{\baposter@papersize}}{}
     284   ]{geometry}
    186285
    187286\usepackage{pgfpages}
    188 \define@key{pgfpagesuselayoutoption}{archE}[]%
    189   {\def\pgfpageoptionheight{101.92cm} \def\pgfpageoptionwidth{91.44cm}}
    190 \pgfpagesuselayout{resize to}[\baposter@finalpapersize,\baposter@format]
    191 
    192 
    193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    195 % New Version, with specified size
    196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    198 
    199 % TODO: Use choose-keys
    200 \typeout{Keys}
    201 \define@cmdkey[ba]{poster}[baposter@]{grid}                  [no]          {}
    202 \define@cmdkey[ba]{poster}[baposter@]{eyecatcher}            [yes]         {}
    203 \define@cmdkey[ba]{poster}[baposter@]{columns}               [{}]          {}
    204 \define@cmdkey[ba]{poster}[baposter@]{textborder}            [faded]       {}
    205 \define@cmdkey[ba]{poster}[baposter@]{headerborder}          [none]        {}
    206 \define@cmdkey[ba]{poster}[baposter@]{headershape}           [roundedright]{}
    207 \define@cmdkey[ba]{poster}[baposter@]{colspacing}            [1em]         {}
    208 \define@cmdkey[ba]{poster}[baposter@]{headerheight}          [0.1\textheight]{}
    209 \define@cmdkey[ba]{poster}[baposter@]{headershade}           [shade-lr]    {}
    210 \define@cmdkey[ba]{poster}[baposter@]{boxshade}              [none]        {}
    211 
     287\if@landscape
     288\if@geometryKnowsThisSize
     289\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperheight,physical paper height=\baposter@finalpaperwidth]
     290\else
     291\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperwidth,physical paper height=\baposter@finalpaperheight]
     292\fi
     293\else
     294\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperwidth,physical paper height=\baposter@finalpaperheight]
     295\fi
     296
     297
     298
     299%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     300%  Default functions for borders/backgrounds
     301%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     302
     303%% These functions will all be redefined from the actual option values. In
     304%% particular, they will be set to \baposter@optionname@optionvalue, which
     305%% should do the actual work / setting for that particular optionvalue.
     306
     307\newcommand{\baposterPosterDrawBackground}[2]{} % Draw poster background
     308
     309\newcommand{\baposterBoxGetShape}{}             % Returns path of text box shape
     310\newcommand{\baposterBoxDrawBackground}[2]{}    % Draw bg of boxes
     311\newcommand{\baposterBoxDrawBorder}[1]{}        % Draw border of individual boxes
     312
     313\newcommand{\baposterHeaderGetShape}{}          % Returns path of text box shape
     314\newcommand{\baposterHeaderSetShade}[3]{}       % Set bg style for box headers
     315\newcommand{\baposterHeaderDrawBackground}[3]{} % Draw background of box header
     316\newcommand{\baposterHeaderDrawBorder}[1]{}     % Draw border of box header
     317\newcommand{\baposterHeaderDrawText}[1]{}       % Draw text inside box header
     318
     319\newcommand{\@@previousbox}{notset}             % stores the previously processed box for below=auto
     320
     321% Function to set a user-defined background
     322\newcommand{\baposter@backgroundCmd}{\error{No background command defined. Use \background{...} to define background}}
     323\newcommand{\background}[1]{\renewcommand{\baposter@backgroundCmd}{#1}}
     324
     325
     326
     327%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     328% Handle poster and box options
     329%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     330
     331\debug{Handling keys}
     332
     333%%
     334%% POSTER OPTIONS
     335%%
     336%% Store all poster options in variables of the form \baposter@option
     337%% choose-keys also store the index in \baposter@optionnr
     338%% choose-keys typically also assign a function
    212339\definecolor{baposter@silver}{cmyk}{0,0,0,0.7}
    213 \define@cmdkey[ba]{poster}[baposter@]{color}                 [orange]      {}
    214 \define@cmdkey[ba]{poster}[baposter@]{colortwo}              [white]       {}
    215 \define@cmdkey[ba]{poster}[baposter@]{bgColorOne}            [baposter@silver]{}
    216 \define@cmdkey[ba]{poster}[baposter@]{bgColorTwo}            [green]       {}
    217 \define@cmdkey[ba]{poster}[baposter@]{borderColor}           [yellow]      {}
    218 \define@cmdkey[ba]{poster}[baposter@]{headerColorOne}        [red]         {}
    219 \define@cmdkey[ba]{poster}[baposter@]{headerColorTwo}        [brown]       {}
    220 \define@cmdkey[ba]{poster}[baposter@]{headerFontColor}       [black]       {}
    221 \define@cmdkey[ba]{poster}[baposter@]{boxColorOne}           [magenta]     {}
    222 \define@cmdkey[ba]{poster}[baposter@]{boxColorTwo}           [cyan]        {}
    223 
    224 \define@cmdkey[ba]{poster}[baposter@]{background}            [plain]       {}
    225 \define@cmdkey[ba]{poster}[baposter@]{headerfont}            [\sc\Large]   {}
    226 \define@cmdkey[ba]{poster}[baposter@]{textfont}              [{}]          {}
    227 
    228 \define@cmdkey[ba]{poster}[baposter@]{linewidth}             [2pt]         {}
     340\define@boolkey[ba]{poster}[baposter@]{grid}                 [false]       {}
     341\define@boolkey[ba]{poster}[baposter@]{eyecatcher}           [true]        {}
     342\define@cmdkey [ba]{poster}[baposter@]{headerheight}         [0.1\textheight]{}
     343\define@cmdkey [ba]{poster}[baposter@]{columns}              [{}]          {}
     344\define@cmdkey [ba]{poster}[baposter@]{colspacing}           [1em]         {}
     345\define@cmdkey [ba]{poster}[baposter@]{bgColorOne}           [baposter@silver]{}
     346\define@cmdkey [ba]{poster}[baposter@]{bgColorTwo}           [green]       {}
     347
     348% background can be one of: shadeLR, shadeTB, plain, user, none
     349\define@choicekey*+[ba]{poster}{background}%
     350    [\baposter@background\baposter@backgroundnr]%
     351    {shadeLR, shadeTB, plain, user, none} [plain] {%
     352  \debug{Poster background: \baposter@background}
     353  \renewcommand{\baposterPosterDrawBackground}[2]{
     354      \csname baposter@background@\baposter@background\endcsname{##1}{##2}}
     355}{
     356  \PackageWarning{baposter}{Unknown background `\baposter@background' (use
     357      shadeLR, shadeTB, plain, none, or user). If user is used, you also
     358      have to define \background{...}.}
     359  \renewcommand{\baposterPosterDrawBackground}[2]{\baposter@background@none{##1}{##2}}
     360}
     361
     362
     363%%
     364%%  BOX OPTIONS
     365%%
     366\define@cmdkey[ba]{posterbox}[baposter@box@]{cornerradius}          [1em]         {}
     367\define@cmdkey[ba]{posterbox}[baposter@box@]{boxheaderheight}       [2em]         {}
     368\define@cmdkey[ba]{posterbox}[baposter@box@]{boxpadding}            [0.5em]       {}
     369
     370
     371% textborder can be one of: none, bars, coils, triangles, rectangle, rounded,
     372% roundedleft, roundedsmall, faded; UNIMPLEMENTED: roundedright
     373\edef\baposter@box@textborder@validvalues{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedsmall,faded}
     374\define@choicekey*+[ba]{posterbox}{textborder}%
     375    [\baposter@box@textborder\baposter@box@textbordernr]%
     376    {none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedright,roundedsmall,faded} [rectangle] {%
     377  \debug{Text border: \baposter@box@textborder}
     378  \renewcommand{\baposterBoxGetShape}{
     379      \csname baposter@box@boxshape@\baposter@box@textborder\endcsname}
     380  \renewcommand{\baposterBoxDrawBorder}[1]{
     381      \csname baposter@box@drawborder@\baposter@box@textborder\endcsname{##1}}
     382}{
     383  \PackageWarning{baposter}{Unknown text-border style `\baposter@box@textborder'.
     384      Edit your file to choose a valid option (\baposter@box@textborder@validvalues).}
     385  \renewcommand{\baposterBoxGetShape}{\baposter@boxshape@rectangle}
     386  \renewcommand{\baposterBoxDrawBorder}[1]{\baposter@drawborder@rectangle{##1}}
     387}
     388
     389% boxshade can be one of: shadeLR, shadeTB, plain, none
     390\define@choicekey*+[ba]{posterbox}{boxshade}%
     391    [\baposter@box@boxshade\baposter@box@boxshadenr]%
     392    {shadelr,shadetb,plain,none} [none] {%
     393  \debug{Box shade: \baposter@box@boxshade}
     394  \renewcommand{\baposterBoxDrawBackground}[2]{
     395      \csname baposter@box@drawbackground@\baposter@box@boxshade\endcsname{##1}{##2}}
     396}{
     397  \PackageWarning{baposter}{Unknown boxshade style `\baposter@boxshade'.
     398      Edit your file to choose a valid option.}
     399  \renewcommand{\baposterBoxDrawBackground}[2]{\baposter@box@drawbackground@none{##1}{##2}}
     400}
     401
     402% headershade can be one of: shade-lr, shade-tb, shade-tb-inverse, plain
     403\define@choicekey*+[ba]{posterbox}{headershade}%
     404    [\baposter@box@headershade\baposter@box@headershadenr]%
     405    {shadelr, shadetb, shadetbinverse, plain} [shadelr] {%
     406  \debug{Header shade: \baposter@box@headershade}
     407  \renewcommand{\baposterHeaderSetShade}[3]{
     408      \csname baposter@box@headershade@\baposter@box@headershade\endcsname{##1}{##2}{##3}}
     409}{
     410  \PackageWarning{baposter}{Unknown headershade style `\baposter@box@headershade'.
     411      Edit your file to choose a valid option.}
     412  \renewcommand{\baposterHeaderSetShade}[3]{\baposter@box@headershade@none{##1}{##2}{##3}}
     413}
     414
     415% headershape can be one of: rectangle, rounded, smallrounded, roundedleft, roundedright
     416\define@choicekey*+[ba]{posterbox}{headershape}%
     417    [\baposter@box@headershape\baposter@box@headershapenr]%
     418    {rectangle,rounded,smallrounded,roundedleft,roundedright} [roundedright] {%
     419  \debug{Header shape: \baposter@box@headershape}
     420  \renewcommand{\baposterHeaderGetShape}{
     421      \csname baposter@box@headershape@\baposter@box@headershape\endcsname}
     422  \renewcommand{\baposterHeaderDrawText}[1]{
     423      \csname baposter@box@headerdrawtext@\baposter@box@headershape\endcsname{##1}}
     424  \renewcommand{\baposterHeaderDrawBorder}[1]{
     425      \csname baposter@box@headerdrawborder@\baposter@box@headershape\endcsname{##1}}
     426}{
     427  \PackageWarning{baposter}{Unknown headershape style `\baposter@headershape'.
     428      Edit your file to choose a valid option.}
     429  \renewcommand{\baposterHeaderGetShape}{\baposter@box@headershape@rectangle}
     430  \renewcommand{\baposterHeaderDrawText}[1]{\baposter@box@headerdrawtext@rectangle{##1}}
     431  \renewcommand{\baposterHeaderDrawBorder}[1]{\baposter@box@headerdrawborder@rectangle{##1}}
     432}
     433
     434% headerborder can be one of: open, closed, none
     435\define@choicekey*+[ba]{posterbox}{headerborder}%
     436    [\baposter@box@headerborder\baposter@box@headerbordernr]%
     437    {open,closed,none} [open] {%
     438  \debug{Header border: \baposter@box@headerborder}
     439%   \renewcommand{\baposterHeaderBorder}{
     440%       \csname baposter@headerborder@\baposter@box@headerborder\endcsname}
     441}{
     442  \PackageWarning{baposter}{Unknown headerborder style `\baposter@headerborder'.
     443      Edit your file to choose a valid option.}
     444%   \renewcommand{\baposterHeaderBorder}{\baposter@box@headerborder@rectangle}
     445}
     446
     447
     448\define@cmdkey[ba]{posterbox}[baposter@box@]{borderColor}           [yellow]      {}
     449\define@cmdkey[ba]{posterbox}[baposter@box@]{headerColorOne}        [red]         {}
     450\define@cmdkey[ba]{posterbox}[baposter@box@]{headerColorTwo}        [brown]       {}
     451\define@cmdkey[ba]{posterbox}[baposter@box@]{headerFontColor}       [black]       {}
     452\define@cmdkey[ba]{posterbox}[baposter@box@]{boxColorOne}           [magenta]     {}
     453\define@cmdkey[ba]{posterbox}[baposter@box@]{boxColorTwo}           [cyan]        {}
     454\define@cmdkey[ba]{posterbox}[baposter@box@]{headerfont}            [\scshape\Large]   {}
     455\define@cmdkey[ba]{posterbox}[baposter@box@]{textfont}              [{}]          {}
     456\define@cmdkey[ba]{posterbox}[baposter@box@]{postertitlecolor}      [black]          {}
     457
     458
     459\define@cmdkey[ba]{posterbox}[baposter@box@]{linewidth}             [2pt]         {}
    229460
    230461\define@cmdkey[ba]{posterbox}[baposter@box@]{below}  [notset]{}
     
    238469\define@cmdkey[ba]{posterbox}[baposter@box@]{name}   [noname]{}
    239470
    240 \newcommand{\baposter@backgroundCmd}{\error{No background command defined. Use \background{...} to define background}}
    241 \newcommand{\background}[1]{\renewcommand{\baposter@backgroundCmd}{#1}}
    242 
    243 \presetkeys[ba]{poster}{
     471% Set some default values, the poster and posterbox environments can override:
     472\setkeys[ba]{poster}{
    244473  % Debug grid
    245   grid=no,
     474  grid=false,
    246475  % Is there an eyecatcher image
    247   eyecatcher=yes,
     476  eyecatcher=true,
    248477  columns={},
    249478  % Colours
    250479  bgColorOne=baposter@silver,
    251480  bgColorTwo=green,
    252   borderColor=yellow,
    253   headerColorOne=red,
    254   headerColorTwo=brown,
    255   headerFontColor=black,
    256   boxColorOne=magenta,
    257   boxColorTwo=cyan,
    258   % Style
    259   headerborder=none,
     481  %
    260482  colspacing=1em,
    261483  headerheight=0.1\textheight,
    262   background=shade-lr,
    263   headershade=shade-lr,
    264   boxshade=none,
    265   headerfont=\sc\Large,% or headerfont=\color{white}\textsf\textbf
    266   textfont={},
    267   linewidth=2pt
     484  background=shadeLR,
    268485}{}
    269 \presetkeys[ba]{posterbox}{
     486\setkeys[ba]{posterbox}{
    270487  % Position
    271488  column=0,row=0,span=1,
     
    276493  % Name
    277494  name=noname,
     495  % Box design: border:
     496  linewidth=1pt,
     497  borderColor=yellow,
     498  cornerradius=1em,
     499  % text box:
     500  textfont={},
     501  boxshade=plain,
     502  boxColorOne=magenta,
     503  boxColorTwo=cyan,
     504  textborder=faded,
     505  boxpadding=0.5em,
     506  % header
     507  headerfont=\scshape\Large,% or headerfont=\color{white}\textsf\textbf
     508  headerFontColor=black,
     509  headerColorOne=red,
     510  headerColorTwo=brown,
     511  headershape=rectangle,
     512  headershade=shadeLR,
     513  headerborder=none,
     514  boxheaderheight=2em,
     515  postertitlecolor=black,
    278516}{}
     517
     518
     519
     520%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     521%%% Background options and functions (one function for each possible value)
     522%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     523
     524\newcommand{\baposter@background@shadelr}[2]{
     525  \debug{BAPOSTER: Using shade left right background.}
     526  \begin{tikzpicture}[remember picture,overlay]%
     527    \shade [shading=axis,left color=#1,right color=#2] (current page.north west)
     528           rectangle(current page.south east);
     529  \end{tikzpicture}%
     530}
     531\newcommand{\baposter@background@shadetb}[2]{
     532  \debug{BAPOSTER: Using shade top to bottom background.}
     533  \begin{tikzpicture}[remember picture,overlay]%
     534    \shade [shading=axis,top color=#1,bottom color=#2] (current page.north west)
     535           rectangle(current page.south east);
     536  \end{tikzpicture}%
     537}
     538\newcommand{\baposter@background@plain}[2]{
     539  \debug{BAPOSTER: Using plain background.}
     540  \begin{tikzpicture}[remember picture,overlay]%
     541    \fill [fill=#1] (current page.north west) rectangle(current page.south east);
     542  \end{tikzpicture}%
     543}
     544\newcommand{\baposter@background@user}[2]{
     545  \debug{BAPOSTER: Using user background.}
     546  \baposter@backgroundCmd%
     547}
     548\newcommand{\baposter@background@none}[2]{
     549  \debug{BAPOSTER: Using no background.}
     550}
     551
     552
     553
     554%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     555%%% Return shape path of text box (depending on the box shape)
     556%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     557
     558\newcommand{\baposter@box@boxshape@none}{\baposter@box@boxshape@rectangle}
     559\newcommand{\baposter@box@boxshape@bars}{
     560  (\baposter@box@name tnw) -- (\baposter@box@name sw) %
     561  (\baposter@box@name se) -- (\baposter@box@name tne)
     562}
     563\newcommand{\baposter@box@boxshape@coils}{\baposter@box@boxshape@bars}
     564\newcommand{\baposter@box@boxshape@triangles}{\baposter@box@boxshape@bars}
     565\newcommand{\baposter@box@boxshape@rectangle}{
     566  (\baposter@box@name tnw) -- (\baposter@box@name sw) -- %
     567  (\baposter@box@name se) -- (\baposter@box@name tne)%
     568}
     569\newcommand{\baposter@box@boxshape@faded}{
     570  (\baposter@box@name tnw) -- (\baposter@box@name sw) %
     571  (\baposter@box@name tne) -- (\baposter@box@name se)
     572  }
     573\newcommand{\baposter@box@boxshape@rounded}{
     574  [rc] \baposter@box@boxshape@rectangle%
     575}
     576\newcommand{\baposter@box@boxshape@roundedsmall}{
     577  [src] \baposter@box@boxshape@rectangle
     578}
     579\newcommand{\baposter@box@boxshape@roundedleft}{
     580  (\baposter@box@name tnw) {[rc]-- (\baposter@box@name sw)} -- %
     581  (\baposter@box@name se) -- (\baposter@box@name tne)%
     582}
     583\newcommand{\baposter@box@boxshape@roundedright}{
     584  (\baposter@box@name tnw) -- (\baposter@box@name sw) {[rc]-- %
     585  (\baposter@box@name se)} -- (\baposter@box@name tne)%
     586}
     587
     588
     589%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     590%%% Draw box background (one function for each possible value)
     591%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     592
     593% These functions take no arguments
     594\newcommand{\baposter@box@drawbackground@none}[2]{
     595  \tikzstyle{box colors}=[]
     596}
     597\newcommand{\baposter@box@drawbackground@plain}[2]{
     598  \tikzstyle{box colors}=[fill=#1]
     599  \fill[box colors] \baposterBoxGetShape;
     600}
     601\newcommand{\baposter@box@drawbackground@shadelr}[2]{
     602  \tikzstyle{box colors}=[shading=axis, left color=#1, right color=#2]%
     603  \fill[box colors] \baposterBoxGetShape;
     604}
     605\newcommand{\baposter@box@drawbackground@shadetb}[2]{
     606  \tikzstyle{box colors}=[shading=axis, top color=#1, bottom color=#2]%
     607  \fill[box colors] \baposterBoxGetShape;
     608}
     609
     610
     611
     612%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     613%%% Draw box border
     614%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     615
     616% These functions take two arguments: borderColor
     617\newcommand{\baposter@box@drawborder@none}[1]{}
     618\newcommand{\baposter@box@drawborder@bars}[1]{
     619  \draw[color=#1] \baposterBoxGetShape;%
     620}
     621\newcommand{\baposter@box@drawborder@coils}[1]{
     622  \draw[color=#1,segment amplitude=0.35em,segment length=0.4em,snake=coil] \baposterBoxGetShape;%
     623}
     624\newcommand{\baposter@box@drawborder@triangles}[1]{
     625  \draw[color=#1,segment amplitude=0.2em,segment length=0.4em,snake=triangles] \baposterBoxGetShape;%
     626}
     627\newcommand{\baposter@box@drawborder@rectangle}[1]{
     628  \draw[color=#1] \baposterBoxGetShape;%
     629}
     630\newcommand{\baposter@box@drawborder@rounded}[1]{
     631  \draw[color=#1] \baposterBoxGetShape;%
     632}
     633\newcommand{\baposter@box@drawborder@roundedleft}[1]{
     634  \draw[color=#1] \baposterBoxGetShape;%
     635}
     636\newcommand{\baposter@box@drawborder@roundedright}[1]{
     637  \draw[color=#1] \baposterBoxGetShape;%
     638}
     639\newcommand{\baposter@box@drawborder@faded}[1]{
     640  % This is the right way to do it, but it does not work with evince, and has problems during printing, so instead we do
     641  %\draw[color=#1,path fading=south] \baposterBoxGetShape;%
     642  % this
     643  \foreach \x in {0,1,...,90} \draw[color=#1!\x] ($(\baposter@box@name tnw)!{(100-\x)/100}!(\baposter@box@name sw)$) -- ($(\baposter@box@name tnw)!{(100-(\x+10))/100}!(\baposter@box@name sw)$);%
     644  \foreach \x in {0,1,...,90} \draw[color=#1!\x] ($(\baposter@box@name tne)!{(100-\x)/100}!(\baposter@box@name se)$) -- ($(\baposter@box@name tne)!{(100-(\x+10))/100}!(\baposter@box@name se)$);%
     645}
     646\newcommand{\baposter@box@drawborder@roundedsmall}[1]{
     647  \draw[color=#1] \baposterBoxGetShape;%
     648}
     649
     650
     651
     652%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     653%%% Return shape path of text box (depending on the box shape)
     654%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     655
     656% These functions take no arguments
     657% TODO: For headerborder==none, use (\baposter@box@name outer tnw) instead!
     658\newcommand{\baposter@box@headershape@rectangle}{%
     659  (\baposter@box@name tnw) -- (\baposter@box@name nw) -- %
     660  (\baposter@box@name ne) -- (\baposter@box@name tne)%
     661}
     662\newcommand{\baposter@box@headershape@smallrounded}{%
     663  (\baposter@box@name tnw) {[src] -- (\baposter@box@name nw) -- %
     664  (\baposter@box@name ne)} -- (\baposter@box@name tne)%
     665}
     666\newcommand{\baposter@box@headershape@roundedright}{%
     667  (\baposter@box@name tnw) -- (\baposter@box@name nw) {[rc] -- %
     668  (\baposter@box@name ne)} -- (\baposter@box@name tne)%
     669}
     670\newcommand{\baposter@box@headershape@roundedleft}{%
     671  (\baposter@box@name tnw) {[rc]-- (\baposter@box@name nw)} -- %
     672  (\baposter@box@name ne) -- (\baposter@box@name tne)%
     673}
     674\newcommand{\baposter@box@headershape@rounded}{%
     675  (\baposter@box@name tnw) {[rc] -- (\baposter@box@name nw) -- %
     676  (\baposter@box@name ne) } -- (\baposter@box@name tne)%
     677}
     678
     679
     680
     681%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     682%%% Header text drawing (one function for each possible value of headershape)
     683%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     684
     685% These functions take one argument: the header text
     686\newcommand{\baposter@box@headerdrawtext@rectangle}[1]{
     687  \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight) node[anchor=west,inner sep=0.4em] {#1};%
     688}
     689\newcommand{\baposter@box@headerdrawtext@smallrounded}[1]{
     690  \path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@box@@boxheaderheight) node[anchor=center] {#1};%
     691}
     692\newcommand{\baposter@box@headerdrawtext@roundedright}[1]{
     693  \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight)%
     694        node[anchor=west,inner sep=0.4em,text depth=0.0em] {#1};%
     695}
     696\newcommand{\baposter@box@headerdrawtext@roundedleft}[1]{
     697  \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight)%
     698        node[anchor=west,inner sep=0.4em] {#1};%
     699}
     700\newcommand{\baposter@box@headerdrawtext@rounded}[1]{
     701    \path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@box@@boxheaderheight) node[anchor=center] {#1};%
     702}
     703
     704
     705
     706%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     707%%% Header shade options and functions (one function for each possible value)
     708%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     709
     710% These functions take two arguments: , headerColorTwo and borderColor
     711\newcommand{\baposter@box@headershade@shadelr}[3]{
     712    \debug{Header-Shade: Shade Left - Right}
     713    \tikzstyle{header colors}=[%
     714      color=#3,%
     715      shading=axis,%
     716      left color=#1,%
     717      right color=#2%
     718    ]%
     719}
     720\newcommand{\baposter@box@headershade@shadetb}[3]{
     721    \debug{Header-Shade: Shade Top - Bottom}
     722    \tikzstyle{header colors}=[%
     723      color=#3,%
     724      shading=axis,%
     725      top color=#1,%
     726      bottom color=#2%
     727    ]%
     728}
     729\newcommand{\baposter@box@headershade@shadetbinverse}[3]{
     730    \tikzstyle{header colors}=[%
     731      top color=#1!75!#2,%
     732      bottom color=#2!100!#1,%
     733      shading angle=20%
     734    ]%
     735    \colorlet{baposterHeaderFontColor}{white}%
     736}
     737\newcommand{\baposter@box@headershade@plain}[3]{
     738    \debug{Header-Shade: Plain}
     739    \tikzstyle{header colors}=[%
     740      color=#3,%
     741      fill=#1%
     742    ]%
     743}
     744\newcommand{\baposter@box@headershade@none}[3]{
     745    \debug{Header-Shade: none}
     746    \tikzstyle{header colors}=[]
     747}
     748
     749
     750
    279751
    280752%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    283755%%%-----------------------------------------------------------------------------
    284756%%% The settings are
    285 %%%   - grid=yes,[no]:    Show grid to help with alignment
     757%%%   - grid=true,[false]:Show grid to help with alignment
    286758%%%   - colspacing=0.7em: Column spacing
    287759%%%   - columns=4:        number of columns (default 4 in landscape and 3 in portrait format) (maximum number is 6)
    288760%%%   - color=[orange]:   xcolor color definition used as the main color of the poster
    289761%%%   - colortwo=[white]: The other color for gradient based layouts
    290 %%%   - textborder=none,bars,coils,triangles,rectangle,rounded,small-rounded,roundedleft,roundedright,[faded]
     762%%%   - textborder=none,bars,coils,triangles,rectangle,rounded,roundedsmall,roundedleft,roundedright,[faded]
    291763%%%                       The style of the box around the text area
    292764%%%   - headerborder=none,closed,open
     
    297769\newenvironment{poster}[5]{%
    298770  \thispagestyle{empty}% Suppress Page Number
    299   \typeout{Poster Starts}%
    300   \setkeys[ba]{poster}{#1}%
    301 %
     771  \debug{Poster Starts}%
     772  % This setkeys call parses all provided options and depending on the option
     773  % value, assigns different handler functions to the \baposter(Box|Header)*
     774  % functions. Once that is done, we don't have to care about particular
     775  % values for border, shading, etc. All we have to do is call the
     776  % handler functions and let them do their job.
     777  % This also allows the user to override the poster-wide defaults on a per-box
     778  % basis.
     779  \setkeys[ba]{posterbox,poster}{#1}%
     780%
     781  % TODO: Move all those assignments to the key macros!
    302782  % Parse Keys%
    303783  \colorlet{bgColorOne}{\baposter@bgColorOne}
    304784  \colorlet{bgColorTwo}{\baposter@bgColorTwo}
    305   \colorlet{borderColor}{\baposter@borderColor}
    306   \colorlet{headerColorOne}{\baposter@headerColorOne}
    307   \colorlet{headerColorTwo}{\baposter@headerColorTwo}
    308   \colorlet{headerFontColor}{\baposter@headerFontColor}
    309   \colorlet{boxColorOne}{\baposter@boxColorOne}
    310   \colorlet{boxColorTwo}{\baposter@boxColorTwo}
    311785%
    312786  %% Boxes%
    313787  \setlength{\headerheight}{\baposter@headerheight}%
    314788  \setlength{\colheight}{\textheight-\baposter@headerheight}%
    315 %
    316   \typeout{Format}%
    317   \ifthenelse{\equal{\baposter@format}{landscape}}{%
    318     \ifthenelse{\equal{\baposter@columns}{}}{\renewcommand{\baposter@columns}{4}}{}
    319   }{%
    320     \ifthenelse{\equal{\baposter@columns}{}}{\renewcommand{\baposter@columns}{3}}{}
    321   }%
    322 %
    323   \typeout{Columns: \baposter@columns}%
     789  \renewcommand{\@@previousbox}{notset}
     790
     791  \debug{Format}%
     792  % Set default for columns if unset (4 for landscape, 3 for portrait)
     793  \ifthenelse{\equal{\baposter@columns}{}}{%
     794    \renewcommand{\baposter@columns}{\if@landscape4\else3\fi}%
     795  }{}
     796%
     797  \debug{Columns: \baposter@columns}%
    324798  \setlength{\baposter@@colspacing}{\baposter@colspacing}%
    325   \typeout{1}%
    326799  \setlength{\colwidth}{\textwidth}%
    327   \typeout{2}%
    328   \addtolength{\colwidth}{-\baposter@columns\baposter@@colspacing}\addtolength{\colwidth}{\baposter@@colspacing}%
    329   \typeout{3}%
    330   \ifthenelse{\equal{\baposter@columns}{1}}{
     800  \addtolength{\colwidth}{\baposter@@colspacing*(1-\baposter@columns)}%
     801  \ifcase\baposter@columns\relax
     802    \error{You need to have at least one column!}
     803  \or % 1
    331804    \setlength{\colwidth}{\colwidth}%
    332   }{
    333     \ifthenelse{\equal{\baposter@columns}{2}}{
    334       \setlength{\colwidth}{0.5\colwidth}%
    335     }{
    336       \ifthenelse{\equal{\baposter@columns}{3}}{
    337         \setlength{\colwidth}{0.3333333333333\colwidth}%
    338       }{
    339         \ifthenelse{\equal{\baposter@columns}{4}}{
    340           \setlength{\colwidth}{0.25\colwidth}%
    341         }{
    342           \ifthenelse{\equal{\baposter@columns}{5}}{
    343             \setlength{\colwidth}{0.2\colwidth}%
    344           }{
    345             \ifthenelse{\equal{\baposter@columns}{6}}{
    346               \setlength{\colwidth}{0.16666666666\colwidth}%
    347             }{
    348               \error{You do not want so many columns}
    349             }
    350           }
    351         }
    352       }
    353     }
    354   }
    355 %
    356   % Background image%
    357   \newcommand{\baposterShadedBG}{%
    358     \ifthenelse{\equal{\baposter@background}{shade-lr}}{%
    359       \begin{tikzpicture}[remember picture,overlay]%
    360         \shade [shading=axis,right color=bgColorOne,left color=bgColorTwo] (current page.north west) rectangle(current page.south east);
    361         \typeout{BAPOSTER: Using shade left right background.}
    362       \end{tikzpicture}%
    363     }{%
    364       \ifthenelse{\equal{\baposter@background}{shade-tb}}{%
    365         \typeout{BAPOSTER: Using shade top to bottom background.}
    366         \begin{tikzpicture}[remember picture,overlay]%
    367           \shade [shading=axis,top color=bgColorOne,bottom color=bgColorTwo] (current page.north west) rectangle(current page.south east);
    368         \end{tikzpicture}%
    369       }{%
    370         \ifthenelse{\equal{\baposter@background}{plain}}{%
    371           \typeout{BAPOSTER: Using plain background.}
    372           \begin{tikzpicture}[remember picture,overlay]%
    373             \fill [fill=bgColorOne] (current page.north west) rectangle(current page.south east);
    374           \end{tikzpicture}%
    375         }{%
    376           \ifthenelse{\equal{\baposter@background}{user}}{%
    377             \typeout{BAPOSTER: Using user background.}
    378             \baposter@backgroundCmd%
    379           }{%
    380             \ifthenelse{\equal{\baposter@background}{none}}{%
    381               \typeout{BAPOSTER: Using no background.}
    382             }{%
    383               \error{Unknown background, use shade-lr, shade-tb, plain, none, or user. If user is used, you also have to define \background{...} }%
    384             }%
    385           }%
    386         }%
    387       }%
    388     }%
    389   }%
     805  \or % 2
     806    \setlength{\colwidth}{0.5\colwidth}%
     807  \or % 3
     808    \setlength{\colwidth}{0.3333333333333\colwidth}%
     809  \or % 4
     810    \setlength{\colwidth}{0.25\colwidth}%
     811  \or % 5
     812    \setlength{\colwidth}{0.2\colwidth}%
     813  \or % 6
     814    \setlength{\colwidth}{0.16666666666\colwidth}%
     815  \else % >6
     816    \error{You do not want so many columns}
     817  \fi
    390818%
    391819  \newcommand{\baposter@reference}{north west}%
     
    411839  % name=   [noname]%
    412840  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     841
     842  % Backward-compatibility definition (\headerbox command uses posterbox env):
    413843  \newcommand{\headerbox}[3]{%
    414     \typeout{##2}%
    415     \setkeys[ba]{posterbox}{##2}%
    416 %
    417 %
     844    \begin{posterbox}[##2]{##1}
     845      ##3
     846    \end{posterbox}
     847  }
     848
     849  \newenvironment{posterbox}[2][]{%
     850    \debug{Poster box options: ##1}%
     851    % Override the poster-wide defaults on a per-box basis
     852    \setkeys[ba]{posterbox}{##1}%
     853%
     854    \def\baposter@box@title{##2}
     855%
     856    \colorlet{borderColor}{\baposter@box@borderColor}
     857    \colorlet{headerColorOne}{\baposter@box@headerColorOne}
     858    \colorlet{headerColorTwo}{\baposter@box@headerColorTwo}
     859    \colorlet{headerFontColor}{\baposter@box@headerFontColor}
     860    \colorlet{boxColorOne}{\baposter@box@boxColorOne}
     861    \colorlet{boxColorTwo}{\baposter@box@boxColorTwo}
     862%
     863    \setlength{\baposter@box@@cornerradius}{\baposter@box@cornerradius}%
     864    \setlength{\baposter@box@@boxheaderheight}{\baposter@box@boxheaderheight}%
     865    \setlength{\baposter@box@@boxpadding}{\baposter@box@boxpadding}%
     866
     867
    418868    %% The columns is always given absolute
    419     % boxstartx = \baposter@box@column * colwidth + (\baposter@box@column-1) * baposter@@colspacing
    420     \setlength{\boxstartx}{\baposter@box@column\colwidth}%
    421     \addtolength{\boxstartx}{\baposter@box@column\baposter@@colspacing}%
     869    % boxstartx = column * colwidth + column * colspacing
     870    \setlength{\boxstartx}{(\colwidth+\baposter@@colspacing)*\baposter@box@column}%
    422871%
    423872    %% The width is gvien absolute
    424     % Box Width = \baposter@box@span * colwidth + (\baposter@box@span-1) * baposter@@colspacing
     873    % Box Width = span * colwidth + (span-1) * colspacing
    425874    \setlength{\boxwidth}{\baposter@box@span\colwidth} %
    426     \addtolength{\boxwidth}{\baposter@box@span\baposter@@colspacing}%
    427     \addtolength{\boxwidth}{-\baposter@@colspacing}%
     875    \addtolength{\boxwidth}{\baposter@@colspacing*(\baposter@box@span-1)}%
    428876%
    429877    %% Measure the content of the box%
    430     \setbox\baposter@content=\hbox{%
     878    \setbox\baposter@box@content=\hbox\bgroup%
    431879      \begin{pgfinterruptpicture}%
    432         \begin{minipage}[t]{\boxwidth-1em}%
    433           \baposter@textfont{##3}%
     880        \begin{minipage}[t]{\boxwidth-\baposter@box@@boxpadding*2}%
     881          \baposter@box@textfont\bgroup%
     882  }% End of posterbox preamble
     883  %%% HERE COME THE ACTUAL CONTENTS OF THE HEADERBOX ENVIRONMENT
     884  {% posterbox handling after contents (i.e. drawing everything)
     885          \egroup%
    434886        \end{minipage}%
    435887      \end{pgfinterruptpicture}%
    436     }%
    437     \setlength{\boxheight}{\ht\baposter@content}\addtolength{\boxheight}{\dp\baposter@content}%
    438     \addtolength{\boxheight}{2em} % Header%
    439     \addtolength{\boxheight}{1em} % Inner Sep%
     888    \egroup%
     889    \setlength{\boxheight}{\ht\baposter@box@content}%
     890    \addtolength{\boxheight}{\dp\baposter@box@content}%
     891    \addtolength{\boxheight}{\baposter@box@@boxheaderheight} % Header%
     892    \addtolength{\boxheight}{2\baposter@box@@boxpadding} % Inner Sep
    440893%
    441894    \ifthenelse{\equal{\baposter@box@height}{bottom}}{%
     
    446899%
    447900    %% Determine the box position%
    448     \typeout{Setting Coordinates}%
    449     \typeout{Upper Right}%
    450     \typeout{\baposter@box@name}%
     901    \debug{Setting Coordinates}%
     902    \debug{Upper Right}%
     903    \debug{\baposter@box@name}%
    451904%
    452905    %%% Upper Right Corner%
     906    % if below=auto, set it to the previous box
     907    % TODO: We should generalize this to the previous box of the used column,
     908    %       currently we use the previous box, which might be in a different column
     909    \ifthenelse{\equal{\baposter@box@below}{auto}}{%
     910        \edef\baposter@box@below{\@@previousbox}
     911        \debug{Box \baposter@box@name  has below=auto, placing it below box \baposter@box@below.}
     912    }{}
     913    \xdef\@@previousbox{\baposter@box@name}
     914
    453915    \ifthenelse{\not\equal{\baposter@box@below}{notset} }{%
    454916      %% Below%
    455       \typeout{Below}%
     917      \debug{Below}%
    456918      \path[shape=coordinate] (\boxstartx,0pt |- \baposter@box@below se) ++(0pt,-\baposter@@colspacing) coordinate(\baposter@box@name nw);%
    457919    }{%
    458920      \ifthenelse{\not\equal{\baposter@box@aligned}{notset} }{%
    459921        %% Aligned%
    460         \typeout{Aligned: \baposter@box@aligned}%
     922        \debug{Aligned: \baposter@box@aligned}%
    461923        \path[shape=coordinate] (\boxstartx,0pt |- \baposter@box@aligned nw)                           coordinate(\baposter@box@name nw);%
    462924      }{%
    463925        %% Fixed%
    464         \typeout{Fixed}%
     926        \debug{Fixed}%
    465927        \setlength{\boxstarty}{\baposter@box@row\colheight}%
    466928        \path[shape=coordinate] (\boxstartx,\colheight-\boxstarty)                                                  coordinate(\baposter@box@name nw);%
     
    468930%
    469931    %% Lower Left Corner%
    470     \typeout{Lower Left}%
     932    \debug{Lower Left}%
    471933    \ifthenelse{\equal{\baposter@box@above}{bottom}}{%
    472934      %% Above = Bottom%
    473       \typeout{Above bottom}%
     935      \debug{Above bottom}%
    474936      \ifthenelse{\equal{\baposter@box@below}{notset} \and \equal{\baposter@box@aligned}{notset}}{%
    475937      \path[shape=coordinate] (\boxstartx,\boxheight)                                                              coordinate(\baposter@box@name nw);%
     
    483945      }{%
    484946        %% Above = notset%
    485         \typeout{Above=not set}%
     947        \debug{Above=not set}%
    486948        \ifthenelse{\equal{\baposter@box@height}{bottom}}{%
    487949          %% height=bottom%
    488           \typeout{height=bottom}%
     950          \debug{height=bottom}%
    489951          \path[shape=coordinate] (\boxstartx+\boxwidth,0pt)                                                       coordinate(\baposter@box@name se);%
    490952        }{ %% height=auto or fixed%
    491           \typeout{height=auto or fixed}%
     953          \debug{height=auto or fixed}%
    492954          \path[shape=coordinate] (\baposter@box@name nw) ++(\boxwidth,-\boxheight)                                coordinate(\baposter@box@name se);%
    493955          }}}}}%
     
    495957        %
    496958    % Set coordinates relative to nw,se%
    497     \typeout{Fixing Coordinates}%
     959    \debug{Fixing Coordinates}%
    498960    \path[shape=coordinate]%
    499       (\baposter@box@name nw) +(0pt,-2em)                coordinate(\baposter@box@name tnw)%
     961      (\baposter@box@name nw) +(0pt,-\baposter@box@@boxheaderheight)                coordinate(\baposter@box@name tnw)%
    500962      (\baposter@box@name nw |- \baposter@box@name se)   coordinate(\baposter@box@name sw)%
    501963      (\baposter@box@name se |- \baposter@box@name nw)   coordinate(\baposter@box@name ne)%
    502       (\baposter@box@name ne) +(0pt,-2em)                coordinate(\baposter@box@name tne)%
     964      (\baposter@box@name ne) +(0pt,-\baposter@box@@boxheaderheight)                coordinate(\baposter@box@name tne)%
    503965%
    504966      (\baposter@box@name nw)  +(-0.025em,0pt)           coordinate(\baposter@box@name outer nw)%
     
    510972      (\baposter@box@name se)  +( 0.025em,0pt)           coordinate(\baposter@box@name outer se);%
    511973%
    512       \ifthenelse{\equal{\baposter@headershade}{shade-lr}}{%
    513         \typeout{Header-Shade: Shade Left - Right}
    514         \tikzstyle{header colors}=[%
    515           color=borderColor,%
    516           shading=axis,%
    517           left color=headerColorOne,%
    518           right color=headerColorTwo%
    519           ]%
    520       }{\ifthenelse{\equal{\baposter@headershade}{shade-tb}}{%
    521         \typeout{Header-Shade: Shade Top - Bottom}
    522         \tikzstyle{header colors}=[%
    523           color=borderColor,%
    524           shading=axis,%
    525           top color=headerColorOne,%
    526           bottom color=headerColorTwo%
    527           ]%
    528       }{\ifthenelse{\equal{\baposter@headershade}{shade-tb-inverse}}{%
    529         \tikzstyle{header colors}=[%
    530           top color=headerColorOne!75!headerColorTwo,%
    531           bottom color=headerColorTwo!100!headerColorOne,%
    532           shading angle=20%
    533           ]%
    534           \colorlet{baposterHeaderFontColor}{white}%
    535       }{\ifthenelse{\equal{\baposter@headershade}{plain}}{%
    536         \typeout{Header-Shade: Plain}
    537         \tikzstyle{header colors}=[%
    538           color=borderColor,%
    539           fill=headerColorOne%
    540           ]%
    541       }{%
    542         \typeout{Header-Shade: Unknown Style: \baposter@headershade}
    543         \PackageError{baposter.cls}{Unknown header shade style \baposter@headershade}{Edit your file to choose a valid option}{}%
    544       }}}}%
    545       \typeout{Box-Shade: \baposter@boxshade}
    546       \ifthenelse{\equal{\baposter@boxshade}{shade-lr}}{%
    547         \tikzstyle{box colors}=[%
    548           shading=axis,%
    549           left color=boxColorOne,%
    550           right color=boxColorTwo%
    551           ]%
    552       }{%
    553         \ifthenelse{\equal{\baposter@boxshade}{shade-tb}}{%
    554           \tikzstyle{box colors}=[%
    555             shading=axis,%
    556             top color=boxColorOne,%
    557             bottom color=boxColorTwo%
    558             ]%
    559         }{%
    560           \ifthenelse{\equal{\baposter@boxshade}{plain}}{%
    561             \tikzstyle{box colors}=[%
    562               fill=boxColorOne%
    563               ]%
    564           }{%
    565             \ifthenelse{\equal{\baposter@boxshade}{none}}{%
    566               \tikzstyle{box colors}=[]%
    567             }{%
    568               \PackageError{baposter.cls}{Unknown box shade style \baposter@boxshade}{Edit your file to choose a valid option}{}%
    569             }%
    570           }%
    571         }%
    572       }%
    573       \tikzstyle{rc}=[rounded corners=2em];%
     974      %% Setting the bg colors of the box header
     975      \baposterHeaderSetShade{headerColorOne}{headerColorTwo}{borderColor}
     976%
     977      \tikzstyle{rc}=[rounded corners=\baposter@box@@cornerradius];%
    574978      \tikzstyle{src}=[rounded corners=0.5em];%
    575979%
    576     \begin{scope}[line width=\baposter@linewidth]
    577       \typeout{Header}%
    578       \typeout{Header-Shape: \baposter@headershape}%
     980
     981    %% Now that everything is set up, draw the actual box, with bg and header
     982    \begin{scope}[line width=\baposter@box@linewidth]
    579983      %% Header%
    580       \ifthenelse  {\equal{\baposter@headershape}{rectangle}}   {%
    581       %%%
    582         \ifthenelse{\equal{\baposter@headerborder}{open}}{%
    583           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    584             \filldraw  [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)         -- (\baposter@box@name ne)       -- (\baposter@box@name tne);%
    585           }{
    586             \shadedraw [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)         -- (\baposter@box@name ne)       -- (\baposter@box@name tne);%
    587           }
    588         }{\ifthenelse{\equal{\baposter@headerborder}{closed}}{%
    589           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    590             \filldraw  [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)         -- (\baposter@box@name ne)       -- (\baposter@box@name tne) -- cycle;%
    591           }{
    592             \shadedraw [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)         -- (\baposter@box@name ne)       -- (\baposter@box@name tne) -- cycle;%
    593           }
    594         }{\ifthenelse{\equal{\baposter@headerborder}{none}}{%
    595           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    596             \fill      [style=header colors] (\baposter@box@name outer tnw)           -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne) -- (\baposter@box@name outer tne) -- cycle;%
    597           }{
    598             \shade     [style=header colors] (\baposter@box@name outer tnw)           -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne) -- (\baposter@box@name outer tne) -- cycle;%
    599           }
    600         }{\PackageError{baposter.cls}{Unknown header border \baposter@headerborder}{Edit your file to choose a valid option}}}}{}%
    601         \path (\baposter@box@name nw) +(0em,-1em) node[anchor=west,inner sep=0.4em] {\color{headerFontColor}\baposter@headerfont{##1}};%
    602       %%%
    603       }{\ifthenelse{\equal{\baposter@headershape}{small-rounded}}     {%
    604       %%%
    605         \ifthenelse{\equal{\baposter@headerborder}{open}}{%
    606           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    607             \filldraw  [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    608           }{
    609             \shadedraw [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    610           }
    611         }{\ifthenelse{\equal{\baposter@headerborder}{closed}}{%
    612           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    613             \filledraw [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    614           }{
    615             \shadedraw [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    616           }
    617         }{\ifthenelse{\equal{\baposter@headerborder}{none}}{%
    618           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    619             \fill      [style=header colors] (\baposter@box@name outer tnw) {[rc]     -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    620           }{
    621             \shade     [style=header colors] (\baposter@box@name outer tnw) {[rc]     -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    622           }
    623         }{\PackageError{baposter.cls}{Unknown header border \baposter@headerborder}{Edit your file to choose a valid option}}}}{}%
    624         \path (\baposter@box@name nw) +(0.5\boxwidth,-1em) node[anchor=center] {\color{headerFontColor}\baposter@headerfont{##1}};%
    625       %%%
    626       }{\ifthenelse{\equal{\baposter@headershape}{roundedright}}{%
    627       %%%
    628         \ifthenelse{\equal{\baposter@headerborder}{open}}{%
    629           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    630             \filldraw  [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)       {[rc] -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    631           }{
    632             \shadedraw [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)       {[rc] -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    633           }
    634         }{\ifthenelse{\equal{\baposter@headerborder}{closed}}{%
    635           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    636             \filldraw  [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)       {[rc] -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    637           }{
    638             \shadedraw [style=header colors] (\baposter@box@name tnw)                 -- (\baposter@box@name nw)       {[rc] -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    639           }
    640         }{\ifthenelse{\equal{\baposter@headerborder}{none}}{%
    641           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    642             \fill      [style=header colors] (\baposter@box@name outer tnw)           -- (\baposter@box@name outer nw) {[rc] -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    643           }{
    644             \shade     [style=header colors] (\baposter@box@name outer tnw)           -- (\baposter@box@name outer nw) {[rc] -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    645           }
    646         }{\PackageError{baposter.cls}{Unknown header border \baposter@headerborder}{Edit your file to choose a valid option}}}}{}%
    647         \path (\baposter@box@name nw) +(0em,-1em) node[anchor=west,inner sep=0.4em,text depth=0.0em] {\color{headerFontColor}\baposter@headerfont{##1}};%
    648       %%%
    649       }{\ifthenelse{\equal{\baposter@headershape}{roundedleft}}{%
    650       %%%
    651         \ifthenelse{\equal{\baposter@headerborder}{open}}{%
    652           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    653             \filldraw  [style=header colors,color=borderColor] (\baposter@box@name tnw)            {[rc]-- (\baposter@box@name nw)       }     -- (\baposter@box@name ne)       -- (\baposter@box@name tne);%
    654           }{
    655             \shadedraw [style=header colors,color=borderColor] (\baposter@box@name tnw)            {[rc]-- (\baposter@box@name nw)       }     -- (\baposter@box@name ne)       -- (\baposter@box@name tne);%
    656           }
    657         }{\ifthenelse{\equal{\baposter@headerborder}{closed}}{%
    658           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    659             \filldraw  [style=header colors,color=borderColor] (\baposter@box@name tnw)            {[rc]-- (\baposter@box@name nw)       }     -- (\baposter@box@name ne)       -- (\baposter@box@name tne) -- cycle;%
    660           }{
    661             \shadedraw [style=header colors,color=borderColor] (\baposter@box@name tnw)            {[rc]-- (\baposter@box@name nw)       }     -- (\baposter@box@name ne)       -- (\baposter@box@name tne) -- cycle;%
    662           }
    663         }{\ifthenelse{\equal{\baposter@headerborder}{none}}{%
    664           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    665             \fill      [style=header colors,color=borderColor] (\baposter@box@name outer tnw)      {[rc]-- (\baposter@box@name outer nw) }     -- (\baposter@box@name outer ne) -- (\baposter@box@name outer tne) -- cycle;%
    666           }{
    667             \shade     [style=header colors,color=borderColor] (\baposter@box@name outer tnw)      {[rc]-- (\baposter@box@name outer nw) }     -- (\baposter@box@name outer ne) -- (\baposter@box@name outer tne) -- cycle;%
    668           }
    669         }{\PackageError{baposter.cls}{Unknown header border \baposter@headerborder}{Edit your file to choose a valid option}}}}{}%
    670         \path (\baposter@box@name nw) +(0em,-1em) node[anchor=west,inner sep=0.4em] {\color{headerFontColor}\baposter@headerfont{##1}};%
    671       %%%
    672       }{\ifthenelse{\equal{\baposter@headershape}{rounded}}     {%
    673       %%%
    674         \ifthenelse{\equal{\baposter@headerborder}{open}}{%
    675           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    676             \filldraw  [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    677           }{
    678             \shadedraw [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne);%
    679           }
    680         }{\ifthenelse{\equal{\baposter@headerborder}{closed}}{%
    681           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    682             \filldraw  [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    683           }{
    684             \shadedraw [style=header colors] (\baposter@box@name tnw)       {[rc]     -- (\baposter@box@name nw)         -- (\baposter@box@name ne)      } -- (\baposter@box@name tne) -- cycle;%
    685           }
    686         }{\ifthenelse{\equal{\baposter@headerborder}{none}}{%
    687           \ifthenelse{\equal{\baposter@headershade}{plain}}{
    688             \fill      [style=header colors] (\baposter@box@name outer tnw) {[rc]     -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    689           }{
    690             \shade     [style=header colors] (\baposter@box@name outer tnw) {[rc]     -- (\baposter@box@name outer nw)   -- (\baposter@box@name outer ne)} -- (\baposter@box@name outer tne) -- cycle;%
    691           }
    692         }{\PackageError{baposter.cls}{Unknown header border \baposter@headerborder}{Edit your file to choose a valid option}}}}{}%
    693         \path (\baposter@box@name nw) +(0.5\boxwidth,-1em) node[anchor=center] {\color{headerFontColor}\baposter@headerfont{##1}};%
    694       %%%
    695       }{%
    696         \typeout{Unknown header style \baposter@headershape}
    697         \PackageError{baposter.cls}{Unknown header style \baposter@headershape}{Edit your file to choose a valid option}{}%
    698       }}}}}%
    699   %
    700       \typeout{Sidebars}%
    701       %% Sidebars%
    702       \ifthenelse  {\equal{\baposter@textborder}{none}}    {%
    703       }{\ifthenelse{\equal{\baposter@textborder}{bars}}{%
    704         \begin{scope}[color=borderColor]%
    705           \draw (\baposter@box@name tne) -- (\baposter@box@name se);%
    706           \draw (\baposter@box@name tnw) -- (\baposter@box@name sw);%
    707         \end{scope}%
    708       }{\ifthenelse{\equal{\baposter@textborder}{coils}}{%
    709         \begin{scope}[color=borderColor,segment amplitude=0.35em,segment length=0.4em,snake=coil]%
    710           \draw (\baposter@box@name tne) -- (\baposter@box@name se);%
    711           \draw (\baposter@box@name tnw) -- (\baposter@box@name sw);%
    712         \end{scope}%
    713       }{\ifthenelse{\equal{\baposter@textborder}{triangles}}{%
    714         \begin{scope}[color=borderColor,segment amplitude=0.2em,segment length=0.4em,snake=triangles]%
    715           \draw [snake=triangles] (\baposter@box@name tne) -- (\baposter@box@name se);%
    716           \draw [snake=triangles] (\baposter@box@name tnw) -- (\baposter@box@name sw);%
    717         \end{scope}%
    718       }{\ifthenelse{\equal{\baposter@textborder}{rectangle}}{%
    719         \begin{scope}[color=borderColor]%
    720         \ifthenelse{\equal{\baposter@boxshade}{none}}{%
     984      \debug{Header}%
     985      \debug{Header-Shape: \baposter@box@headershape, header-border: \baposter@box@headerborder (\baposter@box@headerbordernr)}%
     986      % TODO: Also turn this last ifcase construct into a handler function
     987      %       We only need to determine (fill|shade)(draw|)...
     988%       \baposterHeaderDrawBackground{bgColorOne}{bgColorTwo}{borderColor}
     989%       \baposterHeaderDrawBorder{borderColor}
     990      \ifcase\baposter@box@headerbordernr\relax%
     991        % open
     992        \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
     993          \filldraw  [style=header colors] \baposterHeaderGetShape;%
    721994        }{
    722           \fill[box colors] (\baposter@box@name tnw) -- (\baposter@box@name sw) -- (\baposter@box@name se) -- (\baposter@box@name tne);%
     995          \shadedraw [style=header colors] \baposterHeaderGetShape;%
    723996        }
    724         \draw[color=borderColor] (\baposter@box@name tnw) -- (\baposter@box@name sw) -- (\baposter@box@name se) -- (\baposter@box@name tne);%
    725         \end{scope}%
    726       }{\ifthenelse{\equal{\baposter@textborder}{rounded}}  {%
    727         \ifthenelse{\equal{\baposter@boxshade}{none}}{%
     997      \or
     998        % closed
     999        \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
     1000          \filldraw  [style=header colors] \baposterHeaderGetShape -- cycle;%
    7281001        }{
    729           \fill[box colors,rc] (\baposter@box@name tnw) -- (\baposter@box@name sw) -- (\baposter@box@name se) -- (\baposter@box@name tne);%
     1002          \shadedraw [style=header colors] \baposterHeaderGetShape -- cycle;%
    7301003        }
    731         \draw[color=borderColor,rc] (\baposter@box@name tnw) -- (\baposter@box@name sw) -- (\baposter@box@name se) -- (\baposter@box@name tne);%
    732       }{\ifthenelse{\equal{\baposter@textborder}{roundedleft}}  {%
    733         \ifthenelse{\equal{\baposter@boxshade}{none}}{%
     1004      \or
     1005        % none
     1006        \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
     1007          \fill      [style=header colors] \baposterHeaderGetShape;%
    7341008        }{
    735           \fill[box colors] (\baposter@box@name tnw) {[rc]-- (\baposter@box@name sw)} -- (\baposter@box@name se) -- (\baposter@box@name tne) -- cycle;%
     1009          \shade     [style=header colors] \baposterHeaderGetShape;%
    7361010        }
    737         \draw[color=borderColor,box colors] (\baposter@box@name tnw) {[rc]-- (\baposter@box@name sw)} -- (\baposter@box@name se) -- (\baposter@box@name tne);%
    738       }{\ifthenelse{\equal{\baposter@textborder}{faded}}{%
    739         \tikzstyle{west faded bar}=[color=borderColor]%
    740         \tikzstyle{east faded bar}=[color=borderColor]%
    741         \begin{scope}[west faded bar,x={(\baposter@box@name tnw)},y={(\baposter@box@name sw)}]%
    742           \draw [draw opacity=1.0,west faded bar] (1.0,0.0) -- (0.9,0.1);%
    743           \draw [draw opacity=0.9] (0.9,0.1) -- (0.8,0.2);%
    744           \draw [draw opacity=0.8] (0.8,0.2) -- (0.7,0.3);%
    745           \draw [draw opacity=0.7] (0.7,0.3) -- (0.6,0.4);%
    746           \draw [draw opacity=0.6] (0.6,0.4) -- (0.5,0.5);%
    747           \draw [draw opacity=0.5] (0.5,0.5) -- (0.4,0.6);%
    748           \draw [draw opacity=0.4] (0.4,0.6) -- (0.3,0.7);%
    749           \draw [draw opacity=0.3] (0.3,0.7) -- (0.2,0.8);%
    750           \draw [draw opacity=0.2] (0.2,0.8) -- (0.1,0.9);%
    751           \draw [draw opacity=0.1] (0.1,0.9) -- (0.0,1.0);%
    752         \end{scope}%
    753   %
    754         \begin{scope}[east faded bar,x={(\baposter@box@name tne)},y={(\baposter@box@name se)}]%
    755           \draw [draw opacity=1.0] (1.0,0.0) -- (0.9,0.1);%
    756           \draw [draw opacity=0.9] (0.9,0.1) -- (0.8,0.2);%
    757           \draw [draw opacity=0.8] (0.8,0.2) -- (0.7,0.3);%
    758           \draw [draw opacity=0.7] (0.7,0.3) -- (0.6,0.4);%
    759           \draw [draw opacity=0.6] (0.6,0.4) -- (0.5,0.5);%
    760           \draw [draw opacity=0.5] (0.5,0.5) -- (0.4,0.6);%
    761           \draw [draw opacity=0.4] (0.4,0.6) -- (0.3,0.7);%
    762           \draw [draw opacity=0.3] (0.3,0.7) -- (0.2,0.8);%
    763           \draw [draw opacity=0.2] (0.2,0.8) -- (0.1,0.9);%
    764           \draw [draw opacity=0.1] (0.1,0.9) -- (0.0,1.0);%
    765         \end{scope}%
    766       }{\ifthenelse{\equal{\baposter@textborder}{rounded-small}}  {%
    767         \begin{scope}[color=borderColor,src]%
    768           \draw[color=borderColor,box colors] (\baposter@box@name tnw) -- (\baposter@box@name sw) -- (\baposter@box@name se) -- (\baposter@box@name tne);%
    769         \end{scope}%
    770       }{%
    771         \PackageError{baposter.cls}{Unknown text-box style \baposter@textborder}{Edit your file to choose a valid option}}{}
    772       }}}}}}}}%
    773   %
    774       \typeout{Drawing Text}%
     1011      \fi
     1012      %
     1013      %% Draw the text inside the box header:
     1014      \baposterHeaderDrawText{\color{headerFontColor}\baposter@box@headerfont{\baposter@box@title}};%
     1015      %
     1016      %% Text borders (border around boxes)
     1017      \debug{Poster boxes}%
     1018      % First set box shade
     1019      \baposterBoxDrawBackground{boxColorOne}{boxColorTwo}
     1020      \baposterBoxDrawBorder{borderColor}
     1021      %%
    7751022      %% Text Box%
    776       \path (\baposter@box@name tnw) node(text) [anchor=north west,outer sep=-0.000em,text width=\boxwidth-1em,inner sep=0.5em,text justified] {\usebox{\baposter@content}};%
     1023      \debug{Drawing Text}%
     1024      \path (\baposter@box@name tnw) node(text) [anchor=north west,
     1025            outer sep=-0.000em,text width=\boxwidth-2\baposter@box@@boxpadding,inner sep=\baposter@box@@boxpadding,
     1026            text justified] {\usebox{\baposter@box@content}};%
    7771027    \end{scope}
    778   }%
    779 %
    780   %% Background%
    781   \baposterShadedBG%
     1028    %
     1029    % Finally store the box name as the previous box for the next call
     1030%     \xdef\@@previousbox{\baposter@box@name}%
     1031  }% END of posterbox definition
     1032%
     1033  %% Poster Background%
     1034  \baposterPosterDrawBackground{bgColorOne}{bgColorTwo}%
     1035  %% Poster header/title
     1036  \colorlet{postertitlecolor}{\baposter@box@postertitlecolor}
    7821037  \hspace{-1.5em}%
    7831038  \begin{tikzpicture}[inner sep=0pt,outer sep=0pt,line width=0.05em]%
     
    7871042      (0pt,0pt) coordinate(south west)        (\textwidth,0pt) coordinate(south east);%
    7881043%
    789     \ifthenelse{\equal{\baposter@eyecatcher}{no}}{ % Has no eye catcher
     1044    \ifbaposter@eyecatcher% Has eye catcher
     1045      \debug{Eyecatcher found!}
     1046      \setbox\baposter@titleimage@left=\hbox{#2}%
     1047      %\setbox\baposter@title@top=\hbox{#3}%
     1048    \else% Has no eye catcher%
    7901049      \setbox\baposter@titleimage@left=\hbox{}%
    791     }{ % Has eye catcher%
    792       \typeout{Eyecatcher found!}
    793       \setbox\baposter@titleimage@left=\hbox{#2}%
    794     }%
     1050    \fi%
    7951051    \setlength{\baposter@titleimage@left@width}{\wd\baposter@titleimage@left}%
    7961052    \setbox\baposter@titleimage@right=\hbox{#5}%
    7971053    \setlength{\baposter@titleimage@right@width}{\wd\baposter@titleimage@right}%
     1054    \setlength{\baposter@titleimage@right@height}{\ht\baposter@titleimage@right}%
    7981055    \setlength{\baposter@titleimage@textwidth}{\textwidth}%
    7991056    \addtolength{\baposter@titleimage@textwidth}{-\baposter@titleimage@left@width}%
    800     \addtolength{\baposter@titleimage@textwidth}{-\baposter@titleimage@right@width}%
    801 
    802     \typeout{#3}
     1057    %\addtolength{\baposter@titleimage@textwidth}{-\baposter@titleimage@right@width}%
     1058
     1059    \debug{#3}
    8031060    %
    8041061    %
    8051062    %      % Draw Header%
    8061063    \draw (north west) +(0em,1em+0.5\headerheight) node(image)[anchor=west]   { {\usebox{\baposter@titleimage@left }} };%
    807     \draw (north east) +(0em,1em+0.5\headerheight) node(logo) [anchor=east]   { {\usebox{\baposter@titleimage@right}} };%
    808     \ifthenelse{\equal{\baposter@eyecatcher}{no}}{ % Has no eye catcher
    809       \draw (image.east) node(title)[anchor=west]  { {\begin{minipage}{\baposter@titleimage@textwidth}{\bf\Huge #3}\\{\Large #4}\end{minipage}} };%
    810     }{ % Has eye catcher%
     1064    \draw (north east) +(0em,1em+0.5\baposter@titleimage@right@height) node(logo) [anchor=east]   { {\usebox{\baposter@titleimage@right}} };%
     1065    %
     1066    \ifbaposter@eyecatcher% Has eye catcher%
    8111067      \draw (image.east) node(title)[anchor=west,text width=\baposter@titleimage@textwidth]{%
    8121068        \begin{minipage}{\baposter@titleimage@textwidth}%
    8131069          \begin{center}%
    814           \textbf{\Huge #3}\\%
    815           {\Large #4}%
     1070          \textcolor{postertitlecolor}{\textbf{\Huge #3}}\\%
     1071          {\raggedright\Large #4}%
    8161072          \end{center}%
    8171073        \end{minipage}
    8181074      };%
    819     }%
    820   }%
     1075    \else% Has no eye catcher
     1076      \draw (image.east) node(title)[anchor=west]  { {\begin{minipage}{\baposter@titleimage@textwidth}
     1077                {\textcolor{postertitlecolor}{\bfseries\Huge #3}}\\{\Large #4}\end{minipage}} };%
     1078    \fi
     1079  }% END poster begin
    8211080% The body
    822   {%
     1081  {% BEGIN poster end
    8231082    % The end, draw gridlines if neccesary
    824     \ifthenelse{\equal{\baposter@grid}{yes}}{ % TODO: Understand boolean options declaration%
    825     \draw[draw=green,draw opacity=0.7] %
    826       (0\colwidth,0pt)  -- (0\colwidth,\colheight)%
    827       (1\colwidth,0pt)  -- (1\colwidth,\colheight)%
    828       (1\colwidth+1\baposter@@colspacing,0pt)  -- (1\colwidth+1\baposter@@colspacing,\colheight)%
    829       (2\colwidth+1\baposter@@colspacing,0pt)  -- (2\colwidth+1\baposter@@colspacing,\colheight)%
    830       (2\colwidth+2\baposter@@colspacing,0pt)  -- (2\colwidth+2\baposter@@colspacing,\colheight)%
    831       (3\colwidth+2\baposter@@colspacing,0pt)  -- (3\colwidth+2\baposter@@colspacing,\colheight)%
    832       (3\colwidth+3\baposter@@colspacing,0pt)  -- (3\colwidth+3\baposter@@colspacing,\colheight)%
    833       (4\colwidth+3\baposter@@colspacing,0pt)  -- (4\colwidth+3\baposter@@colspacing,\colheight)%
    834   %
    835       (0pt,0.0\colheight)  -- (\textwidth,0.0\colheight) node[anchor=west] {1.0}%
    836       (0pt,0.1\colheight)  -- (\textwidth,0.1\colheight) node[anchor=west] {0.9}%
    837       (0pt,0.2\colheight)  -- (\textwidth,0.2\colheight) node[anchor=west] {0.8}%
    838       (0pt,0.3\colheight)  -- (\textwidth,0.3\colheight) node[anchor=west] {0.7}%
    839       (0pt,0.4\colheight)  -- (\textwidth,0.4\colheight) node[anchor=west] {0.6}%
    840       (0pt,0.5\colheight)  -- (\textwidth,0.5\colheight) node[anchor=west] {0.5}%
    841       (0pt,0.6\colheight)  -- (\textwidth,0.6\colheight) node[anchor=west] {0.4}%
    842       (0pt,0.7\colheight)  -- (\textwidth,0.7\colheight) node[anchor=west] {0.3}%
    843       (0pt,0.8\colheight)  -- (\textwidth,0.8\colheight) node[anchor=west] {0.2}%
    844       (0pt,0.9\colheight)  -- (\textwidth,0.9\colheight) node[anchor=west] {0.1}%
    845       (0pt,1.0\colheight)  -- (\textwidth,1.0\colheight) node[anchor=west] {0.0};%
    846     }{%
    847     }
     1083    \ifbaposter@grid
     1084      \newdimen{\gridpos}
     1085      \pgfmathsetmacro{\z}{\baposter@columns-1}
     1086      \foreach \y in {0,...,\z}
     1087      {
     1088        \setlength{\gridpos}{\y\colwidth+\y\baposter@@colspacing}
     1089        \draw[draw=green,draw opacity=0.7] (\gridpos,0pt)  -- (\gridpos,\colheight)
     1090            (\gridpos+\colwidth,0pt)  -- (\gridpos+\colwidth,\colheight);%
     1091      }
     1092      % Horizontal lines, every 0.1:
     1093      %% Explicitly list all percentages, because with {0.0, 0.1, ..., 1.0} we
     1094      %% get rounding errors in the displayed numbers!
     1095      \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}
     1096        \draw[draw=green,draw opacity=0.7] (0pt,\colheight-\y\colheight)  --
     1097            (\textwidth,\colheight-\y\colheight) node[anchor=west] {\y};%
     1098    \fi%
    8481099  \end{tikzpicture}%
    8491100 % \xkvview{}
    8501101 \par
    851   }%
     1102  }% END poster end
Note: See TracChangeset for help on using the changeset viewer.