% ----------------------------------------- % Description % ----------------------------------------- % % Fabian's slides % fslides.sty % (c) 2004 Fabian M. Suchanek % % This is a beginner's trial to make Latex work more % like an ordinary slide-presentation-program. The file % supports some features, which are natural for ordinary % presentation-programs, but seem rather complicated in % TeX. It supports % * producing slides of the standard size % This file has been tested (and probably works only) on % Win2000 with pdflatex.exe. % * putting text where you want it % Standard TeX always places text where it supposes it to be % placed best. This file allows you to place text where % *you* suppose it to be placed best. % * putting images where you want them % On Win2000, the picture format supported by pdflatex.exe % is JPG. Other systems might require other formats. % * Drawing simple things % You may draw boxes, circles, frames and lines (with whatever % slope you prefer) % * understanding what you do % This file is small, simple and well-documented. % Furthermore, it requires no non-standard % package, no PS-tricks and no Prosper. % ----------------------------------------- % Standard Usage % ----------------------------------------- % % Here is a blueprint for a slide-show with fslides % % \documentclass{article} % \usepackage{fslides} % \title{} % \author{} % \flogo{.jpg} % \ftitleinfo{} % \begin{document} % \maketitle % \fslide{}{ % \ftext{}{}{} % \fimage{}{}{}{.jpg} % ... % } % \fslide... % ... % \end{document} % % In general % * all fslides-commands are preceded by a "f" % * coordinates have the origin in the lower left corner of the slide % * coordinates are measured in millimeters % * the slide has the size \fmaxx * \fmaxy = 254mm*190mm % * coordinates of objects refer to their lower left corner % However, \ftext has its reference point in the upper left % corner -- so that you can add lines without moving the previous % ones % % ----------------------------------------- % Advanced features % ----------------------------------------- % % * You may change the fontsize by stating % \ffontsize{}{} % * You may change the color by stating % \fcolor{} % * You may have items appear on the same slide by % \fappear{}{ % \ftext... % \fimage... % ... % } % is an integer number. '0' means: Existing % from the beginning, \fappear can be ommitted in this case. '1' means: % appear on the first overlay and persist on all following ones etc. % Note that no surrounding "\overlay" is needed. % * You may have items disappear on the same slide by % using \fdisappear similarly to \fappear % * You may use % \frem{ ... } % to insert multiple-line comments % % ----------------------------------------- % Graphical features % ----------------------------------------- % % * You may change the linethickness of graphical objects by % \flinethickness{} % * You may group objects by % \fgroup{}{}{ ... } % Coordinates used by objects inside the group are relative to the % coordinates of the group. This simplifies moving the objects all % together by changing the group coordinates. % * You may draw frames by % \fframe{}{}{}{}{[]} % * You may draw rectangles by % \frectangle{}{}{}{} % * You may draw circles of radius < 7mm by % \fcircle{}{}{} % * You may draw discs of diametre < 40pt by % \fdisc{}{}{} % * You may draw lines by % \fline{}{}{}{} % Angles are measured counter-clockwise in degrees. You may also % use the predefined values \fup, \fdown, \fright or \fleft. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{fslides} % ----------------------------------------- % Define Papersize % ----------------------------------------- \pagestyle{empty} \setlength\paperheight {190mm} \setlength\paperwidth {254mm} \setlength{\evensidemargin}{-30mm} \setlength{\oddsidemargin}{-30mm} \setlength{\textwidth}{\paperwidth} \setlength{\textheight}{\paperheight} \setlength{\topmargin}{-20mm} \setlength{\headsep}{0mm} % ----------------------------------------- % Packages % ----------------------------------------- \usepackage{color} % For colored text \usepackage{graphicx} % For picture inclusion \usepackage{ifthen} % For overlay programming \usepackage{calc} % For line calculations % ----------------------------------------- % Slide components % ----------------------------------------- \newcounter{fstate} \newcommand{\ferror}[1]{ \typein{ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ #1 slide \arabic{slidenumber} ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ } } \newcommand{\frem}[1]{} \newcommand{\flogo}[1]{\newcommand{\@logo}{#1}} \newcommand{\ftitleinfo}[1]{\newcommand{\@tinfo}{#1}} \renewcommand{\labelitemi}{\color{blue}\rotatebox[origin=c]{-30}{\scalebox{1}[0.6]{)}} } \renewcommand{\labelitemii}{\color{blue}\rotatebox[origin=c]{-30}{\scalebox{1}[0.6]{)}} } \renewcommand{\labelitemiii}{\color{blue}\rotatebox[origin=c]{-30}{\scalebox{1}[0.6]{)}} } \definecolor{grey}{rgb}{0.4,0.4,0.4} \setlength{\unitlength}{1mm} %\setlength{\fboxsep}{5mm} \newcommand{\ftext}[3]{ \ifthenelse{\value{fstate} = 1 } {} {\ferror{Nested ftexts in}} \setcounter{fstate}{2} \fontfamily{phv}\selectfont\put(#1,#2) {\parbox[t]{254mm}{#3}} \setcounter{fstate}{1} } \newcommand{\fimage}[4]{\put(#1,#2) {\includegraphics[width=#3mm] {#4}}} \newcommand{\ffontsize}[2]{\fontsize{#1}{#2}\selectfont} \newcommand{\fcolor}[1]{\color{#1}} \newcommand{\fmaxx}{\paperwidth} \newcommand{\fmaxy}{\paperheight} \newcounter{slidenumber} \makeatletter \newcommand{\fslidehelper}[2]{ \begin{picture}(254,185)(0,0) {\color{blue} \linethickness{2pt} \put(14,160) { \line(1,0){220} } } \ftext{20}{180}{\fcolor{black}\ffontsize{26}{40}#1} \fimage{190}{165}{40}{\@logo} \ftext{5}{15}{\fcolor{grey}\ffontsize{15}{20}\@author} \ftext{80}{15}{\fcolor{grey}\ffontsize{15}{20}\@title} \ifthenelse{\value{slidenumber} = 0}{}{ \ftext{240}{15}{\fcolor{grey}\ffontsize{15}{20}\arabic{slidenumber}} } \ffontsize{24}{40} #2 \end{picture} \newpage \addtocounter{slidenumber}{1} } \makeatother \newcounter{overlaynumber} \newcounter{appearnumber} \newcommand{\fslide}[2]{ \ifthenelse{\value{fstate} = 0 } {} {\ferror{Missing brace before}} \setcounter{fstate}{1} \setcounter{overlaynumber}{0} \setcounter{appearnumber}{0} \fslidehelper{#1}{#2} \whiledo{\value{overlaynumber} < \value{appearnumber}} { \addtocounter{slidenumber}{-1} \addtocounter{overlaynumber}{1} \fslidehelper{#1}{#2} } \setcounter{fstate}{0} } \newcommand{\fappear}[2]{ \ifthenelse{\value{fstate} = 0 } {\ferror{fappear outside slide before}} \ifthenelse{\value{overlaynumber} > #1 \or \value{overlaynumber} = #1} {#2} {} \ifthenelse{\value{appearnumber} < #1} {\setcounter{appearnumber}{#1}} {} } \newcommand{\fdisappear}[2]{ \ifthenelse{\value{fstate} = 0 } {\ferror{fdisappear outside slide before}} \ifthenelse{\value{overlaynumber} < #1} {#2} {} \ifthenelse{\value{appearnumber} < #1} {\setcounter{appearnumber}{#1}} {} } % ----------------------------------------- % Graphical objects % ----------------------------------------- \newcounter{fx} \newcounter{fy} \newcommand{\fup}{90} \newcommand{\fdown}{270} \newcommand{\fright}{0} \newcommand{\fleft}{180} \newcommand{\flinethickness}[1]{\linethickness{#1mm}} \newcommand{\fgroup}[3]{ \put(#1,#2) { #3 } } \newcommand{\fframe}[5]{ \setcounter{fx}{#3} \addtocounter{fx}{-6} \put(#1,#2){ \framebox(#3,#4){ \parbox{\value{fx}mm}{#5} } } } \makeatletter \newcommand{\frectangle}[4]{ \put(#1,#2){\colorbox{\current@color}{\makebox(#3,#4){}}} } \makeatother \newcommand{\fcircle}[3]{ \setcounter{fx}{#3 * 2} \put(#1,#2){\circle{\value{fx}}} } \newcommand{\fdisc}[3]{ \setcounter{fx}{#3 * 2} \put(#1,#2){\circle*{\value{fx}}} } \newcommand{\fline}[4]{ \setcounter{fx}{#1} \setcounter{fy}{#2} \ifthenelse{#3 < \fdown \and #3 > \fup} { \CalculateCos{#3} \addtocounter{fx}{#4 * \real{\UseCos{#3}}} } {} % \ifthenelse{#3 > \fleft} { % \CalculateSin{#3} % \addtocounter{fy}{#4 * \real{\UseSin{#3}}} % } {} \put(\value{fx},\value{fy}){\rotatebox[origin=cl]{#3}{\line(1,0){#4}}} } % ----------------------------------------- % Title % ----------------------------------------- \makeatletter \renewcommand{\maketitle}{ \fslide{}{ \ftext{-5}{120} {\fcolor{black}\centering\ffontsize{26}{40}\@title} \ftext{-5}{100} {\fcolor{black}\centering\ffontsize{22}{30}\@author} \ftext{-5}{60} {\fcolor{black}\centering\ffontsize{22}{30}\@tinfo} } } \makeatother \endinput