You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

302 lines
10 KiB

%****************************************
% Style for LRI posters
% Michel Beaudouin-Lafon (mbl@lri.fr)
% v0.1 20nov2008
%****************************************
\ProvidesPackage{lriposter}[2008/11/20 v0.1 ]
\NeedsTeXFormat{LaTeX2e}
%---------- Page geometry ------------------------------
\usepackage{geometry}
\geometry{paper=a3paper,left=1cm,right=1cm,top=0.5cm,bottom=0.5cm}
%---------- Fonts and special characters ------------------------------
% change fonts: see packages psnfss & psnfssx
\usepackage[T1]{fontenc}
%---------- Basic packages ------------------------------
\usepackage{calc}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{multicol} % to have parts of the document in multicolumns
\usepackage{fancybox} % to create framed text
%---------- General settings ------------------------------
% --- IMPORTANT ---
% the caller MUST have defined the \templatedir variable with the path to the template.
% the default value for the layout of the SVN repository would be:
% \def\templatedir{../../templates/lri2008}
% \usepackage{\templatedir/lriposter}
% the directory holding the template images.
\def\Poster@ImageDir{\templatedir/img}
% the width of the banner and the fotter (a bit wider than the main text)
\newlength\bannerwidth\setlength\bannerwidth{\textwidth + 1cm}
% emphasized text is set in \emphcolor
\renewcommand{\emph}[1]{{\color{\emphcolor}\textbf{#1}}}
% paragraphs are not indented and are separated by 2ex
\setlength\parskip{2ex plus 0.2ex minus 0.2ex}
\setlength\parindent{0pt}
% some useful colors
\definecolor{lrilogored}{RGB}{200,50,46}
\definecolor{lrilogoyellow}{RGB}{236,216,182}
\definecolor{lrilogogreen}{RGB}{160,162,130}
\definecolor{lrilogogray}{RGB}{130,131,132}
\definecolor{lrired}{rgb}{0.64,0.25,0.23}% burgundy
\definecolor{lriblue}{RGB}{58,80,135}% concord blue
\definecolor{lrigreen}{RGB}{90,122,109}% olive green
\definecolor{lriyellow}{RGB}{237,230,204}% sand
%\definecolor{lribrown}{RGB}{163,137,91}
% attempts at getting some kind of gold color for the yellow template...
%\definecolor{lrigold}{RGB}{193,160,4}
%\definecolor{lrigold}{RGB}{199,173,95}
%\definecolor{lrigold}{RGB}{255,208,110}
%\definecolor{lrigold}{RGB}{240,194,104}
%\definecolor{lrigold}{RGB}{240,184,64}
%\definecolor{lrigold}{RGB}{231,200,122}
%\definecolor{lrigold}{RGB}{223,193,118}
%\definecolor{lrigold}{RGB}{220,149,17}
\definecolor{lrigold}{RGB}{217,147,17}
\definecolor{gray}{cmyk}{0,0,0,0.6}
\definecolor{lightgray}{cmyk}{0,0,0,0.15}
%%\definecolor{lrired}{RGB}{68,121,119}% for banner4 - green
%%\definecolor{lrired}{RGB}{90,122,133}% for banner4 - french blue
% define the banner image
\newcommand{\posterbanner}[1]{
\gdef\Poster@Banner{\Poster@ImageDir/#1}
}
% define the highlight color, which is typically used for section titles and emphasized text
% You can call this in the middle of the poster, typically before a section
\newcommand{\sethighlightcolor}[1]{
\gdef\highlightcolor{#1}
}
% define the poster colors from the main color
% The main color becomes the highlight color
% The variables defined here can be redefined anywhere in the poster
\newcommand{\postersettings}[1]{
\sethighlightcolor{#1}
\gdef\emphcolor{\highlightcolor}
\gdef\bannercolor{\highlightcolor}
\gdef\titlecolor{white}
\gdef\subtitlecolor{gray}
\gdef\footercolor{\highlightcolor}
\gdef\sectioncolor{\highlightcolor}
\gdef\subsectioncolor{gray}
\gdef\paragraphcolor{gray}
\gdef\boxcolor{lriyellow}
}
% the four main settings for the color and banner image
\newcommand{\redposter}{
\postersettings{lrired}
\posterbanner{redbanner.jpg}
}
\newcommand{\greenposter}{
\postersettings{lrigreen}
\posterbanner{greenbanner.jpg}
}
\newcommand{\blueposter}{
\postersettings{lriblue}
\posterbanner{bluebanner.jpg}
}
\newcommand{\yellowposter}{
\postersettings{lrigold}
\posterbanner{yellowbanner.jpg}
}
% default to red poster
\redposter
%========== \makeposter macro ========================================
% the commands that can be used before \makeposter
\newcommand{\posterlang}[1]{\gdef\Poster@Lang{-#1}}
% one of \redposter, \greenposter or \blueposter should be used
% \title can be used (it's already defined by LaTeX)
\newcommand{\titleright}[1]{\gdef\Poster@TitleRight{#1}}
\renewcommand{\subtitle}[1]{\subtitletrue\gdef\Poster@Subtitle{#1}}
\newcommand{\subtitleright}[1]{\subtitletrue\gdef\Poster@SubtitleRight{#1}}
\newcommand{\group}[1]{\gdef\Poster@Group{#1}}
\newcommand{\inrialogo}{\inrialogotrue}
\newcommand{\titleLR}[2]{\title{#1}\titleright{#2}}
\newcommand{\subtitleLR}[2]{\subtitle{#1}\subtitleright{#2}}
% inner commands to manage \makeposter
\newif\ifinrialogo
\newif\ifsubtitle
\def\Poster@Lang{}
\def\Poster@Group{\hspace*{1cm}}
\def\Poster@TitleRight{}
\def\Poster@SubtitleRight{}
% the \makeposter macro to output the header and footer
\newcommand{\makeposter}{
\setlength{\unitlength}{1cm}
\begin{picture}(0,0)
% top banner + title and subtitle if any
\put(-0.5,-3){\includegraphics[width=\bannerwidth,height=3.5cm]{\Poster@Banner}}
\put(-0,-3){\includegraphics[width=3cm]{\Poster@ImageDir/logoLRI.pdf}}
\put(-0.5,-4.7){\color{\bannercolor}\rule{\bannerwidth}{1.7cm}}
\put(0,-4.05){\parbox[l]{\bannerwidth}{\textcolor{\titlecolor}{\Huge\textsf\@title}}}
\put(-1,-4.05){\parbox[c]{\bannerwidth}{\begin{flushright}\textcolor{\titlecolor}{\Large\textsf\Poster@TitleRight}\end{flushright}}}
\put(0,-5.4){\ifsubtitle\parbox[c]{\bannerwidth}{\textcolor{\subtitlecolor}{\Large\textsf\Poster@Subtitle}}\fi}
\put(-1,-5.4){\ifsubtitle\parbox[c]{\bannerwidth}{\begin{flushright}\textcolor{\subtitlecolor}{\Large\textsf\Poster@SubtitleRight}\end{flushright}}\fi}
% footer: line with logos underneath and the "i"+group name at the bottomright
\put(-0.5,-39){\color{\footercolor}\rule{\bannerwidth}{.25cm}}
\put(-0.5,-39.6){\parbox[c]{\bannerwidth}{\begin{flushright}
\includegraphics[height=0.05\textwidth]{\Poster@ImageDir/logoUPS.pdf}
\hfill\includegraphics[height=0.05\textwidth]{\Poster@ImageDir/logoCNRS\Poster@Lang.pdf}
\ifinrialogo\hfill\includegraphics[height=0.05\textwidth]{\Poster@ImageDir/logoINRIA\Poster@Lang.pdf}\fi
\hfill\includegraphics[height=0.07\textwidth]{\Poster@ImageDir/i.pdf}\hspace{-2mm}%
\raisebox{2mm}{\textsf{\Large{\Poster@Group}}}\end{flushright}}
}
\end{picture}
\ifsubtitle\vspace*{5.6cm}\else\vspace*{4.6cm}\fi
}
%========== Chapter and Section titles ========================================
\usepackage{titlesec}
% specify whether section titles are displayed with a line underneath them (defaults to true)
% you can call \titleruletrue and \titlerulefalse anywhere and it will affect all subsequent section titles
\newif\iftitlerule
\titleruletrue
% define the format of section titles: colored text, no numbering, with a rule below if titlerule is true
\titleformat{\section}{\normalfont\LARGE\sffamily\bfseries\color{\sectioncolor}}{}{0pt}{}%
[\iftitlerule{\color{\sectioncolor}\titlerule[2pt]\vspace{-7pt}}\fi]
% define the format of subsection titles: colored text, no numbering
\titleformat{\subsection}{\normalfont\Large\sffamily\bfseries\color{\subsectioncolor}}{}{0pt}{}
% define the format of paragraph titles: colored text, inline with the rest of the paragraph
\titleformat{\paragraph}[runin]{\normalfont\large\sffamily\bfseries\color{\paragraphcolor}}{}{1em}{}
%========== Multi columns layout ========================================
% the separation between columns for the 2- and 3-column layouts - these can be changed
\newlength\twocolsep\setlength\twocolsep{1.5cm}
\newlength\threecolsep\setlength\threecolsep{1cm}
% the width of the text in one, two and three columns - don't change these!
\newlength\onecolwidth\setlength\onecolwidth{\textwidth}
\newlength\twocolwidth\setlength\twocolwidth{(\textwidth - \twocolsep)/2}
\newlength\threecolwidth\setlength\threecolwidth{(\textwidth - 2\threecolsep)/3}
% the current width of the text - don't change this!
\newlength\colwidth\setlength\colwidth{\onecolwidth}
% To format a section in two-columns, do this (the title spans the two columns):
% \twocolsection{<sectiontitle}
% text .. text ..
% \columnbreak % force a column break (if needed)
% text .. text ..
% \onecol
%
% To format text (without a title) in two-columns, do this:
% \twocoltext
% text .. text ..
% \columnbreak % force a column break (if needed)
% text .. text ..
% \onecol
%
% Three-column format is achieved similarly with
% \threecolsection{<sectiontitle>} ... \onecol
% \threecoltext ... \onecol
% This can be used to have two columns of text and an in the third column.
% start a section with 2-column format
% the argument is the title of the section
\newcommand{\twocolsection}[1]{
\setlength\columnsep{\twocolsep}\setlength\colwidth{\twocolwidth}
\begin{multicols}{2}[\section{#1}]
\raggedcolumns
}
% start 2-column text
\newcommand{\twocoltext}{
\setlength\columnsep{\twocolsep}\setlength\colwidth{\twocolwidth}
\begin{multicols}{2}
\raggedcolumns
}
% start a section with 3-column format
% the argument is the title of the section
\newcommand{\threecolsection}[1]{
\setlength\columnsep{\threecolsep}\setlength\colwidth{\threecolwidth}
\begin{multicols}{3}[\section{#1}]
\raggedcolumns
}
% start 3-column text
\newcommand{\threecoltext}{
\setlength\columnsep{\threecolsep}\setlength\colwidth{\threecolwidth}
\begin{multicols}{3}
\raggedcolumns
}
% end of 2- or 3-column section or text
\newcommand{\onecol}[1]{
\end{multicols}
\setlength\colwidth{\onecolwidth}
}
%========== Boxes ========================================
% The size of the margin around the text when it is put inside a colored box - can be changed
\newlength\coloredboxmargin\setlength\coloredboxmargin{0.4cm}
% The width of the text inside the coloredbox
\newlength\coloredboxwidth
% To format text on a colored background:
% \begin{coloredbox}{<colorname>}
% ... text ...
% \end{coloredbox}
%
% Note that in multicolumn layout, you can only put text in colored box within a column,
% i.e. you cannot have a coloredbox environment around a \twocoltext ... \onecol block.
% (If someone knows how to fix this let me know!)
%
\newenvironment{coloredbox}[1]%
{\setlength\coloredboxwidth{\colwidth - 2\coloredboxmargin}%
\def\Box@color{#1}\setlength{\fboxsep}{\coloredboxmargin}\begin{Sbox}\begin{minipage}{%
\coloredboxwidth}\setlength{\parskip}{2ex}\vspace{-\parskip}}%
{\end{minipage}\end{Sbox}\colorbox{\Box@color}{\TheSbox}}
% A shortcut for a gray background:
% \begin{graybox}
% ...
% \end{graybox}
%
\newenvironment{graybox}%
{\begin{coloredbox}{lightgray}}%
{\end{coloredbox}}
% A shortcut for a background:
% \begin{cbox}
% ...
% \end{cbox}
%
\newenvironment{cbox}%
{\begin{coloredbox}{\boxcolor}}%
{\end{coloredbox}}