summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/prerex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/prerex')
-rw-r--r--Master/texmf-dist/tex/latex/prerex/prerex.sty119
1 files changed, 10 insertions, 109 deletions
diff --git a/Master/texmf-dist/tex/latex/prerex/prerex.sty b/Master/texmf-dist/tex/latex/prerex/prerex.sty
index fe101470637..2acc9372e7f 100644
--- a/Master/texmf-dist/tex/latex/prerex/prerex.sty
+++ b/Master/texmf-dist/tex/latex/prerex/prerex.sty
@@ -13,7 +13,7 @@
%% This work has the LPPL maintenance status "author-maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{prerex}[2014/03/22 v6.5.0 LaTeX style for prerequisite charts, pgf version]
+\ProvidesPackage{prerex}[2014/03/22 v6.6.0 LaTeX style for prerequisite charts, pgf version]
%
% Changelog is at the end of the file.
%
@@ -45,22 +45,17 @@
%
\newlength{\unit}
-\newlength{\ppt}
-\setlength{\ppt}{0.0138888888in} % one Postscript point = (1/72) in.
\setlength{\unit}{5.7816pt} % 10 pixels per unit at 125dpi; 1pt = (1/72.27) in.
\newcommand{\PixelsPerUnit}{10}
\newcommand{\dpi}{125}
-\newcommand{\ppi}{72}
\RequirePackage{relsize}
\RequirePackage{calc}
\RequirePackage{pgf}[2013/12/18]
\RequirePackage{tikz}\usetikzlibrary{arrows.meta}
\RequirePackage{textcomp}
-\RequirePackage{zref-savepos}
\PassOptionsToPackage{urlcolor=black,colorlinks,raiselinks}{hyperref}
\RequirePackage{hyperref}
-\RequirePackage{ifpdf}
\RequirePackage{xcolor}
\definecolor{light}{gray}{0.5}
@@ -104,48 +99,8 @@
\setcounter{diagheight}{65}
\fi
-\newcounter{chart} % in case there is more than one chart in the document
-\newcounter{xNW}\newcounter{yNW}
-\newcounter{xSE}\newcounter{ySE}
-\newcounter{xSW}\newcounter{ySW}
-\newcounter{xL}\newcounter{yL}
-\newcounter{XSE}\newcounter{YSE}
-
\def\@unitmult{\unit * 5} % used for the grid and as the minimum height of half-course boxes
-\def\@outputImapData#1,#2:#3#4#5{%
-% #1,#2 coordinates
-% #3 URL
-% #4 horizontal delta
-% #5 vertical delta
-%
-\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)
-
- \immediate\write\@imapfile{<area shape=rect coords="\thexNW,\theyNW,\thexSE,\theySE" href="\CourseURL{#1}{#2}{#3}" target="new" alt="#3">}%
-
- \immediate\write\@linkfile{<a xlink:href="\CourseURL{#1}{#2}{#3}" target="course"> <rect fill-opacity="0.0" opacity="0.0"}
- \setcounter{xSW}{1*\ratio{\zposx{gridOrigin_\thechart}sp}{\ppt}} % # points from left edge to origin
- \addtocounter{xSW}{(#1-#4)*\ratio{\unit}{\ppt}} % add # points from origin to node (-#4 chart units)
- \setcounter{ySW}{1*\ratio{\paperheight}{\ppt}}
- \addtocounter{ySW}{0-1*\ratio{\zposy{gridOrigin_\thechart}sp}{\ppt}}
- \addtocounter{ySW}{0-(#2+#5)*\ratio{\unit}{\ppt}}
- \setcounter{xL}{2*(#4)*\ratio{\unit}{\ppt}}
- \setcounter{yL}{2*(#5)*\ratio{\unit}{\ppt}}
- \immediate\write\@linkfile{x="\thexSW" y="\theySW" width="\thexL" height="\theyL"/></a>}
-\fi
-}
-
\pgfsetlayers{}
\def\solidarrow{%
@@ -196,7 +151,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -212,7 +166,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -228,7 +181,6 @@
\\ #4%
\end{tabular}%
}};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -244,7 +196,6 @@
\\ #4%
\end{tabular}%
}};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -261,7 +212,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -277,7 +227,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{2}%
\end{pgfonlayer}%
}
@@ -293,7 +242,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -310,7 +258,6 @@
\end{tabular}}%
};%
\end{pgfonlayer}%
-\@outputImapData#1,#2:{#3}{4}{5}%
}
\def\@reqfullcourse#1,#2:#3#4#5{%
@@ -325,7 +272,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -341,7 +287,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -357,7 +302,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -373,7 +317,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -390,7 +333,6 @@
\\ #4%
\end{tabular}}%
};%
-\@outputImapData#1,#2:{#3}{4}{5}%
\end{pgfonlayer}%
}
@@ -407,7 +349,6 @@
\href{\CourseURL{#1}{#2}{#3}}{%
{\smallersize\mdseries#3}}};%
\fi
-\@outputImapData#1,#2:{#3}{2}{1}%
\end{pgfonlayer}%
}
@@ -624,21 +565,6 @@
\newenvironment{chart}
{ \setcounter{@diagwidth}{10 + 1 * \ratio{\textwidth}{\unit}}
- \ifpdf
- \newwrite\@imapfile % image-map data
- \newwrite\@scriptfile % shell script to crop PNG image
- \newwrite\@linkfile % link data for SVG
- \ifnum\value{chart}=0
- \immediate\openout\@imapfile=\jobname.map
- \immediate\write\@imapfile{<map name="\jobname">}
- \immediate\openout\@linkfile=\jobname.dat
- \else
- \immediate\openout\@imapfile=\jobname_\thechart.map
- \immediate\write\@imapfile{<map name="\jobname_\thechart">}
- \immediate\openout\@linkfile=\jobname_\thechart.dat
- \fi
- \fi
-
\let\halfcourse=\@halfcourse
\let\halfcoursec=\@halfcoursec
\let\reqhalfcourse=\@reqhalfcourse
@@ -667,47 +593,22 @@
\setcounter{@gridheight}{\thediagheight / 10}
\setcounter{@gridtop}{10 * \value{@gridheight} }
\useasboundingbox (0,-2) rectangle (\value{@gridright},\value{@gridtop});
- node at (0,0) {\kern1sp\zsavepos{gridOrigin_\thechart}};
- % access absolute page coordinates of the origin using \zposx and \zposy
}
{
\end{tikzpicture}
- \ifpdf
- \write\@imapfile{</map>}
- \write\@linkfile{</svg>}
- \closeout\@imapfile
- \closeout\@linkfile
- \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
- \stepcounter{chart}
}
%
% Changelog:
%
+% Version 6.6.0
+%
+% remove code to generate \jobname.map and \jobname.sh files
+%
+% Version 6.5.1
+%
+% undid generation of \jobname.dat file: SVG images (with clickable links)
+% can be generated by latest versions of pdf2svg (0.2.3) or dvisvgm (1.5.3)
+%
% Version 6.5.0
%
% pdflatex processing now generates an auxiliary file \jobname.dat of link data