From 3782006e5b8192d3e0e55dc792f9f52fd12286e3 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 22 Apr 2015 21:38:36 +0000
Subject: beamerposter (22apr15)

git-svn-id: svn://tug.org/texlive/trunk@37009 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/beamerposter/beamerposter.sty        | 227 +++++++++++++++------
 1 file changed, 160 insertions(+), 67 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/beamerposter/beamerposter.sty')

diff --git a/Master/texmf-dist/tex/latex/beamerposter/beamerposter.sty b/Master/texmf-dist/tex/latex/beamerposter/beamerposter.sty
index ced92313bd4..a53f9a89a0c 100644
--- a/Master/texmf-dist/tex/latex/beamerposter/beamerposter.sty
+++ b/Master/texmf-dist/tex/latex/beamerposter/beamerposter.sty
@@ -1,6 +1,6 @@
-% Copyright 2007 by 
-% Philippe Dreuw <dreuw@cs.rwth-aachen.de> and 
-% Thomas Deselaers <deselaers@cs.rwth-aachen.de>
+% Copyright 2015 by 
+% Philippe Dreuw <philippe.dreuw@gmail.com> and 
+% Thomas Deselaers <deselaers@gmail.com>
 %
 % This file may be distributed and/or modified
 %
@@ -9,7 +9,16 @@
 %
 %
 % ChangeLog:
-%
+% 1.12 - bugfixed fontscale/myfontscale indention calculation
+%      - added beamerposterarticle icon format
+% 1.11 - removed incompatible paralist package, used beamer's leftmargin lengths instead for indention
+% 1.10 - improved PackageWarning and PackageInfo outputs
+% 1.09 - bugfixed the list indention problem, can be overwritten by user with the \setdefaultleftmargin command.
+%      - added 'printer' option for external printer definition files
+% 1.08 - supports external printer definition files
+%      - added grid mode option
+%      - renamed beamer specific variables
+%      - added font size normalization, so that scale=1.0 is the default font size for all DIN-A(n) sizes
 % 1.07 - bugfixed custom size handling, portrait or landscape settings are ignored now
 % 1.06 - added the type1cm package for scalable math fonts
 % 1.05 - added version check for xkeyval package
@@ -19,111 +28,132 @@
 % 1.01 - bugfixed size handling
 % 1.00 - first beamerposter release
 %
-\def\beamerposter@version{1.07}
-\def\beamerposter@date{2008/03/11}
-\def\beamerposter@msg{beamerposter: latex-beamer poster extension}
-\typeout{Package: \beamerposter@date. v.\beamerposter@version. \beamerposter@msg} 
+\def\beamerposter@name{beamerposter}
+\def\beamerposter@version{1.12}
+\def\beamerposter@date{2015/04/21}
+\def\beamerposter@msg{latex-beamer poster extension}
+\def\beamerposter@releaseinfo{\beamerposter@date \space v.\beamerposter@version \space \beamerposter@msg}
+\def\beamerposter@Error#1#2{\PackageError{\beamerposter@name}{#1}{#2}}
+\def\beamerposter@Warning#1{\PackageWarning{\beamerposter@name}{#1}}
+\def\beamerposter@Info#1{\PackageInfo{\beamerposter@name}{#1}}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerposter}[\beamerposter@date. v.\beamerposter@version. \beamerposter@msg]
+\ProvidesPackage{\beamerposter@name}[\beamerposter@releaseinfo]
 \RequirePackage{xkeyval}[2006/11/18]
 \RequirePackage{type1cm} %% get it from ftp://cam.ctan.org/tex-archive/macros/latex/contrib/type1cm.zip
+\RequirePackage{fp}
+
+\newif\if@beamerposter@portrait
+\newif\if@beamerposter@customsize
+\newif\if@beamerposter@extern
+\newif\if@beamerposter@debug
 
-\newif\ifportrait
-\newif\ifcustomsize
-\newif\ifdebug
 
 \DeclareOptionX{size}[a0]{
-  \typeout{beamerposter: checking size input, please wait.}
+  \beamerposter@Info{checking size input, please wait.}
   \XKV@cc*+[\val\nr]{#1}{a0b,a0,a1,a2,a3,a4,custom}{%
-    \typeout{beamerposter: the input \val\ \nr\ was correct, we proceed.}
+    \beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
     \ifcase\nr\relax
     %a0b
-    \setlength{\paperwidth}{119cm}
-    \setlength{\paperheight}{88cm}
-    \setlength{\textwidth}{116cm}
-    \setlength{\textheight}{88cm}
+    \edef\paperwidthValue{119}
+    \edef\paperheightValue{88}
+    \edef\textwidthValue{116}
+    \edef\textheightValue{88}
+    \edef\fontscale{1.0}
     \or
     %a0
-    \setlength{\paperwidth}{118.82cm}
-    \setlength{\paperheight}{83.96cm}
-    \setlength{\textwidth}{117.82cm}
-    \setlength{\textheight}{82.96cm}
+    \edef\paperwidthValue{118.82}
+    \edef\paperheightValue{83.96}
+    \edef\textwidthValue{117.82}
+    \edef\textheightValue{82.96}
+    \edef\fontscale{1.0}
     \or
     %a1
-    \setlength{\paperwidth}{83.96cm}
-    \setlength{\paperheight}{59.4cm}
-    \setlength{\textwidth}{82.96cm}
-    \setlength{\textheight}{58.4cm}
+    \edef\paperwidthValue{83.96}
+    \edef\paperheightValue{59.4}
+    \edef\textwidthValue{82.96}
+    \edef\textheightValue{58.4}
+    \edef\fontscale{0.70710678}    % fontscale=(1/sqrt(2))^1
     \or
     %a2
-    \setlength{\paperwidth}{59.4cm}
-    \setlength{\paperheight}{41.98cm}
-    \setlength{\textwidth}{58.4cm}
-    \setlength{\textheight}{40.98cm}
+    \edef\paperwidthValue{59.4}
+    \edef\paperheightValue{41.98}
+    \edef\textwidthValue{58.4}
+    \edef\textheightValue{40.98}
+    \edef\fontscale{0.5}           % fontscale=(1/sqrt(2))^2
     \or
     %a3
-    \setlength{\paperwidth}{41.98cm}
-    \setlength{\paperheight}{29.7cm}
-    \setlength{\textwidth}{40.98cm}
-    \setlength{\textheight}{28.7cm}
+    \edef\paperwidthValue{41.98}
+    \edef\paperheightValue{29.7}
+    \edef\textwidthValue{40.98}
+    \edef\textheightValue{28.7}
+    \edef\fontscale{0.35355339}    % fontscale=(1/sqrt(2))^3
     \or
     %a4
-    \setlength{\paperwidth}{29.7cm}
-    \setlength{\paperheight}{21.0cm}
-    \setlength{\textwidth}{28.7cm}
-    \setlength{\textheight}{20.0cm}
+    \edef\paperwidthValue{29.7}
+    \edef\paperheightValue{21.0}
+    \edef\textwidthValue{28.7}
+    \edef\textheightValue{20.0}
+    \edef\fontscale{0.25}          % fontscale=(1/sqrt(2))^4
     \or
-    \customsizetrue
+    \@beamerposter@customsizetrue
     \fi    
   }{%
-    \PackageWarning{beamerposter}{the input \val\ was incorrect and was ignored.}
+    \beamerposter@Warning{the input \val\ was incorrect and was ignored.}
   }%
-  \typeout{beamerposter: finished size input check.}
+  \beamerposter@Info{finished size input check.}
 }
 \DeclareOptionX{orientation}[portrait]{
-  \typeout{beamerposter: checking orientation input, please wait.}
+  \beamerposter@Info{checking orientation input, please wait.}
   \XKV@cc*+[\val\nr]{#1}{portrait,landscape}{%
-    \typeout{beamerposter: the input \val\ \nr\ was correct, we proceed.}
+    \beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
     \ifcase\nr\relax
-    \portraittrue
+    \@beamerposter@portraittrue
     \or
-    \portraitfalse
+    \@beamerposter@portraitfalse
     \fi    
   }{%
-    \PackageWarning{beamerposter}{the input \val\ was incorrect and was ignored.}
+    \beamerposter@Warning{the input \val\ was incorrect and was ignored.}
   }%
-  \typeout{beamerposter: finished orientation check.}
+  \beamerposter@Info{finished orientation check.}
 }
-\DeclareOptionX{scale}[1.0]{\edef\myfontscale{#1}\typeout{beamerposter: myfontscale=\myfontscale}}
-\DeclareOptionX{width}{\edef\customwidth{#1}\typeout{beamerposter: custom poster width=\customwidth}}
-\DeclareOptionX{height}{\edef\customheight{#1}\typeout{beamerposter: custom poster height=\customheight}}
-\DeclareOptionX{debug}{\typeout{beamerposter: enabled debug mode}\debugtrue}
-\DeclareOptionX*{\PackageWarning{beamerposter}{Unknown option ignored: \CurrentOption}}
+\DeclareOptionX{scale}[1.0]{\edef\myfontscale{#1}\beamerposter@Info{myfontscale=\myfontscale}}
+\DeclareOptionX{width}{\edef\customwidth{#1}\beamerposter@Info{custom poster width=\customwidth}}
+\DeclareOptionX{height}{\edef\customheight{#1}\beamerposter@Info{custom poster height=\customheight}}
+\DeclareOptionX{debug}{\beamerposter@Info{enabled debug mode}\@beamerposter@debugtrue}
+\DeclareOptionX{grid}{\beamerposter@Info{enabling grid}\beamertemplategridbackground[1cm]}% Display a grid to help align images
+\DeclareOptionX{printer}{\edef\printerToUse{#1}\@beamerposter@externtrue}
+\DeclareOptionX*{\beamerposter@Warning{Unknown option ignored: \CurrentOption}}
 %\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{beamer}}
 \ExecuteOptionsX{size=a0,scale=1.0}
 \ProcessOptionsX\relax
 
-\ifdebug
-  \RequirePackage[debug]{fp}
-\else
-  \RequirePackage{fp}
+%% enable debug mode for fp package (mainly for upn functions)
+\if@beamerposter@debug
+  \FPdebugtrue  
 \fi
 
+%% normalize scale depending on poster size
+\FPupn{\myfontscale}{myfontscale fontscale * 2 round}
+
 %% swap sizes for portrait orientation
-\ifportrait
+\if@beamerposter@portrait
   \newdimen\tmp
-  \setlength{\tmp}{\paperwidth}
-  \setlength{\paperwidth}{\paperheight}
+  \setlength{\tmp}{\paperwidthValue cm}
+  \setlength{\paperwidth}{\paperheightValue cm}
   \setlength{\paperheight}{\tmp}
-  \setlength{\tmp}{\textwidth}
-  \setlength{\textwidth}{\textheight}
+  \setlength{\tmp}{\textwidthValue cm}
+  \setlength{\textwidth}{\textheightValue cm}
   \setlength{\textheight}{\tmp}
-\else\relax
+\else
+  \setlength{\paperwidth}{\paperwidthValue cm}
+  \setlength{\paperheight}{\paperheightValue cm}
+  \setlength{\textwidth}{\textwidthValue cm}
+  \setlength{\textheight}{\textheightValue cm}
 \fi
 
 %% overwrite dimensions if custom size
-\ifcustomsize
+\if@beamerposter@customsize
   \setlength{\paperwidth}{\customwidth cm}
   \setlength{\paperheight}{\customheight cm}
   \FPupn{\resulttextwidth}{1 customwidth  -}
@@ -139,10 +169,9 @@
 \setlength{\oddsidemargin}{-25.4 mm} % -1in +0.4cm
 
 %% For the page layout
-\ifdebug
-\typeout{beamerposter: paperwidth=\the\paperwidth, paperheight=\the\paperheight}
-\typeout{beamerposter: textwidth=\the\textwidth, textwidth=\the\textheight}
-\fi
+\beamerposter@Info{paperwidth=\the\paperwidth, paperheight=\the\paperheight}
+\beamerposter@Info{textwidth=\the\textwidth, textwidth=\the\textheight}
+\beamerposter@Info{fontscale=\fontscale, myfontscale=\myfontscale}
 \geometry{
   paperwidth=\the\paperwidth,
   paperheight=\the\paperheight,
@@ -153,6 +182,40 @@
   foot=0.5cm  % 
 }
 
+%%
+%% printer definition file example 'rwth-glossy-uv.df':
+%% ----
+%% \typeout{beamerposter: RWTH RZ printer, glossy paper, UV resistant, maximum settings}
+%% \edef\printermaxwidthValue{108} %unit should be cm
+%% \newlength{\printermaxwidth}
+%% \setlength{\printermaxwidth}{\printermaxwidthValue cm}
+%% ----
+%%
+%% now load printer definitions from file (e.g. \usepackage[printer=rwth-glossy-uv.df]{beamerposter}")
+\if@beamerposter@extern
+  \InputIfFileExists{\printerToUse}{\typeout{load \printerToUse}}{\beamerposter@Error{\printerToUse\space not found!}{Please use another printer definition file}}
+  \ifx\printermaxwidthValue\@empty%
+    \relax%
+  \else%
+    %%  @todo: calc poster ratios, scale to maximum printer size, and check if they still fit
+    %%  this here is still very basic ...
+    \FPsub{\resultmaxwidth}{\printermaxwidthValue}{\paperwidthValue}
+    \FPifneg{\resultmaxwidth}
+    \beamerposter@Error{%
+      resultmaxwidth=\resultmaxwidth \MessageBreak
+      printermaxwidthValue=\printermaxwidthValue \MessageBreak
+      paperwidthValue=\paperwidthValue \MessageBreak 
+      The specified poster dimensions might not be printable using
+      '\printerToUse'.
+    }{%
+      Try to reduce your poster dimension and have a look at the aspect ratio.
+    }
+    \else
+      \relax
+    \fi
+  \fi
+%\fi
+
 %% scalable vector fonts
 \edef\fontSizeX{12}\edef\fontSizeY{14}
 \FPupn{\resulttinyX}{myfontscale fontSizeX * 2 round}
@@ -221,3 +284,33 @@
 
 % set the normalfont (default)
 \renewcommand*{\normalfont}{\normalsize}
+
+% adapt list indention (e.g. itemize/enumeration/... see beamer docu)
+\edef\labelWidthValue{1}            % 1em label width
+\edef\labelSepValue{1}              % 1em label separator width
+\edef\indentionLevelValuei{4}       % 4em indention for first level for an A0 poster
+\edef\indentionLevelValueii{2.2}    % etc. ...
+\edef\indentionLevelValueiii{1.87}
+%\edef\indentionLevelValueiiii{1.7}
+%\edef\indentionLevelValueiiiii{1}
+%\edef\indentionLevelValueiiiiii{1}
+\FPupn{\labelWidthValue}{labelWidthValue myfontscale * 2 round}
+\FPupn{\labelSepValue}{labelSepValue myfontscale * 2 round}
+\FPupn{\indentionLevelValuei}{indentionLevelValuei myfontscale * 2 round}
+\FPupn{\indentionLevelValueii}{indentionLevelValueii myfontscale * 2 round}
+\FPupn{\indentionLevelValueiii}{indentionLevelValueiii myfontscale * 2 round}
+%\FPupn{\indentionLevelValueiiii}{indentionLevelValueiiii myfontscale * 2 round}
+%\FPupn{\indentionLevelValueiiiii}{indentionLevelValueiiiii myfontscale * 2 round}
+%\FPupn{\indentionLevelValueiiiiii}{indentionLevelValueiiiiii myfontscale * 2 round}
+\setlength{\leftmargini}{\indentionLevelValuei em}%
+\setlength{\leftmarginii}{\indentionLevelValueii em}%
+\setlength{\leftmarginiii}{\indentionLevelValueiii em}%
+\setlength{\labelwidth}{\labelWidthValue em}%
+\setlength{\labelsep}{\labelSepValue em}%
+
+% define bib item template with larger graphic
+\edef\bibIconScaleValue{2}            % begin with 2
+\FPupn{\bibIconScaleValue}{bibIconScaleValue myfontscale * 2 round}
+\defbeamertemplate{bibliography item}{beamerposterarticle}
+{\lower5pt\hbox{\scalebox{\bibIconScaleValue}{\pgfuseimage{beamericonarticle}}}}
+
-- 
cgit v1.2.3

