diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-13 23:31:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-13 23:31:13 +0000 |
commit | 9df6e561410b27b99ab5bccf59ca4e98056f62b5 (patch) | |
tree | 2061c9b203b56b89cf146d2601037d70be3026db /Master/texmf-dist/tex/plain | |
parent | 813aa9fb76c13fac8ec90e0871dd9de660ba3d8b (diff) |
present 1.0 (13oct10)
git-svn-id: svn://tug.org/texlive/trunk@20080 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/plain')
-rw-r--r-- | Master/texmf-dist/tex/plain/present/present.tex | 66 |
1 files changed, 52 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/plain/present/present.tex b/Master/texmf-dist/tex/plain/present/present.tex index be5f7210e0c..4f2e9e0626b 100644 --- a/Master/texmf-dist/tex/plain/present/present.tex +++ b/Master/texmf-dist/tex/plain/present/present.tex @@ -2,7 +2,7 @@ % % present.tex % Some macros for preparing presentations in TeX, using pdftex -% Version 1.0 +% Version 2.0 % Copyright 2010 Matthias Meister % % This work may be distributed and/or modified under the @@ -32,13 +32,13 @@ % therefore should remain unchanged, too) % % With reference to the definitions in the LaTeX Project Public License, for the -% purposes of this work a 'Base Interpreter' is a program implemeting the TeX +% purposes of this work a 'Base Interpreter' is a program implementing the TeX % language. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\input color % We would like colour on the screen - % color.sty and miniltx required (see www.ctan.org) +\catcode`\@=11 + \parindent0pt % Indentation probably not good for presentation \parskip0pt % Neither is automatic extra space between paragraphs @@ -103,7 +103,6 @@ % % Definitions to allow referencing the last page of a document % -\catcode`\@=11 \newwrite\wl@stpage \newread\rl@stpage \def\bye{% @@ -118,20 +117,36 @@ \openin\rl@stpage=\jobname.lp \ifeof\rl@stpage\closein\rl@stpage\message{RUN AGAIN to get correct number of last page!} \else\read\rl@stpage to \LP\fi -\catcode`\@=12 % % Define some colours % -\definecolor{background}{rgb}{0.6,0.6,1.0} % Define some colour names -\definecolor{text}{rgb}{0.0,0.0,0.8} % -\definecolor{attention}{rgb}{1,0,0} % - % and use them to -\pagecolor{background} % set the color of the background -\color{text} % and of ordinary text +% The commands below handle colour without color.tex, directly with pdftex +% Added October 3rd, 2010 + +% Define colours +\def\backgroundcolour{0.8 0.8 0.8} % Colour of page background +\def\textcolour{0.0 0.0 0.0} % Colour of text +\def\attentioncolour{1 0 0} % Colour for "Attention" + +\newdimen\vsh@ft % vertical shift for background image, vsh@ft+\voffset=-25.4mm +\newdimen\hsh@ft % horizontal shift for background image, hsh@ft+\hoffset=-25.4mm +\vsh@ft=-13mm +\hsh@ft=-5mm + +\newcount\colst@ck +\colst@ck=\pdfcolorstackinit page {\textcolour rg \textcolour RG} +\def\popst@ck{\pdfcolorstack\colst@ck pop} +\def\setcolour#1{\pdfcolorstack\colst@ck push {#1 rg #1 RG}\aftergroup\popst@ck} +\long\def\coloured#1#2{{\setcolour#1#2}} +\long\def\att#1{\coloured\attentioncolour{#1}} +\def\bgc@lset{\relax} +\def\setbgcolour#1{\def\bgc@lset{\begingroup\pdfcolorstack\colst@ck push {#1 rg #1 RG}\aftergroup\popst@ck +\vbox to 0pt{\kern\vsh@ft\hbox to 0pt{% +\kern\hsh@ft\vrule depth0pt height\pdfpageheight width\pdfpagewidth\hss}\vss} +\nointerlineskip +\endgroup}} -\def\att#1{\textcolor{attention}{#1}} % Macro for printing #1 in "attention" colour for - % emphasis \def\NewSlide{\vfill\eject} % Begin a new slide; slide number increases @@ -238,4 +253,27 @@ attr {/Border [0 0 0]} user {/Subtype /Link /A <</S /Named /N /#1>>}% \footline{} % Set some \StandardAspect % defaultvalues +% +% Added 28. August 2010. Not part of version 1.0 +% +% Setting / unsetting a background image. If no background image is used, the background shows background colour +% +\def\h@lpr{\relax} +\def\BIM@G{\relax} +\def\SetBackground#1{\def\BIM@G{#1}} +\def\UnsetBackground{\def\BIM@G{\relax}} +\output{% +\shipout\vbox{% +\bgc@lset +\ifx\BIM@G\h@lpr \else +{\vbox to 0pt{\kern\vsh@ft\hbox to 0pt{\kern\hsh@ft\image[width\pdfpagewidth height\pdfpageheight]{\BIM@G}\hss}\vss}% +\nointerlineskip}\fi +\makeheadline +\pagebody +\makefootline} +\advancepageno +\ifnum\outputpenalty>-20000\else\dosupereject\fi} +\def\rm{\fam=0} %% Added 14. September 2010. Use roman font in math. + +\catcode`\@=12 |