From 7a9971d09aa889f7fc85a81301a6e8c52393287d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Aug 2011 21:32:00 +0000 Subject: prerex 6.1.0 (19aug10) git-svn-id: svn://tug.org/texlive/trunk@23621 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/prerex/prerex.sty | 54 ++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/prerex/prerex.sty b/Master/texmf-dist/tex/latex/prerex/prerex.sty index 46d23896bad..a11e03659f6 100644 --- a/Master/texmf-dist/tex/latex/prerex/prerex.sty +++ b/Master/texmf-dist/tex/latex/prerex/prerex.sty @@ -14,7 +14,7 @@ % % Instructions supported inside \begin{chart} ... \end{chart}: % -% \[req]{half|full}course x,y: {course code}{course title}{timetable code} +% \[req]{half|full}course[c] x,y: {course code}{course title}{timetable code}[{color}] % % \mini x,y: {course code} % @@ -62,10 +62,14 @@ % The nominal diagram width is 10 + (\textwidth divided by \unit). % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{prerex}[2011/08/10 v6.0.6 LaTeX style for prerequisite charts, pgf version] +\ProvidesPackage{prerex}[2011/08/18 v6.1.0 LaTeX style for prerequisite charts, pgf version] % Changelog: % +% Version 6.1.0 +% +% Added commands to specify background color of non-mini course boxes. +% % Version 6.0.6 % % Provide \textbullet at mid-point of edges when grid is on. @@ -282,6 +286,17 @@ \@outputImapData#1,#2:{#3}{4}{2}% } +\def\@halfcoursec#1,#2:#3#4#5#6{% +\node[draw,thin,fill=#6,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)% +{\textsf{% +\renewcommand{\arraystretch}{0.8}% +\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}% +\mbox{\smallersize#3}\,\hfill\,\mbox{\smallersize#5}\\ #4% +\end{tabular}}}% +};% +\@outputImapData#1,#2:{#3}{4}{2}% +} + \def\@reqhalfcourse#1,#2:#3#4#5{% \node[draw,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)% {\textsf{\textbf{% @@ -293,6 +308,17 @@ \@outputImapData#1,#2:{#3}{4}{2}% } +\def\@reqhalfcoursec#1,#2:#3#4#5#6{% +\node[draw,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)% +{\textsf{\textbf{% +\renewcommand{\arraystretch}{0.8}% +\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}% +\mbox{\smallersize#3}\,\hfill\,\mbox{\smallersize#5}\\ #4% +\end{tabular}}}% +}};% +\@outputImapData#1,#2:{#3}{4}{2}% +} + \def\@fullcourse#1,#2:#3#4#5{% \node[draw,thin,fill=\background,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)% {\textsf{% @@ -304,6 +330,16 @@ \@outputImapData#1,#2:{#3}{4}{5}% } +\def\@fullcoursec#1,#2:#3#4#5#6{% +\node[draw,thin,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)% +{\textsf{% +\renewcommand{\arraystretch}{1.7}% +\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}% +\mbox{\smallersize#3}\,\hfill\,\mbox{\smallersize#5}\\ #4% +\end{tabular}}}% +};% +\@outputImapData#1,#2:{#3}{4}{5}% +} \def\@reqfullcourse#1,#2:#3#4#5{% \node[draw,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)% @@ -316,6 +352,16 @@ \@outputImapData#1,#2:{#3}{4}{5}% } +\def\@reqfullcoursec#1,#2:#3#4#5#6{% +\node[draw,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)% +{\textsf{\textbf{% +\renewcommand{\arraystretch}{1.7}% +\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}% +\mbox{\smallersize#3}\,\hfill\,\mbox{\smallersize#5}\\ #4% +\end{tabular}}}}% +};% +\@outputImapData#1,#2:{#3}{4}{5}% +} \def\@mini#1,#2:#3{% \node[fill=white,draw=white,inner ysep=1.8pt](x#1y#2) at (#1,#2)% @@ -561,9 +607,13 @@ } \let\halfcourse=\@halfcourse + \let\halfcoursec=\@halfcoursec \let\reqhalfcourse=\@reqhalfcourse + \let\reqhalfcoursec=\@reqhalfcoursec \let\fullcourse=\@fullcourse + \let\fullcoursec=\@fullcoursec \let\reqfullcourse=\@reqfullcourse + \let\reqfullcoursec=\@reqfullcoursec \let\mini=\@mini \let\text=\@text \let\prereq=\@prereq -- cgit v1.2.3