From 6ea16a3ef7b22c1777e7f57bcb0eaba7e4d37b79 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 22 Apr 2014 22:24:54 +0000 Subject: prerex (with .5 man page) (22apr14) git-svn-id: svn://tug.org/texlive/trunk@33631 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/prerex/prerex.sty | 119 +++----------------------- 1 file changed, 10 insertions(+), 109 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 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{#3}% - - \immediate\write\@linkfile{ } -\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{} - \immediate\openout\@linkfile=\jobname.dat - \else - \immediate\openout\@imapfile=\jobname_\thechart.map - \immediate\write\@imapfile{} - \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{} - \write\@linkfile{} - \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 -- cgit v1.2.3