diff --git a/source/beamerx.sty b/source/beamerx.sty index 91253ef02aa8ecb926d665b2351f198413abce6a..8a5f3eeb1af8bc29dbf3a9fea1c4cc336d937f99 100644 --- a/source/beamerx.sty +++ b/source/beamerx.sty @@ -230,8 +230,10 @@ \setbeamertemplate{background canvas}{% \setlength{\unitlength}{0.00625\paperwidth}% \begin{picture}(160,90)% - \put(0,0){% - \includegraphics[width=\paperwidth,keepaspectratio]{#3}% + \put(80,0){% + \makebox(0,0)[cb]{% + \includegraphics[width=\paperwidth,keepaspectratio]{#3}% + }% }% \put(0,60){% \color{#1}\rule{\paperwidth}{\paperheight/3}% @@ -288,8 +290,10 @@ \setbeamertemplate{background canvas}{% \setlength{\unitlength}{0.00625\paperwidth}% \begin{picture}(160,90)% - \put(0,0){% - \includegraphics[width=\paperwidth,keepaspectratio]{#4}% + \put(80,90){% + \makebox(0,0)[ct]{% + \includegraphics[width=\paperwidth,keepaspectratio]{#4}% + }% }% \put(0,0){% \color{#1}\rule{\paperwidth}{0.5\paperheight}% @@ -326,6 +330,10 @@ } %--- XFrame +% Prototype: +% \begin{xframe} +% {title} +% {subtitle} \newenvironment{xframe}[2]{% \setbeamertemplate{background canvas}{% \setlength{\unitlength}{0.00625\paperwidth}% @@ -342,7 +350,35 @@ \end{frame}% } - +%--- XPic +% Prototype: +% \begin{xpic} +% [size adjustment] +% {picture} +\newenvironment{xpic}[2][hw]{% + \setbeamertemplate{background canvas}{% + \setlength{\unitlength}{0.00625\paperwidth}% + \begin{picture}(160,90)% + \put(80,45){% + \makebox(0,0)[c]{% + \ifthenelse{\equal{#1}{hw}}{% + \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#2}% + }{\ifthenelse{\equal{#1}{wh}}{% + \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#2}% + }{\ifthenelse{\equal{#1}{h}}{% + \includegraphics[height=\paperheight]{#2}% + }{% + \includegraphics[width=\paperwidth]{#2}% + }}}% + }% + }% + \end{picture} + }% + \begin{frame}[plain,b]\centering% +}{% + \vspace*{5mm} + \end{frame}% +} diff --git a/source/exemple.tex b/source/exemple.tex index 89a440c153553618195c95a870305045a9f7b969..23cf60ccca763ce059c55be32aeb939d730f2081 100644 --- a/source/exemple.tex +++ b/source/exemple.tex @@ -23,4 +23,16 @@ \lipsum[1] \end{xframe} +\begin{xpic}{welcome-short} + some text xpic (hw) +\end{xpic} + +\begin{xpic}[h]{welcome-short} + some text xpic (h) +\end{xpic} + +\begin{xpic}[w]{welcome-short} + some text xpic (w) +\end{xpic} + \end{document}