diff options
author | Karl Berry <karl@freefriends.org> | 2011-10-02 00:16:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-10-02 00:16:41 +0000 |
commit | 51b9ba900e58ddc023fb48e9f1cecb304ba24958 (patch) | |
tree | d471364d68cce937568696c3ded6d92a4835c619 /Master/texmf-dist | |
parent | 72fba92170e74ecf682e3f94f347206d264e9ccd (diff) |
context-simpleslides, and find scripts/context/lua/third/* (1oct11)
git-svn-id: svn://tug.org/texlive/trunk@24165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/context/third/simpleslides/example.pdf | bin | 0 -> 7913 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/context/third/simpleslides/example.tex | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/context/third/simpleslides/simpleslides.pdf | bin | 3425287 -> 3423094 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/context/third/simpleslides/simpleslides.tex | 349 | ||||
-rw-r--r-- | Master/texmf-dist/doc/context/third/simpleslides/styles/Shaded-bluered.pdf | bin | 0 -> 187329 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/context/lua/third/simpleslides/mtx-simpleslides.lua | 220 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex | 179 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex | 29 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex | 12 |
11 files changed, 605 insertions, 207 deletions
diff --git a/Master/texmf-dist/doc/context/third/simpleslides/example.pdf b/Master/texmf-dist/doc/context/third/simpleslides/example.pdf Binary files differnew file mode 100644 index 00000000000..83de4ffc787 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/simpleslides/example.pdf diff --git a/Master/texmf-dist/doc/context/third/simpleslides/example.tex b/Master/texmf-dist/doc/context/third/simpleslides/example.tex new file mode 100644 index 00000000000..72840c20515 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/simpleslides/example.tex @@ -0,0 +1,19 @@ +\usemodule[simpleslides] + [style=BigNumber] + +\setupTitle + [ title={Title of the presentation}, + author={Name of authors}, + date={Date of presentation}, + ] + +\starttext +\placeTitle + +\SlideTitle {The first slide} +Write whatever you want. + +\SlideTitle {The second slide} +Continue writing. + +\stoptext diff --git a/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.pdf b/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.pdf Binary files differindex cfd16e4a174..d0bde203a86 100644 --- a/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.pdf +++ b/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.pdf diff --git a/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.tex b/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.tex index 2808402b9d6..ba1945696bb 100644 --- a/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.tex +++ b/Master/texmf-dist/doc/context/third/simpleslides/simpleslides.tex @@ -28,50 +28,9 @@ %% >>> %% Typescripts : <<< -\starttypescript [serif] [dejavu] - \setups[font:fallback:sans] - \definefontsynonym [Serif] [name:dejavuserif] - [features=default] - \definefontsynonym [SerifItalic] [name:dejavuserifitalic] - [features=default] - \definefontsynonym [SerifBold] [name:dejavuserifbold] [features=default] - \definefontsynonym [SerifBoldItalic] [name:dejavuserifbolditalic] - [features=default] -\stoptypescript - -\starttypescript [sans] [dejavu] - \setups[font:fallback:sans] - \definefontsynonym [Sans] [name:dejavusans] - [features=default] - \definefontsynonym [SansItalic] [name:dejavusansoblique] - [features=default] - \definefontsynonym [SansBold] [name:dejavusansbold] - [features=default] - \definefontsynonym [SansBoldItalic] [name:dejavusansboldoblique] - [features=default] -\stoptypescript - -\starttypescript [mono] [dejavu] - \setups[font:fallback:mono] - \definefontsynonym [Mono] [name:dejavusansmono] - [features=default] - \definefontsynonym [MonoItalic] [name:dejavusansmonooblique] - [features=default] - \definefontsynonym [MonoBold] [name:dejavusansmonobold] - [features=default] - \definefontsynonym [MonoBoldItalic] [name:dejavusansmonoboldoblique] - [features=default] -\stoptypescript - -\starttypescript [dejavu] - \definetypeface [dejavu] [rm] [serif] [dejavu] [default] - \definetypeface [dejavu] [ss] [sans] [dejavu] [default] - \definetypeface [dejavu] [tt] [mono] [dejavu] [default] - \definetypeface [dejavu] [mm] [math] [modern] [default] -\stoptypescript \setupbodyfontenvironment[default][em=italic] -\usetypescript[dejavu] + \setupbodyfont[dejavu,10pt] %% >>> @@ -92,13 +51,15 @@ \definetype[typeTEX][option=tex, style=type] \definetype[command][color=darkred, style=type] \definetype[options][color=darkblue, style=type] +\definetyping[TEX][option=tex, before=\startEXAMPLE,after=\stopEXAMPLE] +\definetyping[SIMPLETEX][option=tex] \setupindenting[medium,yes] \setupwhitespace[medium] -\setuphead[title][alternative=middle, textstyle=sansbold] +\setuphead[title][alternative=middle, textstyle=\ss\bf] \setuphead[section,subsubject,subsection] - [numberstyle=sansbold,textstyle=sansbold] + [numberstyle=\ss\bf,textstyle=\ss\bf] \setuplistalternative[a] [distance=0pt,width=1em,stretch=10em, @@ -121,12 +82,11 @@ rulethickness=1pt, framecolor=darkred, width=broad, + height=fit, leftoffset=1em, rightoffset=1em, - before={\testpage[2]\blank[big]}, - after={\blank[big]} -% before={\testpage[3]\blank[3*big]}, -% after={\blank[3*big]} + before={\testpage[3]\blank[2*big]}, + after={\blank}, ] \startuseMPgraphic{background:random} @@ -145,6 +105,7 @@ [EXAMPLEframe] [rulethickness=1pt, framecolor=darkred, + height=6.55cm, width=broad, background=color, backgroundcolor=gray, @@ -167,7 +128,12 @@ %% >>> %% Interface <<< + +\definecolor [colorprettyone] [r=.6,g=.0,b=.0] % red +\definecolor [colorprettytwo] [r=.0,g=.6,b=.0] % green +\definecolor [colorprettythree] [r=.0,g=.0,b=.6] % blue \definecolor[colorprettyfour][orange] + \usemodule[int-load] \loadsetups[cont-en.xml] \loadsetups[t-simpleslides.xml] @@ -182,9 +148,7 @@ rightoffset=1em, align=right, before={\testpage[3]\blank[2*big]}, - after={\endgraf\blank[big]} -% before={\testpage[3]\blank[3*big]}, -% after={\blank[3*big]} + after={\blank\testpage[2]}, ] %% There gotta be a better way to configure this! @@ -229,7 +193,7 @@ \ignorespaces\XMLflush{cd:arguments}\endgraf %\endgraf \egroup - \stopXMLmapping} + \stopXMLmapping}% \stopXMLmapping \getvalue{\e!stop setuptext}} @@ -342,14 +306,14 @@ The salient features of this module are: a new style is also easy. \stopitemize -This module provides a simple structure that will be suitable for beginning or -intermediate users of \CONTEXT, or someone who does not want to spend too much -time playing around with different configuration options for \CONTEXT. As such -it focusses on different users than Hans's presentation modules that provide -more fancier features. This module also offers much less features than the -\LATEX\ \filename{beamer} package. Its main strength is its ease of use; you -should be able to write your first presentation after spending five minutes with -this manual. +This module provides a simple structure that will be suitable for beginning +or intermediate users of \CONTEXT, or someone who does not want to spend +too much time playing around with different configuration options for +\CONTEXT. As such it focusses on different users than Hans's presentation +modules that provide more and fancier features. This module also offers +much less features than the \LATEX\ \filename{beamer} package. Its main +strength is its ease of use; you should be able to write your first +presentation after spending five minutes with this manual. \section{A bit of history} @@ -367,7 +331,7 @@ Thomas wrote some presentation related macros (see the Prac\TEX\ article {\tt\from[practex]}). With time, he extended these macros into a collection of styles providing different visual effects, and later collected all of them in the \filename{taspresent} module. He gave a talk about the -\filename{taspresent} module in in the second \CONTEXT\ user meeting at Bohinj, +\filename{taspresent} module at the second \CONTEXT\ user meeting at Bohinj, and in the ensuing discussions, Aditya and Thomas decided to modularize and \quotation{\CONTEXT{ize}} some of the internals of the module, giving rise to the current module. Most of the code in the current release has been @@ -376,11 +340,11 @@ contributed by Aditya. \section{Installation} The module is installed in the usual way: simply unzip the archive -\filename{t-simpleslides-<date>.zip} into one of your \filename{$TEXMF} trees, -and from a terminal run \command{mktexlsr} (for \MKII) and \command{luatools ---generate} (for \MKIV). To verify that everything was installed correctly, from -a terminal run \command{kpsewhich t-simpleslides.tex} (for \MKII) and -\command{luatools t-simpleslides.tex} (for \MKIV); these commands should return +\filename{t-simpleslides-<date>.zip} into one of your \filename{$TEXMF} +trees, and from a terminal run \command{mktexlsr} (for \MKII) and +\command{mtxrun --generate} (for \MKIV). + +To verify that everything was installed correctly, run \command{kpsewhich t-simpleslides.tex} from a terminal (for \MKII) and \command{mtxrun --locate t-simpleslides.tex} (for \MKIV); these commands should return the complete path of the files that you just installed. \subsubject{A note about \TEX|-|engines} @@ -395,16 +359,14 @@ know how to fix some of the errors with \XETEX, we will appreciate the help. First you must tell \CONTEXT\ that you want to use this module. To do this simply write: -\startEXAMPLE \startTEX \usemodule[simpleslides] \stopTEX -\stopEXAMPLE -This sets the paper size and font sizes to values that are suitable for +The module sets the paper size and font sizes to values that are suitable for presentations. Everything else is left like a default \CONTEXT\ document. The -module provides different styles that change the visual appearance of the -presentation. The following styles are provided: +module comes with the following styles that change the visual appearance of the +presentation. \startitemize[columns, three] \item \options{BigNumber} \item \options{BottomSquares} @@ -415,6 +377,7 @@ presentation. The following styles are provided: \item \options{FramedTitle} \item \options{HorizontalStripes} \item \options{NarrowStripes} + \item \options{PlainCounter} \item \options{RainbowStripe} \item \options{Rounded} \item \options{Shaded} @@ -427,18 +390,16 @@ presentation. The following styles are provided: \stopitemize To use a style, say \options{BigNumber}, pass the \options{style=BigNumber} -option to the \filename{simpleslides} module as follows. +option to the \filename{simpleslides} module: -\startEXAMPLE \startTEX \usemodule[simpleslides] [style=BigNumber] \stopTEX -\stopEXAMPLE Some of the styles have a few variants that can be chosen using \options{color} and \options{alternative} keys. These are explained in \in -Section[sec:styles]. +{Section}[sec:styles]. By default, the Latin Modern Sans font is used. The module makes it easy to use other fonts that come with a typical \TEX\ distribution. @@ -457,19 +418,17 @@ The following fonts are provided: To choose a font, say \options{Helvetica}, pass \options{font=Helvetica} option to the \filename{simpleslides} module as follows. -\startEXAMPLE \startTEX \usemodule[simpleslides] [style=BigNumber, font=Helvetica] \stopTEX -\stopEXAMPLE -By default, the chosen font is used at 17pt size. The font size can be changed -using the \options{size} key. +The default font size is 17pt. Font size can be changed using +the \options{size} key. More details about the fonts, including information on how to use your own fonts -is given in \in Section[sec:fonts]. +is given in \in{Section}[sec:fonts]. The complete setup for using this module is \setup{simpleslides} @@ -479,6 +438,39 @@ The complete setup for using this module is The \filename{simpleslides} module has a very simple model of a presentation. A presentation consists of a title followed by a series of slides; the module provides macros to help create a presentation title page and slides. +A minimal presentation is shown below. The result is shown in \in +{Figure}[fig:example]. + +\startEXAMPLE +\typefile[option=tex]{example.tex} +\stopEXAMPLE + +\placefigure + [top,bottom] + [fig:example] + {A minimal presentation} + \startcombination[2*2] + \startEXAMPLEframe[width=0.55\textwidth] +\startSIMPLETEX + \usemodule[simpleslides] + [style=BigNumber] + \setupTitle[...] + + \starttext + \SlideTitle{...} + ... + \SlideTitle{...} + ... + \stoptext +\stopSIMPLETEX + \stopEXAMPLEframe + {A minimal example} + {\externalfigure[example][page=1,width=0.55\textwidth]}{Title page} + {\externalfigure[example][page=2,width=0.55\textwidth]}{First slide} + {\externalfigure[example][page=3,width=0.55\textwidth]}{Second slide} + \stopcombination + + \subsubject{Presentation title page} @@ -486,7 +478,6 @@ A presentation title page displays the title of the presentation, the names of the authors, and the date. %% TODO: Also add institution and detail. These can be specified using \typeTEX{\setupTitle} as follows: -\startEXAMPLE \startTEX \setupTitle [ title={Title of the presentation}, @@ -494,12 +485,11 @@ These can be specified using \typeTEX{\setupTitle} as follows: date={Date of presentation}, ] \stopTEX -\stopEXAMPLE The macro \typeTEX{\placeTitle} places the title page in the presentation. It is possible to change the look of \typeTEX{\placeTitle} using some additional arguments to \typeTEX{\setupTitle}. These are explained in \in -Section[sec:setuptitle]. +{Section}[sec:setuptitle]. \subsubject{Presentation slide} @@ -514,125 +504,84 @@ that you want. Each presentation style sets up a style for itemizations, and provides useful macros for placing pictures. These macros will be explained later. -\adaptlayout[lines=+2] -\subsubject{A minimal presentation} -A minimal presentation is shown below. The result is shown in \in -Figure[fig:example]. +\section{Placing pictures} -\startEXAMPLE -\typefile[option=tex]{example.tex} -\stopEXAMPLE +If you want to place pictures in your slides, you can always use \CONTEXT's +\typeTEX{\externalfigure} macro. This module also provides a macro, +\typeTEX{\IncludePicture}, for preconfigured picture layouts. Two layouts are +provided: +\startitemize + \item \options{horizontal}: the picture is placed under the title of the slide, + so that it fits in the available space. + \item \options{vertical}: the slide is divided into two columns; the picture is + placed on the left column and text is placed on the right column. +\stopitemize +These layouts are shown in \in{Figure}[fig:pictures]. \placefigure [top,bottom] - [fig:example] - {A minimal presentation} + [fig:pictures] + {Example of \options{horizontal} and \options{vertical} options for + \typeTEX{IncludePicture} macro} + %FIXME: Change caption to \IncludePicture .. \startcombination[2*2] \startEXAMPLEframe[width=0.55\textwidth] +\startSIMPLETEX + \usemodule[simpleslides] + [...] + \starttext + ... + \IncludePicture + [horizontal] + [cow] + {A Dutch Cow} + ... + \stoptext +\stopSIMPLETEX + \stopEXAMPLEframe + {A horizontal picture} + {\externalfigure[styles/BigNumber-blue] + [page=3,width=0.55\textwidth]}{A horizontal picture} + \startEXAMPLEframe[width=0.55\textwidth] \startTEX \usemodule[simpleslides] - [style=BigNumber] - \setupTitle[...] - + [...] \starttext - \SlideTitle{...} ... - \SlideTitle{...} + \IncludePicture + [vertical] + [mill] + {The windmills are an example of a green energy source} ... \stoptext \stopTEX \stopEXAMPLEframe - {A minimal example} - {\externalfigure[example][page=1,width=0.55\textwidth]}{Title page} - {\externalfigure[example][page=2,width=0.55\textwidth]}{First slide} - {\externalfigure[example][page=3,width=0.55\textwidth]}{Second slide} - \stopcombination - - - -\section{Placing pictures} - -If you want to place pictures in your slides, you can always use \CONTEXT's -\typeTEX{\externalfigure} macro. This module also provides a macro, -\typeTEX{\IncludePicture}, for preconfigured picture layouts. Two layouts are -provided: -\startitemize - \item \options{horizontal}: the picture is placed under the title of the slide, - so that it fits in the available space. - \item \options{vertical}: the slide is divided into two columns; the picture is - placed on the left column and text is placed on the right column. -\stopitemize -These layouts are shown in \in Figure[fig:pictures]. - -\page - -% \placefigure -% [top,bottom] -% [fig:pictures] -% {Example of \options{horizontal} and \options{vertical} options for -% \typeTEX{\IncludePicture} macro} -% \startcombination[2*2] -% \startEXAMPLEframe[width=0.55\textwidth] -% \startTEX -% \usemodule[simpleslides] -% [...] -% \starttext -% ... -% \IncludePicture -% [horizontal] -% [cow] -% {A Dutch Cow} -% ... -% \stoptext -% \stopTEX -% \stopEXAMPLEframe -% {A horizontal picture} -% {\externalfigure[styles/BigNumber-blue] -% [page=3,width=0.55\textwidth]}{A horizontal picture} -% \startEXAMPLEframe[width=0.55\textwidth] -% \startTEX -% \usemodule[simpleslides] -% [...] -% \starttext -% ... -% \IncludePicture -% [vertical] -% [mill] -% {The windmills are an example of a green energy source} -% ... -% \stoptext -% \stopTEX -% \stopEXAMPLEframe -% {A vertical picture} -% {\externalfigure[styles/BigNumber-blue] -% [page=10,width=0.55\textwidth]}{A vertical picture} -% \stopcombination + {A vertical picture} + {\externalfigure[styles/BigNumber-blue] + [page=10,width=0.55\textwidth]}{A vertical picture} +\stopcombination A horizontal picture is placed as follows: -\startEXAMPLE \startTEX \IncludePicture [horizontal] [filename] % Name of the file that contains the picture {Title of the slide} \stopTEX -\stopEXAMPLE while a vertical picture is placed as follows: -\startEXAMPLE \startTEX \IncludePicture [vertical] [filename] % Name of the file that contains the picture {Text that is placed on the right of the picture} \stopTEX -\stopEXAMPLE It is possible to change the height and width of the pictures, or highlight them with circles and arrows. These details can be found in \in -Section[sec:pictures] +{Section}[sec:pictures] \page @@ -647,7 +596,7 @@ styles are shown below along with the details of their variants. This is a style with subdued and quiet colors; its characteristic feature is the page number on the lower right border of the text area. This detail was inspired -by {\em split} style (\filename{s-pre-14}) by Hans. +by the {\em split} style (\filename{s-pre-14}) by Hans. \ShowStyle {BigNumber-blue} \page @@ -679,28 +628,26 @@ The light red stripe marks the progress. \subsubject{Embossed} Spread the word, don't be shy! Show your pride in using \CONTEXT. The color -theme will probably look familiar; I copied it from the \filename{enattab} +theme will probably look familiar; we copied it from the \filename{enattab} manual. \ShowStyle {Embossed} If you are shy, or narcissistic, you can change the emblem by -\startEXAMPLE \startTEX \setuplabeltext [simpleslidesemblem={I made this presentation}] \stopTEX -\stopEXAMPLE \page \subsubject{Framed: with \options{alternative=square}} -This style was inspired by {\em green} style (\filename{s-pre-02}) by Hans. It -has a thick blue frame around the entire slide area and a thinner frame around -the text area. The style has two options for alternative: -\options{alternative=stripe} will display a shaded blue area which will grow with -each slide; \options{alternative=square} displays a row of blue squares at the bottom -which also measure the presentation's progress. +This style was inspired by the {\em green} style (\filename{s-pre-02}) by +Hans. It has a thick blue frame around the entire slide area and a thinner +frame around the text area. The style has two options for alternative: +\options{alternative=stripe} will display a shaded blue area which will +grow with each slide; \options{alternative=square} displays a row of blue +squares at the bottom which also measure the presentation's progress. \ShowStyle {Framed-square} \page @@ -712,7 +659,7 @@ which also measure the presentation's progress. \subsubject{FramedTitle} This is a style with loud titles. Its characteristic feature is the {\em scratch -counter} at the bottom. These are derived from Section~7.2 of the Metafun +counter} at the bottom, which is derived from Section~7.2 of the Metafun manual. \ShowStyle {FramedTitle} @@ -810,7 +757,7 @@ style also has a fancy page counter at the bottom. \subsubject{ThickStripes} This theme is inspired by the {\em Berkeley} style of the \LATEX's -\filename{beamer} package. It has a stop watch at the bottom, which keeps tracks +\filename{beamer} package. It has a stop watch at the bottom, which keeps track of the number of slides. \ShowStyle {ThickStripes} @@ -857,7 +804,6 @@ If you want to set up your own font, pick any value for the \options{font} key commands. Make sure to set the bodyfont at size \typeTEX{\NormalSize}. So, if you have your own typescript for a font, your setup will look like this: -\startEXAMPLE \startTEX \usemodule[simpleslides][...] .... @@ -865,7 +811,6 @@ you have your own typescript for a font, your setup will look like this: \usetypescript[Mytypescript] % As set in your typescript file \setupbodyfont[Myfont,\NormalSize] % Note the \NormalSize here \stopTEX -\stopEXAMPLE Internally, the font size is stored in the macro \typeTEX{\NormalSize}. The main text is set at size \typeTEX{\NormalSize}; the main title is set at @@ -912,7 +857,7 @@ such wasn't mentioned in the previous description). As explained earlier, the first argument determines whether the picture will be placed in horizontal or vertical layout; for examples, see \in -Figure[fig:pictures]. The second argument is the filename of the picture that +{Figure}[fig:pictures]. The second argument is the filename of the picture that you want to include. The third argument is an optional argument useful for highlighting the picture. The fourth argument (in braces) is the text accompanying the picture. For horizontal pictures, this text is placed as a @@ -937,10 +882,10 @@ Below is a brief explanation of what the different parameters do: mechanism. \item \options{highlight} \par - This key determines the highlighting of the picture. If you set, + This key determines the highlighting of the picture. If you set \options{highlight=yes}, then you can use one of the three available highlights: \options{circle}, \options{arrow}, and \options{focus}. These - highlights are shown in \in Figure[fig:highlight]. The specific highlight is + highlights are shown in \in{Figure}[fig:highlight]. The specific highlight is chosen using the \options{alternative} key. The location of the highlight is specified using the \options{x} and \options{y} keys. The scaling and rotation of the highlights is set using \options{xscale}, \options{yscale}, @@ -975,7 +920,7 @@ presentation style. The dimensions \options{x} and \options{y} should be a number between 0 and 10. The \options{x} is scaled by 1/10 times the width of the image; the \options{y} value is scaled by 1/10 times the height of the image. The easiest way to understand this is to look at a scaled grid -superimposed on the picture, as in \in Figure[fig:grid]. The grid is configured +superimposed on the picture, as in \in{Figure}[fig:grid]. The grid is configured as follows: \startitemize[packed] @@ -1012,7 +957,7 @@ as follows: Now lets see how different highlight alternatives are specified. Suppose we want to place the picture of a cow and highlight its head. To help determine the center of the circle, we can first superimpose a fine grid on the picture, and -read the value for the center. From \in Figure[fig:grid], \options{x=1.4} and +read the value for the center. From \in{Figure}[fig:grid], \options{x=1.4} and \options{y=8.2} seems like a good value. Next we need to decide on the radius of the circle. The radius can either be specified in terms of the \quotation{x units} (1/10th of the picture width) or \quotation{y units} (1/10th of the @@ -1020,9 +965,8 @@ picture height). Lets try a radius of 1.5 \quotation{x units}. This can be specified as \options{xscale=1.5}. If we wanted something in terms of \quotation{y units}, we could have used \options{yscale}. If both \options{xscale} and \options{yscale} are specified, we will get an ellipse. -Thus, to draw the circle highlight shown in \in Figure[fig:highlight], we wrote +Thus, to draw the circle highlight shown in \in{Figure}[fig:highlight], we wrote -\startEXAMPLE \startTEX \IncludePicture [horizontal] @@ -1035,7 +979,6 @@ Thus, to draw the circle highlight shown in \in Figure[fig:highlight], we wrote shadow=bottomleft] {The head of a dutch cow} \stopTEX -\stopEXAMPLE If \options{direction} key is specified, the circle (or the ellipse) will be rotated by that amount (in degrees) in the counter clockwise direction. The @@ -1052,7 +995,7 @@ In summary, the different keys related to \options{alternative=circle} are: The center of the circle in terms of scaled units. Their values should be between 0 and 10. \item \options{xscale} and \options{yscale} \par - The radius of the circle if only one options is specified. The major and + The radius of the circle if only one option is specified. The major and minor radii of the ellipse if both options are specified. \item \options{direction} \par The amount by which the circle is rotated. This only makes sense if we are @@ -1070,8 +1013,7 @@ arrow. An arrow is specified by three things, the location of its tip, given by \options{x} and \options{y} keys; the length of the arrow, given by \options{length} key; and the direction of the tail, given by \options{direction} key. Thus, to draw the arrow highlight shown in \in -Figure[fig:highlight], we wrote -\startEXAMPLE +{Figure}[fig:highlight], we wrote \startTEX \IncludePicture [horizontal] @@ -1085,7 +1027,6 @@ Figure[fig:highlight], we wrote shadow=bottomleft] {The mouth of a dutch cow} \stopTEX -\stopEXAMPLE The different keys related to \options{alternative=arrow} are: \startitemize[packed] @@ -1117,9 +1058,8 @@ and \options{color} do not have any effect. The area other than the focussed area is washed out with a transparent color. The degree to which it is washed out is determined by \options{opacity} (default value 0.5), and the color of the unfocussed area is determined by \options{shadowcolor} (default value black). -Thus, to draw the focus highlight shown in \in Figure[fig:highlight], we wrote +Thus, to draw the focus highlight shown in \in{Figure}[fig:highlight], we wrote -\startEXAMPLE \startTEX \IncludePicture [horizontal] @@ -1131,7 +1071,6 @@ Thus, to draw the focus highlight shown in \in Figure[fig:highlight], we wrote xscale=1.5] {The head of a dutch cow} \stopTEX -\stopEXAMPLE The different keys related to \options{alternative=focus} are: \startitemize[packed] @@ -1171,6 +1110,24 @@ them stand out more. The key related to shadows is: To select a specific page from a multi-page pdf file, you can use \options{page=<number>} option. +\subsubject{Using your own style} + +The module makes it easy to write your own style or to tweak one of the +provided styles beyond the configuration options provided by the +module. Simply copy the style which is closest in appearance to what you +want to obtain. Give it a filename \filename{s-myownstyle.tex}, +\filename{myownstyle} being any name you like. Put this file into a +directory where \CONTEXT\ will find it, either the directory where you will +process your presentation or somewhere in your personal \filename{$TEXMF} +tree. Then, let the module know that you want to use your own style: + +\startTEX +\usemodule[simpleslides] + [style=myownstyle] +\stopTEX + +The module will read your file and apply your settings. + \stoptext % vim: foldmethod=marker foldmarker=<<<,>>> diff --git a/Master/texmf-dist/doc/context/third/simpleslides/styles/Shaded-bluered.pdf b/Master/texmf-dist/doc/context/third/simpleslides/styles/Shaded-bluered.pdf Binary files differnew file mode 100644 index 00000000000..380ca852c72 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/simpleslides/styles/Shaded-bluered.pdf diff --git a/Master/texmf-dist/scripts/context/lua/third/simpleslides/mtx-simpleslides.lua b/Master/texmf-dist/scripts/context/lua/third/simpleslides/mtx-simpleslides.lua new file mode 100644 index 00000000000..aeb566338cd --- /dev/null +++ b/Master/texmf-dist/scripts/context/lua/third/simpleslides/mtx-simpleslides.lua @@ -0,0 +1,220 @@ +if not modules then modules = { } end modules ['mtx-simplestyles'] = { + version = 0.1, + comment = "Show a particular style of simpleslides module", + author = "Aditya Mahajan and Thomas A. Schmitz", + copyright = "Aditya Mahajan and Thomas A. Schmitz", + license = "GNU Public License v 2.0" +} + +-- Usage: To generate all variations for BigNumber use +-- mtxrun --script simpleslides --style=BigNumber +-- To generate all variations of all styles use +-- mtxrun --script simpleslides --all +-- +-- By default, luatex engine is used. If you want a specific engine, you can +-- pass --engine=pdftex or --engine=xetex to the program. + +third = third or {} +simpleslides = third.simpleslides or {} + +simpleslides.options = { + ["BigNumber"] ={color={"blue", "red"}}, + ["BottomSquares"] ={}, + ["Boxed"] ={}, + ["BoxedTitle"] ={}, + ["Ellipse"] ={}, + ["Embossed"] ={}, + ["Framed"] ={alternative={"square", "stripe"}}, + ["FramedTitle"] ={}, + ["HorizontalStripes"] ={color={"blue", "green", "red"}}, + ["NarrowStripes"] ={color={"blue", "green", "red"}}, + ["PlainCounter"] ={}, + ["RainbowStripe"] ={}, + ["Rounded"] ={}, + ["Shaded"] ={color={"blue", "green", "bluered"}}, + ["SideSquares"] ={}, + ["Split"] ={}, + ["Sunrise"] ={}, + ["Swoosh"] ={}, + ["ThickStripes"] ={}, +} + +function simpleslides.setup(style, color, alternative) + local usemodule = "\\usemodule[simpleslides]\n" + local options = "" + if style then options = options .. "style=" ..style.. ",\n" end + if color then options = options .. "color=" ..color.. ",\n" end + if alternative then options = options .. "alternative="..alternative..",\n" end + return usemodule .. "[" .. options .. "]\n" +end + +simpleslides.body = [[ +\setupTitle + [title={Presentation Title}, + author={F.~Author, S.~Another}, + date={Date / Occasion}] + +\setupexternalfigures[location={local,global,default}] + +\starttext + +\placeTitle + + +\SlideTitle{Make Titles Informative} + +\startitemize + \item Use bullets points when appropriate. + \item Use pictures when possible + \item Do not put too much information on one slide +\stopitemize + +\IncludePicture + [horizontal] + [cow] % Name of the image + {A Dutch Cow} % Title of the slide + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=yes] + {A Dutch Cow with a grid} % Title of the slide + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=yes, + steps=5, % Each grid block is broken into these many parts. + subgrid=yes] + {A Dutch Cow with a fine grid} % Title of the slide + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=yes, + subgrid=yes, + alternative=circle, + color=orange, + x=1.4, + y=8.2, + xscale=1.5, + shadow=bottomleft] + {The head of a dutch cow} + + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=no, + subgrid=no, + alternative=circle, + color=orange, + x=1.4, + y=8.2, + xscale=1.5, + shadow=bottomleft] + {The head of a dutch cow} + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=no, + subgrid=no, + alternative=arrow, + color=orange, + x=0.4, + y=6.8, + direction=-90, + length=3cm, + shadow=topright] + {The mouth of a dutch cow} + +\IncludePicture + [horizontal] + [cow] % Name of the image + [highlight=yes, + grid=no, + subgrid=no, + alternative=focus, + color=orange, + x=1.4, + y=8.2, + xscale=1.5, + opacity=0.5] + {The head of a dutch cow} + +\IncludePicture + [vertical] + [mill] + [width=\NormalWidth] + {The windmills are an example of a green energy source.} + +\SlideTitle{Summary} + +\startitemize + \item The {\em first main message} of your talk in one or two lines. + \item The {\em second main message} of your talk in one or two lines. + \item Perhaps a {\em third message}, but not more than that. +\stopitemize + +\stoptext +]] + +local engine = environment.argument("engine") or "luatex" +local command = "context --" .. engine -- .. " --batchmode" +local styles = environment.argument("styles") +local filename = "styles/simpleslides-example.tex" + +function simpleslides.create_test(style, color, alternative) + local file = assert(io.open(filename, "w")) + file:write(simpleslides.setup(style,color,alternative)) + file:write(simpleslides.body) + assert(io.close(file)) + local result = "--result=styles/"..style + if color then result = result .. "-" .. color end + if alternative then result = result .. "-" .. alternative end + local str = command .. " " .. filename .. " " .. result + logs.report("simpleslides", "executing " .. str) + os.execute(str) +end + +function simpleslides.show_style(style) + if simpleslides.options[style] then + local colors = simpleslides.options[style].color + local bottoms = simpleslides.options[style].alternative + if colors then + for i,color in pairs(colors) do + if bottoms then + for j,alternative in pairs(bottoms) do + simpleslides.create_test(style,color,alternative) + end + else + simpleslides.create_test(style,color,nil) + end + end + else + if bottoms then + for j,alternative in pairs(bottoms) do + simpleslides.create_test(style,nil,alternative) + end + else + simpleslides.create_test(style,nil,nil) + end + end + else + logs.report("simplestyles", "style \"" .. style .. "\" does not exist") + end +end + +if styles == "all" then + for s,i in pairs(simpleslides.options) do + simpleslides.show_style(s) + end +else + simpleslides.show_style(styles) +end diff --git a/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml b/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml index 200d25df4a5..3b9be870b91 100644 --- a/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml +++ b/Master/texmf-dist/tex/context/interface/third/t-simpleslides.xml @@ -23,10 +23,12 @@ <cd:constant type="FramedTitle"/> <cd:constant type="HorizontalStripes"/> <cd:constant type="NarrowStripes"/> + <cd:constant type="PlainCounter"/> <cd:constant type="RainbowStripe"/> <cd:constant type="Rounded"/> <cd:constant type="Shaded"/> <cd:constant type="SideSquares"/> + <cd:constant type="SideToc"/> <cd:constant type="Split"/> <cd:constant type="Sunrise"/> <cd:constant type="Swoosh"/> diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex new file mode 100644 index 00000000000..b6d19de0fa8 --- /dev/null +++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-c-default.tex @@ -0,0 +1,179 @@ +%D \module +%D [ file=simpleslides-c-default, +%D version=2010.09.20 +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Module simpleslides --- Default counter setup, +%D author=Aditya Mahajan and Thomas A. Schmitz, +%D date=\currentdate, +%D copyright={Aditya Mahajan and Thomas A. Schmitz}] +%C +%C Copyright 2010 Aditya Mahajan and Thomas A. Schmitz +%C This file may be distributed under the GNU General Public License v. 2.0. + +\writestatus{simpleslides}{loading default counter setup} + +\startmodule[simpleslides-c-default] + +\unprotect + +%D Attempt to make the counters for the simpleslides module more "modular." +%D This file is called by t-simpleslides.tex and provides the metapost code for +%D page counters which are then included in the backgrounds of the style +%D modules. + +% \def\setupSlideCounter% +% {\dosingleargument\dosetupSlideCounter} +% +% \def\dosetupSlideCounter[#1]% +% {\setvariables[simpleslides:counter] +% [#1]} +% +% \processaction +% [\getvariable{simpleslides:counter}{alternative}] +% [ a=>\def\simpleslidescounter{simpleslides:shaded:counter1}, +% b=>\def\simpleslidescounter{simpleslides:shaded:counter2}, +% c=>\def\simpleslidescounter{simpleslides:shaded:counter3}, +% \v!default=>\def\simpleslidescounter{simpleslides:shaded:counter1}, +% \v!unknown=>\def\simpleslidescounter{simpleslides:shaded:counter1}] + +\def\simpleslidescounter{simpleslides:shaded:counter5} + +\startuseMPgraphic{simpleslides:shaded:counter1} +save p ; path p[] ; +save a ; +if NOfPages <= 15: + a = 0.7cm ; +elseif NOfPages <= 30: + a = 0.45cm ; +else : + a = 0.25cm ; +fi ; +save factor ; numeric factor ; +factor = (TextWidth - a)/(NOfPages - 2) ; +for i = 2 upto NOfPages : + p[i] = unitcircle scaled a shifted (BackSpace + (i-2)*factor, (2cm - a)/2) ; + if i = PageNumber : + pickup pencircle scaled 5pt ; + drawfill p[i] withcolor \MPcolor{simpleslides:variantcolor} ; + else : + circular_shade(p[i],2,\MPcolor{simpleslides:backgroundcolor}, \MPcolor{simpleslides:variantcolor}) ; + fi +endfor ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter2} +save a,b ; +numeric a,b ; +a = 7mm ; +b = PaperWidth/2 - NOfPages * 2.5pt ; + +save p,q; path p,q ; +p =((0,5mm) -- (1mm,11mm)) shifted (b,0) ; +q =((-8mm,5mm) -- (0,11mm) ) shifted (b,0) ; + +pickup pencircle scaled 3pt ; +for i := NOfPages-1 downto 1: + draw (if i mod 5 = 0 : q else : p fi) + shifted (i*5pt, 0pt) + withcolor if i < PageNumber : \MPcolor{simpleslides:variantcolor} + else : \MPcolor{simpleslides:contrastcolor} + fi ; +endfor ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter3} +save diff ;numeric diff; +if NOfPages <= 25: + diff = 0.4cm ; +elseif NOfPages <= 35: + diff = 0.3cm ; +else : + diff = 0.2cm ; +fi ; + +save factor; numeric factor; +factor = TextWidth/(NOfPages - 2) ; + +save p; path p ; +p = unitsquare xyscaled (diff,diff) + shifted (BackSpace,0.85cm) ; + +for i = 2 upto NOfPages: + if PageNumber = i: + fill p xyscaled (0,2) shifted ( (i-2)*factor,-diff-0.85cm) + withcolor \MPcolor{simpleslides:contrastcolor} ; + else : + fill p shifted ( (i-2)*factor, 0) + withcolor \MPcolor{simpleslides:variantcolor} ; + fi ; +endfor ; +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter4} +save p ; +path p[] ; +linejoin := rounded ; + +p[1] := unitsquare xyscaled(TextWidth,1cm) shifted (BackSpace,0.8cm) ; +save i ; +numeric i; +i = PageNumber/NOfPages ; + +p[2] = ulcorner p[1] -- urcorner p[1] ; +p[3] = llcorner p[1] -- lrcorner p[1] ; + +save o; +pair o[] ; + +o[1] := point i along p[2] ; +o[2] := point i along p[3] ; + +p[4] = ulcorner p[1] -- o[1] -- o[2] -- llcorner p[1] -- cycle ; + +fill p[1] withcolor 0.7\MPcolor{simpleslides:backgroundcolor} ; +fill p[4] withcolor \MPcolor{simpleslides:contrastcolor} ; + +pickup pencircle scaled 1pt ; +draw ulcorner p[1] -- urcorner p[1] -- lrcorner p[1] withcolor 0.3white ; +draw lrcorner p[1] -- llcorner p[1] -- ulcorner p[1] withcolor 0.8white ; + +%clip currentpicture to p[4] ; + +% linear_shade(p[1],0,white,red) ; +% +% % \MPcolor{simpleslides:backgroundcolor}, +% % \MPcolor{simpleslides:contrastcolor}) ; +% +% +% +% +\stopuseMPgraphic + +\startuseMPgraphic{simpleslides:shaded:counter5} +save a,b ; +numeric a,b ; +save p ; +path p ; +p = unitsquare xyscaled (3mm,7mm) randomized 2mm shifted (BackSpace, 5mm) ; +fill p withcolor red ; +% a = 7mm ; +% b = PaperWidth/2 - NOfPages * 2.5pt ; +% +% save p,q; path p,q ; +% p =((0,5mm) -- (1mm,11mm)) shifted (b,0) ; +% q =((-8mm,5mm) -- (0,11mm) ) shifted (b,0) ; +% +% pickup pencircle scaled 3pt ; +% for i := NOfPages-1 downto 1: +% draw (if i mod 5 = 0 : q else : p fi) +% shifted (i*5pt, 0pt) +% withcolor if i < PageNumber : red +% else : yellow +% fi ; +% endfor ; +\stopuseMPgraphic + + +\protect + +\stopmodule diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex index 25869b1e0d4..a8da39b1c2c 100644 --- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex +++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Shaded.tex @@ -85,12 +85,33 @@ \startuseMPgraphic{simpleslides:MP:ornament} StartPage ; +save p ; path p[] ; +save a ; +if NOfPages <= 15: + a = 0.7cm ; +elseif NOfPages <= 30: + a = 0.45cm ; +else : + a = 0.25cm ; +fi ; +save factor ; numeric factor ; +factor = (TextWidth - a)/(NOfPages - 1) ; linear_shade(Page, 6, - \MPcolor{simpleslides:backgroundcolor}, - \MPcolor{simpleslides:variantcolor}) ; + \MPcolor{simpleslides:backgroundcolor}, + \MPcolor{simpleslides:variantcolor}) ; if PageNumber >1: - \includeMPgraphic{\simpleslidescounter} ; -fi + for i = 1 upto NOfPages : + p[i] = unitcircle scaled a shifted (BackSpace + (i-1)*factor, (2cm - a)/2) ; + if i = PageNumber : +% p[i] := p[i] zscaled (1.2,1.5) ; + pickup pencircle scaled 5pt ; + drawfill p[i] withcolor \MPcolor{simpleslides:variantcolor} ; + else : + circular_shade(p[i],2,\MPcolor{simpleslides:backgroundcolor}, + \MPcolor{simpleslides:variantcolor}) ; + fi + endfor ; +fi ; StopPage ; \stopuseMPgraphic diff --git a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex index 86b20718664..3230523e1b4 100644 --- a/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex +++ b/Master/texmf-dist/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex @@ -94,7 +94,7 @@ fi ; \doifsetupselse{simpleslides:setups:\moduleparameter{simpleslides}{counter}} {\setups{simpleslides:setups:\moduleparameter{simpleslides}{counter}}} - {\setups{simpleslides:setups:dot}} + {\setups{simpleslides:setups:circle}} \doif% {\moduleparameter{simpleslides}{randomize}} diff --git a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex b/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex index db81ce6737d..c39cb5dd0a8 100644 --- a/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex +++ b/Master/texmf-dist/tex/context/third/simpleslides/t-simpleslides.tex @@ -71,13 +71,13 @@ [simpleslides-s] [default] -\usemodule - [simpleslides-c] - [default] +% \usemodule +% [simpleslides-c] +% [default] -\doiffileelse{\currentmoduleparameter\c!style} - {\usemodule[\currentmoduleparameter\c!style]} - {\usemodule[simpleslides-s][\currentmoduleparameter\c!style]} +\doiffileelse{s-\currentmoduleparameter\c!style} + {\ReadFile{s-\currentmoduleparameter\c!style}} + {\usemodule[simpleslides-s-\currentmoduleparameter\c!style]} \protect |