summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/prerex/prerex.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2014-03-03 01:38:45 +0000
committerNorbert Preining <preining@logic.at>2014-03-03 01:38:45 +0000
commit39cb23d10578b9db523f4f499d3dea3630787af0 (patch)
treef55976b1244f9e20f660d165f740a62b6abb067f /Master/texmf-dist/tex/latex/prerex/prerex.sty
parent3ed297e7d00115c2a2be5d8a32058869f33f0567 (diff)
prerex (3Mar)
git-svn-id: svn://tug.org/texlive/trunk@33078 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/prerex/prerex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/prerex/prerex.sty555
1 files changed, 272 insertions, 283 deletions
diff --git a/Master/texmf-dist/tex/latex/prerex/prerex.sty b/Master/texmf-dist/tex/latex/prerex/prerex.sty
index 3afe6755c5a..429c8171ecd 100644
--- a/Master/texmf-dist/tex/latex/prerex/prerex.sty
+++ b/Master/texmf-dist/tex/latex/prerex/prerex.sty
@@ -11,6 +11,11 @@
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{prerex}[2014/03/02 v6.4.1 LaTeX style for prerequisite charts, pgf version]
+%
+% Changelog is at the end of the file.
%
% Instructions supported inside \begin{chart} ... \end{chart}:
%
@@ -22,7 +27,7 @@
% dotted arrow: \coreq x0,y0,x1,y1: \coreqc x0,y0,x1,y1;curvature:
% dashed arrow: \recomm x0,y0,x1,y1: \recommc x0,y0,x1,y1;curvature:
%
-% \text x,y: {line of text}
+% \text x,y: {lines of text}
%
% \grid coordinate grid background
%
@@ -36,198 +41,7 @@
% \boldbox in-line bold course box
% \dottedbox in-line dotted course box
%
-% The following defaults are defined in prerex.sty (but may be re-defined by the user):
-%
-% \newcommand{\DefaultCurvature}{20}
-%
-% where the argument should be in the range 0-100; 0 means no curvature.
-%
-% \newcommand{\CourseURL}[3]{file:#3.html}
-%
-% where the arguments supplied at the call are the x and y coordinates
-% and the course code.
-%
-% \newcommand{\background}{yellow!15}
-%
-% \setlength{\unit}{5.7816pt} length of a coordinate unit; gives 10 pixels per unit at 125dpi
-% \newcommand{\dpi}{125}
-% \newcommand\PixelsPerUnit{10}
-% \setcounter{diagheight}{75} but reduced to 65 in landscape mode
-% \newcommand{\solidwidth}{0.5pt}
-% \newcommand{\dottedwidth}{0.8pt}
-% \newcommand{\dashedwidth}{0.5pt}
-% \newcommand{\boldwidth}{1.0pt}
-% \newcommand{\smallersize}{\relsize{-2}}
-% \newcommand{\baselineAdj}{-0.5ex}
-%
-% The nominal diagram width is 10 + (\textwidth divided by \unit).
-%
-\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{prerex}[2014/02/27 v6.4.0 LaTeX style for prerequisite charts, pgf version]
-
-% Changelog:
-%
-% Version 6.4.0
-%
-% Revise arrows for tikz version 3.0.0
-%
-% Version 6.3.6
-%
-% Allow line breaks in \text boxes.
-%
-% Version 6.3.5
-%
-% Fix font usage to work with mweights.sty.
-%
-% Version 6.3.4
-%
-% Timetable and course code in bold for required boxes.
-%
-% Version 6.3.3
-%
-% Remove background colour from standalone boxes.
-% \smallersize increased to \relsize{-2}.
-%
-% Version 6.3.2
-%
-% Use pgf layers to keep grid below arrows below boxes (thanks to Ryan Kavanagh).
-% Add struts to stand-alone \...box commands.
-%
-% Version 6.3
-%
-% Allow "opt" course boxes (with dotted outlines).
-%
-% Version 6.2
-%
-% Allow for multi-line "timetable" arguments by using nested tabular environments.
-%
-% 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.
-%
-% Version 6.0.5
-%
-% Changed TARGET attribute in AREA outputs to "new".
-% New configuration command \baselineAdj.
-%
-% Version 6.0.4
-%
-% Added missing initializations of @dy to curved... macros.
-%
-% Version 6.0.3
-%
-% Added required ALT tag to AREA outputs.
-%
-% Version 6.0
-% Version 5.7
-%
-% added implementation details to documentation
-% generated script now only crops the chart image
-%
-% Version 5.6
-% Version 5.5
-%
-% version increased to keep pace with previewer/vprerex
-%
-% Version 5.4
-%
-% code clean-up
-%
-% Version 5.3
-%
-% produces an image-generating script in \jobname.sh
-%
-% Version 5.2
-%
-% use \grid and \foreach (tikz) instead of \multido
-% half-course boxes now have a minimum height (5 units) to improve uniformity
-%
-% Version 5.1
-%
-% generates image-map data in \jobname_n.html for nth chart when n>1
-%
-% Version 5.0
-%
-% also generates \jobname.html with image-map data for all node URLs
-% new configuration commands \dpi and \PixelsPerUnit
-% default \unit length adjusted to give 10 pixels per coordinate unit at 125 dpi
-%
-% Version 4.4
-%
-% increase ysep parameter to 1.8pt to separate course-code or text and arrow tails for minis
-% and text boxes
-%
-% Version 4.3
-%
-% introduce \smallersize configuration command
-%
-% Version 4.2
-%
-% using tinting with xcolor package to ease background-color changes
-%
-% Version 4.1
-%
-% Version 4.0
-%
-% Implement the \text command to place a line of text (centered at the coordinates) in a chart
-%
-% Version 3.8.1:
-%
-% adjust arraystretch factors to work with long-ascender fonts such as Futura
-% adjust inner sep parameters to work with oblique/italic fonts
-% remove workaround for pgf-1.10 bug described at
-% http://sourceforge.net/forum/forum.php?thread_id=1621660&forum_id=477363
-% require version 1.18 (or later) of pgf
-%
-% Version 3.8:
-%
-% require version 1.10 (or later) of pgf
-%
-% Version 3.7:
-%
-% anchor nodes must be non-null for latex/dvips
-%
-% Version 3.6:
-%
-% first pgf-based version
-%
-% Version 3.5:
-% Version 3.4:
-%
-% introduce arrow borders to improve the appearance of crossing arrows
-% change default widths to artifacts created when arrow borders
-% occlude box boundaries
-%
-% Version 3.3:
-%
-% arrows (as well as course boxes and minis) are hyperlinked with coordinate URIs
-%
-% Version 3.2:
-%
-% Version 3.1:
-%
-% Version 3.0:
-%
-% "anchor" hyperlinks are added to coordinate grid to allow computation of
-% chart coordinates at mouse clicks
-%
-% Version 2.0:
-%
-% CourseURL now takes 3 arguments
-% box/mini coordinates displayed in (some) PDF viewers when grid on
-%
-% Version 1.0.2:
-%
-% using \relsize{-3} rather than \scriptsize
-% using \textsf in \lightbox and \boldbox
-%
-% Version 1.0.1:
-%
-% using \RequirePackage rather than \usepackage (suggested by Herbert Voss)
+% The nominal diagram width is (\textwidth divided by \unit) + 10
%
\newlength{\unit}
@@ -240,11 +54,11 @@
\RequirePackage{calc}
\RequirePackage{pgf}[2013/12/18]
\RequirePackage{tikz}\usetikzlibrary{arrows.meta}
-\RequirePackage{ifthen}
\RequirePackage{textcomp}
\RequirePackage{zref-savepos}
\PassOptionsToPackage{urlcolor=black,colorlinks,raiselinks}{hyperref}
\RequirePackage{hyperref}
+\RequirePackage{ifpdf}
\RequirePackage{xcolor}
\definecolor{light}{gray}{0.5}
@@ -252,9 +66,13 @@
\definecolor{verylight}{gray}{0.85}
\definecolor{white}{rgb}{1.0,1.0,1.0} % not transparent, hides grid
+\newcommand{\DefaultCurvature}{20}
+% where the argument should be in the range 0-100; 0 means no curvature.
-\newcommand{\DefaultCurvature}{20} % 0 for no curvature
\newcommand{\CourseURL}[3]{file:#3.html}
+% where the arguments supplied at the call are the x and y coordinates
+% and the course code.
+
\newcommand{\background}{yellow!15}
\newcommand{\solidwidth}{0.5pt}
@@ -296,35 +114,38 @@
% #4 horizontal delta
% #5 vertical delta
%
-\setcounter{xNW}{\dpi * \ratio{\zposx{gridOrigin_\thechart}sp}{1in}}% # of pixels from left edge to origin
-\addtocounter{xNW}{(#1-#4)*\PixelsPerUnit}% add # pixels from origin to node (-#4 units)
-\setcounter{xSE}{\dpi * \ratio{\zposx{gridOrigin_\thechart}sp}{1in}}%
-\addtocounter{xSE}{(#1+#4)*\PixelsPerUnit}% add # pixels from origin to node (+#4 units)
+\ifpdf
+ \setcounter{xNW}{\dpi * \ratio{\zposx{gridOrigin_\thechart}sp}{1in}}% # of pixels from left edge to origin
+ \addtocounter{xNW}{(#1-#4)*\PixelsPerUnit}% add # pixels from origin to node (-#4 units)
+ \setcounter{xSE}{\dpi * \ratio{\zposx{gridOrigin_\thechart}sp}{1in}}%
+ \addtocounter{xSE}{(#1+#4)*\PixelsPerUnit}% add # pixels from origin to node (+#4 units)
-\setcounter{yNW}{ \dpi * \ratio{\paperheight}{1in}} % # of pixels for the whole page
-\addtocounter{yNW}{ 0 - \dpi * \ratio{\zposy{gridOrigin_\thechart}sp}{1in}} % subtract # pixels from bottom edge to origin
-\addtocounter{yNW}{0 - (#2 - #5) * \PixelsPerUnit } % subtract # of pixels from origin to node (-#5)
-\setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
-\addtocounter{ySE}{0 - \dpi * \ratio{\zposy{gridOrigin_\thechart}sp}{1in}}
-\addtocounter{ySE}{0 - (#2 + #5) * \PixelsPerUnit } % subtract # of pixels from origin to node (+#5)
+ \setcounter{yNW}{ \dpi * \ratio{\paperheight}{1in}} % # of pixels for the whole page
+ \addtocounter{yNW}{ 0 - \dpi * \ratio{\zposy{gridOrigin_\thechart}sp}{1in}} % subtract # pixels from bottom edge to origin
+ \addtocounter{yNW}{0 - (#2 - #5) * \PixelsPerUnit } % subtract # of pixels from origin to node (-#5)
+ \setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
+ \addtocounter{ySE}{0 - \dpi * \ratio{\zposy{gridOrigin_\thechart}sp}{1in}}
+ \addtocounter{ySE}{0 - (#2 + #5) * \PixelsPerUnit } % subtract # of pixels from origin to node (+#5)
-\immediate\write\@imapfile{<area shape=rect coords="\thexNW,\theyNW,\thexSE,\theySE" href="\CourseURL{#1}{#2}{#3}" target="new" alt="#3">}%
+ \immediate\write\@imapfile{<area shape=rect coords="\thexNW,\theyNW,\thexSE,\theySE" href="\CourseURL{#1}{#2}{#3}" target="new" alt="#3">}%
+\fi
}
\pgfsetlayers{}
+
\def\solidarrow{%
\tikz[x=\unit,y=\unit,baseline=\baselineAdj]
-\draw[-Latex,line width =\solidwidth] (0,0) -- (4,0);
+\draw[-{Latex[length=4pt]},line width =\solidwidth] (0,0) -- (4,0);
}
\def\dottedarrow{%
\tikz[x=\unit,y=\unit,baseline=\baselineAdj]
-\draw[-Latex,loosely dotted,line width=\dottedwidth] (0,0) -- (4,0);
+\draw[-{Latex[length=4pt]},loosely dotted,line width=\dottedwidth] (0,0) -- (4,0);
}
\def\dashedarrow{%
\tikz[x=\unit,y=\unit,baseline=\baselineAdj]
-\draw[-Latex,dashed,line width=\dashedwidth] (0,0) -- (4,0);
+\draw[-{Latex[length=4pt]},dashed,line width=\dashedwidth] (0,0) -- (4,0);
}
\def\lightbox{%
@@ -350,7 +171,7 @@
\def\@halfcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,thin,fill=\background,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,thin,fill=\background,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -366,7 +187,7 @@
\def\@halfcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,thin,fill=#6,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,thin,fill=#6,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -382,7 +203,7 @@
\def\@reqhalfcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,line width=\boldwidth,fill=\background,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -398,7 +219,7 @@
\def\@reqhalfcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,line width=\boldwidth,fill=#6,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -415,7 +236,7 @@
\def\@opthalfcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,dotted,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,dotted,line width=\boldwidth,fill=\background,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -431,7 +252,7 @@
\def\@opthalfcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,dotted,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
+\node[draw,dotted,line width=\boldwidth,fill=#6,minimum height=\@unitmult](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{0.8}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -447,7 +268,7 @@
\def\@fullcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,thin,fill=\background,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,thin,fill=\background](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -463,7 +284,7 @@
\def\@fullcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,thin,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,thin,fill=#6](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -479,7 +300,7 @@
\def\@reqfullcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,line width=\boldwidth,fill=\background](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -495,7 +316,7 @@
\def\@reqfullcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,line width=\boldwidth,fill=#6](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -511,7 +332,7 @@
\def\@fullcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,thin,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,thin,fill=#6](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -527,7 +348,7 @@
\def\@optfullcourse#1,#2:#3#4#5{%
\begin{pgfonlayer}{courses}%
-\node[draw,dotted,line width=\boldwidth,fill=\background,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,dotted,line width=\boldwidth,fill=\background](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -544,7 +365,7 @@
\def\@optfullcoursec#1,#2:#3#4#5#6{%
\begin{pgfonlayer}{courses}%
-\node[draw,dotted,line width=\boldwidth,fill=#6,rounded corners=2pt,inner ysep=0.5pt](x#1y#2) at (#1,#2)%
+\node[draw,dotted,line width=\boldwidth,fill=#6](x#1y#2) at (#1,#2)%
{
\renewcommand{\arraystretch}{1.7}%
\href{\CourseURL{#1}{#2}{#3}}{\begin{tabular}{@{\hspace{1pt}}c@{\hspace{1pt}}}%
@@ -561,12 +382,12 @@
\def\@mini#1,#2:#3{%
\begin{pgfonlayer}{courses}%
\ifgridon
- \node[fill=white,draw=white,inner ysep=1.8pt](x#1y#2) at (#1,#2)%
+ \node[fill=white,draw=white](x#1y#2) at (#1,#2)%
{
\href{\CourseURL{#1}{#2}{#3}}{%
{\smallersize\mdseries#3}}};%
\else
- \node[fill=none,draw=none,inner ysep=1.8pt](x#1y#2) at (#1,#2)%
+ \node[fill=none,draw=none](x#1y#2) at (#1,#2)%
{
\href{\CourseURL{#1}{#2}{#3}}{%
{\smallersize\mdseries#3}}};%
@@ -579,10 +400,10 @@
% include coordinates if grid on, but don't hyperlink if grid off
\begin{pgfonlayer}{courses}%
\ifgridon
- \node[fill=white,draw=white,inner ysep=1.8pt](x#1y#2) at (#1,#2)%
+ \node[fill=white,draw=white](x#1y#2) at (#1,#2)%
{\href{coord: #1,#2}{\sffamily\mdseries\renewcommand{\arraystretch}{0.5}\begin{tabular}[b]{@{}c@{}}#3\\[-0.4ex]\end{tabular}}};%
\else
- \node[fill=none,draw=none,inner ysep=1.8pt](x#1y#2) at (#1,#2){\sffamily\mdseries\renewcommand{\arraystretch}{0.5}\begin{tabular}[b]{@{}c@{}}#3\\[-0.4ex]\end{tabular}};%
+ \node[fill=none,draw=none](x#1y#2) at (#1,#2){\sffamily\mdseries\renewcommand{\arraystretch}{0.5}\begin{tabular}[b]{@{}c@{}}#3\\[-0.4ex]\end{tabular}};%
\fi
\end{pgfonlayer}%
}
@@ -655,11 +476,10 @@
\def\@straight#1,#2,#3,#4:{%
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt](x#1y#2) -- (x#3y#4) ;
- \draw[-{Latex[fill=black]},draw=white,very thin](x#1y#2) -- (x#3y#4) ;
\ifgridon
- \draw[line width=\solidwidth](x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4);
+ \draw[->,line width=\solidwidth](x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4);
\else
- \draw[line width=\solidwidth](x#1y#2) -- (x#3y#4) ;
+ \draw[->,line width=\solidwidth](x#1y#2) -- (x#3y#4) ;
\fi
\end{pgfonlayer}
}
@@ -678,11 +498,10 @@
\setcounter{@inangle}{180 - \the@myangle}
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
- \draw[-{Latex[fill=black]},draw=white,very thin](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
\ifgridon
- \draw[line width=\solidwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
+ \draw[->,line width=\solidwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
\else
- \draw[line width=\solidwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
+ \draw[->,line width=\solidwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
\fi
\end{pgfonlayer}
}
@@ -690,11 +509,10 @@
\def\@straightDashed#1,#2,#3,#4:{%
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt] (x#1y#2) -- (x#3y#4);
-\draw[-{Latex[fill=black]},draw=white,very thin] (x#1y#2) -- (x#3y#4);
\ifgridon
- \draw[dashed,line width=\dashedwidth] (x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
+ \draw[->,dashed,line width=\dashedwidth] (x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
\else
- \draw[dashed,line width=\dashedwidth] (x#1y#2) -- (x#3y#4);
+ \draw[->,dashed,line width=\dashedwidth] (x#1y#2) -- (x#3y#4);
\fi
\end{pgfonlayer}
}
@@ -712,11 +530,10 @@
\setcounter{@inangle}{180 - \the@myangle}
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
- \draw[-{Latex[fill=black]},draw=white,very thin](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
\ifgridon
- \draw[dashed,line width=\dashedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4);
+ \draw[->,dashed,line width=\dashedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4);
\else
- \draw[dashed,line width=\dashedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4);
+ \draw[->,dashed,line width=\dashedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4);
\fi
\end{pgfonlayer}
}
@@ -724,11 +541,10 @@
\def\@straightDotted#1,#2,#3,#4:{%
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt] (x#1y#2) -- (x#3y#4);
- \draw[-{Latex[fill=black]},draw=white,very thin] (x#1y#2) -- (x#3y#4);
\ifgridon
- \draw[loosely dotted,line width=\dottedwidth] (x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
+ \draw[->,loosely dotted,line width=\dottedwidth] (x#1y#2) -- node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
\else
- \draw[loosely dotted,line width=\dottedwidth] (x#1y#2) -- (x#3y#4);
+ \draw[->,loosely dotted,line width=\dottedwidth] (x#1y#2) -- (x#3y#4);
\fi
\end{pgfonlayer}
}
@@ -746,11 +562,10 @@
\setcounter{@inangle}{180 - \the@myangle}
\begin{pgfonlayer}{arrows}
\draw[draw=white,line width=1.5pt](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
- \draw[-{Latex[fill=black]},draw=white,very thin](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
\ifgridon
- \draw[loosely dotted,line width=\dottedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
+ \draw[->,loosely dotted,line width=\dottedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] node[anchor=mid] {\href{coord: #1,#2,#3,#4}{\textbullet}} (x#3y#4) ;
\else
- \draw[loosely dotted,line width=\dottedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
+ \draw[->,loosely dotted,line width=\dottedwidth](x#1y#2) to[out=\the@myangle,in=\the@inangle,relative] (x#3y#4) ;
\fi
\end{pgfonlayer}
}
@@ -794,15 +609,17 @@
\newenvironment{chart}
{ \setcounter{@diagwidth}{10 + 1 * \ratio{\textwidth}{\unit}}
- \newwrite\@imapfile % image-map data
- \newwrite\@scriptfile % shell script to generate image file
- \ifthenelse{\value{chart} = 0}
- { \immediate\openout\@imapfile=\jobname.map
- \immediate\write\@imapfile{<map name="\jobname">}
- }
- { \immediate\openout\@imapfile=\jobname_\thechart.map
- \immediate\write\@imapfile{<map name="\jobname_\thechart">}
- }
+ \ifpdf
+ \newwrite\@imapfile % image-map data
+ \newwrite\@scriptfile % shell script to generate image file
+ \ifnum\value{chart}=0
+ \immediate\openout\@imapfile=\jobname.map
+ \immediate\write\@imapfile{<map name="\jobname">}
+ \else
+ \immediate\openout\@imapfile=\jobname_\thechart.map
+ \immediate\write\@imapfile{<map name="\jobname_\thechart">}
+ \fi
+ \fi
\let\halfcourse=\@halfcourse
\let\halfcoursec=\@halfcoursec
@@ -825,8 +642,8 @@
\let\recomm=\@recomm
\let\recommc=\@recommc
\let\grid=\@grid
- \begin{tikzpicture}[x=\unit,y=\unit]
- \tikzstyle{every rectangle node}=[inner xsep=1.8pt]
+ \begin{tikzpicture}[x=\unit,y=\unit,>={Latex[length=4pt,fill=black]}]
+ \tikzstyle{every rectangle node}=[inner xsep=1.8pt,rounded corners=2pt,inner ysep=0.5pt]
\setcounter{@gridwidth}{(\the@diagwidth-5) / 10}
\setcounter{@gridright}{10 * \value{@gridwidth}}
\setcounter{@gridheight}{\thediagheight / 10}
@@ -837,34 +654,206 @@
}
{
\end{tikzpicture}
- \write\@imapfile{</map>}
- \closeout\@imapfile
- \zsavepos{EndOfChart_\thechart} % determine cropping coordinates
- \ifdim\paperwidth<\paperheight
- % portrait mode
- \setcounter{xSE}{\dpi * \ratio{\zposx{EndOfChart_\thechart}sp}{1in}}%
- \setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
- \addtocounter{ySE}{0 - \dpi * \ratio{\zposy{EndOfChart_\thechart}sp}{1in}}
- \addtocounter{ySE}{0 + 2 * \PixelsPerUnit } % bottom margin
- \else
- % landscape mode
- \setcounter{xSE}{ \dpi * \ratio{\paperwidth}{1in}}
- \addtocounter{xSE}{0 - \dpi * \ratio{\zposx{EndOfChart_\thechart}sp}{1in}}%
- \addtocounter{xSE}{0 + 2 * \PixelsPerUnit } % bottom margin
- \setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
- \addtocounter{ySE}{ 0 - \dpi * \ratio{\zposy{EndOfChart_\thechart}sp}{1in}}
+ \ifpdf
+ \write\@imapfile{</map>}
+ \closeout\@imapfile
+ \zsavepos{EndOfChart_\thechart} % determine cropping coordinates
+ \ifdim\paperwidth<\paperheight
+ % portrait mode
+ \setcounter{xSE}{\dpi * \ratio{\zposx{EndOfChart_\thechart}sp}{1in}}%
+ \setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
+ \addtocounter{ySE}{0 - \dpi * \ratio{\zposy{EndOfChart_\thechart}sp}{1in}}
+ \addtocounter{ySE}{0 + 2 * \PixelsPerUnit } % bottom margin
+ \else
+ % landscape mode
+ \setcounter{xSE}{ \dpi * \ratio{\paperwidth}{1in}}
+ \addtocounter{xSE}{0 - \dpi * \ratio{\zposx{EndOfChart_\thechart}sp}{1in}}%
+ \addtocounter{xSE}{0 + 2 * \PixelsPerUnit } % bottom margin
+ \setcounter{ySE}{ \dpi * \ratio{\paperheight}{1in}}
+ \addtocounter{ySE}{ 0 - \dpi * \ratio{\zposy{EndOfChart_\thechart}sp}{1in}}
+ \fi
+ \edef\HasH{\expandafter\@gobble\string\#}
+ \ifnum\value{chart}=0
+ % generate a script to crop a chart image
+ \immediate\openout\@scriptfile=\jobname.sh
+ \immediate\write\@scriptfile{\HasH!/bin/sh}
+ % defer remaining output till cropping coordinates are available
+ \write\@scriptfile{mogrify -crop \thexSE x\theySE +0+0 \jobname.png}
+ \write\@scriptfile{exit 0}
+ \closeout\@scriptfile
+ \fi % more than one chart? unlikely a cropping script would be usable
\fi
- \edef\HasH{\expandafter\@gobble\string\#}
- \ifthenelse{\value{chart} = 0}
- { % generate a script to crop a chart image
- \immediate\openout\@scriptfile=\jobname.sh
- \immediate\write\@scriptfile{\HasH!/bin/sh}
- % defer remaining output till cropping coordinates are available
- \write\@scriptfile{mogrify -crop \thexSE x\theySE +0+0 \jobname.png}
- \write\@scriptfile{exit 0}
- \closeout\@scriptfile
- }
- { % more than one chart; unlikely a script would be usable
- }
\stepcounter{chart}
}
+%
+% Changelog:
+%
+% Version 6.4.1
+%
+% Set length=4pt for arrow tips in tikzpicture options.
+% Remove dependence on the ifthen package.
+% Generate map and cropping script only for pdf output.
+%
+% Version 6.4.0
+%
+% Revise arrows for tikz version 3.0.0
+%
+% Version 6.3.6
+%
+% Allow line breaks in \text boxes.
+%
+% Version 6.3.5
+%
+% Fix font usage to work with mweights.sty.
+%
+% Version 6.3.4
+%
+% Timetable and course code in bold for required boxes.
+%
+% Version 6.3.3
+%
+% Remove background colour from standalone boxes.
+% \smallersize increased to \relsize{-2}.
+%
+% Version 6.3.2
+%
+% Use pgf layers to keep grid below arrows below boxes (thanks to Ryan Kavanagh).
+% Add struts to stand-alone \...box commands.
+%
+% Version 6.3
+%
+% Allow "opt" course boxes (with dotted outlines).
+%
+% Version 6.2
+%
+% Allow for multi-line "timetable" arguments by using nested tabular environments.
+%
+% 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.
+%
+% Version 6.0.5
+%
+% Changed TARGET attribute in AREA outputs to "new".
+% New configuration command \baselineAdj.
+%
+% Version 6.0.4
+%
+% Added missing initializations of @dy to curved... macros.
+%
+% Version 6.0.3
+%
+% Added required ALT tag to AREA outputs.
+%
+% Version 6.0
+% Version 5.7
+%
+% added implementation details to documentation
+% generated script now only crops the chart image
+%
+% Version 5.6
+% Version 5.5
+%
+% version increased to keep pace with previewer/vprerex
+%
+% Version 5.4
+%
+% code clean-up
+%
+% Version 5.3
+%
+% produces an image-generating script in \jobname.sh
+%
+% Version 5.2
+%
+% use \grid and \foreach (tikz) instead of \multido
+% half-course boxes now have a minimum height (5 units) to improve uniformity
+%
+% Version 5.1
+%
+% generates image-map data in \jobname_n.html for nth chart when n>1
+%
+% Version 5.0
+%
+% also generates \jobname.html with image-map data for all node URLs
+% new configuration commands \dpi and \PixelsPerUnit
+% default \unit length adjusted to give 10 pixels per coordinate unit at 125 dpi
+%
+% Version 4.4
+%
+% increase ysep parameter to 1.8pt to separate course-code or text and arrow tails for minis
+% and text boxes
+%
+% Version 4.3
+%
+% introduce \smallersize configuration command
+%
+% Version 4.2
+%
+% using tinting with xcolor package to ease background-color changes
+%
+% Version 4.1
+%
+% Version 4.0
+%
+% Implement the \text command to place a line of text (centered at the coordinates) in a chart
+%
+% Version 3.8.1:
+%
+% adjust arraystretch factors to work with long-ascender fonts such as Futura
+% adjust inner sep parameters to work with oblique/italic fonts
+% remove workaround for pgf-1.10 bug described at
+% http://sourceforge.net/forum/forum.php?thread_id=1621660&forum_id=477363
+% require version 1.18 (or later) of pgf
+%
+% Version 3.8:
+%
+% require version 1.10 (or later) of pgf
+%
+% Version 3.7:
+%
+% anchor nodes must be non-null for latex/dvips
+%
+% Version 3.6:
+%
+% first pgf-based version
+%
+% Version 3.5:
+% Version 3.4:
+%
+% introduce arrow borders to improve the appearance of crossing arrows
+% change default widths to artifacts created when arrow borders
+% occlude box boundaries
+%
+% Version 3.3:
+%
+% arrows (as well as course boxes and minis) are hyperlinked with coordinate URIs
+%
+% Version 3.2:
+%
+% Version 3.1:
+%
+% Version 3.0:
+%
+% "anchor" hyperlinks are added to coordinate grid to allow computation of
+% chart coordinates at mouse clicks
+%
+% Version 2.0:
+%
+% CourseURL now takes 3 arguments
+% box/mini coordinates displayed in (some) PDF viewers when grid on
+%
+% Version 1.0.2:
+%
+% using \relsize{-3} rather than \scriptsize
+% using \textsf in \lightbox and \boldbox
+%
+% Version 1.0.1:
+%
+% using \RequirePackage rather than \usepackage (suggested by Herbert Voss)
+%
+