marketing

Marketing materials (presentations, posters, flyers)
Log | Files | Refs

pdfpc-commands.sty (4545B)


      1 % Package: textpos is required for textblock*
      2 \usepackage[absolute,overlay]{textpos}
      3 
      4 
      5 % fullFrameMovie
      6 %
      7 % Arguments:
      8 %
      9 %   [optional]: movie-options, seperated by &
     10 %       Supported options: loop, start=N, end=N, autostart
     11 %   Default: autostart&loop
     12 %
     13 %   1. Movie file
     14 %   2. Poster image
     15 %   3. Any text on the slide, or nothing (e.g. {})
     16 %
     17 % Example:
     18 %   \fullFrameMovie[loop&autostart]{apollo17.avi}{apollo17.jpg}{\copyrightText{Apollo 17, NASA}}
     19 %
     20 \newcommand{\fullFrameMovie}[4][autostart&loop]
     21 {
     22     {
     23         \setbeamercolor{background canvas}{bg=black}
     24 
     25 
     26         % to make this work for both horizontally filled and vertically filled images, we create an absolutely
     27         % positioned textblock* that we force to be the width of the slide.
     28         % we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
     29         % height of the frame.  Once we have created an absolutely positioned and sized box, it doesn't matter what
     30         % goes inside -- it will always be vertically and horizontally centered
     31         \frame[plain]
     32         {
     33             \begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
     34             \centering
     35             \vbox to 0.95\paperheight {
     36                 \vfil{
     37                     \href{run:#2?autostart&#1}{\includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#3}}
     38                 }
     39                 \vfil
     40             }
     41             \end{textblock*}
     42             #4
     43         }
     44     }
     45 }
     46 
     47 % inlineMovie
     48 %
     49 % Arguments:
     50 %
     51 %   [optional]: movie-options, seperated by &
     52 %       Supported options: loop, start=N, end=N, autostart
     53 %   Default: autostart&loop
     54 %
     55 %   1. Movie file
     56 %   2. Poster image
     57 %   3. size command, such as width=\textwidth
     58 %
     59 % Example:
     60 %   \inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7\textheight}
     61 %
     62 \newcommand{\inlineMovie}[4][autostart&loop]
     63 {
     64     \href{run:#2?#1}{\includegraphics[#4]{#3}}
     65 }
     66 
     67 
     68 % copyrightText
     69 %
     70 % Produces small text on the right side of the screen, useful for
     71 % stating copyright or other small notes in movies or images
     72 %
     73 % Arguments:
     74 %
     75 %   [optional]: text color
     76 %       Default: white
     77 %
     78 %   1. Text to be displayed
     79 %
     80 % Example:
     81 %   \copyrightText{Full frame image of: Apollo 17, NASA}
     82 %
     83 \newcommand\copyrightText[2][white]{%
     84  \begin{textblock*}{\paperwidth}(0\paperwidth,.97\paperheight)%
     85     \hfill\textcolor{#1}{\tiny#2}\hspace{20pt}
     86   \end{textblock*}
     87 }
     88 
     89 % fullFrameImageZoomed
     90 %
     91 % Produces a slide that contains a full frame image.  Scales down the image
     92 % to fit if the aspect ratio of the slide does not match the image.
     93 %
     94 % Arguments:
     95 %
     96 %   [optional]: color of text on page
     97 %       Default: white
     98 %
     99 %   1. Path to image file
    100 %   2. Any additional content on the frame
    101 %
    102 % Example:
    103 %   \fullFrameImageZoomed{apollo17.jpg}{\copyrightText{Full frame image of: Apollo 17, NASA}}
    104 %
    105 \newcommand{\fullFrameImage}[3][white]
    106 {
    107     {
    108         \setbeamercolor{normal text}{bg=black,fg=#1}
    109 
    110 
    111         % to make this work for both horizontally filled and vertically filled images, we create an absolutely
    112         % positioned textblock* that we force to be the width of the slide.
    113         % we then place it at (0,0), and then create a box inside of it to ensure that it's always 95% of the vertical
    114         % height of the frame.  Once we have created an absolutely positioned and sized box, it doesn't matter what
    115         % goes inside -- it will always be vertically and horizontally centered
    116         \frame
    117         {
    118             \begin{textblock*}{\paperwidth}(0\paperwidth,0\paperheight)
    119             \centering
    120             \vbox to 0.95\paperheight {
    121                 \vfil{
    122                     \includegraphics[width=\paperwidth,height=0.95\paperheight,keepaspectratio]{#2}
    123                 }
    124                 \vfil
    125             }
    126             \end{textblock*}
    127             #3
    128         }
    129     }
    130 }
    131 
    132 % fullFrameImageZoomed
    133 %
    134 % Produces a slide that contains a full frame image.  If the aspect ratio
    135 % of the image does not match the slide, it crops the image.
    136 %
    137 % Arguments:
    138 %
    139 %   [optional]: color of text on page
    140 %       Default: black
    141 %
    142 %   1. Path to image file
    143 %   2. Any additional content on the frame
    144 %
    145 % Example:
    146 %   \fullFrameImageZoomed{apollo17.jpg}{\copyrightText{Full frame image of: Apollo 17, NASA}}
    147 %
    148 \newcommand{\fullFrameImageZoomed}[3][black]
    149 {
    150     {
    151         \usebackgroundtemplate{\includegraphics[height=\paperheight]{#2}}
    152         \setbeamercolor{normal text}{bg=black,fg=#1}
    153         \frame
    154         {
    155             #3
    156         }
    157     }
    158 }
    159 
    160 
    161 
    162 
    163