| 1 |
%% frames.sty by Ross Moore <ross@mpce.mq.edu.au> 29-MAY-96 |
| 2 |
%% Mathematics Department, Macquarie University, Sydney. |
| 3 |
%% |
| 4 |
%% This style-file adds no new code to LaTeX. |
| 5 |
%% It is provided solely to facilitate loading of the |
| 6 |
%% frames.perl package by Martin Wilck <martin@tropos.de> |
| 7 |
%% to add support for Netscape Navigator's frame extensions, |
| 8 |
%% when using the LaTeX2HTML translator. |
| 9 |
%% |
| 10 |
%% |
| 11 |
|
| 12 |
\typeout{*********************} |
| 13 |
\typeout{The frames.perl package allows HTML markup to be |
| 14 |
produced^^J which is non-conformant with the HTML 2.0 standard.} |
| 15 |
\typeout{Not all Web-browsers can be expected to correctly |
| 16 |
display this markup.} |
| 17 |
\typeout{*********************} |
| 18 |
|
| 19 |
%% |
| 20 |
%% Usage: \framecolor{<frame>}{<options>} |
| 21 |
%% \frameoptions[<frame>]{<options>} |
| 22 |
%% \frameColorSet[<frame>]{<colorset>} |
| 23 |
%% |
| 24 |
%% \framecolor{<frame>}{<options>} sets <options> to be the |
| 25 |
%% complete set of options for the given <frame>. |
| 26 |
%% |
| 27 |
%% \frameoption[<frame>]{<options>} updates the existing values |
| 28 |
%% of the <frame>'s parameters, using those provided in <options>. |
| 29 |
%% Any unspecified parameters remain with their previous values. |
| 30 |
%% If no <frame> is specied, then the TEXT frame is assumed. |
| 31 |
%% |
| 32 |
%% \framecolorset{<frame>}{<colorset>} uses the set of 4 colors |
| 33 |
%% defined by the <colorset>. |
| 34 |
%% |
| 35 |
%% \framecolorset*{<frame>}{<colorset>} uses the set of 4 colors |
| 36 |
%% defined by the <colorset>, but in reverse order. |
| 37 |
%% |
| 38 |
|
| 39 |
\newcommand\frameoptions[1][TEXT]{\bgroup\catcode`\#=11\framecolor@{#1}} |
| 40 |
\newcommand\framecolor{\bgroup\catcode`\#=11\framecolor@} |
| 41 |
\newcommand\DeclareColorSet[2]{\defineColorset@{#1}#2,*% |
| 42 |
\write-1{new COLORSET: #1 = (#2)}} |
| 43 |
|
| 44 |
\def\framecolor@#1#2{\write-1{^^J |
| 45 |
ignoring layout information for frame #1 : ^^J #2}\egroup} |
| 46 |
|
| 47 |
\newcommand\frameColorSet{\@ifstar{\@ifstar |
| 48 |
{\frameColorSet@star}{\frameColorSet@starstar}}{\frameColorSet@}} |
| 49 |
\newcommand\frameColorSet@[2][TEXT]{}%\write-1{COLORSET: frame=#1; SET=#2}} |
| 50 |
\newcommand\frameColorSet@star[2][TEXT]{}%\write-1{COLORSET: frame=#1; SET=#2*}} |
| 51 |
\newcommand\frameColorSet@starstar[2][TEXT]{}%\write-1{COLORSET: frame=#1; SET=#2**}} |
| 52 |
|
| 53 |
\newcount\colsetcnt@ |
| 54 |
\def\defineColorset@#1{% |
| 55 |
\def\thiscolorset{#1}\colsetcnt@=0\relax\getnextColorset@} |
| 56 |
|
| 57 |
\def\getnextColorset@#1,{\advance\colsetcnt\@ne |
| 58 |
\edef\next{\thiscolorset\the\colsetcnt}% |
| 59 |
\DefineNamedColor{named}{\next}{named}{#1}% |
| 60 |
\@ifstar{\endColorSet}{\getnextColorset}} |
| 61 |
|
| 62 |
\def\endColorSet{\ifnum\colsetcnt<4\relax |
| 63 |
\typeout{only \colsetcnt colors defined for ColorSet: \thiscolorset}\fi} |