Skip to content
Snippets Groups Projects
Commit eed48366 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Update baposter.cls to latest version

parent e43855b9
Branches
No related tags found
No related merge requests found
...@@ -8,13 +8,29 @@ ...@@ -8,13 +8,29 @@
%% It is meant to be used with pdftex, but might also work with pslatex if you %% It is meant to be used with pdftex, but might also work with pslatex if you
%% are not interested in things like transparency. %% are not interested in things like transparency.
%% %%
%% Copyright (C) 2007-2010 Brian Amberg %% Copyright (C) 2007-2011 Brian Amberg
%% Copyright (C) 2011 Reinhold Kainhofer <reinhold@kainhofer.com> %% Copyright (C) 2011 Reinhold Kainhofer <reinhold@kainhofer.com>
%% %%
%% 29. September 2011:
%% - Finally fixed confusion with paper size handling and landscape. This required seperate handling of papersizes
%% known to the geometry package and other packages.
%% 26. September 2011:
%% - Reverted drawing of faded borders to manual method, as the current result does not work with evince,
%% and produced spurious colored boxes with okular and acroread.
%% - Added one more example due to popular request
%% 16. September 2011:
%% - Removed nag package, such that it compiles on older systems
%% - Added more examples
%% 15. September 2011:
%% - Merged fork by (rk) back into mainline, essentially taking over all the great improvements that Reinhold Kainhofer coded.
%% We call this version 2, as it breaks the interface in some small points. Essentially watch out for this:
%% - no/yes keys are now false/true
%% - the shade-lr etc. keys have the hypen removed, and are now called shadelr etc.
% - Added more examples, which are all adapted to work with the current version
%% 27. August 2011 (rk): %% 27. August 2011 (rk):
%% - Completely factored out all drawing commands to handler functions, assigned via choice keys %% - Completely factored out all drawing commands to handler functions, assigned via choice keys
%% - Added cornerradius, boxheaderheight, boxpadding options %% - Added cornerradius, boxheaderheight, boxpadding options
%% - Added missing roundedright %% - Added missing roundedright
%% 26. August 2011 (rk): %% 26. August 2011 (rk):
%% - Turned headerbox cmd into posterbox environment (allows verbatim) %% - Turned headerbox cmd into posterbox environment (allows verbatim)
%% - pass several options to packages %% - pass several options to packages
...@@ -87,12 +103,11 @@ ...@@ -87,12 +103,11 @@
%% -) Rename headershade back to shade-lr, shade-tb, shade-tb-inverse %% -) Rename headershade back to shade-lr, shade-tb, shade-tb-inverse
%% -) Rename headershape back to small-rounded %% -) Rename headershape back to small-rounded
%% -) Option value consistency (small-rounded vs. rounded-small; missing ones) %% -) Option value consistency (small-rounded vs. rounded-small; missing ones)
%% -) Rename \baposterDrawPosterBackground, \baposterTextborder, \baposterBoxShade, %% -) Rename \baposterHeaderSetShade, \baposterHeaderDrawText to include @ and verb
%% \baposterHeaderSetShade, \baposterHeaderDrawText to include @ and verb
%% %%
%% %%
%% Licence: GPL %% Licence: GPL
\ProvidesClass{baposter}[2011/08/25 v2.0 baposter class] \ProvidesClass{baposter}[2011/11/26 v2.0 baposter class]
\NeedsTeXFormat{LaTeX2e}[1995/06/01] \NeedsTeXFormat{LaTeX2e}[1995/06/01]
\LoadClass{article} \LoadClass{article}
\typeout{baposter: Brian Amberg, 2007, 2008, 2009, 2010, 2011 | http://www.brian-amberg.de/uni/poster/} \typeout{baposter: Brian Amberg, 2007, 2008, 2009, 2010, 2011 | http://www.brian-amberg.de/uni/poster/}
...@@ -109,9 +124,9 @@ ...@@ -109,9 +124,9 @@
\newlength{\colwidth}% \newlength{\colwidth}%
\newlength{\colheight}% \newlength{\colheight}%
\newlength{\baposter@@colspacing}% \newlength{\baposter@@colspacing}%
\newlength{\baposter@@cornerradius}% \newlength{\baposter@box@@cornerradius}%
\newlength{\baposter@@boxheaderheight}% \newlength{\baposter@box@@boxheaderheight}%
\newlength{\baposter@@boxpadding}% \newlength{\baposter@box@@boxpadding}%
\newlength{\boxstartx}% \newlength{\boxstartx}%
\newlength{\boxstarty}% \newlength{\boxstarty}%
\newlength{\boxwidth}% \newlength{\boxwidth}%
...@@ -119,7 +134,7 @@ ...@@ -119,7 +134,7 @@
\newlength{\baposter@titleimage@left@width}% \newlength{\baposter@titleimage@left@width}%
\newlength{\baposter@titleimage@right@width}% \newlength{\baposter@titleimage@right@width}%
\newlength{\baposter@titleimage@textwidth}% \newlength{\baposter@titleimage@textwidth}%
\newbox\baposter@content% \newbox\baposter@box@content%
\newbox\baposter@titleimage@left% \newbox\baposter@titleimage@left%
\newbox\baposter@titleimage@title% \newbox\baposter@titleimage@title%
\newbox\baposter@titleimage@right% \newbox\baposter@titleimage@right%
...@@ -138,16 +153,17 @@ ...@@ -138,16 +153,17 @@
\RequirePackage{pgf} \RequirePackage{pgf}
\RequirePackage{ifthen} \RequirePackage{ifthen}
\RequirePackage[T1]{fontenc} \RequirePackage[T1]{fontenc}
\RequirePackage[l2tabu, orthodox]{nag} %\RequirePackage[l2tabu, orthodox]{nag}
\usetikzlibrary{decorations} \usetikzlibrary{decorations}
\usetikzlibrary{fadings} \usetikzlibrary{fadings}
\usetikzlibrary{snakes}
\usetikzlibrary{calc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Settings % Settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO: Add package options
% Choose a smaller value for larger fonts % Choose a smaller value for larger fonts
\newcommand{\baposter@fontscale}{0.292} \newcommand{\baposter@fontscale}{0.292}
...@@ -161,22 +177,62 @@ ...@@ -161,22 +177,62 @@
%% Paper sizes %% Paper sizes
\newif\if@landscape \newif\if@landscape
\newif\if@geometryKnowsThisSize
\DeclareOptionX{landscape}{\@landscapetrue} \DeclareOptionX{landscape}{\@landscapetrue}
\DeclareOptionX{portrait}{} \DeclareOptionX{portrait}{}
\newcommand{\baposter@setfinalpapersize}[2]{\setlength{\baposter@finalpaperwidth}{#1}\setlength{\baposter@finalpaperheight}{#2}} \newcommand{\baposter@setfinalpapersize}[2]{%
\baposter@setfinalpapersize{841mm}{1189mm} \if@geometryKnowsThisSize
\setlength{\baposter@finalpaperwidth}{#1}%
\setlength{\baposter@finalpaperheight}{#2}%
\else
\if@landscape
% Transpose length, if geometry does not handle the papersize based on the key
\setlength{\baposter@finalpaperwidth}{#2}%
\setlength{\baposter@finalpaperheight}{#1}%
\else
\setlength{\baposter@finalpaperwidth}{#1}%
\setlength{\baposter@finalpaperheight}{#2}%
\fi
\fi
}
% Default paperwidth and paperheight = a0paper
\DeclareOptionX{paperwidth}[841mm]{\setlength{\baposter@finalpaperwidth}{#1}} \DeclareOptionX{paperwidth}[841mm]{\setlength{\baposter@finalpaperwidth}{#1}}
\DeclareOptionX{paperheight}[1189mm]{\setlength{\baposter@finalpaperheight}{#1}} \DeclareOptionX{paperheight}[1189mm]{\setlength{\baposter@finalpaperheight}{#1}}
\DeclareOptionX{a0paper}{\baposter@setfinalpapersize{841mm}{1189mm}} \DeclareOptionX{archA} { \baposter@setfinalpapersize{9in}{12in}}%
\DeclareOptionX{a1paper}{\baposter@setfinalpapersize{594mm}{841mm}} \DeclareOptionX{archB} { \baposter@setfinalpapersize{12in}{18in}}%
\DeclareOptionX{a2paper}{\baposter@setfinalpapersize{420mm}{594mm}} \DeclareOptionX{archC} { \baposter@setfinalpapersize{18in}{24in}}%
\DeclareOptionX{a3paper}{\baposter@setfinalpapersize{297mm}{420mm}} \DeclareOptionX{archD} { \baposter@setfinalpapersize{24in}{36in}}%
\DeclareOptionX{a4paper}{\baposter@setfinalpapersize{210mm}{297mm}} \DeclareOptionX{archE} { \baposter@setfinalpapersize{36in}{48in}}%
\DeclareOptionX{a5paper}{\baposter@setfinalpapersize{148.5mm}{210mm}} \DeclareOptionX{archE1} { \baposter@setfinalpapersize{30in}{42in}}%
\DeclareOptionX{archE}{\baposter@setfinalpapersize{91.44cm}{121.92cm}} \DeclareOptionX{archE2} { \baposter@setfinalpapersize{26in}{38in}}%
\DeclareOptionX{archE3} { \baposter@setfinalpapersize{27in}{39in}}%
\DeclareOptionX{a0paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{841mm}{1189mm}}%g
\DeclareOptionX{a1paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{594mm}{841mm}}%g
\DeclareOptionX{a2paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{420mm}{594mm}}%g
\DeclareOptionX{a3paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{297mm}{420mm}}%g
\DeclareOptionX{a4paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{210mm}{297mm}}%g
\DeclareOptionX{a5paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{148mm}{210mm}}%g
\DeclareOptionX{a6paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{105mm}{148mm}}%g
\DeclareOptionX{b0paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{1000mm}{1414mm}}%g
\DeclareOptionX{b1paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{707mm}{1000mm}}%g
\DeclareOptionX{b2paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{500mm}{707mm}}%g
\DeclareOptionX{b3paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{353mm}{500mm}}%g
\DeclareOptionX{b4paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{250mm}{353mm}}%g
\DeclareOptionX{b5paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{176mm}{250mm}}%g
\DeclareOptionX{b6paper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{125mm}{176mm}}%g
\DeclareOptionX{ansiapaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{11in}}%
\DeclareOptionX{ansibpaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{11in}{17in}}%
\DeclareOptionX{ansicpaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{17in}{22in}}%
\DeclareOptionX{ansidpaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{22in}{34in}}%
\DeclareOptionX{ansiepaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{34in}{44in}}%
\DeclareOptionX{letterpaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{11in}}%
\DeclareOptionX{legalpaper} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{8.5in}{14in}}%
\DeclareOptionX{executivepaper}{\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{7.25in}{10.5in}}%
\DeclareOptionX{screen} {\@geometryKnowsThisSizetrue\baposter@setfinalpapersize{225mm}{180mm}}%g
% Margin
\setlength{\baposter@finalmargin}{1.5cm} \setlength{\baposter@finalmargin}{1.5cm}
\DeclareOptionX{fontscale}[0.292]{\renewcommand{\baposter@fontscale}{#1}} \DeclareOptionX{fontscale}[0.292]{\renewcommand{\baposter@fontscale}{#1}}
\DeclareOptionX{margin} [1.5cm]{\setlength{\baposter@finalmargin}{#1}} \DeclareOptionX{margin} [1.5cm]{\setlength{\baposter@finalmargin}{#1}}
...@@ -195,7 +251,6 @@ ...@@ -195,7 +251,6 @@
\ProcessOptionsX \ProcessOptionsX
\if@debug \if@debug
\newcommand{\debug}[1]{\typeout{#1}} \newcommand{\debug}[1]{\typeout{#1}}
\else \else
...@@ -203,13 +258,6 @@ ...@@ -203,13 +258,6 @@
\fi \fi
\if@landscape
\debug{Swapping paper sizes}
\newlength{\baposter@swappapersizes}
\setlength{\baposter@swappapersizes}{\baposter@finalpaperwidth}
\setlength{\baposter@finalpaperwidth}{\baposter@finalpaperheight}
\setlength{\baposter@finalpaperheight}{\baposter@swappapersizes}
\fi
\setlength{\baposter@basepaperwidth} {\baposter@fontscale\baposter@finalpaperwidth } \setlength{\baposter@basepaperwidth} {\baposter@fontscale\baposter@finalpaperwidth }
\setlength{\baposter@basepaperheight}{\baposter@fontscale\baposter@finalpaperheight} \setlength{\baposter@basepaperheight}{\baposter@fontscale\baposter@finalpaperheight}
...@@ -221,10 +269,10 @@ ...@@ -221,10 +269,10 @@
\setlength{\baposter@basemarginleft}{\baposter@basemargin} \setlength{\baposter@basemarginleft}{\baposter@basemargin}
\addtolength{\baposter@basemarginleft}{\baposter@fontscale\baposter@movebody} \addtolength{\baposter@basemarginleft}{\baposter@fontscale\baposter@movebody}
\debug{Paperwidth=\the\baposter@finalpaperwidth} \typeout{Paperwidth=\the\baposter@finalpaperwidth}
\debug{Paperheight=\the\baposter@finalpaperheight} \typeout{Paperheight=\the\baposter@finalpaperheight}
\debug{BasePaperwidth=\the\baposter@basepaperwidth} \typeout{BasePaperwidth=\the\baposter@basepaperwidth}
\debug{BasePaperheight=\the\baposter@basepaperheight} \typeout{BasePaperheight=\the\baposter@basepaperheight}
\usepackage[ \usepackage[
paperwidth=\baposter@basepaperwidth, paperwidth=\baposter@basepaperwidth,
paperheight=\baposter@basepaperheight, paperheight=\baposter@basepaperheight,
...@@ -232,10 +280,18 @@ ...@@ -232,10 +280,18 @@
bmargin=\baposter@basemargin, bmargin=\baposter@basemargin,
lmargin=\baposter@basemarginleft, lmargin=\baposter@basemarginleft,
rmargin=\baposter@basemarginright, rmargin=\baposter@basemarginright,
portrait]{geometry} % The portrait switch is necessary to override the double swapping which would otherwise happen in landscape mode ]{geometry}
\usepackage{pgfpages} \usepackage{pgfpages}
\if@landscape
\if@geometryKnowsThisSize
\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperheight,physical paper height=\baposter@finalpaperwidth]
\else
\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperwidth,physical paper height=\baposter@finalpaperheight]
\fi
\else
\pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperwidth,physical paper height=\baposter@finalpaperheight] \pgfpagesuselayout{resize to}[physical paper width=\baposter@finalpaperwidth,physical paper height=\baposter@finalpaperheight]
\fi
...@@ -261,8 +317,6 @@ ...@@ -261,8 +317,6 @@
\newcommand{\@@previousbox}{notset} % stores the previously processed box for below=auto \newcommand{\@@previousbox}{notset} % stores the previously processed box for below=auto
% Function to set a user-defined background % Function to set a user-defined background
\newcommand{\baposter@backgroundCmd}{\error{No background command defined. Use \background{...} to define background}} \newcommand{\baposter@backgroundCmd}{\error{No background command defined. Use \background{...} to define background}}
\newcommand{\background}[1]{\renewcommand{\baposter@backgroundCmd}{#1}} \newcommand{\background}[1]{\renewcommand{\baposter@backgroundCmd}{#1}}
...@@ -270,23 +324,25 @@ ...@@ -270,23 +324,25 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New Version, with specified size % Handle poster and box options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO: Use choose-keys \debug{Handling keys}
\debug{Keys}
%%
%% POSTER OPTIONS
%%
%% Store all poster options in variables of the form \baposter@option %% Store all poster options in variables of the form \baposter@option
%% choose-keys also store the index in \baposter@optionnr %% choose-keys also store the index in \baposter@optionnr
%% choose-keys typically also assign a function %% choose-keys typically also assign a function
\definecolor{baposter@silver}{cmyk}{0,0,0,0.7}
\define@boolkey[ba]{poster}[baposter@]{grid} [false] {} \define@boolkey[ba]{poster}[baposter@]{grid} [false] {}
\define@boolkey[ba]{poster}[baposter@]{eyecatcher} [true] {} \define@boolkey[ba]{poster}[baposter@]{eyecatcher} [true] {}
\define@cmdkey[ba]{poster}[baposter@]{columns} [{}] {} \define@cmdkey [ba]{poster}[baposter@]{headerheight} [0.1\textheight]{}
\define@cmdkey[ba]{poster}[baposter@]{colspacing} [1em] {} \define@cmdkey [ba]{poster}[baposter@]{columns} [{}] {}
\define@cmdkey[ba]{poster}[baposter@]{cornerradius} [1em] {} \define@cmdkey [ba]{poster}[baposter@]{colspacing} [1em] {}
\define@cmdkey[ba]{poster}[baposter@]{boxheaderheight} [2em] {} \define@cmdkey [ba]{poster}[baposter@]{bgColorOne} [baposter@silver]{}
\define@cmdkey[ba]{poster}[baposter@]{boxpadding} [0.5em] {} \define@cmdkey [ba]{poster}[baposter@]{bgColorTwo} [green] {}
\define@cmdkey[ba]{poster}[baposter@]{headerheight} [0.1\textheight]{}
% background can be one of: shadeLR, shadeTB, plain, user, none % background can be one of: shadeLR, shadeTB, plain, user, none
\define@choicekey*+[ba]{poster}{background}% \define@choicekey*+[ba]{poster}{background}%
...@@ -302,98 +358,102 @@ ...@@ -302,98 +358,102 @@
\renewcommand{\baposterPosterDrawBackground}[2]{\baposter@background@none{##1}{##2}} \renewcommand{\baposterPosterDrawBackground}[2]{\baposter@background@none{##1}{##2}}
} }
%%
%% BOX OPTIONS
%%
\define@cmdkey[ba]{posterbox}[baposter@box@]{cornerradius} [1em] {}
\define@cmdkey[ba]{posterbox}[baposter@box@]{boxheaderheight} [2em] {}
\define@cmdkey[ba]{posterbox}[baposter@box@]{boxpadding} [0.5em] {}
% textborder can be one of: none, bars, coils, triangles, rectangle, rounded, % textborder can be one of: none, bars, coils, triangles, rectangle, rounded,
% roundedleft, roundedsmall, faded; UNIMPLEMENTED: roundedright % roundedleft, roundedsmall, faded; UNIMPLEMENTED: roundedright
\edef\baposter@textborder@validvalues{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedsmall,faded} \edef\baposter@box@textborder@validvalues{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedsmall,faded}
\define@choicekey*+[ba]{poster}{textborder}% \define@choicekey*+[ba]{posterbox}{textborder}%
[\baposter@textborder\baposter@textbordernr]% [\baposter@box@textborder\baposter@box@textbordernr]%
{none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedright,roundedsmall,faded} [rectangle] {% {none,bars,coils,triangles,rectangle,rounded,roundedleft,roundedright,roundedsmall,faded} [rectangle] {%
\debug{Text border: \baposter@textborder} \debug{Text border: \baposter@box@textborder}
\renewcommand{\baposterBoxGetShape}{ \renewcommand{\baposterBoxGetShape}{
\csname baposter@boxshape@\baposter@textborder\endcsname} \csname baposter@box@boxshape@\baposter@box@textborder\endcsname}
\renewcommand{\baposterBoxDrawBorder}[1]{ \renewcommand{\baposterBoxDrawBorder}[1]{
\csname baposter@drawboxborder@\baposter@textborder\endcsname{##1}} \csname baposter@box@drawborder@\baposter@box@textborder\endcsname{##1}}
}{ }{
\PackageWarning{baposter}{Unknown text-border style `\baposter@textborder'. \PackageWarning{baposter}{Unknown text-border style `\baposter@box@textborder'.
Edit your file to choose a valid option (\baposter@textborder@validvalues).} Edit your file to choose a valid option (\baposter@box@textborder@validvalues).}
\renewcommand{\baposterBoxGetShape}{\baposter@boxshape@rectangle} \renewcommand{\baposterBoxGetShape}{\baposter@boxshape@rectangle}
\renewcommand{\baposterBoxDrawBorder}[1]{\baposter@drawboxborder@rectangle{##1}} \renewcommand{\baposterBoxDrawBorder}[1]{\baposter@drawborder@rectangle{##1}}
} }
% boxshade can be one of: shadeLR, shadeTB, plain, none % boxshade can be one of: shadeLR, shadeTB, plain, none
\define@choicekey*+[ba]{poster}{boxshade}% \define@choicekey*+[ba]{posterbox}{boxshade}%
[\baposter@boxshade\baposter@boxshadenr]% [\baposter@box@boxshade\baposter@box@boxshadenr]%
{shadelr,shadetb,plain,none} [none] {% {shadelr,shadetb,plain,none} [none] {%
\debug{Box shade: \baposter@boxshade} \debug{Box shade: \baposter@box@boxshade}
\renewcommand{\baposterBoxDrawBackground}[2]{ \renewcommand{\baposterBoxDrawBackground}[2]{
\csname baposter@drawboxbackground@\baposter@boxshade\endcsname{##1}{##2}} \csname baposter@box@drawbackground@\baposter@box@boxshade\endcsname{##1}{##2}}
}{ }{
\PackageWarning{baposter}{Unknown boxshade style `\baposter@boxshade'. \PackageWarning{baposter}{Unknown boxshade style `\baposter@boxshade'.
Edit your file to choose a valid option.} Edit your file to choose a valid option.}
\renewcommand{\baposterBoxDrawBackground}[2]{\baposter@drawboxbackground@none{##1}{##2}} \renewcommand{\baposterBoxDrawBackground}[2]{\baposter@box@drawbackground@none{##1}{##2}}
} }
% headershade can be one of: shade-lr, shade-tb, shade-tb-inverse, plain % headershade can be one of: shade-lr, shade-tb, shade-tb-inverse, plain
\define@choicekey*+[ba]{poster}{headershade}% \define@choicekey*+[ba]{posterbox}{headershade}%
[\baposter@headershade\baposter@headershadenr]% [\baposter@box@headershade\baposter@box@headershadenr]%
{shadelr, shadetb, shadetbinverse, plain} [shadelr] {% {shadelr, shadetb, shadetbinverse, plain} [shadelr] {%
\debug{Box shade: \baposter@headershade} \debug{Header shade: \baposter@box@headershade}
\renewcommand{\baposterHeaderSetShade}[3]{ \renewcommand{\baposterHeaderSetShade}[3]{
\csname baposter@headershade@\baposter@headershade\endcsname{##1}{##2}{##3}} \csname baposter@box@headershade@\baposter@box@headershade\endcsname{##1}{##2}{##3}}
}{ }{
\PackageWarning{baposter}{Unknown headershade style `\baposter@headershade'. \PackageWarning{baposter}{Unknown headershade style `\baposter@box@headershade'.
Edit your file to choose a valid option.} Edit your file to choose a valid option.}
\renewcommand{\baposterHeaderSetShade}[3]{\baposter@headershade@none{##1}{##2}{##3}} \renewcommand{\baposterHeaderSetShade}[3]{\baposter@box@headershade@none{##1}{##2}{##3}}
} }
% headershape can be one of: rectangle, rounded, smallrounded, roundedleft, roundedright % headershape can be one of: rectangle, rounded, smallrounded, roundedleft, roundedright
\define@choicekey*+[ba]{poster}{headershape}% \define@choicekey*+[ba]{posterbox}{headershape}%
[\baposter@headershape\baposter@headershapenr]% [\baposter@box@headershape\baposter@box@headershapenr]%
{rectangle,rounded,smallrounded,roundedleft,roundedright} [roundedright] {% {rectangle,rounded,smallrounded,roundedleft,roundedright} [roundedright] {%
\debug{Header shape: \baposter@headershape} \debug{Header shape: \baposter@box@headershape}
\renewcommand{\baposterHeaderGetShape}{ \renewcommand{\baposterHeaderGetShape}{
\csname baposter@headershape@\baposter@headershape\endcsname} \csname baposter@box@headershape@\baposter@box@headershape\endcsname}
\renewcommand{\baposterHeaderDrawText}[1]{ \renewcommand{\baposterHeaderDrawText}[1]{
\csname baposter@headerdrawtext@\baposter@headershape\endcsname{##1}} \csname baposter@box@headerdrawtext@\baposter@box@headershape\endcsname{##1}}
\renewcommand{\baposterHeaderDrawBorder}[1]{ \renewcommand{\baposterHeaderDrawBorder}[1]{
\csname baposter@headerdrawborder@\baposter@headershape\endcsname{##1}} \csname baposter@box@headerdrawborder@\baposter@box@headershape\endcsname{##1}}
}{ }{
\PackageWarning{baposter}{Unknown headershape style `\baposter@headershape'. \PackageWarning{baposter}{Unknown headershape style `\baposter@headershape'.
Edit your file to choose a valid option.} Edit your file to choose a valid option.}
\renewcommand{\baposterHeaderGetShape}{\baposter@headershape@rectangle} \renewcommand{\baposterHeaderGetShape}{\baposter@box@headershape@rectangle}
\renewcommand{\baposterHeaderDrawText}[1]{\baposter@headerdrawtext@rectangle{##1}} \renewcommand{\baposterHeaderDrawText}[1]{\baposter@box@headerdrawtext@rectangle{##1}}
\renewcommand{\baposterHeaderDrawBorder}[1]{\baposter@headerdrawborder@rectangle{##1}} \renewcommand{\baposterHeaderDrawBorder}[1]{\baposter@box@headerdrawborder@rectangle{##1}}
} }
% headerborder can be one of: open, closed, none % headerborder can be one of: open, closed, none
\define@choicekey*+[ba]{poster}{headerborder}% \define@choicekey*+[ba]{posterbox}{headerborder}%
[\baposter@headerborder\baposter@headerbordernr]% [\baposter@box@headerborder\baposter@box@headerbordernr]%
{open,closed,none} [open] {% {open,closed,none} [open] {%
\debug{Header border: \baposter@headerborder} \debug{Header border: \baposter@box@headerborder}
% \renewcommand{\baposterHeaderBorder}{ % \renewcommand{\baposterHeaderBorder}{
% \csname baposter@headerborder@\baposter@headerborder\endcsname} % \csname baposter@headerborder@\baposter@box@headerborder\endcsname}
}{ }{
\PackageWarning{baposter}{Unknown headerborder style `\baposter@headerborder'. \PackageWarning{baposter}{Unknown headerborder style `\baposter@headerborder'.
Edit your file to choose a valid option.} Edit your file to choose a valid option.}
% \renewcommand{\baposterHeaderBorder}{\baposter@headerborder@rectangle} % \renewcommand{\baposterHeaderBorder}{\baposter@box@headerborder@rectangle}
} }
\definecolor{baposter@silver}{cmyk}{0,0,0,0.7} \define@cmdkey[ba]{posterbox}[baposter@box@]{borderColor} [yellow] {}
\define@cmdkey[ba]{poster}[baposter@]{color} [orange] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{headerColorOne} [red] {}
\define@cmdkey[ba]{poster}[baposter@]{colortwo} [white] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{headerColorTwo} [brown] {}
\define@cmdkey[ba]{poster}[baposter@]{bgColorOne} [baposter@silver]{} \define@cmdkey[ba]{posterbox}[baposter@box@]{headerFontColor} [black] {}
\define@cmdkey[ba]{poster}[baposter@]{bgColorTwo} [green] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{boxColorOne} [magenta] {}
\define@cmdkey[ba]{poster}[baposter@]{borderColor} [yellow] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{boxColorTwo} [cyan] {}
\define@cmdkey[ba]{poster}[baposter@]{headerColorOne} [red] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{headerfont} [\scshape\Large] {}
\define@cmdkey[ba]{poster}[baposter@]{headerColorTwo} [brown] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{textfont} [{}] {}
\define@cmdkey[ba]{poster}[baposter@]{headerFontColor} [black] {}
\define@cmdkey[ba]{poster}[baposter@]{boxColorOne} [magenta] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{linewidth} [2pt] {}
\define@cmdkey[ba]{poster}[baposter@]{boxColorTwo} [cyan] {}
\define@cmdkey[ba]{poster}[baposter@]{headerfont} [\scshape\Large] {}
\define@cmdkey[ba]{poster}[baposter@]{textfont} [{}] {}
\define@cmdkey[ba]{poster}[baposter@]{linewidth} [2pt] {}
\define@cmdkey[ba]{posterbox}[baposter@box@]{below} [notset]{} \define@cmdkey[ba]{posterbox}[baposter@box@]{below} [notset]{}
\define@cmdkey[ba]{posterbox}[baposter@box@]{above} [notset]{} \define@cmdkey[ba]{posterbox}[baposter@box@]{above} [notset]{}
...@@ -405,7 +465,8 @@ ...@@ -405,7 +465,8 @@
\define@cmdkey[ba]{posterbox}[baposter@box@]{height} [auto] {} \define@cmdkey[ba]{posterbox}[baposter@box@]{height} [auto] {}
\define@cmdkey[ba]{posterbox}[baposter@box@]{name} [noname]{} \define@cmdkey[ba]{posterbox}[baposter@box@]{name} [noname]{}
\presetkeys[ba]{poster}{ % Set some default values, the poster and posterbox environments can override:
\setkeys[ba]{poster}{
% Debug grid % Debug grid
grid=false, grid=false,
% Is there an eyecatcher image % Is there an eyecatcher image
...@@ -414,30 +475,12 @@ ...@@ -414,30 +475,12 @@
% Colours % Colours
bgColorOne=baposter@silver, bgColorOne=baposter@silver,
bgColorTwo=green, bgColorTwo=green,
borderColor=yellow, %
headerColorOne=red,
headerColorTwo=brown,
headerFontColor=black,
boxColorOne=magenta,
boxColorTwo=cyan,
% Style
headerborder=none,
headershape=rectangle,
colspacing=1em, colspacing=1em,
headerheight=0.1\textheight, headerheight=0.1\textheight,
background=shadeLR, background=shadeLR,
headershade=shadeLR,
boxshade=none,
headerfont=\scshape\Large,% or headerfont=\color{white}\textsf\textbf
textfont={},
textborder=faded,
linewidth=2pt,
%
cornerradius=1em,
boxheaderheight=2em,
boxpadding=0.5em,
}{} }{}
\presetkeys[ba]{posterbox}{ \setkeys[ba]{posterbox}{
% Position % Position
column=0,row=0,span=1, column=0,row=0,span=1,
below=notset,above=notset, below=notset,above=notset,
...@@ -446,6 +489,26 @@ ...@@ -446,6 +489,26 @@
height=auto, height=auto,
% Name % Name
name=noname, name=noname,
% Box design: border:
linewidth=2pt,
borderColor=yellow,
cornerradius=1em,
% text box:
textfont={},
boxshade=plain,
boxColorOne=magenta,
boxColorTwo=cyan,
textborder=faded,
boxpadding=0.5em,
% header
headerfont=\scshape\Large,% or headerfont=\color{white}\textsf\textbf
headerFontColor=black,
headerColorOne=red,
headerColorTwo=brown,
headershape=rectangle,
headershade=shadeLR,
headerborder=none,
boxheaderheight=2em,
}{} }{}
...@@ -457,7 +520,7 @@ ...@@ -457,7 +520,7 @@
\newcommand{\baposter@background@shadelr}[2]{ \newcommand{\baposter@background@shadelr}[2]{
\debug{BAPOSTER: Using shade left right background.} \debug{BAPOSTER: Using shade left right background.}
\begin{tikzpicture}[remember picture,overlay]% \begin{tikzpicture}[remember picture,overlay]%
\shade [shading=axis,right color=#1,left color=#2] (current page.north west) \shade [shading=axis,left color=#1,right color=#2] (current page.north west)
rectangle(current page.south east); rectangle(current page.south east);
\end{tikzpicture}% \end{tikzpicture}%
} }
...@@ -488,29 +551,32 @@ ...@@ -488,29 +551,32 @@
%%% Return shape path of text box (depending on the box shape) %%% Return shape path of text box (depending on the box shape)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\baposter@boxshape@none}{\baposter@boxshape@rectangle} \newcommand{\baposter@box@boxshape@none}{\baposter@box@boxshape@rectangle}
\newcommand{\baposter@boxshape@bars}{ \newcommand{\baposter@box@boxshape@bars}{
(\baposter@box@name tnw) -- (\baposter@box@name sw) % (\baposter@box@name tnw) -- (\baposter@box@name sw) %
(\baposter@box@name se) -- (\baposter@box@name tne) (\baposter@box@name se) -- (\baposter@box@name tne)
} }
\newcommand{\baposter@boxshape@coils}{\baposter@boxshape@bars} \newcommand{\baposter@box@boxshape@coils}{\baposter@box@boxshape@bars}
\newcommand{\baposter@boxshape@triangles}{\baposter@boxshape@bars} \newcommand{\baposter@box@boxshape@triangles}{\baposter@box@boxshape@bars}
\newcommand{\baposter@boxshape@rectangle}{ \newcommand{\baposter@box@boxshape@rectangle}{
(\baposter@box@name tnw) -- (\baposter@box@name sw) -- % (\baposter@box@name tnw) -- (\baposter@box@name sw) -- %
(\baposter@box@name se) -- (\baposter@box@name tne)% (\baposter@box@name se) -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@boxshape@faded}{\baposter@boxshape@rectangle} \newcommand{\baposter@box@boxshape@faded}{
\newcommand{\baposter@boxshape@rounded}{ (\baposter@box@name tnw) -- (\baposter@box@name sw) %
[rc] \baposter@boxshape@rectangle% (\baposter@box@name tne) -- (\baposter@box@name se)
}
\newcommand{\baposter@box@boxshape@rounded}{
[rc] \baposter@box@boxshape@rectangle%
} }
\newcommand{\baposter@boxshape@roundedsmall}{ \newcommand{\baposter@box@boxshape@roundedsmall}{
[src] \baposter@boxshape@rectangle [src] \baposter@box@boxshape@rectangle
} }
\newcommand{\baposter@boxshape@roundedleft}{ \newcommand{\baposter@box@boxshape@roundedleft}{
(\baposter@box@name tnw) {[rc]-- (\baposter@box@name sw)} -- % (\baposter@box@name tnw) {[rc]-- (\baposter@box@name sw)} -- %
(\baposter@box@name se) -- (\baposter@box@name tne)% (\baposter@box@name se) -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@boxshape@roundedright}{ \newcommand{\baposter@box@boxshape@roundedright}{
(\baposter@box@name tnw) -- (\baposter@box@name sw) {[rc]-- % (\baposter@box@name tnw) -- (\baposter@box@name sw) {[rc]-- %
(\baposter@box@name se)} -- (\baposter@box@name tne)% (\baposter@box@name se)} -- (\baposter@box@name tne)%
} }
...@@ -521,18 +587,18 @@ ...@@ -521,18 +587,18 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These functions take no arguments % These functions take no arguments
\newcommand{\baposter@drawboxbackground@none}[2]{ \newcommand{\baposter@box@drawbackground@none}[2]{
\tikzstyle{box colors}=[] \tikzstyle{box colors}=[]
} }
\newcommand{\baposter@drawboxbackground@plain}[2]{ \newcommand{\baposter@box@drawbackground@plain}[2]{
\tikzstyle{box colors}=[fill=#1] \tikzstyle{box colors}=[fill=#1]
\fill[box colors] \baposterBoxGetShape; \fill[box colors] \baposterBoxGetShape;
} }
\newcommand{\baposter@drawboxbackground@shadelr}[2]{ \newcommand{\baposter@box@drawbackground@shadelr}[2]{
\tikzstyle{box colors}=[shading=axis, left color=#1, right color=#2]% \tikzstyle{box colors}=[shading=axis, left color=#1, right color=#2]%
\fill[box colors] \baposterBoxGetShape; \fill[box colors] \baposterBoxGetShape;
} }
\newcommand{\baposter@drawboxbackground@shadetb}[2]{ \newcommand{\baposter@box@drawbackground@shadetb}[2]{
\tikzstyle{box colors}=[shading=axis, top color=#1, bottom color=#2]% \tikzstyle{box colors}=[shading=axis, top color=#1, bottom color=#2]%
\fill[box colors] \baposterBoxGetShape; \fill[box colors] \baposterBoxGetShape;
} }
...@@ -544,29 +610,36 @@ ...@@ -544,29 +610,36 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These functions take two arguments: borderColor % These functions take two arguments: borderColor
\newcommand{\baposter@drawboxborder@none}[1]{} \newcommand{\baposter@box@drawborder@none}[1]{}
\newcommand{\baposter@drawboxborder@bars}[1]{ \newcommand{\baposter@box@drawborder@bars}[1]{
\draw[color=#1] \baposterBoxGetShape;% \draw[color=#1] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@coils}[1]{ \newcommand{\baposter@box@drawborder@coils}[1]{
\draw[color=#1,segment amplitude=0.35em,segment length=0.4em,snake=coil] \baposterBoxGetShape;% \draw[color=#1,segment amplitude=0.35em,segment length=0.4em,snake=coil] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@triangles}[1]{ \newcommand{\baposter@box@drawborder@triangles}[1]{
\draw[color=#1,segment amplitude=0.2em,segment length=0.4em,snake=triangles] \baposterBoxGetShape;% \draw[color=#1,segment amplitude=0.2em,segment length=0.4em,snake=triangles] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@rectangle}[1]{ \newcommand{\baposter@box@drawborder@rectangle}[1]{
\draw[color=#1] \baposterBoxGetShape;%
}
\newcommand{\baposter@box@drawborder@rounded}[1]{
\draw[color=#1] \baposterBoxGetShape;% \draw[color=#1] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@rounded}[1]{ \newcommand{\baposter@box@drawborder@roundedleft}[1]{
\draw[color=#1] \baposterBoxGetShape;% \draw[color=#1] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@roundedleft}[1]{ \newcommand{\baposter@box@drawborder@roundedright}[1]{
\draw[color=#1] \baposterBoxGetShape;% \draw[color=#1] \baposterBoxGetShape;%
} }
\newcommand{\baposter@drawboxborder@faded}[1]{ \newcommand{\baposter@box@drawborder@faded}[1]{
\draw [color=#1,path fading=south] \baposterBoxGetShape;% % This is the right way to do it, but it does not work with evince, and has problems during printing, so instead we do
%\draw[color=#1,path fading=south] \baposterBoxGetShape;%
% this
\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)$);%
\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)$);%
} }
\newcommand{\baposter@drawboxborder@roundedsmall}[1]{ \newcommand{\baposter@box@drawborder@roundedsmall}[1]{
\draw[color=#1] \baposterBoxGetShape;% \draw[color=#1] \baposterBoxGetShape;%
} }
...@@ -578,23 +651,23 @@ ...@@ -578,23 +651,23 @@
% These functions take no arguments % These functions take no arguments
% TODO: For headerborder==none, use (\baposter@box@name outer tnw) instead! % TODO: For headerborder==none, use (\baposter@box@name outer tnw) instead!
\newcommand{\baposter@headershape@rectangle}{% \newcommand{\baposter@box@headershape@rectangle}{%
(\baposter@box@name tnw) -- (\baposter@box@name nw) -- % (\baposter@box@name tnw) -- (\baposter@box@name nw) -- %
(\baposter@box@name ne) -- (\baposter@box@name tne)% (\baposter@box@name ne) -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@headershape@smallrounded}{% \newcommand{\baposter@box@headershape@smallrounded}{%
(\baposter@box@name tnw) {[src] -- (\baposter@box@name nw) -- % (\baposter@box@name tnw) {[src] -- (\baposter@box@name nw) -- %
(\baposter@box@name ne)} -- (\baposter@box@name tne)% (\baposter@box@name ne)} -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@headershape@roundedright}{% \newcommand{\baposter@box@headershape@roundedright}{%
(\baposter@box@name tnw) -- (\baposter@box@name nw) {[rc] -- % (\baposter@box@name tnw) -- (\baposter@box@name nw) {[rc] -- %
(\baposter@box@name ne)} -- (\baposter@box@name tne)% (\baposter@box@name ne)} -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@headershape@roundedleft}{% \newcommand{\baposter@box@headershape@roundedleft}{%
(\baposter@box@name tnw) {[rc]-- (\baposter@box@name nw)} -- % (\baposter@box@name tnw) {[rc]-- (\baposter@box@name nw)} -- %
(\baposter@box@name ne) -- (\baposter@box@name tne)% (\baposter@box@name ne) -- (\baposter@box@name tne)%
} }
\newcommand{\baposter@headershape@rounded}{% \newcommand{\baposter@box@headershape@rounded}{%
(\baposter@box@name tnw) {[rc] -- (\baposter@box@name nw) -- % (\baposter@box@name tnw) {[rc] -- (\baposter@box@name nw) -- %
(\baposter@box@name ne) } -- (\baposter@box@name tne)% (\baposter@box@name ne) } -- (\baposter@box@name tne)%
} }
...@@ -606,22 +679,22 @@ ...@@ -606,22 +679,22 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These functions take one argument: the header text % These functions take one argument: the header text
\newcommand{\baposter@headerdrawtext@rectangle}[1]{ \newcommand{\baposter@box@headerdrawtext@rectangle}[1]{
\path (\baposter@box@name nw) +(0em,-0.5\baposter@@boxheaderheight) node[anchor=west,inner sep=0.4em] {#1};% \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight) node[anchor=west,inner sep=0.4em] {#1};%
} }
\newcommand{\baposter@headerdrawtext@smallrounded}[1]{ \newcommand{\baposter@box@headerdrawtext@smallrounded}[1]{
\path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@@boxheaderheight) node[anchor=center] {#1};% \path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@box@@boxheaderheight) node[anchor=center] {#1};%
} }
\newcommand{\baposter@headerdrawtext@roundedright}[1]{ \newcommand{\baposter@box@headerdrawtext@roundedright}[1]{
\path (\baposter@box@name nw) +(0em,-0.5\baposter@@boxheaderheight)% \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight)%
node[anchor=west,inner sep=0.4em,text depth=0.0em] {#1};% node[anchor=west,inner sep=0.4em,text depth=0.0em] {#1};%
} }
\newcommand{\baposter@headerdrawtext@roundedleft}[1]{ \newcommand{\baposter@box@headerdrawtext@roundedleft}[1]{
\path (\baposter@box@name nw) +(0em,-0.5\baposter@@boxheaderheight)% \path (\baposter@box@name nw) +(0em,-0.5\baposter@box@@boxheaderheight)%
node[anchor=west,inner sep=0.4em] {#1};% node[anchor=west,inner sep=0.4em] {#1};%
} }
\newcommand{\baposter@headerdrawtext@rounded}[1]{ \newcommand{\baposter@box@headerdrawtext@rounded}[1]{
\path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@@boxheaderheight) node[anchor=center] {#1};% \path (\baposter@box@name nw) +(0.5\boxwidth,-0.5\baposter@box@@boxheaderheight) node[anchor=center] {#1};%
} }
...@@ -631,7 +704,7 @@ ...@@ -631,7 +704,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These functions take two arguments: headerColorOne, headerColorTwo and borderColor % These functions take two arguments: headerColorOne, headerColorTwo and borderColor
\newcommand{\baposter@headershade@shadelr}[3]{ \newcommand{\baposter@box@headershade@shadelr}[3]{
\debug{Header-Shade: Shade Left - Right} \debug{Header-Shade: Shade Left - Right}
\tikzstyle{header colors}=[% \tikzstyle{header colors}=[%
color=#3,% color=#3,%
...@@ -640,7 +713,7 @@ ...@@ -640,7 +713,7 @@
right color=#2% right color=#2%
]% ]%
} }
\newcommand{\baposter@headershade@shadetb}[3]{ \newcommand{\baposter@box@headershade@shadetb}[3]{
\debug{Header-Shade: Shade Top - Bottom} \debug{Header-Shade: Shade Top - Bottom}
\tikzstyle{header colors}=[% \tikzstyle{header colors}=[%
color=#3,% color=#3,%
...@@ -649,7 +722,7 @@ ...@@ -649,7 +722,7 @@
bottom color=#2% bottom color=#2%
]% ]%
} }
\newcommand{\baposter@headershade@shadetbinverse}[3]{ \newcommand{\baposter@box@headershade@shadetbinverse}[3]{
\tikzstyle{header colors}=[% \tikzstyle{header colors}=[%
top color=#1!75!#2,% top color=#1!75!#2,%
bottom color=#2!100!#1,% bottom color=#2!100!#1,%
...@@ -657,28 +730,20 @@ ...@@ -657,28 +730,20 @@
]% ]%
\colorlet{baposterHeaderFontColor}{white}% \colorlet{baposterHeaderFontColor}{white}%
} }
\newcommand{\baposter@headershade@plain}[3]{ \newcommand{\baposter@box@headershade@plain}[3]{
\debug{Header-Shade: Plain} \debug{Header-Shade: Plain}
\tikzstyle{header colors}=[% \tikzstyle{header colors}=[%
color=#3,% color=#3,%
fill=#1% fill=#1%
]% ]%
} }
\newcommand{\baposter@headershade@none}[3]{ \newcommand{\baposter@box@headershade@none}[3]{
\debug{Header-Shade: none} \debug{Header-Shade: none}
\tikzstyle{header colors}=[] \tikzstyle{header colors}=[]
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Header shade options and functions (one function for each possible value)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These functions take no arguments
% TODO: Drawing routines for header border & background
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The main poster environment %%% The main poster environment
...@@ -705,33 +770,24 @@ ...@@ -705,33 +770,24 @@
% functions. Once that is done, we don't have to care about particular % functions. Once that is done, we don't have to care about particular
% values for border, shading, etc. All we have to do is call the % values for border, shading, etc. All we have to do is call the
% handler functions and let them do their job. % handler functions and let them do their job.
\setkeys[ba]{poster}{#1}% % This also allows the user to override the poster-wide defaults on a per-box
% basis.
\setkeys[ba]{posterbox,poster}{#1}%
% %
% TODO: Move all those assignments to the key macros! % TODO: Move all those assignments to the key macros!
% Parse Keys% % Parse Keys%
\colorlet{bgColorOne}{\baposter@bgColorOne} \colorlet{bgColorOne}{\baposter@bgColorOne}
\colorlet{bgColorTwo}{\baposter@bgColorTwo} \colorlet{bgColorTwo}{\baposter@bgColorTwo}
\colorlet{borderColor}{\baposter@borderColor}
\colorlet{headerColorOne}{\baposter@headerColorOne}
\colorlet{headerColorTwo}{\baposter@headerColorTwo}
\colorlet{headerFontColor}{\baposter@headerFontColor}
\colorlet{boxColorOne}{\baposter@boxColorOne}
\colorlet{boxColorTwo}{\baposter@boxColorTwo}
% %
%% Boxes% %% Boxes%
\setlength{\headerheight}{\baposter@headerheight}% \setlength{\headerheight}{\baposter@headerheight}%
\setlength{\colheight}{\textheight-\baposter@headerheight}% \setlength{\colheight}{\textheight-\baposter@headerheight}%
%
\setlength{\baposter@@cornerradius}{\baposter@cornerradius}%
\setlength{\baposter@@boxheaderheight}{\baposter@boxheaderheight}%
\setlength{\baposter@@boxpadding}{\baposter@boxpadding}%
\renewcommand{\@@previousbox}{notset} \renewcommand{\@@previousbox}{notset}
\debug{Format}% \debug{Format}%
% Set default for columns if unset (4 for landscape, 3 for portrait) % Set default for columns if unset (4 for landscape, 3 for portrait)
\ifthenelse{\equal{\baposter@columns}{}}{% \ifthenelse{\equal{\baposter@columns}{}}{%
\renewcommand{\baposter@columns}{\if@landscape\relax4\else3\fi}% \renewcommand{\baposter@columns}{\if@landscape4\else3\fi}%
}{} }{}
% %
\debug{Columns: \baposter@columns}% \debug{Columns: \baposter@columns}%
...@@ -788,10 +844,23 @@ ...@@ -788,10 +844,23 @@
\newenvironment{posterbox}[2][]{% \newenvironment{posterbox}[2][]{%
\debug{Poster box options: ##1}% \debug{Poster box options: ##1}%
% Override the poster-wide defaults on a per-box basis
\setkeys[ba]{posterbox}{##1}% \setkeys[ba]{posterbox}{##1}%
% %
\def\baposter@box@title{##2} \def\baposter@box@title{##2}
% %
\colorlet{borderColor}{\baposter@box@borderColor}
\colorlet{headerColorOne}{\baposter@box@headerColorOne}
\colorlet{headerColorTwo}{\baposter@box@headerColorTwo}
\colorlet{headerFontColor}{\baposter@box@headerFontColor}
\colorlet{boxColorOne}{\baposter@box@boxColorOne}
\colorlet{boxColorTwo}{\baposter@box@boxColorTwo}
%
\setlength{\baposter@box@@cornerradius}{\baposter@box@cornerradius}%
\setlength{\baposter@box@@boxheaderheight}{\baposter@box@boxheaderheight}%
\setlength{\baposter@box@@boxpadding}{\baposter@box@boxpadding}%
%% The columns is always given absolute %% The columns is always given absolute
% boxstartx = column * colwidth + column * colspacing % boxstartx = column * colwidth + column * colspacing
\setlength{\boxstartx}{(\colwidth+\baposter@@colspacing)*\baposter@box@column}% \setlength{\boxstartx}{(\colwidth+\baposter@@colspacing)*\baposter@box@column}%
...@@ -802,10 +871,10 @@ ...@@ -802,10 +871,10 @@
\addtolength{\boxwidth}{\baposter@@colspacing*(\baposter@box@span-1)}% \addtolength{\boxwidth}{\baposter@@colspacing*(\baposter@box@span-1)}%
% %
%% Measure the content of the box% %% Measure the content of the box%
\setbox\baposter@content=\hbox\bgroup% \setbox\baposter@box@content=\hbox\bgroup%
\begin{pgfinterruptpicture}% \begin{pgfinterruptpicture}%
\begin{minipage}[t]{\boxwidth-\baposter@@boxpadding*2}% \begin{minipage}[t]{\boxwidth-\baposter@box@@boxpadding*2}%
\baposter@textfont\bgroup% \baposter@box@textfont\bgroup%
}% End of posterbox preamble }% End of posterbox preamble
%%% HERE COME THE ACTUAL CONTENTS OF THE HEADERBOX ENVIRONMENT %%% HERE COME THE ACTUAL CONTENTS OF THE HEADERBOX ENVIRONMENT
{% posterbox handling after contents (i.e. drawing everything) {% posterbox handling after contents (i.e. drawing everything)
...@@ -813,10 +882,10 @@ ...@@ -813,10 +882,10 @@
\end{minipage}% \end{minipage}%
\end{pgfinterruptpicture}% \end{pgfinterruptpicture}%
\egroup% \egroup%
\setlength{\boxheight}{\ht\baposter@content}% \setlength{\boxheight}{\ht\baposter@box@content}%
\addtolength{\boxheight}{\dp\baposter@content}% \addtolength{\boxheight}{\dp\baposter@box@content}%
\addtolength{\boxheight}{\baposter@@boxheaderheight} % Header% \addtolength{\boxheight}{\baposter@box@@boxheaderheight} % Header%
\addtolength{\boxheight}{2\baposter@@boxpadding} % Inner Sep \addtolength{\boxheight}{2\baposter@box@@boxpadding} % Inner Sep
% %
\ifthenelse{\equal{\baposter@box@height}{bottom}}{% \ifthenelse{\equal{\baposter@box@height}{bottom}}{%
}{\ifthenelse{\equal{\baposter@box@height}{auto}}{% }{\ifthenelse{\equal{\baposter@box@height}{auto}}{%
...@@ -885,10 +954,10 @@ ...@@ -885,10 +954,10 @@
% Set coordinates relative to nw,se% % Set coordinates relative to nw,se%
\debug{Fixing Coordinates}% \debug{Fixing Coordinates}%
\path[shape=coordinate]% \path[shape=coordinate]%
(\baposter@box@name nw) +(0pt,-\baposter@@boxheaderheight) coordinate(\baposter@box@name tnw)% (\baposter@box@name nw) +(0pt,-\baposter@box@@boxheaderheight) coordinate(\baposter@box@name tnw)%
(\baposter@box@name nw |- \baposter@box@name se) coordinate(\baposter@box@name sw)% (\baposter@box@name nw |- \baposter@box@name se) coordinate(\baposter@box@name sw)%
(\baposter@box@name se |- \baposter@box@name nw) coordinate(\baposter@box@name ne)% (\baposter@box@name se |- \baposter@box@name nw) coordinate(\baposter@box@name ne)%
(\baposter@box@name ne) +(0pt,-\baposter@@boxheaderheight) coordinate(\baposter@box@name tne)% (\baposter@box@name ne) +(0pt,-\baposter@box@@boxheaderheight) coordinate(\baposter@box@name tne)%
% %
(\baposter@box@name nw) +(-0.025em,0pt) coordinate(\baposter@box@name outer nw)% (\baposter@box@name nw) +(-0.025em,0pt) coordinate(\baposter@box@name outer nw)%
(\baposter@box@name tnw) +(-0.025em,0pt) coordinate(\baposter@box@name outer tnw)% (\baposter@box@name tnw) +(-0.025em,0pt) coordinate(\baposter@box@name outer tnw)%
...@@ -901,36 +970,36 @@ ...@@ -901,36 +970,36 @@
%% Setting the bg colors of the box header %% Setting the bg colors of the box header
\baposterHeaderSetShade{headerColorOne}{headerColorTwo}{borderColor} \baposterHeaderSetShade{headerColorOne}{headerColorTwo}{borderColor}
% %
\tikzstyle{rc}=[rounded corners=\baposter@@cornerradius];% \tikzstyle{rc}=[rounded corners=\baposter@box@@cornerradius];%
\tikzstyle{src}=[rounded corners=0.5em];% \tikzstyle{src}=[rounded corners=0.5em];%
% %
%% Now that everything is set up, draw the actual box, with bg and header %% Now that everything is set up, draw the actual box, with bg and header
\begin{scope}[line width=\baposter@linewidth] \begin{scope}[line width=\baposter@box@linewidth]
%% Header% %% Header%
\debug{Header}% \debug{Header}%
\debug{Header-Shape: \baposter@headershape, header-border: \baposter@headerborder (\baposter@headerbordernr)}% \debug{Header-Shape: \baposter@box@headershape, header-border: \baposter@box@headerborder (\baposter@box@headerbordernr)}%
% TODO: Also turn this last ifcase construct into a handler function % TODO: Also turn this last ifcase construct into a handler function
% We only need to determine (fill|shade)(draw|)... % We only need to determine (fill|shade)(draw|)...
% \baposterHeaderDrawBackground{bgColorOne}{bgColorTwo}{borderColor} % \baposterHeaderDrawBackground{bgColorOne}{bgColorTwo}{borderColor}
% \baposterHeaderDrawBorder{borderColor} % \baposterHeaderDrawBorder{borderColor}
\ifcase\baposter@headerbordernr\relax% \ifcase\baposter@box@headerbordernr\relax%
% open % open
\ifthenelse{\equal{\baposter@headershade}{plain}}{ \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
\filldraw [style=header colors] \baposterHeaderGetShape;% \filldraw [style=header colors] \baposterHeaderGetShape;%
}{ }{
\shadedraw [style=header colors] \baposterHeaderGetShape;% \shadedraw [style=header colors] \baposterHeaderGetShape;%
} }
\or \or
% closed % closed
\ifthenelse{\equal{\baposter@headershade}{plain}}{ \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
\filldraw [style=header colors] \baposterHeaderGetShape -- cycle;% \filldraw [style=header colors] \baposterHeaderGetShape -- cycle;%
}{ }{
\shadedraw [style=header colors] \baposterHeaderGetShape -- cycle;% \shadedraw [style=header colors] \baposterHeaderGetShape -- cycle;%
} }
\or \or
% none % none
\ifthenelse{\equal{\baposter@headershade}{plain}}{ \ifthenelse{\equal{\baposter@box@headershade}{plain}}{
\fill [style=header colors] \baposterHeaderGetShape;% \fill [style=header colors] \baposterHeaderGetShape;%
}{ }{
\shade [style=header colors] \baposterHeaderGetShape;% \shade [style=header colors] \baposterHeaderGetShape;%
...@@ -938,7 +1007,7 @@ ...@@ -938,7 +1007,7 @@
\fi \fi
% %
%% Draw the text inside the box header: %% Draw the text inside the box header:
\baposterHeaderDrawText{\color{headerFontColor}\baposter@headerfont{\baposter@box@title}};% \baposterHeaderDrawText{\color{headerFontColor}\baposter@box@headerfont{\baposter@box@title}};%
% %
%% Text borders (border around boxes) %% Text borders (border around boxes)
\debug{Poster boxes}% \debug{Poster boxes}%
...@@ -949,8 +1018,8 @@ ...@@ -949,8 +1018,8 @@
%% Text Box% %% Text Box%
\debug{Drawing Text}% \debug{Drawing Text}%
\path (\baposter@box@name tnw) node(text) [anchor=north west, \path (\baposter@box@name tnw) node(text) [anchor=north west,
outer sep=-0.000em,text width=\boxwidth-2\baposter@@boxpadding,inner sep=\baposter@@boxpadding, outer sep=-0.000em,text width=\boxwidth-2\baposter@box@@boxpadding,inner sep=\baposter@box@@boxpadding,
text justified] {\usebox{\baposter@content}};% text justified] {\usebox{\baposter@box@content}};%
\end{scope} \end{scope}
% %
% Finally store the box name as the previous box for the next call % Finally store the box name as the previous box for the next call
...@@ -997,7 +1066,7 @@ ...@@ -997,7 +1066,7 @@
\end{minipage} \end{minipage}
};% };%
\else% Has no eye catcher \else% Has no eye catcher
\draw (image.east) node(title)[anchor=west] { {\begin{minipage}{\baposter@titleimage@textwidth}{\bf\Huge #3}\\{\Large #4}\end{minipage}} };% \draw (image.east) node(title)[anchor=west] { {\begin{minipage}{\baposter@titleimage@textwidth}{\bfseries\Huge #3}\\{\Large #4}\end{minipage}} };%
\fi \fi
}% END poster begin }% END poster begin
% The body % The body
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment