Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Germain-C2S
Beamer TPT NG
Commits
07bd4779
Commit
07bd4779
authored
May 17, 2020
by
Cédric Ware
Browse files
Rationalize: options and logos.
parent
8d62ebd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
texinputs/beamerthemetptnew.sty
View file @
07bd4779
...
...
@@ -16,25 +16,11 @@
\let\tpt
@save@sffamily=
\sfdefault
\RequirePackage
{
helvet
}
% FIXME déplacer.
% Trouver le compromis entre \ProcessOptions au début ou à la fin.
\defbeamertemplate
{
page in head/foot
}{
plain
}{
%
\insertframenumber
}
\defbeamertemplate
{
page in head/foot
}{
total
}{
%
\insertframenumber
/
\inserttotalframenumber
}
\defbeamertemplate
{
page in head/foot
}{
body
}{
%
\insertframenumber
/
\insertbodyframenumber
}
% Options du package.
\newif\iftpt
@infolines
\tpt
@infolinesfalse
\newif\iftpt
@navsymbols
\tpt
@navsymbolstrue
\newif\iftpt
@titleaffiliation
\tpt
@titleaffiliationfalse
\newif\iftpt
@affiliation
\tpt
@affiliationfalse
\newif\iftpt
@logosaclay
\tpt
@logosaclayfalse
\newif\iftpt
@logoipp
\tpt
@logoippfalse
\tptthemekeys
{
%
infolines/.is if=tpt@infolines,
navsymbols/.is choice,
...
...
@@ -52,8 +38,18 @@
\tpt
@navsymbolsfalse
}
,
titleaffiliation/.is if=tpt@titleaffiliation,
affiliation/.is if=tpt@affiliation,
logosaclay/.is if=tpt@logosaclay,
logoipp/.is if=tpt@logoipp,
logosaclay/.code=
{
%
\affiliationlogoinfooter
{
logo-upsay-e
}
\affiliationlogointitle
{
logo-upsay-violet
}
\tpt
@affiliationtrue
\tpt
@titleaffiliationtrue
}
,
logoipp/.code=
{
%
\affiliationlogoinfooter
{
logo-IPP-small
}
\affiliationlogointitle
{
logo-IMT
}
\tpt
@affiliationtrue
\tpt
@titleaffiliationtrue
}
,
helvet/.is choice,
helvet/.default=true,
helvet/false/.code=
{
\let\sfdefault
=
\tpt
@save@sffamily
\normalfont
}
,
...
...
@@ -67,7 +63,7 @@
framecount=false,
% ... mais par défaut il est mis à "false".
bodyframecount/.style=
{
framecount=body
}
,
}
\ProcessPgfOptions
{
/tpt theme
}
%
\ProcessPgfOptions
à la fin du package, après les définitions.
\mode
<presentation>
...
...
@@ -78,10 +74,26 @@
% Une macro pour aider.
\newcommand*\tpt
@deflength[2]
{
\newlength
{
#1
}
\setlength
{
#1
}{
#2
}}
% Taille des logos.
% Taille des logos
dans la page de titre
.
\tpt
@deflength
{
\titlelogowidth
}{
2cm
}
\tpt
@deflength
{
\titleaffiliationlogowidth
}{
2cm
}
% Taille des logos en bas de page.
\tpt
@deflength
{
\footerlogomargin
}{
1em
}
% Marge horizontale droite.
\tpt
@deflength
{
\footerlogoheight
}{
.05118
\paperwidth
}
% Hauteur des logos.
\AtEndOfPackage
{
%
% La hauteur est 5% de la page s'il y a des logos d'affiliation, 7,8% sinon.
% FIXME Est-ce vraiment ce qu'on veut ?
% FIXME Ne fonctionne pas si les logos sont modifiés au vol dans le document.
\ifx\insertAffLogo\@
empty
\setlength
{
\footerlogoheight
}{
.07812
\paperwidth
}
%
\fi
}
%
% Déclaration des logos.
%
% le logo de la page de titre
\pgfdeclareimage
[width=\titlelogowidth]
{
LogoFirst
}{
logo-tp-ipp.pdf
}
% pour positionner ce logo par rapport au coin sup. gauche
...
...
@@ -91,53 +103,24 @@
\newcommand\extralogo
[1]
{
\gdef\insertextralogo
{
#1
}}
\extralogo
{}
% Pour Modifier les logos des affiliations
% Il faut que footerlogoheight soit défini avant qu'on l'utilise... Ici la valeur avec affiliation
% Quand le logo des affiliations est utilisé, il faut réduire la taille à 5% de la largeur de la slide
\tpt
@deflength
{
\footerlogoheight
}{
.05118
\paperwidth
}
\tpt
@deflength
{
\footerlogomargin
}{
1em
}
% Marge horizontale droite.
% Pour modifier les logos des affiliations.
% FIXME rationaliser.
% Au cas où le nom du fichier contiendrait des _ on passe par une macro pour modifier
% son interprétation
\def\affiliationlogoinfooter
{
\begingroup\catcode
`
\_
=12
\REALaffiliationlogoinfooter
}
\newcommand
\
REALaffiliationlogoinfooter
[
1
]
{
%
\
pgfdeclareimage
[height=\footerlogoheight]
{
footerAffiliation
}{
#1
}
%
\def\affiliationlogoinfooter
{
\begingroup\catcode
`
\_
=12
\
@
REALaffiliationlogoinfooter
}
\newcommand
*\@
REALaffiliationlogoinfooter[
2][height=
\footerlogoheight
]
{
%
\
gdef\insertAffLogo
{
\includegraphics
[#1]
{
#2
}
}
%
\endgroup
%
}
\def\insertAffLogo
{}
\def\affiliationlogointitle
{
\begingroup\catcode
`
\_
=12
\REALaffiliationlogointitle
}
\newcommand\REALaffiliationlogointitle
[
1
]
{
%
\
pgfdeclareimage
[width=\t
itle
a
ff
iliationlogowidth]
{
titleAffiliation
}{
#1
}
%
\def\affiliationlogointitle
{
\begingroup\catcode
`
\_
=12
\
@
REALaffiliationlogointitle
}
\newcommand\
@
REALaffiliationlogointitle[
2][width=
\titleaffiliationlogowidth
]
{
%
\
gdef\insertT
itle
A
ff
Logo
{
\includegraphics
[#1]
{
#2
}
}
%
\endgroup
%
}
% Affiliation par défaut IP-Paris sans IMT sur page de titre
\iftpt
@logoipp
\affiliationlogoinfooter
{
logo-IPP-small
}
\affiliationlogointitle
{
logo-IMT
}
\tpt
@affiliationtrue
\tpt
@titleaffiliationtrue
\fi
\iftpt
@logosaclay
\affiliationlogoinfooter
{
logo-upsay-e
}
\affiliationlogointitle
{
logo-upsay-violet
}
\tpt
@affiliationtrue
\tpt
@titleaffiliationtrue
\fi
\iftpt
@titleaffiliation
\newcommand\insertTitleAffLogo
{
\hspace
{
\logoskiph
}
\pgfuseimage
{
titleAffiliation
}
\vspace
{
.18
\paperheight
}}
\else
\newcommand\insertTitleAffLogo
{}
\fi
\iftpt
@affiliation
\newcommand\insertAffLogo
{
\hspace
{
1em
}
\pgfuseimage
{
footerAffiliation
}}
\else
% le logo fait 1cm de haut soit 7.8% des 12.8cm de large d'un beamer 4/3 standard
\setlength
{
\footerlogoheight
}{
.07812
\paperwidth
}
\newcommand\insertAffLogo
{}
\fi
\def\insertTitleAffLogo
{}
\logo
{
\includegraphics
[height=\footerlogoheight]
{
logo-tp-ipp
}}
...
...
@@ -208,7 +191,9 @@
\insertextralogo
}
\par
%
\vfill
{}
\vfill
{}
%
\insertTitleAffLogo
\iftpt
@titleaffiliation
\hspace*
{
\logoskiph
}
\insertTitleAffLogo\vspace
{
.18
\paperheight
}
%
\fi
\end{minipage}
\end{column}
\begin{column}
{
.6
\paperwidth
}
...
...
@@ -322,6 +307,20 @@
}
%
}
% Templates pour le nº de page.
\defbeamertemplate*
{
page in head/foot
}{
plain
}{
%
% Juste le nº.
\insertframenumber
}
\defbeamertemplate
{
page in head/foot
}{
total
}{
%
% Avec le nombre total de pages.
\insertframenumber
/
\inserttotalframenumber
}
\defbeamertemplate
{
page in head/foot
}{
body
}{
%
% Avec le nombre de pages hors annexe (défini plus bas).
\insertframenumber
/
\insertbodyframenumber
}
%
% Le bas de page proprement dit : les boîtes et le logo dans la footline.
% Le logo est typesetté dans une boîte pour calculer sa largeur et
...
...
@@ -331,24 +330,29 @@
\defbeamertemplate*
{
footline
}{
tpt default
}{
%
%
% On commence par typesetter le logo pour calculer la largeur restante.
\sbox\tpt
@tempbox
{
\insertlogo\insertAffLogo
}
%
\sbox\tpt
@tempbox
{
\insertlogo\
iftpt
@affiliation
\hspace
{
1em
}
\
insertAffLogo
\fi
}
%
\setlength\@
tempdima
{
\dimexpr
\paperwidth
-
\wd\tpt
@tempbox
\relax
}
%
%
% FIXME nav symbols
% Une petite marge verticale entre le corps du texte et le bas de page.
\vskip
2pt
%
%
% Symboles de navigation si besoin.
\iftpt
@navsymbols
\vskip
2pt
%
\begin{beamercolorbox}
%
[wd=
\@
tempdima,
\tpt
@navsymbols@align]
{
navigation symbols
}
\usebeamertemplate***
{
navigation symbols
}
%
\end{beamercolorbox}
\fi
%
% Les boîtes de bas de page et le logo.
\mbox
{
%
\tptbottomboxes
{
\@
tempdima
}
%
\hspace*
{
\footlinespacing
}
%
\hfill
%
\smash
{
\raisebox
{
\tptfooterlogoyshift
}{
\usebox
{
\tpt
@tempbox
}}}
%
}
%
%
% Marge verticale avec le bord inférieur de la page.
\vskip\tptbottomboxesmargin
%
}
...
...
@@ -472,3 +476,6 @@
\mode
<all>
% On finit par traiter les options du package maintenant que tout est défini.
\ProcessPgfOptions
{
/tpt theme
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment