summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/lecturer
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-30 21:54:38 +0000
committerKarl Berry <karl@freefriends.org>2010-09-30 21:54:38 +0000
commit9fd0a0bb2a40ac6581d2d04df1393e79f78f1db5 (patch)
treed9a58f1448783d2e480fa5efe17bb59ea94ebc0a /Master/texmf-dist/tex/generic/lecturer
parent4e47383328db1a995e33650ec387e5526cdac809 (diff)
ltr-* in runtime
git-svn-id: svn://tug.org/texlive/trunk@19953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/lecturer')
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-areas.tex208
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-graphics.tex644
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-job.tex406
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-navigation.tex263
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-slides.tex244
-rw-r--r--Master/texmf-dist/tex/generic/lecturer/ltr-steps.tex202
6 files changed, 1967 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-areas.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-areas.tex
new file mode 100644
index 00000000000..9e89d6696ed
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-areas.tex
@@ -0,0 +1,208 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+%
+% ATTRIBUTES
+%
+\def\setarea#1#2\par{%
+ \ltr@space_loop{\ltr@setarea_do{#2}}{#1 }%
+ }
+\long\def\ltr@setarea_do#1#2{%
+ \ltr@ifattribute {ltr@#2@inner_area}:visible;
+ {\setparameter {ltr@#2@inner_area}:}
+ {\ltr@setarea_new{#2}}%
+ #1\par
+ }%
+\def\ltr@area_list{}%
+\def\ltr@setarea_new#1{%
+ \global\eaddright\ltr@area_list{ltr@#1@inner_area,}%
+ \passcs{\usecs{newbox}}{ltr@#1@inner_area:box}%
+ \restrictparameter ltr@#1@inner_area:
+ width height hshift hshift* vshift vshift* left right top bottom
+ foreground background topskip baselineskip parindent parskip hpos vpos
+ visible frame frame_width frame_color frame_corner frame_dash
+ everyposition everyfreeposition font hsize vsize image
+ \par
+ \ltr@restrictattribute ltr@#1@inner_area:visible; true false step\par
+ \ltr@restrictattribute ltr@#1@inner_area:frame_corner; miter round bevel\par
+ \ltr@restrictattribute ltr@#1@inner_area:hpos; ff rr fr rf\par
+ \defactiveparameter ltr@#1@inner_area {%
+ \ltr@delete_empty{##1:background}%
+ \ltr@todim_loop{##1}{width height hshift hshift* vshift vshift* left right top bottom hsize vsize
+ topskip baselineskip parindent frame_width }%
+ \ltr@dimen_set{##1}{hshift*}{hshift}{width}{\pdfpagewidth}%
+ \ltr@dimen_set{##1}{vshift*}{vshift}{height}{\pdfpageheight}%
+ \ltr@deleteattribute ##1:hshift*;%
+ \ltr@deleteattribute ##1:vshift*;%
+ \ltr@dimen_set{##1}{right}{left}{hsize}{\ltr@area_width{##1}}%
+ \ltr@dimen_set{##1}{bottom}{top}{vsize}{\ltr@area_height{##1}}%
+ \ltr@deleteattribute ##1:right;%
+ \ltr@deleteattribute ##1:bottom;%
+ \ltr@ifattribute##1:frame;
+ {\def\ltr@area_name{#1}\ltr@passvalue{\ltr@option_launchloop{area}}##1:frame;}{}%
+ \ltr@deleteattribute##1:frame;
+ \ltr@todim_loop{##1}{frame_width }%
+ \ltr@ifattribute##1:frame_color;{}
+ {\ltr@ifattribute##1:background;
+ {\ltr@setattribute##1:frame_color; = {\ltr@usevalueor##1:background;{white}} }{}}%
+ }%
+ \setparameter {ltr@#1@inner_area}:
+ visible = true
+ }
+\def\ltr@area_usepair#1#2{%
+ \ltr@setattribute ltr@\ltr@area_name @inner_area:frame_#1;={#2}
+ }
+%
+%
+%
+\def\ltr@area_hshift#1{%
+ \ltr@usevalueor #1:hshift;{0pt}%
+ }
+\def\ltr@area_vshift#1{%
+ \ltr@usevalueor #1:vshift;{0pt}%
+ }
+\def\ltr@area_width#1{%
+ \ltr@usevalueor #1:width;{\dimexpr(\pdfpagewidth-\ltr@area_hshift{#1})}%
+ }
+\def\ltr@area_height#1{%
+ \ltr@usevalueor #1:height;{\dimexpr(\pdfpageheight-\ltr@area_vshift{#1})}%
+ }
+\def\ltr@area_left#1{%
+ \ltr@usevalueor #1:left;{0pt}%
+ }
+\def\ltr@area_top#1{%
+ \ltr@usevalueor #1:top;{0pt}%
+ }
+\def\ltr@area_hsize#1{%
+ \ltr@usevalueor #1:hsize;{\dimexpr(\ltr@area_width{#1}-\ltr@area_left{#1})\relax}%
+ }
+\def\ltr@area_vsize#1{%
+ \ltr@usevalueor #1:vsize;{\dimexpr(\ltr@area_height{#1}-\ltr@area_top{#1})\relax}%
+ }
+%
+% POSITION
+% No attributes, except the optional argument,
+% which takes the x and y (downward, \'a la TeX)
+% shifts. Most of this is box manipulation.
+%
+\newcount\ltr@temp_count
+\newcount\ltr@position_count
+\def\position#1{%
+ \ifnextnospace[{\ltr@position{#1}}{\ltr@position{#1}[]}%
+ }
+\newife\ifltr@area_do
+\long\def\ltr@position#1[#2]{%
+ \ltr@ifattribute ltr@#1@inner_area:visible;
+ {\ltr@area_check{#1}%
+ \ifltr@area_do
+ {\ltr@position_do{#2}{ltr@#1@inner_area}}
+ {\gobbleone}}
+ {\ltr@error{Area `#1' doesn't exist. Material is discarded}\gobbleone}
+ }
+\def\ltr@area_check#1{%
+ \ltr@area_dotrue
+ \ltr@ifattribute ltr@inner_slide:areas*;
+ {\ltr@ifvalue ltr@inner_slide:areas*; = all
+ {\ltr@area_dofalse}
+ {\ltr@storevalue\ltr@temp ltr@inner_slide:areas*;
+ \addright\ltr@temp{ }\addleft\ltr@temp{ }%
+ \passexpanded{\iffcontains{ #1 }}{\ltr@temp}\ltr@area_dofalse}}
+ {}%
+ \ltr@ifattribute ltr@inner_slide:areas;
+ {\ltr@ifvalue ltr@inner_slide:areas; = all
+ {}
+ {\ltr@storevalue\ltr@temp ltr@inner_slide:areas;
+ \addright\ltr@temp{ }\addleft\ltr@temp{ }%
+ \passexpanded{\ifcontains{ #1 }}{\ltr@temp}\ltr@area_dotrue\ltr@area_dofalse}}
+ {}%
+ }
+\newbox\ltr@temp_box
+\newdimen\ltr@temp_dimen
+\long\def\ltr@position_do#1#2#3{%
+ \ifemptystring{#1}
+ % Normal position.
+ {\setbox\ltr@temp_box=\ltr@position_dobox{#2}{\ltr@usevalue #2:everyposition;#3}}
+ % Free position.
+ {\setbox\ltr@temp_box=\vbox{%
+ \ltr@position_dobox{#2}{\ltr@usevalue #2:everyfreeposition;#3}}%
+ \ltr@position_getposition#1
+ \setbox\ltr@temp_box=\vbox{%
+ \kern\dimexpr(\ltr@position_top+\ltr@usevalueor #2:topskip;\topskip-\ht\ltr@temp_box)\relax
+ \moveright\ltr@position_left\box\ltr@temp_box
+ }%
+ \dp\ltr@temp_box=0pt \ht\ltr@temp_box=0pt
+ }%
+ % How to apply topskip?
+ % If the box isn't empty, that doesn't mean it shouldn't be used,
+ % since the content of the box might be material freely positioned,
+ % which doesn't exist, so to speak.
+ % We can't measure the box either, because if topskip
+ % is 0pt, one-line material without depth will fill the box
+ % with height and depth 0pt, as if there were nothing, and
+ % topskip will be applied again on the next material.
+ % Hence this pseudo-conditional turned to true the first
+ % time real material is added.
+ \ifemptystring{#1}
+ {\begingroup
+ \ltr@usevalue #2:font;% So em and ex are right.
+ \ifcsname #2:done\endcsname
+ \global\ltr@temp_dimen=\dimexpr(%
+ \dimexpr(\ltr@usevalueor #2:baselineskip;\baselineskip+\ltr@usevalueor #2:parskip;{0pt})\relax
+ -\dimexpr(\ht\ltr@temp_box+\dp\usecs{#2:box}))\relax
+ \ifdim\ltr@temp_dimen<\lineskiplimit
+ \global\ltr@temp_dimen=\lineskip
+ \fi
+ \else
+ \global\ltr@temp_dimen=\dimexpr(\ltr@usevalueor #2:topskip;\topskip-\ht\ltr@temp_box)\relax%
+ \global\letcs{#2:done}\relax
+ \fi
+ \endgroup}
+ {\edef\ltr@position_left{\the\ht\usecs{#2:box}}% I could have used special dimensions
+ \edef\ltr@position_top{\the\dp\usecs{#2:box}}}% but it's a time of austerity.
+ \global\setbox\usecs{#2:box}=\vbox{%
+ \unless\ifvoid\usecs{#2:box}
+ \unvcopy\usecs{#2:box}
+ \fi
+ \ifemptystring{#1}
+ {\kern\ltr@temp_dimen}
+ {\kern-\dimexpr(\ht\usecs{#2:box}+\dp\usecs{#2:box})\relax}
+ \ifx\ltr@step_current\emptycs
+ \ifemptystring{#1}\unvbox\box\ltr@temp_box
+ \reverse\iffcs{ltr@#2_\the\slideno @inner_area:group}
+ {\global\letcs{ltr@#2_\the\slideno @inner_area:group}\emptycs}
+ \else
+ \global\advance\ltr@position_count1
+ \pdfliteral {/OC/ltr@position_\the\ltr@position_count:content BDC}
+ \ifemptystring{#1}\unvbox\box\ltr@temp_box
+ \pdfliteral {EMC}
+ \addproperties{ltr@position_\the\ltr@position_count:content}{\ltr@step_current}
+ \reverse\iffcs{#2_\the\slideno:group}
+ {\global\letcs{#2_\the\slideno:group}\ltr@step_current
+ \addproperties{#2_\the\slideno:background}{\usecs{#2_\the\slideno:group}}}
+ \fi
+ \reverse\iffemptystring{#1} % Restore the box to its original dimensions.
+ {\prevdepth-1000pt \vbox to \ht\usecs{#2:box}{\vfil\hbox{\vrule height0pt width0pt depth\dp\usecs{#2:box}}}}%
+ }%
+ \ltr@temp_dimen=0pt
+ }
+\def\ltr@position_getposition#1,#2 {%
+ \edef\ltr@position_left{\ifemptystring{#1}{0pt}{\dimexpr(#1)}}%
+ \edef\ltr@position_top{\ifemptystring{#2}{0pt}{\dimexpr(#2)}}
+ }
+\long\def\ltr@position_dobox#1#2{%
+ \vtop{%
+ \ltr@usevalue #1:font;
+ \parindent\ltr@usevalueor #1:parindent;{0pt}\relax
+ \hsize=\ltr@area_hsize{#1}\relax
+ \ltr@settovalue\baselineskip #1:baselineskip;
+ \parskip=\ltr@usevalueor #1:parskip;{0pt}\relax
+ \leftskip=0pt \rightskip=0pt plus 1fill\relax
+ \ltr@ifcasevalue #1:hpos;
+ \val ff \rightskip=0pt
+ \val rr \leftskip=0pt plus 1fill\relax
+ \val rf \leftskip=0pt plus 1fill \rightskip=0pt
+ \endval
+ #2}%
+ }
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-graphics.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-graphics.tex
new file mode 100644
index 00000000000..c42ef9f1d26
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-graphics.tex
@@ -0,0 +1,644 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+% COLORS
+% No attributes here. Cool.
+%
+\def\newcolor#1#2{%
+ \ifnextnospace[{\ltr@newcolor{#1}{#2}}{\ltr@newcolor{#1}{#2}[]}%
+ }
+\def\ltr@newcolor#1#2[#3]#4{%
+ \ifcs{ltr@colormodel_#2}
+ {\xdefcs{ltr@color_user:#1}{%
+ \usecs{ltr@colormodel_#2}#4\ltr@color_end
+ \ifemptystring{#3}{/ltr@opacity_1 gs }{/ltr@opacity_#3 gs }}%
+ \reverse\iffemptystring{#3}{\ltr@create_opacity{#3}}%
+ \xdefcs{ltr@jscolor_user:#1}{\usecs{ltr@jscolormodel_#2}#4\ltr@color_end}%
+ }%
+ {\ltr@error{Unknown color model `#2'. Color `#1' won't be defined}}%
+ }
+\def\ltr@create_opacity#1{%
+ \reverse\iffcs{ltr@opacity_#1}
+ {\immediate\pdfobj{<< /Type/ExtGState /CA #1 /ca #1 >>}%
+ \addgstate{ltr@opacity_#1}{\the\pdflastobj}%
+ \gdefcs{ltr@opacity_#1}{}}%
+ }
+
+\def\ltr@colormodel_grey#1\ltr@color_end{#1 g #1 G }
+\let\ltr@colormodel_gray\ltr@colormodel_grey
+\def\ltr@colormodel_rgb#1\ltr@color_end{#1 rg #1 RG }
+\def\ltr@colormodel_cmyk#1\ltr@color_end{#1 k #1 K }
+%
+\def\ltr@color_use#1{%
+ \ifcs{ltr@color_user:#1}
+ {\usecs{ltr@color_user:#1}}
+ {\ltr@color_analyze#1 0 0 0 0 \ltr@color_end}%
+ }
+\def\ltr@color_analyze#1 {%
+ \ifcs{ltr@color_usemodel:#1}
+ {\usecs{ltr@color_usemodel:#1}}%
+ {\ltr@use_defaultcolor}%
+ }
+%
+\defcs{ltr@color_usemodel:grey}#1 #2\ltr@color_end{#1 g #1 G }
+\letcstocs{ltr@color_usemodel:gray}{ltr@color_usemodel:grey}
+\defcs{ltr@color_usemodel:rgb}#1 #2 #3 #4\ltr@color_end{#1 #2 #3 rg #1 #2 #3 RG }
+\defcs{ltr@color_usemodel:cmyk}#1 #2 #3 #4 #5\ltr@color_end{#1 #2 #3 #4 k #1 #2 #3 #4 K }
+\def\ltr@use_defaultcolor#1\ltr@color_end{1 g 1 G }
+%
+% A simple macro for everybody.
+%
+\long\def\usecolor#1#2{%
+ \pdfcolorstack0 push {\ltr@color_use{#1}}%
+ #2%
+ \pdfcolorstack0 pop%
+ }
+%
+% And the same in JavaScript, just for the background in full screen. Ain't it nice?
+%
+\def\ltr@jscolormodel_grey#1\ltr@color_end{["G",#1]}
+\let\ltr@jscolormodel_gray\ltr@jscolormodel_grey
+\def\ltr@jscolormodel_rgb#1 #2 #3\ltr@color_end{["RGB",#1,#2,#3]}
+\def\ltr@jscolormodel_cmyk#1 #2 #3 #4\ltr@color_end{["CMYK",#1,#2,#3,#4]}
+%
+\def\ltr@jscolor_use#1#2#3{%
+ \ltr@ifattribute #1:#2;
+ {\ifcs{ltr@jscolor_user:\ltr@usevalueor#1:#2;{ltr@novalue}}
+ {\usecs{ltr@jscolor_user:\ltr@usevalue#1:#2;}}
+ {\ltr@passvaluenobraces{\ltr@jscolor_analyze{#3}}#1:#2; \ltr@color_end}}
+ {["G",#3]}%
+ }
+\def\ltr@jscolor_analyze#1#2 {%
+ \ifcs{ltr@jscolor_usemodel:#2}
+ {\usecs{ltr@jscolor_usemodel:#2}}%
+ {\ltr@jsuse_defaultcolor{#1}}%
+ }
+\defcs{ltr@jscolor_usemodel:grey}#1 \ltr@color_end{["G",#1]}
+\letcstocs{ltr@jscolor_usemodel:gray}{ltr@jscolor_usemodel:grey}
+\defcs{ltr@jscolor_usemodel:rgb}#1 #2 #3 \ltr@color_end{["RGB",#1,#2,#3]}
+\defcs{ltr@jscolor_usemodel:cmyk}#1 #2 #3 #4 \ltr@color_end{["CMYK",#1,#2,#3,#4]}
+\def\ltr@jsuse_defaultcolor#1#2\ltr@color_end{["G",#1]}
+
+\ltr@create_opacity{1}
+\newcolor{black}{grey}{0}
+\newcolor{white}{grey}{1}
+\newcolor{red}{rgb}{1 0 0}
+\newcolor{green}{rgb}{0 1 0}
+\newcolor{blue}{rgb}{0 0 1}
+\newcolor{cyan}{cmyk}{1 0 0 0}
+\newcolor{magenta}{cmyk}{0 1 0 0}
+\newcolor{yellow}{cmyk}{0 0 1 0}
+
+%
+%
+%
+%
+% SHADES
+%
+\def\ltr@newshade_do#1#2#3{%
+ \immediate\pdfobj stream attr {
+ /FunctionType 4
+ /Domain [0 1]
+ /Range [#1]
+ }
+ {{\ltr@usevalueor ltr@inner_shade:speed;1 mul dup #3}}%
+ \edef\ltr@temp{\the\pdflastobj\spacecs}
+ \immediate\pdfobj{
+ <<
+ /ShadingType 2
+ /Coords[0 0 1 0]
+ /Extend [true true]
+ /ColorSpace /Device#2
+ /Function \ltr@temp 0 R
+ >>}
+ \edef\ltr@temp{\the\pdflastobj\spacecs}%
+ \addshading{ltr@shade_\ltr@usevalue ltr@inner_shade:name;}{\ltr@temp}
+ }
+\def\ltr@newshade_trig#1#2{%
+ \ltr@nopt{%
+ \dimexpr(\ltr@nopt{#1pt*71/4068}%
+ \dimexpr(#2\dimexpr(#2\dimexpr(#2\dimexpr(#2pt/72-1pt)\relax+42pt)\relax-840pt)\relax+5040pt)\relax/5040)\relax}%
+ }
+\def\ltr@newshade_sin#1{%
+ \ltr@newshade_trig{#1}{\ltr@nopt{\ltr@nopt{#1pt*71/4068}\dimexpr(#1pt*71/4068)}}%
+ }
+\def\ltr@newshade_cos#1{%
+ \ltr@newshade_trig{\ltr@nopt{90pt-#1pt}}{\ltr@nopt{\ltr@nopt{\ltr@nopt{90pt-#1pt}pt*71/4068}\dimexpr(\ltr@nopt{90pt-#1pt}pt*71/4068)}}%
+ }
+\def\ltr@newshade_removepoint#1.#2#3#4#5\ltr@end{#1#2#3#4}
+\def\ltr@newshade_removesign-{}%
+\def\ltr@newshade_doscale#1{%
+ \xdefcs{ltr@shade_user:\ltr@usevalue ltr@inner_shade:name;_scale}{\ltr@nopt{1000pt/\expandafter\ltr@newshade_removepoint#1000\ltr@end}}%
+ }
+\defactiveparameter ltr@inner_shade {%
+ \ltr@todim_loop{#1}{width height }%
+ \ifdim\ltr@usevalueor #1:angle;{90}pt>90pt
+ \ltr@error{A shade's angle can't be more than 90 [shade `\ltr@usevalue #1:name;']}%
+ \ltr@esetattribute #1:angle; = 90
+ \else
+ \ifdim\ltr@usevalueor #1:angle;{90}pt<-90pt
+ \ltr@error{A shade's angle can't be less than -90 [shade `\ltr@usevalue #1:name;']}%
+ \ltr@esetattribute #1:angle; = -90
+ \fi
+ \fi
+ \ifdim\ltr@usevalueor #1:angle;{90}pt<0pt
+ \ltr@esetattribute #1:angle; = \ltr@passvaluenobraces\ltr@newshade_removesign#1:angle;
+ \gdefcs{ltr@shade_user:\ltr@usevalue #1:name;}{reversed}%
+ \else
+ \gdefcs{ltr@shade_user:\ltr@usevalue #1:name;}{normal}%
+ \fi
+ \xdefcs{ltr@shade_user:\ltr@usevalue #1:name;_sin}{\ltr@newshade_sin{\ltr@usevalueor#1:angle;{90}}}%
+ \xdefcs{ltr@shade_user:\ltr@usevalue #1:name;_cos}{\ltr@newshade_cos{\ltr@usevalueor#1:angle;{90}}}%
+ \ifdim\ltr@usevalueor#1:angle;{90}pt<45pt
+ \passcs\ltr@newshade_doscale{ltr@shade_user:\ltr@usevalue #1:name;_cos}%
+ \else
+ \passcs\ltr@newshade_doscale{ltr@shade_user:\ltr@usevalue #1:name;_sin}%
+ \fi
+ \ltr@ifvalue #1:fixed; = true
+ {\gdefcs{ltr@shade_user:\ltr@usevalue #1:name;_fixed}{}
+%
+% This would force fixed shades to have at least the slide's dimension,
+% so it would never take the area's dimensions. But after all why forbid
+% an option simply because I can't see the point of it?
+%
+% \gdefcs{ltr@shade_user:\ltr@usevalue #1:name;_width}{\pdfpagewidth}
+% \gdefcs{ltr@shade_user:\ltr@usevalue #1:name;_height}{\pdfpageheight}
+ }{}%
+ \ltr@passvalue{\gdefcs{ltr@shade_user:\ltr@usevalue #1:name;_width}}#1:width;%
+ \ltr@passvalue{\gdefcs{ltr@shade_user:\ltr@usevalue #1:name;_height}}#1:height;%
+ \ltr@ifcasevalue#1:model;
+ \val grey
+ \edef\ltr@from_grey{\ltr@usevalueor#1:from;0 }%
+ \edef\ltr@to_grey{\ltr@usevalueor#1:to;1 }%
+ \ltr@newshade_do{0 1}{Gray}{%
+ \ltr@newshade_setcolor{grey}}%
+ \val gray
+ \edef\ltr@from_grey{\ltr@usevalueor#1:from;0 }%
+ \edef\ltr@to_grey {\ltr@usevalueor#1:to;0 }%
+ \ltr@newshade_do{0 1}{Gray}{%
+ \ltr@newshade_setcolor{grey}}%
+ \val rgb
+ \ltr@passvaluenobracesor{\ltr@newshade_getrgb{from}}#1:from;
+ {\def\ltr@from_red{0 }\def\ltr@from_green{0 }\def\ltr@from_black{0 }} %
+ \ltr@passvaluenobracesor{\ltr@newshade_getrgb{to}}#1:to;
+ {\def\ltr@to_red{1 }\def\ltr@to_green{1 }\def\ltr@to_blue{1 }} %
+ \ltr@newshade_do{0 1 0 1 0 1}{RGB}{%
+ \ltr@newshade_setcolor{red}%
+ exch dup \ltr@newshade_setcolor{green}%
+ exch \ltr@newshade_setcolor{blue}}%
+ \val cmyk
+ \ltr@passvaluenobracesor{\ltr@newshade_getcmyk{from}}#1:from;
+ {\def\ltr@from_cyan{0 }\def\ltr@from_magenta{0 }\def\ltr@from_yellow{ }\def\ltr@from_black{0 }} %
+ \ltr@passvaluenobraces{\ltr@newshade_getcmyk{to}}#1:to;
+ {\def\ltr@to_cyan{1 }\def\ltr@to_magenta{1 }\def\ltr@to_yellow{1 }\def\ltr@to_black{1 }} %
+ \ltr@newshade_do{0 1 0 1 0 1 0 1}{CMYK}{%
+ \ltr@newshade_setcolor{cyan}%
+ exch dup \ltr@newshade_setcolor{magenta}%
+ exch dup \ltr@newshade_setcolor{yellow}%
+ exch \ltr@newshade_setcolor{black}%
+ }%
+ \elseval
+ \edef\ltr@from_grey{\ltr@usevalueor#1:from;0 }%
+ \edef\ltr@to_grey{\ltr@usevalueor#1:to;1 }%
+ \ltr@newshade_do{0 1}{Gray}{%
+ \ltr@newshade_setcolor{grey}}%
+ \endval
+ \ltr@deleteattribute#1:name;%
+ \ltr@deleteattribute#1:width;%
+ \ltr@deleteattribute#1:height;%
+ \ltr@deleteattribute#1:fixed;%
+ \ltr@deleteattribute#1:model;%
+ \ltr@deleteattribute#1:from;%
+ \ltr@deleteattribute#1:to;%
+ \ltr@deleteattribute#1:angle;%
+ \ltr@deleteattribute#1:speed;%
+ }
+\def\ltr@newshade_getrgb#1#2 #3 #4 {%
+ \defcs{ltr@#1_red}{#2 }\defcs{ltr@#1_green}{#3 }\defcs{ltr@#1_blue}{#4 }%
+ \skipspace{}%
+ }
+\def\ltr@newshade_getcmyk#1#2 #3 #4 #5 {%
+ \defcs{ltr@#1_cyan}{#2 }\defcs{ltr@#1_magenta}{#3 }\defcs{ltr@#1_yellow}{#4 }\defcs{ltr@#1_black}{#5 }%
+ \skipspace{}%
+ }
+\def\ltr@newshade_setcolor#1{%
+ \usecs{ltr@from_#1} \usecs{ltr@to_#1} sub mul \usecs{ltr@from_#1} exch sub
+ }
+\restrictparameter ltr@inner_shade: name model from to angle speed width height fixed\par
+\ltr@boolean_attr{ltr@inner_shade:fixed}
+\ltr@restrictattribute ltr@inner_shade:model; grey gray rgb cmyk\par
+\def\newshade#1{%
+ \setparameter ltr@inner_shade:
+ name = {#1}
+ }
+
+%
+%
+%
+%
+% PAINTING
+%
+\def\ltr@paint_area#1#2#3#4#5{%
+ \ifcs{ltr@shade_user:#1}
+ {\ltr@point_convert{#2-\pdfhorigin}
+ \ltr@point_convert{\pdfvorigin-#3}
+ \ltr@point_convert{#4}
+ \ltr@point_convert{-#5} re W* n
+ \ltr@paint_shade{#1}}
+ {\ltr@paint_color{f}{#1}}
+ {#2}{#3}{#4}{#5}
+ }
+\def\ltr@paint_path#1#2#3#4#5{%
+ \ifcs{ltr@shade_user:\ltr@usevalueor#1:frame_color;{ltr@novalue}}
+ {\ltr@point_convert{#2-\dimexpr(\pdfhorigin+\ltr@usevalue #1:frame_width;)}
+ \ltr@point_convert{\dimexpr(\pdfvorigin+\ltr@usevalue #1:frame_width;)-#3}
+ \ltr@point_convert{#4+\dimexpr(\ltr@usevalue #1:frame_width;*2)}
+ \ltr@point_convert{-#5+\dimexpr(\ltr@usevalue #1:frame_width;*2)} re
+ \ltr@point_convert{#2-\pdfhorigin}
+ \ltr@point_convert{\pdfvorigin-#3}
+ \ltr@point_convert{#4}
+ \ltr@point_convert{-#5} re W* n
+ \ltr@passvalue\ltr@paint_shade #1:frame_color;
+ {\dimexpr(#2-\ltr@usevalue #1:frame_width;)\relax}
+ {\dimexpr(#3-\ltr@usevalue #1:frame_width;)\relax}
+ {#4+\dimexpr(\ltr@usevalue #1:frame_width;*2)}
+ {#5+\dimexpr(\ltr@usevalue #1:frame_width;*2)}}
+ {%
+ \ltr@point_convert{\ifdim\ltr@usevalue #1:frame_width;<0pt -\fi\ltr@usevalue #1:frame_width;} w
+ \ltr@ifcasevalue#1:frame_corner;
+ \val round 1
+ \val bevel 2
+ \elseval 0
+ \endval\spacecs j
+ \ltr@ifattribute#1:frame_dash;{[\ltr@usevalue#1:frame_dash;] 0 d }{}%
+ \ltr@passvalue{\ltr@paint_color{S}}#1:frame_color;
+ {\dimexpr(#2-\ltr@usevalue #1:frame_width;/2)}
+ {\dimexpr(#3-\ltr@usevalue #1:frame_width;/2)}
+ {\dimexpr(#4+\ltr@usevalue #1:frame_width;)}
+ {\dimexpr(#5+\ltr@usevalue #1:frame_width;)}}
+ }
+\def\ltr@paint_shade#1#2#3#4#5{%
+% Translation, and reversal of vertical dimension.
+ 1 0 0 -1
+ \passexpandedcs\ifstring{ltr@shade_user:#1}{reversed}
+ {\ifcs{ltr@shade_user:#1_fixed}
+ {\ltr@point_convert{\pdfpagewidth-\pdfhorigin}}
+ {\ltr@point_convert{\dimexpr(#4+#2)-\pdfhorigin}}}
+ {\ifcs{ltr@shade_user:#1_fixed}
+ {\ltr@point_convert{-\pdfhorigin}}
+ {\ltr@point_convert{#2-\pdfhorigin}}}
+ \ifcs{ltr@shade_user:#1_fixed}{\ltr@point_convert{\pdfvorigin}}{\ltr@point_convert{\pdfvorigin-#3}} cm
+% Scaling.
+ \passexpandedcs\iffstring{ltr@shade_user:#1}{reversed}{-}%
+ \ifcs{ltr@shade_user:#1_width}
+ {\ltr@point_convert{\usecs{ltr@shade_user:#1_width}}}
+ {\ltr@point_convert{#4}}%
+ 0 0
+ \ifcs{ltr@shade_user:#1_height}
+ {\ltr@point_convert{\usecs{ltr@shade_user:#1_height}}}
+ {\ltr@point_convert{#5}}%
+ 0 0 cm
+% Rotation.
+ \usecs{ltr@shade_user:#1_cos} \usecs{ltr@shade_user:#1_sin} -\usecs{ltr@shade_user:#1_sin}
+ \usecs{ltr@shade_user:#1_cos} 0 0 cm
+% Scaling of rotated material top accommodate the new length (diagonal, not side).
+ \usecs{ltr@shade_user:#1_scale} 0 0 1 0 0 cm
+ /ltr@shade_#1 sh
+ }
+\def\ltr@paint_color#1#2#3#4#5#6{%
+ \ltr@color_use{#2}%
+ \ltr@point_convert{#3-\pdfhorigin} \ltr@point_convert{\pdfvorigin-#4}
+ \ltr@point_convert{#5} \ltr@point_convert{-#6} re #1
+ }
+
+%
+%
+%
+%
+% SYMBOLS
+%
+\def\ltr@draw_dim#1{%
+ \ltr@nopt{#1pt}%
+ }
+\newfornoempty\ltr@draw_loop{1}#2,{%
+ \passtrim{#2}{\ltr@draw_addspace{#1}}%
+ }[\ltr@draw_add{}{}{}{#1}]
+\def\ltr@draw_addspace#1#2{%
+ \reverse\iffemptystring{#2}{\ltr@draw_decide{#1}#2 }% SPACE!!!
+ }
+\def\ltr@draw_decide#1#2 {%
+ \ifcs{ltr@draw_#2}
+ {\usecs{ltr@draw_#2}{#1}}
+ {\ltr@draw_line{#1}#2 }%
+ }
+\def\ltr@draw_line#1#2 #3 {%
+ \ifstring{#2}{+}
+ {\ltr@draw_relativeline#3 }
+ {\ltr@draw_add{}{#2}{#3}{l}%
+ \passarguments{S}}%
+ }
+\def\ltr@draw_relativeline#1 #2 {%
+ \ltr@draw_add{}{\ltr@nopt{#1pt+\ltr@draw_x pt}}{\ltr@nopt{#2pt+\ltr@draw_y pt}}{l}%
+ \passarguments{S}
+ }
+\def\ltr@draw_move#1#2 #3 {%
+ \ifstring{#2}{+}
+ {\ltr@draw_relativemove{#1}#3 }
+ {\ltr@draw_add{#1}{#2}{#3}{m}%
+ \passarguments{}}%
+ }
+\def\ltr@draw_relativemove#1#2 #3 {%
+ \ltr@draw_add{#1}{\ltr@nopt{#2pt+\ltr@draw_x pt}}{\ltr@nopt{#3pt+\ltr@draw_y pt}}{m}%
+ \passarguments{}
+ }
+\def\ltr@draw_stroke#1{%
+ \ltr@draw_add{S}{\ltr@draw_x}{\ltr@draw_y}{m}%
+ \passarguments{}
+ }
+\def\ltr@draw_close#1{%
+ \ltr@draw_add{h}{\ltr@draw_x}{\ltr@draw_y}{m}%
+ \passarguments{S}
+ }
+\def\ltr@draw_fill#1{%
+ \ltr@draw_add{f*}{\ltr@draw_x}{\ltr@draw_y}{m}%
+ \passarguments{}
+ }
+\def\ltr@draw_paint#1{%
+ \ltr@draw_add{h B*}{\ltr@draw_x}{\ltr@draw_y}{m}%
+ \passarguments{}
+ }
+\def\ltr@draw_pen#1#2 {%
+ \ltr@draw_add{}{}{}{#2 w }%
+ \passarguments{}
+ }
+\def\ltr@draw_color#1#2 {%
+ \ifcs{ltr@color_user:#2}
+ {\ltr@draw_add{}{}{}{\usecs{ltr@color_user:#2}}}
+ {\usecs{ltr@draw_color#2}}%
+ }
+\def\ltr@draw_colorrgb#1 #2 #3 {%
+ \ltr@draw_add{}{}{}{#1 #2 #3 rg #1 #2 #3 RG }%
+ }
+\def\ltr@draw_colorcmyk#1 #2 #3 #4 {%
+ \ltr@draw_add{}{}{}{#1 #2 #3 #4 k #1 #2 #3 #4 K }%
+ }
+\def\ltr@draw_colorgrey#1 {%
+ \ltr@draw_add{}{}{}{#1 g #1 G }%
+ }
+\let\ltr@draw_colorgray\ltr@draw_colorgrey
+\def\ltr@draw_add#1#2#3#4{%
+ \eaddright\ltr@draw_temp{%
+ \reverse\iffemptystring{#1}{#1 }%
+ \reverse\iffemptystring{#2}{\ltr@draw_dim{#2} }%
+ \reverse\iffemptystring{#3}{\ltr@draw_dim{#3} }%
+ #4 }%
+ \reverse\iffemptystring{#2}
+ {\edef\ltr@draw_x{#2}%
+ \ifdim\ltr@draw_x pt>\ltr@draw_xmax pt \edef\ltr@draw_xmax{\ltr@draw_x}\fi
+ \ifdim\ltr@draw_x pt<\ltr@draw_xmin pt \edef\ltr@draw_xmin{\ltr@draw_x}\fi}%
+ \reverse\iffemptystring{#3}
+ {\edef\ltr@draw_y{#3}%
+ \ifdim\ltr@draw_y pt>\ltr@draw_ymax pt \edef\ltr@draw_ymax{\ltr@draw_y}\fi
+ \ifdim\ltr@draw_y pt<\ltr@draw_ymin pt \edef\ltr@draw_ymin{\ltr@draw_y}\fi}%
+ }
+\def\ltr@draw_circle#1#2 #3 {%
+ \usecs{ltr@draw_circle#2}{\ltr@draw_x}{\ltr@draw_y}{#3}%
+ \passarguments{S}
+ }
+\def\ltr@draw_kappa{5522847}
+\def\ltr@draw_circleur#1#2#3{%
+ \ltr@draw_addcircle{#1pt}{#2pt+.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt+#3pt-.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt+#3pt}
+ {#1pt+#3pt}{#2pt+#3pt}{#3}{#3}%
+ }
+\def\ltr@draw_circledr#1#2#3{%
+ \ltr@draw_addcircle{#1pt}{#2pt-.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt+#3pt-.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt-#3pt}
+ {#1pt+#3pt}{#2pt-#3pt}{#3}{-#3}%
+ }
+\def\ltr@draw_circleru#1#2#3{%
+ \ltr@draw_addcircle{#1pt+.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt}
+ {#1pt+#3pt}{#2pt+#3pt-.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt+#3pt}{#2pt+#3pt}{#3}{#3}%
+ }
+\def\ltr@draw_circlerd#1#2#3{%
+ \ltr@draw_addcircle{#1pt+.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt}
+ {#1pt+#3pt}{#2pt-#3pt+.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt+#3pt}{#2pt-#3pt}{#3}{-#3}%
+ }
+\def\ltr@draw_circleul#1#2#3{%
+ \ltr@draw_addcircle{#1pt}{#2pt+.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt-#3pt+.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt+#3pt}
+ {#1pt-#3pt}{#2pt+#3pt}{-#3}{#3}%
+ }
+\def\ltr@draw_circledl#1#2#3{%
+ \ltr@draw_addcircle{#1pt}{#2pt-.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt-#3pt+.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt-#3pt}
+ {#1pt-#3pt}{#2pt-#3pt}{-#3}{-#3}%
+ }
+\def\ltr@draw_circlelu#1#2#3{%
+ \ltr@draw_addcircle{#1pt-.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt}
+ {#1pt-#3pt}{#2pt+#3pt-.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt-#3pt}{#2pt+#3pt}{-#3}{#3}%
+ }
+\def\ltr@draw_circleld#1#2#3{%
+ \ltr@draw_addcircle{#1pt-.\ltr@draw_kappa\dimexpr(#3pt)}{#2pt}
+ {#1pt-#3pt}{#2pt-#3pt+.\ltr@draw_kappa\dimexpr(#3pt)}
+ {#1pt-#3pt}{#2pt-#3pt}{-#3}{-#3}%
+ }
+\def\ltr@draw_addcircle#1#2#3#4#5#6#7#8{%
+ \eaddright\ltr@draw_temp{%
+ \ltr@nopt{#1} \ltr@nopt{#2}
+ \ltr@nopt{#3} \ltr@nopt{#4}
+ \ltr@nopt{#5} \ltr@nopt{#6} c
+ }%
+ \edef\ltr@draw_x{\ltr@nopt{\ltr@draw_x pt+#7pt}}%
+ \edef\ltr@draw_y{\ltr@nopt{\ltr@draw_y pt+#8pt}}%
+ \reverse\iffemptycommand\ltr@draw_x
+ {\ifdim\ltr@draw_x pt>\ltr@draw_xmax pt \edef\ltr@draw_xmax{\ltr@draw_x}\fi
+ \ifdim\ltr@draw_x pt<\ltr@draw_xmin pt \edef\ltr@draw_xmin{\ltr@draw_x}\fi}%
+ \reverse\iffemptycommand\ltr@draw_y
+ {\ifdim\ltr@draw_y pt>\ltr@draw_ymax pt \edef\ltr@draw_ymax{\ltr@draw_y}\fi
+ \ifdim\ltr@draw_y pt<\ltr@draw_ymin pt \edef\ltr@draw_ymin{\ltr@draw_y}\fi}%
+ }
+
+\def\newsymbol#1{%
+ \ifnextnospace[{\ltr@newsymbol{#1}}{\ltr@newsymbol{#1}[1pt]}%
+ }
+\def\ltr@newsymbol#1[#2]#3{%
+ \def\ltr@draw_temp{}%
+ \def\ltr@draw_x{0}\def\ltr@draw_y{0}%
+ \def\ltr@draw_xmax{0}\def\ltr@draw_xmin{0}%
+ \def\ltr@draw_ymax{0}\def\ltr@draw_ymin{0}%
+ \def\ltr@draw_unit{1pt}%
+ \def\ltr@draw_leftpadding{1cm}\def\ltr@draw_rightpadding{1pt}%
+ \def\ltr@draw_toppadding{1pt}\def\ltr@draw_bottompadding{1pt}%
+ \ltr@option_launchloop{draw}{#2}%
+ \deftrim\ltr@temp{#3}%
+ \passexpanded{\ltr@draw_loop{}}{\ltr@temp,}%
+ \setbox\ltr@temp_box=\hbox{% Need the total width (not just positive) of the drawing.
+ % \ltr@draw_xmin is negative, hence the somewhat confusing signs.
+ \kern-\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_xmin pt)\relax-\ltr@draw_leftpadding)\relax
+ \pdfliteral{q \ltr@point_convert{\ltr@draw_unit} 0 0 \ltr@point_convert{\ltr@draw_unit} 0 0 cm 1 w 0 0 m \ltr@draw_temp Q}}%
+ \wd\ltr@temp_box=\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_xmax pt-\ltr@draw_xmin pt)\relax+\ltr@draw_leftpadding+\ltr@draw_rightpadding)\relax
+ \ht\ltr@temp_box=\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_ymax pt)\relax+\ltr@draw_toppadding)\relax
+ \dp\ltr@temp_box=-\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_ymin pt)\relax-\ltr@draw_bottompadding)\relax
+ \pdfxform resources {/ExtGState << \ltr@page_extgstate >>} \ltr@temp_box
+ \setbox\ltr@temp_box=\hbox{%
+ \kern\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_xmin pt)\relax-\ltr@draw_leftpadding)\relax
+ \pdfrefxform\the\pdflastxform}%
+ \xdefcs{ltr@\commandtoname#1@symbol_width}{\the\wd\ltr@temp_box}%
+ \xdefcs{ltr@\commandtoname#1@symbol_height}{\the\ht\ltr@temp_box}%
+ \xdefcs{ltr@\commandtoname#1@symbol_depth}{\the\dp\ltr@temp_box}%
+ \xdef#1{%
+ \hbox{%
+ \kern\dimexpr(\ltr@point_convert{\ltr@draw_unit}\dimexpr(\ltr@draw_xmin pt)\relax-\ltr@draw_leftpadding)\relax
+ \pdfrefxform\the\pdflastxform}%
+ }%
+ }
+\def\ltr@draw_usepair#1#2{%
+ \ifstring{#1}{padding}
+ {\def\ltr@draw_leftpadding{#2}%
+ \def\ltr@draw_rightpadding{#2}%
+ \def\ltr@draw_toppadding{#2}%
+ \def\ltr@draw_bottompadding{#2}}
+ {\ifcs{ltr@draw_#1padding}
+ {\defcs{ltr@draw_#1padding}{#2}}
+ {\ltr@error{Unknown option `#1' in \string\newsymbol}}}%
+ }
+\def\ltr@draw_useatom#1{%
+ \def\ltr@draw_unit{#1}%
+ }
+\def\symbolwidth#1{%
+ \ltr@symbol_dimensions{#1}{width}%
+ }
+\def\symbolheight#1{%
+ \ltr@symbol_dimensions{#1}{height}%
+ }
+\def\symboldepth#1{%
+ \ltr@symbol_dimensions{#1}{depth}%
+ }
+\def\ltr@symbol_dimensions#1#2{%
+ \ifcs{ltr@\commandtoname#1@symbol_#2}
+ {\usecs{ltr@\commandtoname#1@symbol_#2}}
+ {\ltr@error{\string#1 is not a symbol}}%
+ }
+%
+%
+% IMAGES
+%
+\def\newimage#1{%
+ \ifnextnospace[{\ltr@newimage{#1}}{\ltr@newimage{#1}[,]}%
+ }
+\def\ltr@newimage#1[#2,#3]#4{%
+ \pdfximage\reverse\iffemptystring{#2}{width \dimexpr(#2)\relax }
+ \reverse\iffemptystring{#3}{height \dimexpr(#3)\relax }
+ {#4}%
+ \xdefcs{ltr@image_user:#1}{%
+ \hbox{\pdfrefximage\the\pdflastximage}%
+ }%
+ \setbox\ltr@temp_box=\usecs{ltr@image_user:#1}%
+ \xdefcs{ltr@image_height:#1}{\the\ht\ltr@temp_box}%
+ }
+\def\useimage#1{%
+ \ifcs{ltr@image_user:#1}
+ {\usecs{ltr@image_user:#1}}
+ {\ltr@error{Unkown image `#1'. Declare it with \string\useimage}}%
+ }
+\def\ltr@image_use#1#2#3{%
+ \iffcs{ltr@image_user:#1}
+ {\kern\dimexpr(#3-\pdfvorigin)\relax
+ \moveright\dimexpr(#2-\pdfhorigin)\relax
+ \usecs{ltr@image_user:#1}
+ \kern-\dimexpr(#3+\usecs{ltr@image_height:#1}-\pdfvorigin)\relax
+ \prevdepth-1000pt}%
+ }%
+
+%
+% TRANSITIONS
+% Attributes : type, motion, direction, dimension, duration, scale.
+%
+\def\ltr@transition_restrictions{name type motion direction dimension duration scale}
+\passexpandednobraces{\restrictparameter ltr@inner_transition:}\ltr@transition_restrictions\par
+\ltr@restrictattribute ltr@inner_transition:type;
+ split Split blinds Blinds box Box wipe Wipe
+ dissolve Dissolve glitter Glitter fly Fly
+ push Push cover Cover uncover Uncover fade Fade\par
+\ltr@restrictattribute ltr@inner_transition:motion; inward outward\par
+\ltr@restrictattribute ltr@inner_transition:direction; lr bt rl tb dx\par
+\ltr@restrictattribute ltr@inner_transition:dimension; horizontal vertical\par
+\defactiveparameter ltr@inner_transition{%
+ \immediate\pdfobj{
+ << /Type/Trans
+ /S/%
+ \ltr@ifcasevalue #1:type;
+ \val split Split
+ \val Split Split
+ \val blinds Blinds
+ \val Blinds Blinds
+ \val box Box
+ \val Box Box
+ \val wipe Wipe
+ \val Wipe Wipe
+ \val dissolve Dissolve
+ \val Dissolve Dissolve
+ \val glitter Glitter
+ \val Glitter Glitter
+ \val fly Fly
+ \val Fly Fly
+ \val push Push
+ \val Push Push
+ \val cover Cover
+ \val Cover Cover
+ \val uncover Uncover
+ \val Uncover Uncover
+ \val fade Fade
+ \val Fade Fade
+ \elseval R
+ \endval\spacecs
+ \ltr@ifcasevalue #1:motion;
+ \val inward /M/I
+ \val outward /M/O
+ \endval\spacecs
+ \ltr@ifcasevalue #1:direction;
+ \val lr /Di 0
+ \val bt /Di 90
+ \val rl /Di 180
+ \val tb /Di 270
+ \val dx /Di 315
+ \endval\spacecs
+ \ltr@ifcasevalue #1:dimension;
+ \val horizontal /Dm/H
+ \val vertical /Dm/V
+ \endval\spacecs
+ \ltr@ifattribute #1:duration;{/D \ltr@usevalue #1:duration;}{}
+ \ltr@ifattribute #1:scale;{/SS \ltr@usevalue #1:scale;}{}
+ >>}%
+ \xdefcs{ltr@inner_transition:\ltr@usevalue #1:name;}{\the\pdflastobj\spacecs}%
+ \ltr@deleteattribute#1:name;%
+ \ltr@deleteattribute#1:type;%
+ \ltr@deleteattribute#1:motion;%
+ \ltr@deleteattribute#1:direction;%
+ \ltr@deleteattribute#1:dimension;%
+ \ltr@deleteattribute#1:duration;%
+ \ltr@deleteattribute#1:scale;%
+ }
+\def\newtransition#1{%
+ \restrictallattributes transition #1\par
+ \setparameter ltr@inner_transition:
+ name = {#1}
+ }
+\newtransition{split} type = split\par
+\newtransition{blinds} type = blinds\par
+\newtransition{box} type = box\par
+\newtransition{wipe} type = wipe\par
+\newtransition{dissolve} type = dissolve\par
+\newtransition{glitter} type = glitter\par
+\newtransition{fly} type = fly\par
+\newtransition{push} type = push\par
+\newtransition{cover} type = cover\par
+\newtransition{uncover} type = uncover\par
+\newtransition{fade} type = fade\par
+\restrictallattributes transition none\par
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-job.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-job.tex
new file mode 100644
index 00000000000..0dd3fe6cf85
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-job.tex
@@ -0,0 +1,406 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+% ATTRIBUTES
+%
+\restrictparameter job: background fullscreen normal title pdftitle author pdfauthor date mode menutext autofullscreen font\par
+\ltr@boolean_attr{job:fullscreen} \ltr@boolean_attr{job:autofullscreen}
+\ltr@restrictattribute job:normal; none outlines thumbs layers\par
+\ltr@restrictattribute job:mode; presentation handout\par
+\defactiveparameter job {%
+ \ltr@ifvalue #1:mode; = presentation
+ {\def\handoutonly{\gobbleoneand\ignorespaces}%
+ \let\presentationonly\unbrace
+ \let\presentationorhandout\firstoftwo}
+ {\let\handoutonly\unbrace
+ \def\presentationonly{\gobbleoneand\ignorespaces}%
+ \let\presentationorhandout\secondoftwo}
+ \ltr@storevalueor\Title #1:title;{\let\Title\emptycs}%
+ \ltr@storevalueor\Author #1:author;{\let\Author\emptycs}%
+ \ltr@storevalueor\Date #1:date;{\def\Date{\the\month/\the\day/\the\year}}%
+ \pdfinfo{%
+ \ltr@ifattribute #1:pdfauthor;%
+ {/Author (\ltr@usevalue #1:pdfauthor;)}
+ {\ltr@ifattribute #1:author;{/Author (\ltr@usevalue #1:author;)}{}}
+ \ltr@ifattribute #1:pdftitle;%
+ {/Title (\ltr@usevalue #1:pdftitle;)}
+ {\ltr@ifattribute #1:title;{/Title (\ltr@usevalue #1:title;)}{}}
+ /Creator (TeX, with a little help from Lecturer) % Yes, pure self-advertising
+ }%
+ \pdfcatalog{%
+ /PageMode\ltr@ifvalue #1:fullscreen; = true
+ {/FullScreen}
+ {\ltr@ifcasevalue#1:normal;
+ \val none /UseNone
+ \val outlines /UseOutlines
+ \val thumbs /UseThumbs
+ \val layers /UseOC
+ \elseval /UseNone
+ \endval}
+ /ViewerPreferences << /NonFullScreenPageMode
+ \ltr@ifcasevalue#1:normal;
+ \val none /UseNone
+ \val outlines /UseOutlines
+ \val thumbs /UseThumbs
+ \val layers /UseOC
+ \elseval /UseNone
+ \endval >>
+ }%
+ \ltr@ifattribute #1:background;
+ % It makes sense for the job parameter to appear at the beginning
+ % of the document, before color definition. If this were added,
+ % immediately, the color wouldn't be right. That's why
+ % this will be added at the job's end to the document's catalog.
+ {\def\ltr@job_background{/OpenAction << /S/JavaScript /JS(app.fs.backgroundColor=\ltr@jscolor_use{#1}{background}{0})>>}}{}
+ }
+\setparameter job:
+ mode = presentation
+ normal = outlines
+ title = \jobname
+ menutext = ***
+ fullscreen = false
+ autofullscreen = false
+\par
+
+%
+%
+%
+% OUTPUT ROUTINE
+% It is called by \endslide.
+%
+\def\ltr@output_penalty{-15000\relax}
+%
+% One day perhaps I'll make slides that can break
+% when the content is too large. Which means:
+% output before every step, check the accumulated
+% material, etc. Which is not too complicated. The
+% hardest part comes with \position (they must be
+% treated as insertions) and OCGs (they must be recorded
+% to the page only if the step isn't moved to the next
+% one, whereas for the moment OCGs are created with the
+% step itself). And there'll be trouble anyway with content
+% related to elements that occur on two different pages
+% because of a split (e.g. optional content controlled
+% by the first and last steps). Which, for the moment,
+% is too much work with little benefit (slides aren't
+% supposed to be too large!).
+%
+\output{%
+ \ifnum\outputpenalty=\ltr@output_penalty
+ \ltr@slide_output
+ \else
+ {\setbox\ltr@temp_box=\box255}%
+ \fi}
+\def\ltr@slide_output{%
+ % This chains the steps.
+ \reverse\iffemptycommand\ltr@page_steplist{\passexpanded{\ltr@output_loop{}{}{}}\ltr@page_steplist}
+ % For LaTeX, otherwise you get errors in \write statements.
+ \ifnum\formatnumber>3
+ \let\protect\noexpand
+ \fi
+ \setbox255=\vbox{\unvbox255}
+ \ltr@ifattribute ltr@inner_slide:vsize;
+ {}
+ {\ltr@setattribute ltr@inner_slide:vsize; = {\dimexpr(\pdfpageheight-2\pdfvorigin)\relax} }% We badly need this value.
+ % If the page is too high, it is scaled if scale=true.
+ \ifdim\dimexpr\ht255-\pageshrink>\ltr@usevalue ltr@inner_slide:vsize;\relax
+ \ltr@ifvalue ltr@inner_slide:scale; = true
+ {\setbox255=\vbox{
+ \pdfsave
+ \pdfsetmatrix{\ltr@point_convert{\ltr@usevalue ltr@inner_slide:vsize;/\ltr@integer{\ht255-\pageshrink}} 0 0
+ \ltr@point_convert{\ltr@usevalue ltr@inner_slide:vsize;/\ltr@integer{\ht255-\pageshrink}}}
+ \unvcopy255
+ \kern-\dimexpr\ht255-\pageshrink\relax \kern-\dp255
+ \pdfrestore
+ \kern\dimexpr\ht255-\pageshrink\relax \kern\dp255
+ }}{}
+ \fi
+ \shipout\vbox{% At last...
+ \pdfliteral direct {q}
+ % Paints the slide background.
+ \pdfliteral {%
+ q
+ \ltr@passvalueand\ltr@paint_area ltr@inner_slide:background;{{0pt}{0pt}\pdfpagewidth\pdfpageheight}{}%
+ Q}
+ % Puts the background image, if any.
+ \ltr@passvalueand{\ltr@image_use}ltr@inner_slide:image;{{0pt}{0pt}}{}
+ % Puts the areas.
+ \expandafter\ltr@output_arealoop\expandafter{\ltr@area_list}%
+ % Set the slide's foreground color and release that good ol' box.
+ \pdfcolorstack0 push {\ltr@passvalueor\ltr@color_use ltr@inner_slide:foreground;{\ltr@color_use{black}}}
+ \vbox to \ltr@usevalue ltr@inner_slide:vsize;{%
+ \ltr@ifcasevalue ltr@inner_slide:vpos;
+ \val top \unvbox255 \vfil
+ \val center \vfil\unvbox255 \vfil
+ \val bottom \vfil\unvbox255
+ \elseval \unvbox255 \vfil
+ \endval
+ }%
+ \pdfcolorstack0 pop
+ \pdfliteral page {%
+ Q
+ q
+ 1 0 0 -1 0 \ltr@point_convert\pdfpageheight cm
+ \passexpanded\ltr@grid_loop\ltr@grids
+ Q}
+ }
+ \ifnum\formatnumber>2
+ \let\protect\relax
+ \fi
+ \advanceslideno
+ }
+\def\ltr@remove_ltr ltr@#1@inner_area{#1}
+\newfor\ltr@output_arealoop#1,{%
+ \passexpanded\ltr@area_check{\ltr@remove_ltr#1}%
+ \iffltr@area_do{%
+ \ifvoid\usecs{#1:box}
+ % Draw the area's background unless the box is empty
+ % and not visible.
+ \ltr@ifvalue #1:visible; = true {\ltr@area_draw{#1}}{}
+ \else
+ \ltr@ifvalue #1:visible; = step
+ {\pdfliteral {/OC/#1_\the\slideno:background BDC}
+ \ltr@area_draw{#1}
+ \pdfliteral {EMC}}
+ {\ltr@area_draw{#1}}
+ % Position the box.
+ \kern\dimexpr(\dimexpr(\ltr@area_vshift{#1}+\ltr@area_top{#1})\relax-\pdfvorigin)\relax
+ % Use its foreground color.
+ \pdfcolorstack0 push {\ltr@passvalueor\ltr@color_use #1:foreground;{\ltr@color_use{black}}}
+ \moveright\dimexpr(\dimexpr(\ltr@area_hshift{#1}+\ltr@area_left{#1})\relax-\pdfhorigin)\relax
+ \vbox to \ltr@area_vsize{#1}\relax{%
+ \ltr@ifcasevalue #1:vpos;
+ \val top \unvbox\usecs{#1:box} \vfil
+ \val center \ltr@temp_dimen=\dp\usecs{#1:box}\vfil\unvbox\usecs{#1:box} \kern-\ltr@temp_dimen\vfil
+ \val bottom \vfil\unvbox\usecs{#1:box}
+ \elseval \unvbox\usecs{#1:box} \vfil
+ \endval
+ }%
+ \pdfcolorstack0 pop
+ \kern-\dimexpr(%
+ \dimexpr(\ltr@area_vshift{#1}+\ltr@area_top{#1})\relax
+ +\ltr@area_vsize{#1}+\prevdepth-\pdfvorigin)\relax
+ \global\letcs{#1:done}\ltr@undefined
+ \fi}
+ \prevdepth-1000pt
+ }
+\def\ltr@area_draw#1{%
+ \pdfliteral {%
+ % Paint the area's background if it has a color.
+ \ltr@ifattribute #1:background;{
+ q
+ \ifdim\ltr@usevalueor #1:frame_width;{0pt}<0pt
+ \ltr@passvalue\ltr@paint_area #1:background;
+ {\dimexpr(\ltr@area_hshift{#1}-\ltr@usevalue #1:frame_width;)}
+ {\dimexpr(\ltr@area_vshift{#1}-\ltr@usevalue #1:frame_width;)}
+ {\dimexpr(\ltr@area_width{#1})+2\ltr@usevalue #1:frame_width;}
+ {\dimexpr(\ltr@area_height{#1}+2\ltr@usevalue #1:frame_width;)}%
+ \else
+ \ltr@passvalue\ltr@paint_area #1:background;
+ {\dimexpr(\ltr@area_hshift{#1})}
+ {\dimexpr(\ltr@area_vshift{#1})}
+ {\dimexpr(\ltr@area_width{#1})}
+ {\dimexpr(\ltr@area_height{#1})}%
+ \fi
+ Q}{}
+ % Paint the frame iff not 0.
+ \ifpdfabsdim\ltr@usevalueor #1:frame_width;{0pt}>0pt
+ \ltr@ifattribute #1:frame_color;
+ {q
+ \ltr@paint_path{#1}
+ {\dimexpr(\ltr@area_hshift{#1})}
+ {\dimexpr(\ltr@area_vshift{#1})}
+ {\dimexpr(\ltr@area_width{#1})}
+ {\dimexpr(\ltr@area_height{#1})}%
+ Q}{}
+ \fi}
+ % Uses the image if any.
+ \ltr@passvalueand{\ltr@image_use}#1:image;
+ {{\ltr@area_hshift{#1}}{\ltr@area_vshift{#1}}}{}
+ }%
+%
+%
+%
+% Draws the grid at the end of the shipout.
+%
+\newfor\ltr@grid_loop#1#2#3#4#5{%
+ \ltr@color_use{#4}
+ \ltr@point_convert{#5} w
+ \ltr@grid_vertical{#1}{#3}{#2}
+ \ltr@grid_horizontal{#2}{#3}{#1}
+ }
+\newwhile\ltr@grid_vertical3{#1+#2}{#2}{#3}{%
+ \ifdim\dimexpr(#1)>\pdfpagewidth
+ \afterfi{\breakwhile{}}
+ \else
+ \ltr@point_convert{#1} \ltr@point_convert{#3} m
+ \ltr@point_convert{#1} \ltr@point_convert\pdfpageheight l S
+ \fi}
+\newwhile\ltr@grid_horizontal3{#1+#2}{#2}{#3}{%
+ \ifdim\dimexpr#1>\pdfpageheight
+ \afterfi{\breakwhile{}}
+ \else
+ \ltr@point_convert{#3} \ltr@point_convert{#1} m
+ \ltr@point_convert\pdfpagewidth \ltr@point_convert{#1} l S
+ \fi}
+\def\ltr@grids{}
+\def\showgrid{%
+ \ifnextnospace[{\ltr@showgrid}{\ltr@showgrid[0pt,0pt]}%
+ }
+\def\ltr@showgrid[#1,#2]#3{%
+ \ifnext[{\ltr@showgrid_getarg{#1}{#2}{#3}}{\ltr@showgrid_getarg{#1}{#2}{#3}[grey .5]}%
+ }
+\def\ltr@showgrid_getarg#1#2#3[#4]{%
+ \ifnext[{\ltr@showgrid_do{#1}{#2}{#3}{#4}}{\ltr@showgrid_do{#1}{#2}{#3}{#4}[.2pt]}%
+ }
+\def\ltr@showgrid_do#1#2#3#4[#5]{%
+ \global\eaddright\ltr@grids{%
+ {\ifemptystring{#1}{0pt}{#1}}
+ {\ifemptystring{#2}{0pt}{#2}}
+ {#3}{#4}
+ {\ifemptystring{#5}{.2pt}{#5}}}%
+ }
+\def\hidegrids{\def\ltr@grids{}}
+%
+%
+%
+%
+% A loop to connect object.
+% #4 is the ordered list of objects on the page (those that
+% appear by themselves, although they can also be tied to
+% other ones).
+% #1 is the previously reserved action number,
+% #2 is the sequence to go back to the previous object,
+% #3 is the current object.
+%
+% Suppose (I'm talking to myself, I know), that
+% #4 extracts from "A,B,C,".
+% On first iteration, #1, #2 and #3 are empty.
+% We reserve an action number, and define the first
+% object on the page as this number. Then we pass
+% {<number>}{}{A} and the next iteration has B as #4.
+% Now, second iteration, we create the object with
+% <number> (and reserve another one before hand). #2 is empty,
+% meaning there's no previous object, thus /P(revious)A(ction)
+% for A is "go to the previous page".
+% #3 is not empty, it's A, and we build its /N(ext)A(ction),
+% i.e. what happens when we hit it with a move forward, as
+% its own appearance and the appearance and disappearance
+% of the objects that are tied to it via "on" and "off".
+% Now we pass {<new number>}{</PA of A>}{B} and #4 is C
+% (yes, we never use #4, we just pass it as #3).
+% Things are clearer now (!). We build the object
+% B with <new number>, create its /NA as before and
+% use #2 as /PA, since, A is just before B.
+%
+\newfornoempty\ltr@output_loop{3}#4,{%
+ \pdfobj reserveobjnum
+ \ltr@temp_count=\pdflastobj
+ \ifemptystring{#1}
+ {\edef\ltr@page_firstobject{\the\ltr@temp_count\spacecs 0 R}%
+ \expandafter\passarguments\expandafter{\the\ltr@temp_count}{}{#4}}%
+ {\ltr@output_addtopagePA{#3}%
+ \immediate\pdfobj useobjnum #1 {%
+ << \ifemptystring{#2}{/PA << /S/Named /N/PrevPage >> }{#2}
+ \ltr@output_NA{#3}%
+ /Next \the\ltr@temp_count\spacecs 0 R >>}
+ \expandafter\passarguments\expandafter{\the\ltr@temp_count}{/Prev #1 0 R \ltr@output_PA{#3}}{#4}}}
+ [\ltr@output_addtopagePA{#3}%
+ \immediate\pdfobj useobjnum #1 {%
+ << \ifemptystring{#2}{/PA << /S/Named /N/PrevPage >> }{#2}% If there is only one object on the page, #2 is empty.
+ \ltr@output_NA{#3}%
+ /Next <<
+ /Prev #1 0 R
+ \ltr@output_PA{#3}%
+ /NA << /S/Named /N/NextPage >> >>
+ >>}%
+ \addtopageobject{%
+ /PresSteps <<
+ /Prev <<
+ /Prev #1 0 R /NA << /S/Named /N/NextPage >>
+ \ltr@output_PA{#3}
+ >>
+ /PA << /S/SetOCGState /State [] /Next [ \ltr@page_PA ] >>
+ /Next \ltr@page_firstobject
+ /NA << /S/SetOCGState /State [/OFF \ltr@page_invisibleOCGs /ON \ltr@page_visibleOCGs] >>
+ >>}]
+\def\ltr@output_NA#1{%
+ /NA <<
+ /S/SetOCGState /State [/ON #1 0 R \ltr@OCGs_onoff{#1}{OFF}]
+ \iffcs{ltr@step_#1:transition}{/Next << /S/Trans /Trans \usecs{ltr@step_#1:transition} >> }%
+ >>
+ }%
+\def\ltr@output_PA#1{%
+ /PA << /S/SetOCGState /State [/OFF #1 0 R \ltr@OCGs_onoff{#1}{ON}] >>
+ }%
+\def\ltr@output_addtopagePA#1{%
+ \eaddright\ltr@page_PA{<< /S/SetOCGState /State [/ON #1 0 R \ltr@OCGs_onoff{#1}{OFF}] >> }%
+ }%
+\def\ltr@OCGs_onoff#1#2{%
+ \iffcs{ltr@step_#1:name}{%
+ \iffcs{ltr@step_\usecs{ltr@step_#1:name}:on}{\usecs{ltr@step_\usecs{ltr@step_#1:name}:on}}%
+ \iffcs{ltr@step_\usecs{ltr@step_#1:name}:off}{/#2 \usecs{ltr@step_\usecs{ltr@step_#1:name}:off}}}%
+ }
+\newfor\ltr@page_doPA#1{#1 }
+
+%
+% Now, things look like this (PresSteps is the root
+% object on the page):
+%
+% PresSteps: Prev = (Prev = C, PA = Hide C, NA = NextPage)
+% PA = Shows the page as it is when it has been read
+% Next = A
+% NA = Shows the page as in its original appearance
+% A: NA = Show A + A-transition
+% Next = B
+% PA = PrevPage
+% B: NA = Show B + B-transition
+% Next = C
+% PA = Hide A
+% Prev = A
+% C: NA = Show C + C-transition
+% Next = (Prev = B, PA = Hide C, NA = NextPage)
+% PA = Hide B
+% Prev = B
+%
+% PDF works as follows: when you're on a step
+% and you move forward, you execute the NA
+% of the current step and then move to the one
+% specified by Next (and similarly for a move
+% backward). So, suppose you're on B and move
+% forward, then you show B and go to C. And
+% if you move forward again, you show C and
+% go to the unnamed node between parentheses.
+% Which is like any other node. If you go backward,
+% you hide C and go to C, etc.
+% Now, PresSteps is special, it's a slippery place.
+% Note that you can't reach it by a step: A has no
+% Prev entry. You go to PresSteps only when you
+% arrive on a page, and if you arrive by moving
+% forward Next becomes the new node immediately
+% (no need to move forward to reach A, otherwise
+% you'd need two clicks to make it appear). On the
+% other hand, if you come by moving backward, then
+% Prev becomes the current node immediately, and
+% you can see what it does: if you move forward, it
+% goes to the next page, and if you move backward,
+% you hide C and make it the current node.
+% PresSteps also contains a PA and NA, which are
+% executed under the same circumstances; the NA
+% contains the list of steps of the page and their
+% original visibility; hence when one arrives on a
+% page, this visibility is restored. PA contains
+% the succession of actions made thoughout the page;
+% hence, when one arrives on it backward, this succession
+% of action is executed and one sees the completed page.
+% Thus, one avoids discrepancy between navigation and
+% step visibility.
+%
+% To say it otherwise, PresSteps is the gate to the
+% page, and you have to go through the gate to reach
+% the steps (they aren't linked together from one
+% page to the other.
+%
+% And I'm not really lecturing on PDF here. I'm just
+% trying to write things down while I understand them.
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-navigation.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-navigation.tex
new file mode 100644
index 00000000000..437dfc59968
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-navigation.tex
@@ -0,0 +1,263 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+\def\ltr@link_create#1#2#3{%
+ \hbox{%
+ \pdfannot{%
+ /Subtype/Link
+ /Border [0 0 0]
+ /H/\ifstring{#1}{none}{N}{\ifstring{#1}{flash}{I}{\ifstring{#1}{push}{P}{N}}}
+ \reverse\iffemptycommand\ltr@step_current{/OC \ltr@step_current 0 R}
+ /A #2}%
+ #3}%
+ }
+%
+\def\firstslide{%
+ \ifnext[{\ltr@firstslide}{\ltr@firstslide[]}%
+ }
+\def\ltr@firstslide[#1]#2{%
+ \ltr@link_create{#1}{<< /S/GoTo /D (ltr@linktopage_1) >>}{#2}%
+ }
+\def\lastslide{%
+ \ifnext[{\ltr@lastslide}{\ltr@lastslide[]}%
+ }
+\def\ltr@lastslide[#1]#2{%
+ \ltr@link_create{#1}{<< /S/Named /N/LastPage >>}{#2}%
+ }
+\def\prevslide{%
+ \ifnum\slideno=1
+ \expandafter\firstslide
+ \else
+ \afterfi{\ifnext[{\ltr@prevslide}{\ltr@prevslide[]}}
+ \fi
+ }
+\def\ltr@prevslide[#1]#2{%
+ \ltr@link_create{#1}{<< /S/GoTo /D (ltr@linktopage_\the\numexpr\slideno-1\relax) >>}{#2}%
+ }
+\def\nextslide{%
+ \ifnext[{\ltr@nextslide}{\ltr@nextslide[]}%
+ }
+\def\ltr@nextslide[#1]#2{%
+ \ltr@link_create{#1}{<< /S/GoTo /D (ltr@linktopage_\the\numexpr\slideno+1\relax) >>}{#2}%
+ }
+\def\nextstep{%
+ \ifnext[{\ltr@nextstep}{\ltr@nextstep[]}%
+ }
+\def\ltr@nextstep[#1]#2{%
+ \ltr@link_create{#1}{<< /S/Named /N/NextPage >>}{#2}%
+ }
+\def\prevstep{%
+ \ifnext[{\ltr@prevstep}{\ltr@prevstep[]}%
+ }
+\def\ltr@prevstep[#1]#2{%
+ \ltr@link_create{#1}{<< /S/Named /N/PrevPage >>}{#2}%
+ }
+%
+\def\anchor#1{%
+ \ifcs{ltr@anchor_user:#1}
+ {\ltr@error{Anchor `#1' already exists. Find another name}}
+ {\global\letcs{ltr@anchor_user:#1}\relax
+ \immediate\pdfobj\iffcs{ltr@anchor_objnum:#1}{useobjnum \usecs{ltr@anchor_objnum:#1}}{\ltr@anchor{\the\slideno}{\ltr@activesteps_count}}%
+ \reverse\iffcs{ltr@anchor_objnum:#1}{\xdefcs{ltr@anchor_objnum:#1}{\the\pdflastobj\spacecs}}}%
+ }
+\def\ltr@anchor#1#2{%
+ <<
+ /S/GoTo /D (ltr@linktopage_#1)
+ /Next << /S/JavaScript /JS (\ltr@ifvalue job:autofullscreen; = true {app.fs.isFullScreen = true; }{}%
+ if (app.fs.isFullScreen) {\repeatuntil{#2}{app.execMenuItem("NextPage");}}) >>
+ >>}%
+\def\goto{%
+ \ifnextnospace[{\ltr@goto}{\ltr@goto[none]}%
+ }
+\def\ltr@goto[#1]#2#3{%
+ \reverse\iffcs{ltr@anchor_objnum:#2}
+ {\pdfobj reserveobjnum%
+ \xdefcs{ltr@anchor_objnum:#2}{\the\pdflastobj}}%
+ \ltr@link_create{#1}{\usecs{ltr@anchor_objnum:#2} 0 R}{#3}%
+ }
+\def\gotoA{%
+ \ifnextnospace[{\ltr@gotoA}{\ltr@gotoA[none]}%
+ }
+\def\ltr@gotoA[#1]#2#3{%
+ \anchor{ltr@#2_back}%
+ \ltr@goto[#1]{#2}{#3}%
+ }
+\def\gotoB{%
+ \ifnextnospace[{\ltr@gotoB}{\ltr@gotoB[none]}%
+ }
+\def\ltr@gotoB[#1]#2#3{%
+ \anchor{#2}%
+ \ltr@goto[#1]{ltr@#2_back}{#3}%
+ }
+\def\showorhide{%
+ \ifnextnospace[{\ltr@showorhide}{\ltr@showorhide[none]}%
+ }
+\def\ltr@showorhide[#1]#2#3{%
+ \ifsuffix,{#2}
+ {\ltr@showorhide_loop{}{}{}{#2}}
+ {\ltr@showorhide_loop{}{}{}{#2,}}%
+ \ltr@link_create{#1}{\ltr@temp 0 R}{#3}%
+ }
+\newfor\ltr@showorhide_loop{3}#4=#5,{%
+ \ltr@showorhide_objloop{#5 }%
+ \passtrim{#4}\ifstring{on}
+ {\passarguments{#1#5 }{#2}{#3}}
+ {\passtrim{#4}\ifstring{off}
+ {\passarguments{#1}{#2#5 }{#3}}
+ {\passtrim{#4}\ifstring{toggle}
+ {\passarguments{#1}{#2}{#3#5 }}
+ {\ltr@error{Unkown attribute `#4' in \string\showorhide}}}}%
+ }[\immediate\pdfobj{%
+ << /S/SetOCGState
+ /State [/ON \ltr@showorhide_objects{#1} /OFF \ltr@showorhide_objects{#2} /Toggle \ltr@showorhide_objects{#3}] >>}%
+ \edef\ltr@temp{\the\pdflastobj\spacecs}]
+\newfornoempty\ltr@showorhide_objloop#1 {%
+ \reverse\iffcs{ltr@step_objnum:#1_\the\slideno}
+ {\pdfobj reserveobjnum
+ \xdefcs{ltr@step_objnum:#1_\the\slideno}{\the\pdflastobj\spacecs}}%
+ }
+\newfornoempty\ltr@showorhide_objects#1 {%
+ \usecs{ltr@step_objnum:#1_\the\slideno}0 R
+ }
+%
+\def\showbookmarks{%
+ \ifnextnospace[{\ltr@showbookmarks}{\ltr@showbookmarks[none]}%
+ }
+\def\ltr@showbookmarks[#1]#2{%
+ \reverse\iffcommand\ltr@bookmark_menuobject{%
+ \pdfobj reserveobjnum
+ \xdef\ltr@bookmark_menuobject{\the\pdflastobj\spacecs}}%
+ \ltr@link_create{#1}{\ltr@bookmark_menuobject 0 R}{#2}%
+ }
+%
+\def\ltr@bookmark_list{}
+\def\ltr@bookmark_stack{}
+\def\createbookmark{%
+ \ifnextnospace[{\ltr@createbookmark}{\ltr@createbookmark[]}%
+ }
+\newcount\ltr@bookmark_count
+\def\ltr@createbookmark[#1]#2{%
+ \ifnextnospace[
+ {\ltr@bookmark_create{#1}{#2}}
+ {\global\advance\ltr@bookmark_count1
+ \ltr@bookmark_create{#1}{#2}[ltr@bookmark_number:\the\ltr@bookmark_count]}%
+ }
+\def\ltr@bookmark_create#1#2[#3]#4{%
+ \reverse\iffcommand\ltr@bookmark_menuobject{%
+ \pdfobj reserveobjnum
+ \xdef\ltr@bookmark_menuobject{\the\pdflastobj\spacecs}%
+ }%
+ \passexpanded{\ltr@bookmark_add{#2}{{#4}{\the\slideno,\the\ltr@activesteps_count,{#3}}{#1}}}\ltr@bookmark_stack
+ }
+\bgroup
+\setcatcodes{\{\}=12,<=1,>=2}
+\gdef\ltr@leftbrace<{>
+\gdef\ltr@rightbrace<}>
+\egroup
+\def\ltr@bookmark_submenu#1{%
+ \reverse\iffemptystring{#1}{, oSubMenu: [#1]}%
+ }
+\newfor\ltr@bookmark_add{2}#3,{%
+ \straightenif{ifdim}{#1pt>#3pt }
+ {\global\eaddright\ltr@bookmark_list{#2\ltr@leftbrace}
+ \retrieverest{\ltr@bookmark_addtostack{#1,#3,}}}
+ {\global\eaddright\ltr@bookmark_list{\ltr@rightbrace,}}
+ }[\global\eaddright\ltr@bookmark_list{#2\ltr@leftbrace}
+ \ltr@bookmark_addtostack{#1,}{}]
+\def\ltr@bookmark_addtostack#1#2{\gdef\ltr@bookmark_stack{#1#2}}
+
+%
+%
+% JOB END
+% Creates the bookmarks and fills the catalog with the OCGs.
+% The default end job is maintained, except in TeX.
+%
+\newfor\ltr@bookmark_endlist#1,{%
+ \eaddright\ltr@bookmark_list{\ltr@rightbrace,}%
+ }
+\newfor\ltr@bookmark_process#1#2#3#4,{%
+ \ltr@bookmark_subcount{0}{#1}{#2}{#3}{#4}%
+ \reverse\iffemptystring{#4}{\ltr@bookmark_process{#4}}%
+ }
+\newfor\ltr@bookmark_subcount{4}#5,{%
+ \passarguments{#1+1}{#2}{#3}{#4}
+ }[\def\ltr@bookmark_sign{-}%
+ \def\ltr@bookmark_options{}%
+ \ltr@option_launchloop{bookmark}{#4}%
+ \ltr@bookmark_anchor#3,%
+ \pdfoutline attr {\ltr@bookmark_options} user {\ltr@bookmark_action#3,} count \ltr@bookmark_sign\the\numexpr(#1) {#2}%
+ ]
+\def\ltr@bookmark_useatom#1{%
+ \ifstring{#1}{italic}
+ {\eaddright\ltr@bookmark_options{/F 1 }}
+ {\ifstring{#1}{bold}
+ {\eaddright\ltr@bookmark_options{/F 2 }}
+ {\ifstring{#1}{bolditalic}
+ {\eaddright\ltr@bookmark_options{/F 3 }}
+ {\ifstring{#1}{open}
+ {\def\ltr@bookmark_sign{}}
+ {\ifstring{#1}{closed}
+ {\def\ltr@bookmark_sign{-}}
+ {\reverse\iffstring{#1}{nosubmenutext}
+ {\eaddright\ltr@bookmark_options{/C [#1]}}}}}}}%
+ }
+\def\ltr@bookmark_action#1,#2,#3,{\ltr@anchor{#1}{#2}}
+\def\ltr@bookmark_anchor#1,#2,#3,{%
+ \immediate\pdfobj\iffcs{ltr@anchor_objnum:#3}{useobjnum \usecs{ltr@anchor_objnum:#3}}{\ltr@anchor{#1}{#2}}%
+ \reverse\iffcs{ltr@anchor_objnum:#1}{\xdefcs{ltr@anchor_objnum:#1}{\the\pdflastobj\spacecs}}%
+ }
+\newstring{nosubmenutext}
+\newfor\ltr@bookmark_javaprocess{1}#2#3#4#5,{%
+ \reverse\iffemptystring{#1}{, }%
+ {cName: "#2"%
+ \ifemptystring{#5}
+ {, cReturn: "#3"}
+ {, oSubMenu: [\ifcontains{nosubmenutext}{#4}
+ {\ltr@bookmark_javaprocess{}{#5}}
+ {\ltr@bookmark_javaprocess{}{{\ltr@usevalueor job:menutext;{***}}{#3}{}{},#5}}]%
+ }}%
+ \passarguments{*}
+ }
+\def\ltr@job_end{%
+ \reverse\iffemptycommand\ltr@bookmark_list{%
+ \expandafter\ltr@bookmark_endlist\expandafter{\ltr@bookmark_stack}
+ \bgroup
+ \setcatcodes{_@=11}
+ \scantokens\expandafter{\expandafter\gdef\expandafter\ltr@bookmark_list\expandafter{\ltr@bookmark_list}}%
+ \egroup
+ \expandafter\ltr@bookmark_process\expandafter{\ltr@bookmark_list}
+ \edef\ltr@bookmark_list{\passexpanded{\ltr@bookmark_javaprocess{}}\ltr@bookmark_list}
+ \immediate\pdfobj useobjnum \ltr@bookmark_menuobject{%
+ << /S/JavaScript
+ /JS (var bookmark = app.popUpMenuEx(\ltr@bookmark_list);
+ if (bookmark != null)
+ {var bookmark = bookmark.split(",");
+ \ltr@ifvalue job:autofullscreen; = true {app.fs.isFullScreen = true; }{}%
+ this.gotoNamedDest("ltr@linktopage_" + bookmark[0])};)
+ % If the two JS actions are executed together, the timing is wrong and the second
+ % one has no effect. Hence its isolation in a /Next action.
+ /Next << /S/JavaScript
+ /JS (if (app.fs.isFullScreen) { if (bookmark != null) {for (var i=0; i<bookmark[1];i++) {app.execMenuItem("NextPage")}} } ) >>
+ >>
+ }}
+ \pdfcatalog{%
+ \iffcommand\ltr@job_background\ltr@job_background
+ /OCProperties <<
+ /OCGs [\ltr@catalog_OCGs]
+ /D << /Order [\ltr@order_OCGs] /BaseState/OFF /ON [\ltr@visible_OCGs] >>
+ >>}
+ \ltr@end_job
+ }
+\ifnum\formatnumber<3
+ \let\ltr@end_job\end
+ \let\bye\ltr@job_end % plain and eplain
+\else
+ \ifnum\formatnumber=3
+ \let\ltr@end_job\normalend
+ \let\normalend\ltr@job_end % ConTeXt
+ \else
+ \let\ltr@end_job\@@end
+ \let\@@end\ltr@job_end % LaTeX
+ \fi
+\fi
+
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-slides.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-slides.tex
new file mode 100644
index 00000000000..dd99458dbfc
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-slides.tex
@@ -0,0 +1,244 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+\countdef\slideno=0
+\slideno=1
+\def\advanceslideno{\global\advance\slideno1 }
+\def\slidenumber{\the\slideno}
+%
+%
+%
+% ATTRIBUTES
+%
+\def\ltr@slide_restrictions{width height background foreground image transition bookmark everyslide anchor font scale
+ vsize vpos hpos top left right bottom parindent parskip hsize baselineskip topskip pdftitle bookmarklevel bookmarkstyle areas areas* }
+\def\ltr@slide_deleteattributes{%
+ \passexpanded{\ltr@attribute_deletion{ltr@inner_slide}}\ltr@slide_restrictions
+ }
+\passexpandednobraces{\restrictparameter slide ltr@inner_slide:}\ltr@slide_restrictions\par
+\ltr@restrictattribute slide:vpos; top center bottom\par
+\ltr@restrictattribute ltr@inner_slide:vpos; top center bottom\par
+\ltr@restrictattribute slide:hpos; ff rr fr rf\par
+\ltr@restrictattribute ltr@inner_slide:hpos; ff rr fr rf\par
+\ltr@boolean_attr{slide:bookmark}
+\ltr@boolean_attr{ltr@inner_slide:bookmark}
+\ltr@boolean_attr{slide:scale}
+\ltr@boolean_attr{ltr@inner_slide:scale}
+\def\ltr@slide_parameter#1{%
+ \ltr@todim_loop{#1}{width height vsize hsize top left bottom right parindent baselineskip topskip }%
+ \ltr@delete_empty{#1:font}%
+ \ltr@delete_empty{#1:hsize}\ltr@delete_empty{#1:left}\ltr@delete_empty{#1:right}%
+ \ltr@delete_empty{#1:vsize}\ltr@delete_empty{#1:top}\ltr@delete_empty{#1:bottom}%
+ \ltr@dimen_set{#1}{right}{left}{hsize}{\ltr@usevalueor #1:width;\pdfpagewidth}%
+ \ltr@dimen_set{#1}{bottom}{top}{vsize}{\ltr@usevalueor #1:height;\pdfpageheight}%
+ \ltr@deleteattribute #1:right;%
+ \ltr@deleteattribute #1:bottom;%
+ }
+\defactiveparameter slide {%
+ \ltr@slide_parameter{#1}%
+ }
+% #1 parameter (e.g. slide)
+% #2 ordering attribute (e.g. right (for slide))
+% #3 first obeying attribute (e.g. left)
+% #4 second obeying attribute (e.g. hsize)
+% #5 reference (e.g. (page)width)
+\def\ltr@dimen_set#1#2#3#4#5{%
+ \nometa\ltr@ifattribute #1:#2;
+ {\ltr@passvalue{\defcs{ltr@#1:inner_#2}}#1:#2;%
+ \nometa\ltr@ifattribute #1:#3;
+ {\ltr@setattribute #1:#4; = {\dimexpr(#5-\dimexpr(\usecs{ltr@#1:inner_#2}+\ltr@usevalue #1:#3;))\relax} }% SPACE
+ {\nometa\ltr@ifattribute #1:#4;
+ {\ltr@setattribute #1:#3; = {\dimexpr(#5-\dimexpr(\usecs{ltr@#1:inner_#2}+\ltr@usevalue #1:#4;))\relax} }% SPACE
+ {\ltr@passvalue{\ltr@setattribute #1:#3;=}#1:#2; % SPACE
+ \ltr@setattribute #1:#4; = {\dimexpr(#5-\dimexpr(\usecs{ltr@#1:inner_#2}+\ltr@usevalue #1:#3;))\relax} }}}% SPACE
+ {}%
+ }
+% Defaults
+\vsize=\maxdimen % So no unwanted output occurs
+\setparameter slide:
+ vpos = center
+ background = white
+ foreground = black
+ bookmark = true
+ bookmarklevel = 1
+ scale = false
+
+\setparameter ltr@inner_slide:
+ meta = slide
+
+\long\def\setslide#1#2\par{%
+ \ltr@space_loop{\ltr@setslide_do{#2}}{#1 }%
+ }
+\long\def\ltr@setslide_do#1#2{%
+ \ltr@ifattribute {ltr@#2@inner_slide}:meta;
+ {\setparameter{ltr@#2@inner_slide}:}
+ {\ltr@setslide_new{#2}}%
+ #1\par
+ }
+\def\ltr@setslide_new#1{%
+ \defcs{#1}{%
+ \ltr@setattribute ltr@inner_slide:meta;={ltr@#1@inner_slide}
+ \slide}%
+ \letcs{end#1}\endslide
+ \ifnum\formatnumber=3 % ConTeXt
+ \letcstocs{start#1}{#1}%
+ \letcs{stop#1}\endslide
+ \fi
+ \passexpandednobraces{\restrictparameter ltr@#1@inner_slide:}\ltr@slide_restrictions\par
+ \ltr@restrictattribute ltr@#1@inner_slide:vpos; top center bottom\par
+ \ltr@boolean_attr{ltr@#1@inner_slide:bookmark}%
+ \defactiveparameter ltr@#1@inner_slide {%
+ \ltr@slide_parameter{##1}%
+ }%
+ \setparameter{ltr@#1@inner_slide}:
+ meta = slide
+ }
+%
+%
+%
+%
+%
+%
+% The \slide command.
+% Attributes (beside those in the slide parameter):
+% pdftitle; and a value without a = sign is taken
+% as the slide title and recorded in \slidetitle;
+% it is also recorded as pdftitle if there is this
+% entry is missing.
+%
+\def\slidetitle{}\def\ltr@slide_pdftitle{}
+\def\ltr@ltr@inner_slide_usepair#1#2{% Used by option_launchloop.
+ \ltr@setattribute ltr@inner_slide:#1;={#2} %
+ }
+\def\ltr@ltr@inner_slide_useatom#1{% Idem. (Literate programming, he said?)
+ \def\slidetitle{#1}%
+ }
+\def\slide{%
+ \ifnextnospace[{\ltr@slide}{\ltr@slide[]}%
+ }
+\ifnum\formatnumber=3
+ \let\startslide\slide
+\fi
+\def\ltr@slide[#1]{%
+ \def\slidetitle{}
+ \ltr@option_launchloop{ltr@inner_slide}{#1}%
+ \ltr@slide_parameter{ltr@inner_slide}%
+ \edef\ltr@slide_pdftitle{%
+ \ltr@usevalueor ltr@inner_slide:pdftitle;{\slidetitle}%
+ }%
+ \pdfdest name {ltr@linktopage_\the\slideno} fit
+ \ltr@ifvalue ltr@inner_slide:bookmark;= true
+ {\ltr@ifattribute ltr@inner_slide:anchor;
+ {\createbookmark[\ltr@usevalue ltr@inner_slide:bookmarkstyle;]{\ltr@usevalue ltr@inner_slide:bookmarklevel;}[\ltr@usevalue ltr@inner_slide:anchor;]{\ltr@slide_dotitle}}
+ {\createbookmark[\ltr@usevalue ltr@inner_slide:bookmarkstyle;]{\ltr@usevalue ltr@inner_slide:bookmarklevel;}{\ltr@slide_dotitle}}}
+ {\ltr@passvalue\anchor ltr@inner_slide:anchor;}
+ %
+ \ltr@usevalueor ltr@inner_slide:font;{\ltr@usevalue job:font;}%
+ % Set the page dimensions.
+ \baselineskip=\ltr@usevalueor ltr@inner_slide:baselineskip;{12pt}\relax
+ \topskip=\ltr@usevalueor ltr@inner_slide:topskip;{12pt}\relax
+ \parskip=\ltr@usevalueor ltr@inner_slide:parskip;{0pt}\relax
+ \pdfpagewidth=\ltr@usevalueor ltr@inner_slide:width;{15cm}\relax
+ \pdfpageheight=\ltr@usevalueor ltr@inner_slide:height;{12cm}\relax
+ \pdfhorigin=\ltr@usevalueor ltr@inner_slide:left;{2cm}\relax
+ \pdfvorigin=\ltr@usevalueor ltr@inner_slide:top;{1cm}\relax
+ \hsize=\ltr@usevalueor ltr@inner_slide:hsize;{\dimexpr(\pdfpagewidth-2\pdfhorigin)\relax}\relax
+ \parindent=\ltr@usevalueor ltr@inner_slide:parindent;{0pt}\relax
+ \leftskip=0pt \rightskip=0pt plus 1fill\relax
+ \ltr@ifcasevalue ltr@inner_slide:hpos;
+ \val ff \rightskip=0pt
+ \val rr \leftskip=0pt plus 1fill\relax
+ \val rf \leftskip=0pt plus 1fill\rightskip=0pt
+ \endval
+ \ltr@usevalue ltr@inner_slide:everyslide;%
+ }
+\def\ltr@slide_dotitle{%
+ \ifemptycommand\ltr@slide_pdftitle{Page \the\slideno}{\ltr@slide_pdftitle}%
+ }
+\def\endslide{%
+ \par
+ \ltr@step_clear
+ \ifdim\pagetotal=0pt
+ \hbox{\vrule width 0pt}% If the slide is empty, there might be material in areas.
+ \fi % Close the previous step, if any.
+ \addtopageresources{%
+ /Properties << \ltr@page_properties >>
+ /Shading << \ltr@page_shading >>
+ /ExtGState << \ltr@page_extgstate >>
+ }%
+ \addtopageobject{%
+ \iffcs{ltr@inner_transition:\ltr@usevalueor ltr@inner_slide:transition;{ltr@no_value}}
+ {/Trans \usecs{ltr@inner_transition:\ltr@usevalueor ltr@inner_slide:transition;{ltr@no_value}} 0 R}
+ \ltr@pageattr_global}%
+ % End up as /Order [ [(Page 1) 1 0 R 2 0 R...] [(Page 2)...]...] in the catalog.
+ \global\eaddright\ltr@order_OCGs{[(\ltr@slide_dotitle) \ltr@page_OCGs] }%
+ % Here we go.
+ \penalty\ltr@output_penalty
+ \ltr@page_clear
+ }
+\ifnum\formatnumber=3 % ConTeXt
+ \let\stopslide\endslide
+\fi
+%
+% Resource management.
+% Should be usable by anybody. Returns the list of /<name> <number> 0 R pairs
+% in /Page ... /Resources << /Properties ... >>.
+% Using \pdfpageresources would ruin everything.
+%
+\def\ltr@catalog_OCGs{} \def\ltr@page_OCGs{} \def\ltr@order_OCGs{}
+\def\ltr@visible_OCGs{} \def\ltr@page_visibleOCGs{} \def\ltr@page_invisibleOCGs{}
+\edef\ltr@page_PA{}
+\def\ltr@page_properties{} \def\ltr@page_steplist{}
+\def\ltr@page_shading{} \def\ltr@page_extgstate{}
+\def\ltr@pageattr_global{}
+\def\addshading#1#2{%
+ \global\eaddright\ltr@page_shading{/#1 #2 0 R }%
+ }
+\def\addgstate#1#2{%
+ \global\eaddright\ltr@page_extgstate{/#1 #2 0 R }%
+ }
+\def\addproperties#1#2{%
+ \global\eaddright\ltr@page_properties{/#1 #2 0 R }%
+ }
+\def\addtopageresources#1{%
+ \begingroup
+ \edef\ltr@temp{\global\pdfpageresources{\the\pdfpageresources\spacecs #1 }}%
+ \ltr@temp
+ \endgroup
+ }
+\def\addOCG#1{%
+ \global\eaddright\ltr@catalog_OCGs{#1 0 R }%
+ \global\eaddright\ltr@page_OCGs{#1 0 R }%
+ \global\eaddright\ltr@page_invisibleOCGs{#1 0 R }%
+ }
+\def\addvisibleOCG#1{%
+ \global\eaddright\ltr@catalog_OCGs{#1 0 R }%
+ \global\eaddright\ltr@visible_OCGs{#1 0 R }%
+ \global\eaddright\ltr@page_OCGs{#1 0 R }%
+ \global\eaddright\ltr@page_visibleOCGs{#1 0 R }%
+ }
+\def\addtopageobject#1{%
+ \begingroup
+ \edef\ltr@temp{\global\pdfpageattr{#1\the\pdfpageattr}}%
+ \ltr@temp
+ \endgroup
+ }
+\def\addtoeachpageobject#1{%
+ \global\eaddright\ltr@pageattr_global{#1}%
+ }
+\def\ltr@page_clear{%
+ \gdef\ltr@page_OCGs{}%
+ \gdef\ltr@page_visbleOCGs{}%
+ \gdef\ltr@page_invisbleOCGs{}%
+ \gdef\ltr@page_PA{}%
+ \gdef\ltr@page_properties{}%
+ \gdef\ltr@page_steplist{}%
+ \global\pdfpageattr={}%
+ \global\def\ltr@step_current{}%
+ \global\ltr@steps_count=0
+ \global\ltr@activesteps_count=0
+ \ltr@setattribute ltr@inner_slide:meta; = slide
+ \ltr@slide_deleteattributes
+ }
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/lecturer/ltr-steps.tex b/Master/texmf-dist/tex/generic/lecturer/ltr-steps.tex
new file mode 100644
index 00000000000..eb2424aadcc
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/lecturer/ltr-steps.tex
@@ -0,0 +1,202 @@
+% This file is part of the Lecturer package.
+% Paul Isambert -- July 2010.
+%
+% ATTRIBUTES
+%
+\def\ltr@step_restrictions{%
+ vskip hskip everyvstep everyhstep left right
+ transition handout visible group color font on off pdftitle }
+\ltr@boolean_attr{step:handout}
+\ltr@boolean_attr{step:visible}
+\ltr@boolean_attr{step:group}
+\ltr@setattribute step:handout;=true
+\defactiveparameter step {%
+ \ltr@delete_empty{#1:font}%
+ }%
+
+\def\ltr@step_clear{%
+ \ifltr@step_open
+ \ltr@ifattribute ltr@inner_step:font;
+ {\ltr@usevalueor ltr@inner_slide:font;{\ltr@usevalue job:font;}}{}%
+ \ltr@ifvalue ltr@inner_step:group; = true
+ {\endgroup}{}%
+ \ltr@passvalueand{\reverse\iffemptystring}ltr@inner_step:color;
+ {{\pdfcolorstack0 pop}}{}%
+ \pdfliteral direct {EMC}%
+ \ltr@setattribute ltr@inner_step:meta; = step
+ \passexpanded{\ltr@attribute_deletion{ltr@inner_step}}\ltr@step_restrictions
+ \fi
+ }
+\passexpandednobraces{\restrictparameter step ltr@inner_step:}\ltr@step_restrictions\par
+\ltr@boolean_attr{ltr@inner_step:handout}
+\ltr@boolean_attr{ltr@inner_step:visible}
+\ltr@boolean_attr{ltr@inner_step:group}
+
+\long\def\setstep#1#2\par{%
+ \ltr@setstep_do{#2}{#1}%
+ }%
+\newfor\ltr@setstep_do{1}#2{%
+ \ltr@ifattribute {ltr@\commandtoname#2@inner_step}:meta;
+ {\setparameter{ltr@\commandtoname#2@inner_step}:}
+ {\ltr@setstep_new{#2}}%
+ #1\par
+ }
+\def\ltr@setstep_new#1{%
+ \def#1{%
+ \ltr@step_clear
+ \ltr@setattribute ltr@inner_step:meta;={ltr@\commandtoname#1@inner_step}
+ \ltr@step_do}%
+ \passexpandednobraces{\restrictparameter {ltr@\commandtoname#1@inner_step}:}\ltr@step_restrictions\par
+ \ltr@boolean_attr{{ltr@\commandtoname#1@inner_step}:visible}%
+ \ltr@boolean_attr{{ltr@\commandtoname#1@inner_step}:handout}%
+ \ltr@boolean_attr{{ltr@\commandtoname#1@inner_step}:group}%
+ \defactiveparameter{ltr@\commandtoname#1@inner_step}{%
+ \ltr@delete_empty{##1:font}%
+ }%
+ \setparameter{ltr@\commandtoname#1@inner_step}:
+ meta = step
+ }
+\setparameter ltr@inner_step:
+ meta = step
+
+%
+%
+%
+%
+%
+% The \step command.
+%
+\newif\ifltr@step_open
+\newcount\ltr@steps_count
+\newcount\ltr@activesteps_count
+\def\step{%
+ % Close the current step, if any.
+ \ltr@step_clear
+ \ltr@step_do
+ }
+% Steps created with \newstep goes there directly.
+\def\ltr@step_do{%
+ \global\ltr@step_opentrue
+ \ifnextnospace[{\ltr@step_create}{\ltr@step_create[]}%
+ }
+
+\newif\ifltr@step_standalone
+%
+% For the options.
+%
+\newif\ifltr@step_named
+\def\ltr@stepcheck_useatom#1{%
+ \ltr@step_namedtrue
+ \reverse\iffcs{ltr@step_objnum:#1_\the\slideno}
+ {\pdfobj reserveobjnum%
+ \xdefcs{ltr@step_objnum:#1_\the\slideno}{\the\pdflastobj\spacecs}}%
+ \global\lettocs\ltr@step_current{ltr@step_objnum:#1_\the\slideno}%
+ }
+\def\ltr@stepcheck_usepair#1#2{}
+%
+\def\ltr@step_useatom#1{%
+ \ifstring{#1}{here}
+ {\ltr@error{You can't name a step `here', it's a keyword}}
+ {\def\ltr@step_ref{#1}%
+ \iffemptycommand\ltr@step_pdftitle{\def\ltr@step_pdftitle{#1}}}%
+ }
+\def\ltr@step_usepair#1#2{%
+ \ifstring{#1}{on}
+ {\ltr@step_standalonefalse\ltr@step_onoff{on}{#2 }}
+ {\ifstring{#1}{off}
+ {\ltr@step_onoff{off}{#2 }}
+ {\ifstring{#1}{pdftitle}
+ {\def\ltr@step_pdftitle{#2}}
+ {\ltr@setattribute ltr@inner_step:#1;={#2} }}}%
+ }
+\def\ltr@step_usepair#1#2{%
+ \ifstring{#1}{pdftitle}
+ {\def\ltr@step_pdftitle{#2}}
+ {\ltr@setattribute ltr@inner_step:#1;={#2} }%
+ }
+\def\ltr@step_onoff#1#2{%
+ \reverse\iffemptystring{#2}
+ {\ltr@step_onoffloop{#1}{#2 }}%
+ }
+\newfornoempty\ltr@step_onoffloop{1}#2 {%
+ \ifstring{#2}{here}{\ltr@step_standalonetrue}{%
+ \ifcs{ltr@step_#2:#1}
+ {\global\eaddrightcs}
+ {\xdefcs}
+ {ltr@step_#2:#1}{\ltr@step_current 0 R }}%
+ % Add the object to ltr@step_OCG:on/off
+ }
+\def\ltr@step_current{}
+\def\ltr@step_create[#1]{%
+ \global\advance\ltr@steps_count1
+ \ltr@step_namedfalse
+ \ltr@option_launchloop{stepcheck}{#1}%
+ \unless\ifltr@step_named
+ \pdfobj reserveobjnum
+ \xdef\ltr@step_current{\the\pdflastobj\spacecs}%
+ \fi
+ \def\ltr@step_ref{}\def\ltr@step_pdftitle{}%
+ \ltr@step_standalonefalse
+ \ltr@option_launchloop{step}{#1}%
+ \ltr@delete_empty{ltr@inner_step:font}%
+ \ltr@passvalueor{\ltr@step_onoff{on}}ltr@inner_step:on;\ltr@step_standalonetrue
+ \ltr@passvalue{\ltr@step_onoff{off}}ltr@inner_step:off;%
+ \immediate\pdfobj useobjnum\ltr@step_current {%
+ << /Type/OCG /Name(%
+ \ifemptycommand\ltr@step_ref
+ {\ifemptycommand\ltr@step_pdftitle
+ {[step \the\ltr@steps_count]}
+ {\ltr@step_pdftitle}}%
+ {\ltr@step_pdftitle}) >>
+ }%
+ % ... and, if the object has a reference name, it might be referenced,
+ % so its object number now returns its name.
+ \reverse\iffemptycommand\ltr@step_ref{\global\letcs{ltr@step_\ltr@step_current:name}\ltr@step_ref}%
+ % According to the value to the attribute "handout" or "visible"
+ % this group has base state ON or OFF (see catalog).
+ \ltr@ifvalue job:mode; = handout
+ {\ltr@ifvalue ltr@inner_step:handout; = true
+ {\addvisibleOCG{\ltr@step_current}}
+ {\addOCG{\ltr@step_current}}}
+ {\ltr@ifvalue ltr@inner_step:visible; = true
+ {\addvisibleOCG{\ltr@step_current}\ltr@step_standalonefalse}
+ {\addOCG{\ltr@step_current}}}%
+ % Link the step to the OCG.
+ \addproperties{ltr@step_\the\ltr@steps_count:content}{\ltr@step_current}%
+ % If the step appears by itself, it is added it to the list to
+ % be chained in the output routine, and its transition is stored, if any.
+ \ifltr@step_standalone
+ \global\advance\ltr@activesteps_count1
+ \global\eaddright\ltr@page_steplist{\ltr@step_current,}%
+ \iffcs{ltr@inner_transition:\ltr@usevalueor ltr@inner_step:transition;{ltr@no_value}}
+ {\xdefcs{ltr@step_\ltr@step_current:transition}{%
+ \usecs{ltr@inner_transition:\ltr@usevalueor ltr@inner_step:transition;{ltr@no_value}} 0 R}}%
+ \fi
+ % The step is opened, and the every...'s released.
+ \pdfliteral direct {/OC/ltr@step_\the\ltr@steps_count:content BDC}%
+ \ltr@ifvalue ltr@inner_step:group; = true
+ {\begingroup}{}%
+ \ltr@passvalueand{\reverse\iffemptystring}ltr@inner_step:color;
+ {{\pdfcolorstack0 push {\ltr@passvalue\ltr@color_use ltr@inner_step:color;}}}{}%
+ \ltr@usevalue ltr@inner_step:font;%
+ \ifvmode
+ \ltr@settovalue\vskip ltr@inner_step:vskip;%
+ \leftskip=0pt \rightskip=0pt plus 1fill\relax
+ \ltr@ifcasevalue ltr@inner_slide:hpos;
+ \val ff \rightskip=0pt
+ \val rr \leftskip=0pt plus 1fill\relax
+ \val rf \leftskip=0pt plus 1fill\rightskip=0pt
+ \endval
+ \ltr@settovalue{\advance\leftskip}ltr@inner_step:left;%
+ \ltr@settovalue{\advance\rightskip}ltr@inner_step:right;%
+ \ltr@usevalue ltr@inner_step:everyvstep;%
+ \else
+ \ifhmode
+ \ltr@settovalue\hskip ltr@inner_step:hskip;%
+ \ltr@usevalue ltr@inner_step:everyhstep;%
+ \fi
+ \fi
+ \ignorespaces
+ }
+
+\endinput \ No newline at end of file