|
1 | 1 | \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).] |
3 | 3 |
|
4 | 4 | %=======================================================================
|
5 | 5 | % Declaration des options
|
|
11 | 11 | }
|
12 | 12 | \DeclareOption{simplehead}{%
|
13 | 13 | \AtEndOfPackage{%
|
14 |
| - \renewcommand{\resetbackgroundcanvas}{% |
15 |
| - \setbeamertemplate{background canvas}{} |
16 |
| - } |
| 14 | + \renewcommand{\includebeamerxarmes}{}% |
| 15 | + } |
| 16 | +} |
| 17 | +\DeclareOption{notochead}{% |
| 18 | + \AtEndOfPackage{% |
| 19 | + \renewcommand{\includebeamerxsection}{}% |
17 | 20 | }
|
18 | 21 | }
|
19 | 22 | \DeclareOption{simplebloc}{%
|
20 | 23 | \AtEndOfPackage{%
|
21 | 24 | \renewcommand{\beamerxblockheader}{}
|
22 | 25 | }
|
23 | 26 | }
|
| 27 | +\DeclareOption{oldscreen}{% |
| 28 | + \AtEndOfPackage{% |
| 29 | + \oldscreen{}\applyscreen{}% |
| 30 | + } |
| 31 | +} |
24 | 32 | \ProcessOptions*
|
25 | 33 | %=======================================================================
|
26 | 34 | % Package requis
|
|
62 | 70 | }
|
63 | 71 | \fi
|
64 | 72 | %=======================================================================
|
| 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 | +%======================================================================= |
65 | 98 | % Definition des couleurs
|
66 | 99 | %=======================================================================
|
67 | 100 | \definecolor{bleu303}{RGB}{0,62,92}
|
|
236 | 269 | % Definition du theme beamer
|
237 | 270 | %=======================================================================
|
238 | 271 | %---------- Parametres generaux
|
| 272 | +\newcommand\defaultheadcolor{% |
| 273 | + \colorlet{xhdcolor}{bleu303}% |
| 274 | +} |
| 275 | +\defaultheadcolor% |
239 | 276 | \newcommand\resetcolors{%
|
240 | 277 | \colorlet{xfgcolor}{black}%
|
241 | 278 | \colorlet{xbgcolor}{white}%
|
|
247 | 284 | }
|
248 | 285 | \resetcolors%
|
249 | 286 |
|
250 |
| -\newlength\beamerxmargin% |
251 |
| -\setlength\beamerxmargin{\textheight/15} % 6 units |
252 | 287 | \setbeamercovered{transparent=40}
|
253 | 288 | \setlength\fboxsep{1ex}
|
254 | 289 |
|
|
287 | 322 | }
|
288 | 323 | }
|
289 | 324 |
|
| 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 | +} |
290 | 341 | \newcommand\resetbackgroundcanvas{%
|
291 | 342 | \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){% |
295 | 347 | \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} |
297 | 352 | }%
|
298 | 353 | }%
|
299 | 354 | \end{picture}%
|
|
398 | 453 | }
|
399 | 454 | \AtBeginDocument{%
|
400 | 455 | \renewcommand\maketitle{%
|
401 |
| - \setlength{\unitlength}{0.00625\paperwidth}% |
| 456 | + \setlength{\unitlength}{\paperwidth/\thebmrW}% |
402 | 457 | \setbeamertemplate{background canvas}{%
|
403 | 458 | \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){% |
406 | 462 | \makebox(0,0)[c]{%
|
407 |
| - \includegraphics[width=\paperwidth,keepaspectratio]{beamerxbackground}% |
| 463 | + \includegraphics[height=\paperheight,keepaspectratio]{beamerxbackground}% |
408 | 464 | }%
|
409 | 465 | }%
|
410 |
| - \put(6,45){% |
| 466 | + \setcounter{bmrX}{2*\thebmrTPmargin}% |
| 467 | + \put(\thebmrX,\thebmrY){% |
411 | 468 | \makebox(0,0)[l]{%
|
412 | 469 | \includebeamerxlogo{}%
|
413 | 470 | }%
|
414 | 471 | }%
|
415 |
| - \put(3,3){% |
| 472 | + \put(\thebmrTPmargin,\thebmrTPmargin){% |
416 | 473 | \makebox(0,0)[lb]{%
|
417 |
| - \begin{minipage}{0.5\paperwidth}\noindent% |
| 474 | + \begin{minipage}{.5\paperwidth}\noindent% |
418 | 475 | \sffamily\footnotesize\polyauteursave\hspace*{0pt}%
|
419 | 476 | \end{minipage}%
|
420 | 477 | }%
|
421 | 478 | }%
|
422 |
| - \put(157,3){% |
| 479 | + \setcounter{bmrX}{\thebmrW-\thebmrTPmargin}% |
| 480 | + \put(\thebmrX,\thebmrTPmargin){% |
423 | 481 | \makebox(0,0)[rb]{%
|
424 |
| - \begin{minipage}{0.5\paperwidth}\noindent\flushright% |
| 482 | + \begin{minipage}{.5\paperwidth}\noindent\flushright% |
425 | 483 | \sffamily\footnotesize\polydatesave\hspace*{0pt}%
|
426 | 484 | \end{minipage}%
|
427 | 485 | }%
|
428 | 486 | }%
|
429 |
| - \put(157,46){% |
| 487 | + \setcounter{bmrY}{\thebmrY+1}% |
| 488 | + \put(\thebmrX,\thebmrY){% |
430 | 489 | \makebox(0,0)[rb]{%
|
431 | 490 | \begin{minipage}{0.75\paperwidth}\noindent\flushright%
|
432 | 491 | \Large\setlength{\baselineskip}{0.7\baselineskip}%
|
433 | 492 | \sffamily\bfseries\MakeUppercaseWithNewline{\polytitresave}\hspace*{0pt}%
|
434 | 493 | \end{minipage}%
|
435 | 494 | }%
|
436 | 495 | }%
|
437 |
| - \put(157,47){% |
| 496 | + \setcounter{bmrY}{\thebmrY+1}% |
| 497 | + \put(\thebmrX,\thebmrY){% |
438 | 498 | \makebox(0,0)[rt]{%
|
439 | 499 | \begin{minipage}{0.75\paperwidth}\noindent\flushright%
|
440 | 500 | \setlength{\baselineskip}{0.7\baselineskip}%
|
|
483 | 543 | % {number}
|
484 | 544 | % {title}
|
485 | 545 | \newcommand{\xsectionframe}[5]{%
|
| 546 | + \colorlet{xhdcolor}{#1}% |
486 | 547 | \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){% |
490 | 552 | \makebox(0,0)[cb]{%
|
491 | 553 | \includegraphics[width=\paperwidth,keepaspectratio]{#3}%
|
492 | 554 | }%
|
493 | 555 | }%
|
494 |
| - \put(0,60){% |
| 556 | + \setcounter{bmrY}{2*\thebmrH/3}% |
| 557 | + \put(0,\thebmrY){% |
495 | 558 | \color{#1}\rule{\paperwidth}{\paperheight/3}%
|
496 | 559 | }%
|
| 560 | + \setcounter{bmrY}{5*\thebmrH/6}% |
497 | 561 | \ifthenelse{\equal{#4}{}}{%
|
498 |
| - \put(80,75){% |
| 562 | + \put(\thebmrX,\thebmrY){% |
499 | 563 | \makebox(0,0)[c]{%
|
500 | 564 | \begin{minipage}{140\unitlength}\centering%
|
501 | 565 | \Large\sffamily\color{#2}\MakeUppercaseWithNewline{#5}%
|
502 | 566 | \end{minipage}%
|
503 | 567 | }%
|
504 | 568 | }%
|
505 | 569 | }{%
|
506 |
| - \put(80,75){% |
| 570 | + \put(\thebmrX,\thebmrY){% |
507 | 571 | \makebox(0,0)[cb]{%
|
508 | 572 | \begin{minipage}{140\unitlength}\centering%
|
509 | 573 | \Huge\sffamily\color{#2}#4%
|
510 | 574 | \end{minipage}%
|
511 | 575 | }%
|
512 | 576 | }%
|
513 |
| - \put(80,70){% |
| 577 | + \setcounter{bmrY}{\thebmrY-5}% |
| 578 | + \put(\thebmrX,\thebmrY){% |
514 | 579 | \makebox(0,0)[ct]{%
|
515 | 580 | \begin{minipage}{140\unitlength}\centering%
|
516 | 581 | \Large\sffamily\color{#2}\MakeUppercaseWithNewline{#5}%
|
|
561 | 626 | % {subtitle}
|
562 | 627 | \newcommand{\xsubsectionframe}[6]{%
|
563 | 628 | \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){% |
567 | 633 | \makebox(0,0)[ct]{%
|
568 | 634 | \includegraphics[width=\paperwidth,keepaspectratio]{#4}%
|
569 | 635 | }%
|
570 | 636 | }%
|
571 | 637 | \put(0,0){%
|
572 |
| - \color{#1}\rule{\paperwidth}{0.5\paperheight}% |
| 638 | + \color{#1}\rule{\paperwidth}{.5\paperheight}% |
573 | 639 | }%
|
574 |
| - \put(160,22.5){% |
| 640 | + \setcounter{bmrY}{\thebmrH/4}% |
| 641 | + \put(\thebmrW,\thebmrY){% TODO |
575 | 642 | \makebox(0,0)[c]{%
|
576 | 643 | \color{#2}\includegraphics[height=3\paperheight/7,keepaspectratio]{beamerxarmes}%
|
577 | 644 | }%
|
578 | 645 | }%
|
579 | 646 | \ifthenelse{\equal{#6}{}}{%
|
580 |
| - \put(80,21){% |
| 647 | + \setcounter{bmrY}{\thebmrY-3}% |
| 648 | + \put(\thebmrX,\thebmrY){% |
581 | 649 | \makebox(0,0)[ct]{%
|
582 | 650 | \color{#3}\includegraphics[height=\paperheight/22,keepaspectratio]{beamerxx}%
|
583 | 651 | }%
|
584 | 652 | }%
|
585 |
| - \put(80,24){% |
| 653 | + \setcounter{bmrY}{\thebmrY+6}% |
| 654 | + \put(\thebmrX,\thebmrY){% |
586 | 655 | \makebox(0,0)[cb]{%
|
587 |
| - \begin{minipage}{120\unitlength}\centering% |
| 656 | + \begin{minipage}{.75\paperwidth}\centering% |
588 | 657 | \large\rmfamily\bfseries\color{#3}\MakeUppercaseWithNewline{#5}%
|
589 | 658 | \end{minipage}%
|
590 | 659 | }%
|
591 | 660 | }%
|
592 | 661 | }{%
|
593 |
| - \put(80,22.5){% |
| 662 | + \put(\thebmrX,\thebmrY){% |
594 | 663 | \makebox(0,0)[c]{%
|
595 | 664 | \color{#3}\includegraphics[height=\paperheight/22,keepaspectratio]{beamerxx}%
|
596 | 665 | }%
|
597 | 666 | }%
|
598 |
| - \put(80,28){% |
| 667 | + \setcounter{bmrY}{\thebmrY+11}% |
| 668 | + \put(\thebmrX,\thebmrY){% |
599 | 669 | \makebox(0,0)[cb]{%
|
600 |
| - \begin{minipage}{120\unitlength}\centering% |
| 670 | + \begin{minipage}{.75\paperwidth}\centering% |
601 | 671 | \large\rmfamily\bfseries\color{#3}\MakeUppercaseWithNewline{#5}%
|
602 | 672 | \end{minipage}%
|
603 | 673 | }%
|
604 | 674 | }%
|
605 |
| - \put(80,18){% |
| 675 | + \setcounter{bmrY}{\thebmrY-22}% |
| 676 | + \put(\thebmrX,\thebmrY){% |
606 | 677 | \makebox(0,0)[ct]{%
|
607 |
| - \begin{minipage}{120\unitlength}\centering% |
| 678 | + \begin{minipage}{.75\paperwidth}\centering% |
608 | 679 | \large\rmfamily\color{#3}#6%
|
609 | 680 | \end{minipage}%
|
610 | 681 | }%
|
|
624 | 695 | % {picture}
|
625 | 696 | \newenvironment{xpic}[2][hw]{%
|
626 | 697 | \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){% |
630 | 702 | \makebox(0,0)[c]{%
|
631 | 703 | \ifthenelse{\equal{#1}{w}}{%
|
632 | 704 | \includegraphics[width=\paperwidth]{#2}%
|
|
653 | 725 | % [frame parameters]
|
654 | 726 | % {title}
|
655 | 727 | \newsavebox\beamerxpicturebox%
|
| 728 | +\newlength\beamerxpictureboxH% |
| 729 | +\newlength\beamerxpictureboxW% |
656 | 730 | \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% |
659 | 737 | \includegraphics[height=\paperheight]{#1}%
|
660 | 738 | \else%
|
661 | 739 | \includegraphics[width=\paperwidth]{#1}%
|
|
689 | 767 | }}}%
|
690 | 768 | \colorlet{xfootcolor}{xtextcolor}%
|
691 | 769 | \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){% |
695 | 774 | \makebox(0,0)[c]{%
|
696 | 775 | \includefullpic{#2}%
|
697 | 776 | }%
|
|
0 commit comments