From 43f0cab68a9ea1b2cc9385df46487eb6f4cba012 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Mar 2014 22:12:25 +0000 Subject: prerex (23mar14) git-svn-id: svn://tug.org/texlive/trunk@33264 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/prerex/prerex.sty | 57 +++++++++++++++++++-------- 1 file changed, 41 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/tex/latex/prerex') diff --git a/Master/texmf-dist/tex/latex/prerex/prerex.sty b/Master/texmf-dist/tex/latex/prerex/prerex.sty index 429c8171ecd..fe101470637 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/02 v6.4.1 LaTeX style for prerequisite charts, pgf version] +\ProvidesPackage{prerex}[2014/03/22 v6.5.0 LaTeX style for prerequisite charts, pgf version] % % Changelog is at the end of the file. % @@ -45,10 +45,12 @@ % \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} @@ -69,7 +71,7 @@ \newcommand{\DefaultCurvature}{20} % where the argument should be in the range 0-100; 0 means no curvature. -\newcommand{\CourseURL}[3]{file:#3.html} +\newcommand{\CourseURL}[3]{#3.html} % where the arguments supplied at the call are the x and y coordinates % and the course code. @@ -79,7 +81,7 @@ \newcommand{\boldwidth}{1.0pt} \newcommand{\dottedwidth}{0.8pt} \newcommand{\dashedwidth}{0.5pt} -\newcommand{\smallersize}{\relsize{-2}} +\newcommand{\smallersize}{\relsize{-3}} \newcommand{\baselineAdj}{-0.5ex} \newcounter{@myangle} @@ -103,8 +105,11 @@ \fi \newcounter{chart} % in case there is more than one chart in the document -\newcounter{xNW}\newcounter{yNW} % coordinates of NW corner of a node -\newcounter{xSE}\newcounter{ySE} % coordinates of SE corner of a node +\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 @@ -128,6 +133,16 @@ \addtocounter{ySE}{0 - (#2 + #5) * \PixelsPerUnit } % subtract # of pixels from origin to node (+#5) \immediate\write\@imapfile{#3}% + + \immediate\write\@linkfile{ } \fi } @@ -611,13 +626,16 @@ \ifpdf \newwrite\@imapfile % image-map data - \newwrite\@scriptfile % shell script to generate image file + \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 @@ -656,21 +674,23 @@ \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 + \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}}% + \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}} + \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 @@ -678,7 +698,7 @@ \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{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 @@ -688,6 +708,11 @@ % % Changelog: % +% Version 6.5.0 +% +% pdflatex processing now generates an auxiliary file \jobname.dat of link data +% for use with a SVG image +% % Version 6.4.1 % % Set length=4pt for arrow tips in tikzpicture options. -- cgit v1.2.3