Skip to content

Commit c71a0d9

Browse files
committed
releasing v2.3.0
2 parents 0858f80 + 8dfa438 commit c71a0d9

File tree

6 files changed

+178
-52
lines changed

6 files changed

+178
-52
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# 2
22

3+
## 2.3
4+
5+
### 2.3.0
6+
7+
* Aspect ratio 4:3 now available (default is still 16:9 and advised)
8+
* Section title in the header
9+
310
## 2.2
411

512
### 2.2.1

install/unix.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ cd "$(readlink -m "$0/../../")" # chdir to the root directory of the package arc
44
TEXMFLOCAL="$(kpsewhich -var-value TEXMFLOCAL)"
55
PACKAGE="$TEXMFLOCAL/tex/latex/beamerx/"
66
FONTS="$TEXMFLOCAL/fonts/truetype/"
7-
PERMS="Dg+s,ug+w,o-w,+X"
7+
PERMS="Dg+s,ug+w,o-w,+X,+r"
88
mkdir -p "$PACKAGE" "$FONTS"
9+
printf "%s> Installing source files...%s\n" "$(tput setaf 2)" "$(tput sgr0)"
910
rsync --recursive --exclude-from=install/.exclude --delete-excluded --chmod=$PERMS source/ $PACKAGE/
11+
printf "%s> Installing font files...%s\n" "$(tput setaf 2)" "$(tput sgr0)"
1012
rsync --recursive --update --chmod=$PERMS fonts/ $FONTS/
11-
texhash || mktexlsr
13+
printf "%s> Updating database...%s\n" "$(tput setaf 2)" "$(tput sgr0)"
14+
{ texhash || mktexlsr; } >/dev/null
15+
printf "%sDONE !%s\n" "$(tput setaf 2)" "$(tput sgr0)"

source/beamerx.sty

Lines changed: 128 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
\NeedsTeXFormat{LaTeX2e}
2-
\ProvidesPackage{beamerx}[2017/01/26 v2.2.1, standard scientific slideshows layout for Ecole polytechnique (Palaiseau,France).]
2+
\ProvidesPackage{beamerx}[2017/01/31 v2.3.0, standard scientific slideshows layout for Ecole polytechnique (Palaiseau,France).]
33

44
%=======================================================================
55
% Declaration des options
@@ -11,16 +11,24 @@
1111
}
1212
\DeclareOption{simplehead}{%
1313
\AtEndOfPackage{%
14-
\renewcommand{\resetbackgroundcanvas}{%
15-
\setbeamertemplate{background canvas}{}
16-
}
14+
\renewcommand{\includebeamerxarmes}{}%
15+
}
16+
}
17+
\DeclareOption{notochead}{%
18+
\AtEndOfPackage{%
19+
\renewcommand{\includebeamerxsection}{}%
1720
}
1821
}
1922
\DeclareOption{simplebloc}{%
2023
\AtEndOfPackage{%
2124
\renewcommand{\beamerxblockheader}{}
2225
}
2326
}
27+
\DeclareOption{oldscreen}{%
28+
\AtEndOfPackage{%
29+
\oldscreen{}\applyscreen{}%
30+
}
31+
}
2432
\ProcessOptions*
2533
%=======================================================================
2634
% Package requis
@@ -62,6 +70,31 @@
6270
}
6371
\fi
6472
%=======================================================================
73+
% Definition des longueurs
74+
%=======================================================================
75+
\newcounter{bmrX}\newcounter{bmrY}
76+
77+
\newcounter{bmrW}\newcounter{bmrH}
78+
\setcounter{bmrW}{320}
79+
80+
\newcounter{bmrXmargin}
81+
\setcounter{bmrXmargin}{12}
82+
\newlength\beamerxmargin%
83+
\setlength\beamerxmargin{\thebmrXmargin\paperwidth/\thebmrW} % 6 units
84+
85+
\newcounter{bmrTPmargin}
86+
\setcounter{bmrTPmargin}{6}
87+
88+
\newcommand\oldscreen{% 4:3 ratio
89+
\setcounter{bmrH}{240}
90+
}
91+
\newcommand\newscreen{% 16:9 ratio
92+
\setcounter{bmrH}{180}
93+
}
94+
\newcommand\applyscreen{%
95+
}
96+
\newscreen{}\applyscreen{}
97+
%=======================================================================
6598
% Definition des couleurs
6699
%=======================================================================
67100
\definecolor{bleu303}{RGB}{0,62,92}
@@ -236,6 +269,10 @@
236269
% Definition du theme beamer
237270
%=======================================================================
238271
%---------- Parametres generaux
272+
\newcommand\defaultheadcolor{%
273+
\colorlet{xhdcolor}{bleu303}%
274+
}
275+
\defaultheadcolor%
239276
\newcommand\resetcolors{%
240277
\colorlet{xfgcolor}{black}%
241278
\colorlet{xbgcolor}{white}%
@@ -247,8 +284,6 @@
247284
}
248285
\resetcolors%
249286

250-
\newlength\beamerxmargin%
251-
\setlength\beamerxmargin{\textheight/15} % 6 units
252287
\setbeamercovered{transparent=40}
253288
\setlength\fboxsep{1ex}
254289

@@ -287,13 +322,33 @@
287322
}
288323
}
289324

325+
\newcommand\includebeamerxarmes{\color{gris428}\includegraphics[height=\paperheight/6,keepaspectratio]{beamerxarmes}}
326+
\newcommand\insertsectionHEAD{\expandafter\insertsectionHEADaux\insertsectionhead}
327+
\newcommand\insertsectionHEADaux[3]{#1{#2}{\MakeUppercase{#3}}}
328+
\newcommand\includebeamerxsection{%
329+
\ifnum \thesection>0
330+
{%
331+
\renewcommand\baselinestretch{.5}\color{xhdcolor}\rule{.8\textwidth}{.5ex}\\[-2ex]
332+
\raisebox{-\height}{%
333+
\begin{minipage}{\textwidth}\tiny\flushright%
334+
\hspace*{0mm}\insertsectionHEAD%
335+
\end{minipage}%
336+
}%
337+
}\\[.2ex]%
338+
\else%
339+
\fi%
340+
}
290341
\newcommand\resetbackgroundcanvas{%
291342
\setbeamertemplate{background canvas}{%
292-
\setlength{\unitlength}{0.00625\paperwidth}%
293-
\begin{picture}(160,90)%
294-
\put(154,84){%
343+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
344+
\begin{picture}(\thebmrW,\thebmrH)%
345+
\setcounter{bmrX}{\thebmrW-\thebmrXmargin}\setcounter{bmrY}{\thebmrH-\thebmrXmargin}%
346+
\put(\thebmrX,\thebmrY){%
295347
\makebox(0,0)[rt]{%
296-
\color{gris428}\includegraphics[height=\paperheight/7,keepaspectratio]{beamerxarmes}%
348+
\begin{minipage}{\paperheight/5}\flushright%
349+
\includebeamerxsection{}
350+
\includebeamerxarmes{}
351+
\end{minipage}
297352
}%
298353
}%
299354
\end{picture}%
@@ -398,43 +453,48 @@
398453
}
399454
\AtBeginDocument{%
400455
\renewcommand\maketitle{%
401-
\setlength{\unitlength}{0.00625\paperwidth}%
456+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
402457
\setbeamertemplate{background canvas}{%
403458
\color{white}%
404-
\begin{picture}(160,90)%
405-
\put(80,45){%
459+
\begin{picture}(\thebmrW,\thebmrH)%
460+
\setcounter{bmrX}{\thebmrW/2}\setcounter{bmrY}{\thebmrH/2}%
461+
\put(\thebmrX,\thebmrY){%
406462
\makebox(0,0)[c]{%
407-
\includegraphics[width=\paperwidth,keepaspectratio]{beamerxbackground}%
463+
\includegraphics[height=\paperheight,keepaspectratio]{beamerxbackground}%
408464
}%
409465
}%
410-
\put(6,45){%
466+
\setcounter{bmrX}{2*\thebmrTPmargin}%
467+
\put(\thebmrX,\thebmrY){%
411468
\makebox(0,0)[l]{%
412469
\includebeamerxlogo{}%
413470
}%
414471
}%
415-
\put(3,3){%
472+
\put(\thebmrTPmargin,\thebmrTPmargin){%
416473
\makebox(0,0)[lb]{%
417-
\begin{minipage}{0.5\paperwidth}\noindent%
474+
\begin{minipage}{.5\paperwidth}\noindent%
418475
\sffamily\footnotesize\polyauteursave\hspace*{0pt}%
419476
\end{minipage}%
420477
}%
421478
}%
422-
\put(157,3){%
479+
\setcounter{bmrX}{\thebmrW-\thebmrTPmargin}%
480+
\put(\thebmrX,\thebmrTPmargin){%
423481
\makebox(0,0)[rb]{%
424-
\begin{minipage}{0.5\paperwidth}\noindent\flushright%
482+
\begin{minipage}{.5\paperwidth}\noindent\flushright%
425483
\sffamily\footnotesize\polydatesave\hspace*{0pt}%
426484
\end{minipage}%
427485
}%
428486
}%
429-
\put(157,46){%
487+
\setcounter{bmrY}{\thebmrY+1}%
488+
\put(\thebmrX,\thebmrY){%
430489
\makebox(0,0)[rb]{%
431490
\begin{minipage}{0.75\paperwidth}\noindent\flushright%
432491
\Large\setlength{\baselineskip}{0.7\baselineskip}%
433492
\sffamily\bfseries\MakeUppercaseWithNewline{\polytitresave}\hspace*{0pt}%
434493
\end{minipage}%
435494
}%
436495
}%
437-
\put(157,47){%
496+
\setcounter{bmrY}{\thebmrY+1}%
497+
\put(\thebmrX,\thebmrY){%
438498
\makebox(0,0)[rt]{%
439499
\begin{minipage}{0.75\paperwidth}\noindent\flushright%
440500
\setlength{\baselineskip}{0.7\baselineskip}%
@@ -483,34 +543,39 @@
483543
% {number}
484544
% {title}
485545
\newcommand{\xsectionframe}[5]{%
546+
\colorlet{xhdcolor}{#1}%
486547
\setbeamertemplate{background canvas}{%
487-
\setlength{\unitlength}{0.00625\paperwidth}%
488-
\begin{picture}(160,90)%
489-
\put(80,0){%
548+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
549+
\begin{picture}(\thebmrW,\thebmrH)%
550+
\setcounter{bmrX}{\thebmrW/2}%
551+
\put(\thebmrX,0){%
490552
\makebox(0,0)[cb]{%
491553
\includegraphics[width=\paperwidth,keepaspectratio]{#3}%
492554
}%
493555
}%
494-
\put(0,60){%
556+
\setcounter{bmrY}{2*\thebmrH/3}%
557+
\put(0,\thebmrY){%
495558
\color{#1}\rule{\paperwidth}{\paperheight/3}%
496559
}%
560+
\setcounter{bmrY}{5*\thebmrH/6}%
497561
\ifthenelse{\equal{#4}{}}{%
498-
\put(80,75){%
562+
\put(\thebmrX,\thebmrY){%
499563
\makebox(0,0)[c]{%
500564
\begin{minipage}{140\unitlength}\centering%
501565
\Large\sffamily\color{#2}\MakeUppercaseWithNewline{#5}%
502566
\end{minipage}%
503567
}%
504568
}%
505569
}{%
506-
\put(80,75){%
570+
\put(\thebmrX,\thebmrY){%
507571
\makebox(0,0)[cb]{%
508572
\begin{minipage}{140\unitlength}\centering%
509573
\Huge\sffamily\color{#2}#4%
510574
\end{minipage}%
511575
}%
512576
}%
513-
\put(80,70){%
577+
\setcounter{bmrY}{\thebmrY-5}%
578+
\put(\thebmrX,\thebmrY){%
514579
\makebox(0,0)[ct]{%
515580
\begin{minipage}{140\unitlength}\centering%
516581
\Large\sffamily\color{#2}\MakeUppercaseWithNewline{#5}%
@@ -561,50 +626,56 @@
561626
% {subtitle}
562627
\newcommand{\xsubsectionframe}[6]{%
563628
\setbeamertemplate{background canvas}{%
564-
\setlength{\unitlength}{0.00625\paperwidth}%
565-
\begin{picture}(160,90)%
566-
\put(80,90){%
629+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
630+
\begin{picture}(\thebmrW,\thebmrH)%
631+
\setcounter{bmrX}{\thebmrW/2}%
632+
\put(\thebmrX,\thebmrH){%
567633
\makebox(0,0)[ct]{%
568634
\includegraphics[width=\paperwidth,keepaspectratio]{#4}%
569635
}%
570636
}%
571637
\put(0,0){%
572-
\color{#1}\rule{\paperwidth}{0.5\paperheight}%
638+
\color{#1}\rule{\paperwidth}{.5\paperheight}%
573639
}%
574-
\put(160,22.5){%
640+
\setcounter{bmrY}{\thebmrH/4}%
641+
\put(\thebmrW,\thebmrY){% TODO
575642
\makebox(0,0)[c]{%
576643
\color{#2}\includegraphics[height=3\paperheight/7,keepaspectratio]{beamerxarmes}%
577644
}%
578645
}%
579646
\ifthenelse{\equal{#6}{}}{%
580-
\put(80,21){%
647+
\setcounter{bmrY}{\thebmrY-3}%
648+
\put(\thebmrX,\thebmrY){%
581649
\makebox(0,0)[ct]{%
582650
\color{#3}\includegraphics[height=\paperheight/22,keepaspectratio]{beamerxx}%
583651
}%
584652
}%
585-
\put(80,24){%
653+
\setcounter{bmrY}{\thebmrY+6}%
654+
\put(\thebmrX,\thebmrY){%
586655
\makebox(0,0)[cb]{%
587-
\begin{minipage}{120\unitlength}\centering%
656+
\begin{minipage}{.75\paperwidth}\centering%
588657
\large\rmfamily\bfseries\color{#3}\MakeUppercaseWithNewline{#5}%
589658
\end{minipage}%
590659
}%
591660
}%
592661
}{%
593-
\put(80,22.5){%
662+
\put(\thebmrX,\thebmrY){%
594663
\makebox(0,0)[c]{%
595664
\color{#3}\includegraphics[height=\paperheight/22,keepaspectratio]{beamerxx}%
596665
}%
597666
}%
598-
\put(80,28){%
667+
\setcounter{bmrY}{\thebmrY+11}%
668+
\put(\thebmrX,\thebmrY){%
599669
\makebox(0,0)[cb]{%
600-
\begin{minipage}{120\unitlength}\centering%
670+
\begin{minipage}{.75\paperwidth}\centering%
601671
\large\rmfamily\bfseries\color{#3}\MakeUppercaseWithNewline{#5}%
602672
\end{minipage}%
603673
}%
604674
}%
605-
\put(80,18){%
675+
\setcounter{bmrY}{\thebmrY-22}%
676+
\put(\thebmrX,\thebmrY){%
606677
\makebox(0,0)[ct]{%
607-
\begin{minipage}{120\unitlength}\centering%
678+
\begin{minipage}{.75\paperwidth}\centering%
608679
\large\rmfamily\color{#3}#6%
609680
\end{minipage}%
610681
}%
@@ -624,9 +695,10 @@
624695
% {picture}
625696
\newenvironment{xpic}[2][hw]{%
626697
\setbeamertemplate{background canvas}{%
627-
\setlength{\unitlength}{0.00625\paperwidth}%
628-
\begin{picture}(160,90)%
629-
\put(80,45){%
698+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
699+
\begin{picture}(\thebmrW,\thebmrH)%
700+
\setcounter{bmrX}{\thebmrW/2}\setcounter{bmrY}{\thebmrH/2}%
701+
\put(\thebmrX,\thebmrY){%
630702
\makebox(0,0)[c]{%
631703
\ifthenelse{\equal{#1}{w}}{%
632704
\includegraphics[width=\paperwidth]{#2}%
@@ -653,9 +725,15 @@
653725
% [frame parameters]
654726
% {title}
655727
\newsavebox\beamerxpicturebox%
728+
\newlength\beamerxpictureboxH%
729+
\newlength\beamerxpictureboxW%
656730
\newcommand\includefullpic[1]{%
657-
\sbox\beamerxpicturebox{\includegraphics{#1}}%
658-
\ifdim\ht\beamerxpicturebox<.5625\wd\beamerxpicturebox%
731+
\sbox\beamerxpicturebox{\includegraphics[width=1cm]{#1}}%
732+
\setlength\beamerxpictureboxH{\ht\beamerxpicturebox}%
733+
\setlength\beamerxpictureboxW{\wd\beamerxpicturebox}%
734+
\setlength\beamerxpictureboxW{\beamerxpictureboxW/\thebmrW}%
735+
\setlength\beamerxpictureboxW{\thebmrH\beamerxpictureboxW}%
736+
\ifdim\beamerxpictureboxH<\beamerxpictureboxW%
659737
\includegraphics[height=\paperheight]{#1}%
660738
\else%
661739
\includegraphics[width=\paperwidth]{#1}%
@@ -689,9 +767,10 @@
689767
}}}%
690768
\colorlet{xfootcolor}{xtextcolor}%
691769
\setbeamertemplate{background canvas}{%
692-
\setlength{\unitlength}{0.00625\paperwidth}%
693-
\begin{picture}(160,90)%
694-
\put(80,45){%
770+
\setlength{\unitlength}{\paperwidth/\thebmrW}%
771+
\begin{picture}(\thebmrW,\thebmrH)%
772+
\setcounter{bmrX}{\thebmrW/2}\setcounter{bmrY}{\thebmrH/2}%
773+
\put(\thebmrX,\thebmrY){%
695774
\makebox(0,0)[c]{%
696775
\includefullpic{#2}%
697776
}%

source/beamerxbackground.jpg

2.65 KB
Loading

0 commit comments

Comments
 (0)