From e71364f18cbfb00305b86b52f2d0bb5f0d338f7e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Jan 2006 23:54:02 +0000 Subject: trunk/Master/texmf-dist/source/latex/hyper git-svn-id: svn://tug.org/texlive/trunk@326 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/hyper/Makefile-MSDos | 72 + Master/texmf-dist/source/latex/hyper/Makefile-Unix | 71 + Master/texmf-dist/source/latex/hyper/README | 49 + Master/texmf-dist/source/latex/hyper/TODO | 34 + Master/texmf-dist/source/latex/hyper/backcite.dtx | 401 +++ .../texmf-dist/source/latex/hyper/contrib/README | 9 + .../source/latex/hyper/contrib/harvard-to.hyp | 21 + Master/texmf-dist/source/latex/hyper/dvi2pdf.pl | 239 ++ Master/texmf-dist/source/latex/hyper/hyper.dtx | 3732 ++++++++++++++++++++ Master/texmf-dist/source/latex/hyper/hyper.ins | 90 + .../texmf-dist/source/latex/hyper/scontrib/README | 6 + .../source/latex/hyper/scontrib/harvard.hyp | 21 + 12 files changed, 4745 insertions(+) create mode 100644 Master/texmf-dist/source/latex/hyper/Makefile-MSDos create mode 100644 Master/texmf-dist/source/latex/hyper/Makefile-Unix create mode 100644 Master/texmf-dist/source/latex/hyper/README create mode 100644 Master/texmf-dist/source/latex/hyper/TODO create mode 100644 Master/texmf-dist/source/latex/hyper/backcite.dtx create mode 100644 Master/texmf-dist/source/latex/hyper/contrib/README create mode 100644 Master/texmf-dist/source/latex/hyper/contrib/harvard-to.hyp create mode 100644 Master/texmf-dist/source/latex/hyper/dvi2pdf.pl create mode 100644 Master/texmf-dist/source/latex/hyper/hyper.dtx create mode 100644 Master/texmf-dist/source/latex/hyper/hyper.ins create mode 100644 Master/texmf-dist/source/latex/hyper/scontrib/README create mode 100644 Master/texmf-dist/source/latex/hyper/scontrib/harvard.hyp (limited to 'Master/texmf-dist/source/latex/hyper') diff --git a/Master/texmf-dist/source/latex/hyper/Makefile-MSDos b/Master/texmf-dist/source/latex/hyper/Makefile-MSDos new file mode 100644 index 00000000000..e45ddb604f6 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/Makefile-MSDos @@ -0,0 +1,72 @@ +# MSDos-Makefile + +### variables to configure for the local system + +#installation directories +TEXINPUTS = . +TEXDOCS_SRC = . +TEXDOCS_DVI = $(TEXDOCS_SRC) +TEXDOCS_PS = $(TEXDOCS_SRC) + +#executables +LATEX = latex +DVIPS = dvips -z -o + +THEMAKE = $(MAKE) -f Makefile-MSDos + +COPY = copy +ECHO = echo +MKDIR = mkdir +RM = del + +### do not change anything beyond this line + +PACKAGE = hyper + +default: $(PACKAGE).dvi + +$(PACKAGE).dvi: $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + +$(PACKAGE).ps: $(PACKAGE).dvi + $(DVIPS) $(PACKAGE).ps $(PACKAGE).dvi + +files: $(PACKAGE).ins $(PACKAGE).dtx + $(LATEX) $(PACKAGE).ins + +install: + $(THEMAKE) -s install-info + +install-info: + $(ECHO) "After configuring the Makefile call:" + $(ECHO) " $(THEMAKE) install-package to install the package (without sources)" + $(ECHO) " $(THEMAKE) install-doc to install the documentation sources" + $(ECHO) " $(THEMAKE) install-dvi to install the documentation in dvi-format" + $(ECHO) " $(THEMAKE) install-ps to install the documentation in ps-format" + $(ECHO) " $(THEMAKE) install-all to install the package and the documentation" + +install-package: files + -$(MKDIR) $(TEXINPUTS) + $(COPY) *.sty $(TEXINPUTS) + $(COPY) *.hyp $(TEXINPUTS) + $(COPY) contrib\*.hyp $(TEXINPUTS) + $(COPY) scontrib\*.hyp $(TEXINPUTS) + +install-doc: $(PACKAGE).dtx + - $(MKDIR) $(TEXDOCS_SRC) + $(COPY) $(PACKAGE).dtx $(TEXDOCS_SRC) + +install-dvi: $(PACKAGE).dvi + -$(MKDIR) $(TEXDOCS_DVI) + $(COPY) $(PACKAGE).dvi $(TEXDOCS_DVI) + +install-ps: $(PACKAGE).ps + -$(MKDIR) $(TEXDOCS_PS) + $(COPY) $(PACKAGE).ps $(TEXDOCS_PS) + +install-all: install-package install-doc install-dvi install-ps + +clean: + $(RM) *.aux *.cfg *.dvi *.hyp *.log *.ps *.sty *.toc diff --git a/Master/texmf-dist/source/latex/hyper/Makefile-Unix b/Master/texmf-dist/source/latex/hyper/Makefile-Unix new file mode 100644 index 00000000000..b972d5df860 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/Makefile-Unix @@ -0,0 +1,71 @@ +# UNIX-Makefile + +### variables to configure for the local system + +#installation directories +TEXINPUTS = . +TEXDOCS_SRC = . +TEXDOCS_DVI = $(TEXDOCS_SRC) +TEXDOCS_PS = $(TEXDOCS_SRC) + +#executables +LATEX = latex +DVIPS = dvips -z -o + +THEMAKE = $(MAKE) -f Makefile-Unix + +COPY = cp +ECHO = echo +MKDIR = mkdir +RM = /bin/rm -rf + +### do not change anything beyond this line + +PACKAGE = hyper + +default: $(PACKAGE).dvi + +$(PACKAGE).dvi: $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + $(LATEX) $(PACKAGE).dtx + +$(PACKAGE).ps: $(PACKAGE).dvi + $(DVIPS) $(PACKAGE).ps $(PACKAGE).dvi + +files: $(PACKAGE).ins $(PACKAGE).dtx + $(LATEX) $(PACKAGE).ins + +install: + $(THEMAKE) -s install-info + +install-info: + $(ECHO) "After configuring the Makefile call:" + $(ECHO) " $(THEMAKE) install-package to install the package (without sources)" + $(ECHO) " $(THEMAKE) install-doc to install the documentation sources" + $(ECHO) " $(THEMAKE) install-dvi to install the documentation in dvi-format" + $(ECHO) " $(THEMAKE) install-ps to install the documentation in ps-format" + $(ECHO) " $(THEMAKE) install-all to install the package and the documentation" + +install-package: files + -$(MKDIR) $(TEXINPUTS) + $(COPY) *.sty *.hyp $(TEXINPUTS)/ + $(COPY) contrib/*.hyp $(TEXINPUTS)/ + $(COPY) scontrib/*.hyp $(TEXINPUTS)/ + +install-doc: $(PACKAGE).dtx + - $(MKDIR) $(TEXDOCS_SRC) + $(COPY) $(PACKAGE).dtx $(TEXDOCS_SRC)/ + +install-dvi: $(PACKAGE).dvi + -$(MKDIR) $(TEXDOCS_DVI) + $(COPY) $(PACKAGE).dvi $(TEXDOCS_DVI)/ + +install-ps: $(PACKAGE).ps + -$(MKDIR) $(TEXDOCS_PS) + $(COPY) $(PACKAGE).ps $(TEXDOCS_PS)/ + +install-all: install-package install-doc install-dvi install-ps + +clean: + $(RM) *.aux *.cfg *.dvi *.hyp *.log *.ps *.sty *.toc diff --git a/Master/texmf-dist/source/latex/hyper/README b/Master/texmf-dist/source/latex/hyper/README new file mode 100644 index 00000000000..fac47d3ea6a --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/README @@ -0,0 +1,49 @@ +hyper-package V4.2d of 1999/03/09 + +This package is used to produce hypertext documents with LaTeX. + +Currently supported are: + * the LaTeX2e base + * the following packages: + + amslatex + + cweb + + fancyheadings + + ftnright + + longtable + + natbib + + subeqnarray + + theorem + + xr + +Current extensions are: + * backcite + +Many other packages will run with the hyper-package without modifying +anything. Just try it. + +Documentation: + Process hyper.dtx three times with latex + If the hyper-package is already installed this will produce a hypertext + document. Otherwise you will get a classical document without hypertext + marks. + +Installation on Unix-platforms: + Configure the variables of Makefile-Unix to Your needs and execute + "make -f Makefile-Unix install". Follow the instructions. + +Installation on MSDos-platforms: + Configure the variables of Makefile-MSDos to Your needs and execute + "nmake -f Makefile-MSDos install". Follow the instructions. + +Installation on other platforms: + Process hyper.ins with latex and move the files ending with .hyp or .sty + into a directory searched by TeX. + Move the files from the subdirectories contrib and scontrib into a + directory searched by TeX. + +Addons (not part of the installation directives above): + There is a perl script called dvi2pdf.pl that generates a pdf file from + a dvi file using a dvips capable of transforming hyper dvi files to + hyper ps files and ghostscripts pdfwriter capability. + This file has three variables that have to be configured. + diff --git a/Master/texmf-dist/source/latex/hyper/TODO b/Master/texmf-dist/source/latex/hyper/TODO new file mode 100644 index 00000000000..be8e2cd9a78 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/TODO @@ -0,0 +1,34 @@ +- Introduce \DefineHyperURL and \UseHyperUrl to + allow definition of external URLs in the document + preamble and usage at any position in the document + so that redefinition of URLs become easier + Add names \...ExternalURL? + +- after reference text for ref pageref noref as optional parameter surrounded by (,)? + (to be passed as 5th parameter to hyper@setref) + +- Introduce Base Reference for External Links + base_name: html: + +- Introduce corresponding Macro(s) for inserting + relative links + +- Introduce Other Link/Referencing mechanism + that uses "type of stuff.number of stuff" + instead of an internal code as an alternative. + +- Consider the following part from html.sty (and allow additional optional parameter): + %%% HYPERREF + % Suggested by Eric M. Carol + % Similar to \ref but accepts conditional text. + % The first argument is HTML text which will become ``hyperized'' + % (underlined). + % The second and third arguments are text which will appear only in the paper + % version (DVI file), enclosing the fourth argument which is a reference to a label. + % + %e.g. \hyperref{using the tracer}{using the tracer (see Section}{)}{trace} + % where there is a corresponding \label{trace} + % + \newcommand{\hyperref}[4]{#2\ref{#4}#3} + +- Is it worth to develop a native PDF support? \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/hyper/backcite.dtx b/Master/texmf-dist/source/latex/hyper/backcite.dtx new file mode 100644 index 00000000000..2b49be45284 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/backcite.dtx @@ -0,0 +1,401 @@ +% \iffalse +%% File: backcite.dtx Copyright (C) 1995--1999 Michael Mehlich +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +% +%<*driver> +\documentclass{ltxdoc} +\IfFileExists{hyper.sty}{% + \message{*** Generating hypertext documentation ***} + \usepackage[color,pagetop]{hyper}% +}{% + \def\hyperURL##1##2##3##4{##4} +} +% +\def\fileversion{V2.0} +\def\filedate{1997/03/01} +\def\docdate{1997/03/01} +%<*driver> +\begin{document} + \title{Backcite Extension for Hyper\LaTeXe\\\fileversion} + \author{Michael Mehlich} + \date{\docdate} + \maketitle + \tableofcontents + \DocInput{backcite.dtx} +\end{document} +% +% \fi +% \CheckSum{513} +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \MakeShortVerb{|} +% +% \title{Hyper\LaTeXe} +% \maketitle +% +% \section{Introduction} +% For developing documents it is often useful to know the places +% bibliographic entries have been used in. This subpackage of +% the |hyper|--package realizes this by remembering the pages +% or sections/theorems and so on a |\cite| command occurs in. +% The resulting informations are then added to the respectively +% bibliograhic entries for the citations. +% +% \section{Usage} +% This package is not intended to be used stand alone but only +% together with the |hyper|--package. You can invoke it by giving +% |backcitepages| respectively |backcitesections| as optional +% parameters for the |hyper|--package. +% +% \StopEventually{} +% +% \clearpage +% \section{The Realization} +% First of all, introduce the standard header. +% \begin{macrocode} +%<*backcite> +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{hxt-bc}% + [\filedate\space Backcite extension for HyperLaTeX2e] +% \end{macrocode} +% Now check whether the |\hyper|--package already has been loaded. +% Otherwise, print a warning message and load it. +% \begin{macrocode} +\@ifpackageloaded{hyper}{}{% +\PackageWarningNoLine{backcite}{% + Backcite extension of hyper package needs hyper package.\MessageBreak + Loading hyper package.% +}% +\usepackage[no]{hyper}% +} +% \end{macrocode} +% We have to recognize all the places for the citations; thus, we need a +% collector for them that introduces a new macro holding this information +% for each cite and, to check them being unchanged by a latex run, a new +% token list holding all these macros. Such a collector is defined +% in a generic way by the following macro. (First time I used +% |\expandafter| seven(!) times one after another.) +% \begin{macrocode} +\def\hyper@aux#1#2#3{% + \expandafter\ifx\csname hyper@aux@#1@#2\endcsname\relax% + \expandafter\global% + \expandafter\edef\csname hyper@aux@#1@#2\endcsname% + {(#3)}% + \else% + \expandafter\global% + \expandafter\edef\csname hyper@aux@#1@#2\endcsname% + {\csname hyper@aux@#1@#2\endcsname(#3)}% + \fi% + \expandafter\ifx\csname hyper@aux@#1\endcsname\relax% + \expandafter\global\expandafter% + \newtoks\csname hyper@aux@#1\endcsname% + \fi% + \def\hyper@tempa{\csname hyper@aux@#1\endcsname}% + \expandafter\expandafter\expandafter\expandafter% + \expandafter\expandafter\expandafter\global% + \expandafter\expandafter\expandafter\expandafter% + \expandafter\expandafter\expandafter\hyper@tempa% + \expandafter\expandafter\expandafter\expandafter% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\the\expandafter\hyper@tempa% + \csname hyper@aux@#1@#2\endcsname% + }% +} +% \end{macrocode} +% To remember the citations between two runs or realize a bibliography in +% front of a document we have to write the neccessary informations about +% the occurrences of the citations to the axiliary file and get the +% informations back when reading this file during startup.\newline +% Damned, why do different packages handle this differently? +% \begin{macrocode} +\def\hyperbackcite#1#2#3#4{\hyper@aux{br}{#1}{#2,#3,#4}} +\def\hyper@back@to@aux#1{% + \@bsphack% + \protected@write% + \@auxout% + {}% + {\string\hyperbackcite% + {#1}% + {\@currenthyper}% + {\@currentlabel}% + {\thepage}% + }% + \@esphack% +} +\def\hyper@back@to@aux@list#1{% + \@for\@citeb:=#1\do% + {\edef\@citeb{\expandafter\@firstofone\@citeb}% + \@bsphack% + \protected@write% + \@auxout% + {}% + {\string\hyperbackcite% + {\@citeb}% + {\@currenthyper}% + {\@currentlabel}% + {\thepage}% + }% + \@esphack% + }% +} +\let\hyper@citex\@citex% +\def\@citex[#1]#2{% + \hyper@back@to@aux@list{#2}% + \hyper@citex[#1]{#2}% +}% +\ifx\harvarditem\@undefined\else% + \let\hyper@har@citetoaux\HAR@citetoaux% + \def\HAR@citetoaux#1{% + \hyper@back@to@aux{#1}% + \hyper@har@citetoaux{#1}% + }% +\fi +\ifx\NAT@set@cites\@undefined\else% + \let\hyper@hyper@natlinkstart\hyper@natlinkstart% + \def\hyper@natlinkstart#1#2\hyper@natlinkend{% + \hyper@back@to@aux{#1}% + \hyper@hyper@natlinkstart{#1}{#2}\hyper@natlinkend% + }% + \ifnum\NAT@sort=1\relax + \let\hyper@back@hold\relax + \def\hyper@compress@cite#1#2{% + \advance\@tempcnta\@ne% + \ifnum #1=\@tempcnta% + \ifx\@h@ld\relax% + \edef\@h@ld{% + \@citea% + \noexpand% + \hyper@natlinkstart{#2}{#1}% + \noexpand% + \hyper@natlinkend% + }% + \def\hyper@back@hold{\hyper@back@to@aux{#2}}% + \else% + \hyper@back@hold% + \def\@h@ld{% + \hbox{--}% + \hyper@natlinkstart{#2}{#1}\hyper@natlinkend% + }% + \def\hyper@back@hold{\hyper@back@to@aux{#2}}% + \fi% + \else% + \@h@ld\@citea% + \hyper@natlinkstart{#2}{#1}\hyper@natlinkend% + \let\@h@ld\relax% + \fi% + \@tempcnta#1\def\@citea{\NAT@sep\penalty\@m\NAT@space}% + } + \fi + \NAT@set@cites +\fi% +% \end{macrocode} +% However, that does not help much. So far we did not write the informations +% down into the resulting |dvi|--file. To overcome this we modify +% the |\bibitem|--command such that the respectively informations will be +% added after each entry. +% \begin{macrocode} +\let\hyper@lbibitem\@lbibitem +\def\@lbibitem[#1]#2#3\par{% + \hyper@lbibitem[#1]{#2}#3% + \expandafter\hyper@backcite\csname hyper@aux@br@#2\endcsname% + \par% +} +\let\hyper@bibitem\@bibitem +\def\hyper@bibitem#1#2\par{% + \hyper@bibitem{#1}#2% + \expandafter\hyper@backcite\csname hyper@aux@br@#1\endcsname% + \par% +} +\ifx\harvarditem\@undefined\else + \let\hyper@harvarditem\harvarditem + \def\harvarditem{% + \@ifnextchar[{\hyper@harvard@oitem}{\hyper@harvard@item}% + } + \def\hyper@harvard@item#1#2#3#4\par{% + \hyper@harvarditem{#1}{#2}{#3}#4% + \expandafter\hyper@backcite\csname hyper@aux@br@#3\endcsname% + \par% + } + \def\hyper@harvard@oitem[#1]#2#3#4#5\par{% + \hyper@harvarditem[#1]{#2}{#3}{#4}#5% + \expandafter\hyper@backcite\csname hyper@aux@br@#4\endcsname% + \par% + } +\fi +% \end{macrocode} +% As we do not want an entry several times\footnote{Note, that currently +% we do not sort the list of informations. Thus, we may get several +% identical entries for the sectioning informations if, e.g.\ we cite +% something within a theorem.} +% but want to insert a hint +% about the type of backcites, we have to count then number of informations +% for each citation. +% Afterwards we can print out this hint and loop through all informations +% to print them out. +% \begin{macrocode} +\def\hyperbackcitepage{Cited on page~} +\def\hyperbackcitepages{Cited on pages~} +\def\hyperbackcitesection{Cited in~} +\def\hyperbackcitesections{Cited in~} +\def\hyperbackcitenormalseparator{, } +\def\hyperbackcitefinalseparatorpair{ and~} +\def\hyperbackcitefinalseparatorlist{, and~} +\def\hyper@backcite#1{% + \bgroup% + \let\hyper@last@cite\relax% + \count11=0\relax% + \expandafter\hyper@back@cnt#1\relax% + \let\hyper@last@cite\relax% + \expandafter\ifnum\count11>0\relax% + \if@hyper@back@pages@% + \expandafter\ifnum\count11>1\relax% + \hyperbackcitepages% + \else% + \hyperbackcitepage% + \fi% + \else% + \expandafter\ifnum\count11>1\relax% + \hyperbackcitesection% + \else% + \hyperbackcitesections% + \fi% + \fi% + \ifnum\count11>2\relax% + \let\hyper@back@final@connection% + \hyperbackcitefinalseparatorlist% + \else% + \let\hyper@back@final@connection% + \hyperbackcitefinalseparatorpair% + \fi% + \expandafter\hyper@@backcite#1\relax.% + \fi% + \egroup% +} +\def\hyper@back@cnt{\@ifnextchar({\hyper@@back@cnt}{\@gobble}} +\def\hyper@@back@cnt(#1,#2,#3){% + \if@hyper@back@pages@% + \edef\hyper@tempa{#3}% + \ifx\hyper@last@cite\hyper@tempa\relax\else% + \advance\count11by1\relax% + \edef\hyper@last@cite{#3}% + \fi% + \else% + \edef\hyper@tempa{#2}% + \ifx\hyper@tempa\@empty% + \else\ifx\hyper@last@cite\hyper@tempa\relax\else% + \advance\count11by1\relax% + \edef\hyper@last@cite{#2}% + \fi\fi% + \fi% + \hyper@back@cnt% +} +\def\hyper@@backcite{\@ifnextchar({\hyper@@@backcite}{}} +\def\hyper@@@backcite(#1,#2,#3){% + \if@hyper@back@pages@% + \edef\hyper@tempa{#3}% + \ifx\hyper@tempa\@empty\relax% + \else\ifx\hyper@last@cite\hyper@tempa\relax\else% + \advance\count11by-1\relax% + \ifx\hyper@last@cite\relax\else% + \ifnum\count11=0\relax% + \hyper@back@final@connection% + \else% + \hyperbackcitenormalseparator% + \fi% + \fi% + \hyperpagereference{#3}{#3}% + \edef\hyper@last@cite{#3}% + \fi\fi% + \else% + \edef\hyper@tempa{#2}% + \ifx\hyper@tempa\@empty\relax% + \else\ifx\hyper@last@cite\hyper@tempa\relax\else% + \advance\count11by-1\relax% + \ifx\hyper@last@cite\relax\else% + \ifnum\count11=0\relax% + \hyper@back@final@connection% + \else% + \hyperbackcitenormalseparator% + \fi% + \fi% + \hyperreference{#1}{#2}% + \edef\hyper@last@cite{#2}% + \fi\fi% + \fi% + \hyper@@backcite% +} +% \end{macrocode} +% At the end of the latex run we want to check whether the backcites +% may have changed to warn the user about this problem. Thus, we +% reread the auxiliary file just generated and collect all the informations +% about the new citations. Afterwards we just check their equivalence +% roughly such that everything is correct at least when no warning message +% is printed. +% \begin{macrocode} +\def\hyperbackcite@check#1#2#3#4{\hyper@aux{brc}{#1}{#2,#3,#4}} +\let\hyper@back@cite@enddocument\enddocument +\def\enddocument{% + \let\hyperbackcite\hyperbackcite@check% + \let\hyper@@backcite@end\@@end% + \def\@@end{\hyper@check@backcites\hyper@@backcite@end}% + \hyper@back@cite@enddocument% +} +\def\hyper@check@backcites{% + \expandafter\ifx\csname hyper@aux@br\endcsname\relax% + \expandafter\ifx\csname hyper@aux@brc\endcsname\relax% + \else% + \PackageWarningNoLine{backcite}{% + Backcite(s) may have changed.\MessageBreak + Rerun to get back references right% + }% + \fi% + \else\expandafter\ifx\csname hyper@aux@brc\endcsname\relax% + \PackageWarningNoLine{backcite}{% + Backcite(s) may have changed.\MessageBreak + Rerun to get back references right% + }% + \else% + \edef\hyper@tempa{\the\hyper@aux@br} + \edef\hyper@tempb{\the\hyper@aux@brc} + \edef\hyper@tempa{\hyper@tempa} + \edef\hyper@tempb{\hyper@tempb} + \ifx\hyper@tempa\hyper@tempb\else% + \PackageWarningNoLine{backcite}{% + Backcite(s) may have changed.\MessageBreak + Rerun to get back references right% + }% + \fi% + \fi\fi% +} +% \end{macrocode} +% Now let's just introduce the options for this package, i.e.\ decide +% whether we want to introduce backreferences for the citations using +% the pages or the section/theorem numbers. +% \begin{macrocode} +\newif\if@hyper@back@pages@ +\@hyper@back@pages@true +\DeclareOption{pages}{\@hyper@back@pages@true} +\DeclareOption{sections}{\@hyper@back@pages@false} +\ProcessOptions +% +% \end{macrocode} +% +% \Finale diff --git a/Master/texmf-dist/source/latex/hyper/contrib/README b/Master/texmf-dist/source/latex/hyper/contrib/README new file mode 100644 index 00000000000..5668e5d43a0 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/contrib/README @@ -0,0 +1,9 @@ +This area is for downloading stuff that authors have +written for adding hypertex capability to other packages +that are not supported by the hyper package. + +They can be included by giving the name for +including .hyp as an optional parameter when +including the hyper package. +If a file does not end with .hyp include it afterwards +instead. diff --git a/Master/texmf-dist/source/latex/hyper/contrib/harvard-to.hyp b/Master/texmf-dist/source/latex/hyper/contrib/harvard-to.hyp new file mode 100644 index 00000000000..c4cfce13771 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/contrib/harvard-to.hyp @@ -0,0 +1,21 @@ +%% harvard.hyp - Amendments to harvard bibliography style Version 2.0.5 +%% to be used together with the hyper package +%% Author: Renate Schmidt (schmidt@mpi-sb.mpg.de) +%% Copyright: Renate Schmidt, May 1995 +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{harvard-to.hyp}[95/05/15] + +%% An apaptation of the original \harvarditem command that inserts a +% \blindhyperanchor for each item in the biliography and \hyperreference +% links around the citation-year. +\renewcommand{\harvarditem}[4][\null]{% + \hyper@setcurrent% + \item[\blindhyperanchor{\@currenthyper}]% + \if@filesw{ \def\protect##1{\string ##1\space}% + \ifthenelse{\equal{#1}{\null}} + {\def\next{{#4}{#2}{#2}{\hyperreference{\@currenthyper}{#3}}}} + {\def\next{{#4}{#2}{#1}{\hyperreference{\@currenthyper}{#3}}}} + \immediate\write\@auxout{\string\harvardcite\next}% + }\fi% + \protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces% + } diff --git a/Master/texmf-dist/source/latex/hyper/dvi2pdf.pl b/Master/texmf-dist/source/latex/hyper/dvi2pdf.pl new file mode 100644 index 00000000000..1a953c8e561 --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/dvi2pdf.pl @@ -0,0 +1,239 @@ +#!/usr/bin/perl + +## File: backcite.dtx Copyright (C) 1995--1999 Michael Mehlich +## This program can be redistributed and/or modified under the terms +## of the LaTeX Project Public License Distributed from CTAN +## archives in directory macros/latex/base/lppl.txt; either +## version 1 of the License, or any later version. + +### DESCRIPTION: +### This script transforms dvi-files to pdf-files using dvihps and ghostscripts pdfwriter +### It has been tested with emtex's dvips and ghostscript 4.01 on WindowsNT +### Usage: dvi2pdf +### where are the usual dvips options and/or one of the following ones +### -nopdf produce only the ps-file not the pdf-file +### (this option is automatically used if output file has suffix .ps) +### -noborder produces an outputfile where the hyper-links don't have borders +### -s, shifts the hyper-links by (,) + +#Note: This script overwrites eventually existing files named +# $$.ps, $pdffile.ps, $pdffile.pdf +# where $$ is the process id (as provided by perl) +# and $pdffile is the output file name given with the option -o or +# derived from the input file name, i.e. the input file name without suffix + +### CONFIGURATION: +#Access paths for the programs dvihps and ghostscript +$GHOSTSCRIPT = "gswin32c"; #how to call ghostscript +$DVIHPS = "dvips"; #how to call hyper postscript capable dvips +$REMOVEFILE = "del"; #command to delete file + +### Probably no changes necessary below this line + +#some local initializations +$argno = 0; +$arglist = ""; +$dvifile = ""; +$psfile = ""; +$pdffile = ""; +$xshift = 0; $yshift = 0; #shift for hyper references +$referenceborder = 1; #do we want to have a border surrounding hyper references? +$nopdf = 0; #we just patch the ps-file if ($nopdf == 1) + +#scan arguments for input and output file and preserver rest for forwarding to dvips +while ($argno <= $#ARGV) + { if ($ARGV[$argno] eq "") + { #empty argument, ignore + } + elsif ($ARGV[$argno] =~ m/^-s([\+\-0-9]+)\,([\+\-0-9]+)$/) + { $xshift = $1; + $yshift = $2; + } + elsif ($ARGV[$argno] =~ m/^-nopdf$/) + { $nopdf = 1; + } + elsif ($ARGV[$argno] =~ m/^-noborder$/) + { $referenceborder = 0; + } + elsif ($ARGV[$argno] =~ m/^-(.)(.+)$/) + { #argument follows flag directly + if ($1 eq "o") + { #argument is output file + ($pdffile ne "") && die("Sorry, multiple output files cannot be handled"); + $pdffile = $2; + } + else + { #argument is dvi-argument + if ($ARGV[$argno] =~ m/ /) + { $arglist .= ' '.'"'.$ARGV[$argno].'"'; + } + else + { $arglist .= ' '.$ARGV[$argno]; + } + } + } + elsif ($ARGV[$argno] =~ m/^-(.)$/) + { #flag without directly following argument + if ( ($1 eq "a") || ($1 eq "k") || ($1 eq "m") || ($1 eq "q") || ($1 eq "r") + || ($1 eq "s") || ($1 eq "z") || ($1 eq "A") || ($1 eq "B") || ($1 eq "E") + || ($1 eq "F") || ($1 eq "K") || ($1 eq "M") || ($1 eq "N") || ($1 eq "R") + || ($1 eq "U") || ($1 eq "V") || ($1 eq "Z") + ) + { #flag without argument + if (!($1 eq "z")) + { $arglist .= ' '.$ARGV[$argno]; + } + } + elsif ($1 eq "i") + { die("Sorry, separate file per section cannot be handled"); + } + elsif ($1 eq "f") + { die("Sorry, run in filter mode not possible"); + } + else + { #flag with argument + if ($1 eq "o") + { #argument is output file + ($pdffile ne "") && die("Sorry, multiple output files cannot be handled"); + $pdffile = $ARGV[$argno+1]; + } + else + { #argument is dvi-argument + if ($ARGV[$argno+1] =~ m/ /) + { $arglist .= ' '.$ARGV[$argno].' '.'"'.$ARGV[$argno+1].'"'; + } + else + { $arglist .= ' '.$ARGV[$argno].' '.$ARGV[$argno+1]; + } + } + $argno++; + } + } + else + { #nonflag argument + ($dvifile ne "") && die("Sorry, multiple input files cannot be handled"); + $dvifile = $ARGV[$argno]; + } + $argno++; + } +$arglist = substr($arglist,1,length($arglist)-1); + +($dvifile eq "") && die("Sorry, no input file"); +if (!($dvifile =~ m/\.[^\.\:\\\/]*$/)) + { $dvifile .= '.dvi'; + } +(!($dvifile =~ m/\.dvi$/)) && die("Sorry, input file has illegal suffix different from .dvi"); + +if ($pdffile eq "") + { ($pdffile = $dvifile) =~ s/\.[^\:\\\/\.]*$/\.pdf/; + if ($pdffile eq $dvifile) + { $pdffile = $dvifile.'.pdf'; + } + } +else + { if ($pdffile =~ m/\.ps$/) + { $nopdf = 1; + } + } + +($psfile = $pdffile) =~ s/\.[^\:\\\/\.]*$/\.ps/; + +$tmpfile = "$$.ps"; + +#output arguments +print STDERR "DVI file: $dvifile\n"; +print STDERR "PS file: $psfile\n"; +if ($nopdf == 0) + { print STDERR "PDF file: $pdffile\n"; + } +print STDERR "TMP file: $tmpfile\n"; +print STDERR "Arg list: $arglist\n"; +print STDERR "Shifting: ($xshift,$yshift)\n"; +print STDERR "HyBorder: "; if ($referenceborder) { print STDERR "preserve"; } else { print STDERR "none"; }; print STDERR "\n"; + +#call dvips +print STDERR "*** $DVIHPS -z $arglist -o $tmpfile $dvifile\n"; +system("$DVIHPS -z $arglist -o $tmpfile $dvifile"); +(!(-f "$tmpfile")) && die("Error, $DVIHPS could not generate '$tmpfile'"); + +#path postscript file because we want to use a different fitheight for references to pages +print STDERR "*** PATCH $tmpfile $psfile\n"; + +open(STDIN,"<$tmpfile") || die("Input file '$tmpfile' not found.\n"); +open(STDOUT,">$psfile") || do { close(STDIN); die("Cannot open file '$psfile' for writing.\n") }; + +while () + { if (/^\s*\((.+)\)\s+\[([0-9]+)\s+\[([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\]\s+([0-9]+)\]\s+def\s*$/) + { $name = $1; # name of an anchor + $page = $2; # page the anchor is on + $xa = $3 + $xshift; # rectangular box of anchor + $ya = $4 + $yshift; + $xb = $5 + $xshift; + $yb = $6 + $yshift; + $fitheight = (($ya > $yb) ? $ya : $yb) + 10; # screen top to show when reference to this anchor is choosen + print STDOUT "($name) [$page [$xa $ya $xb $yb] $fitheight] def\n"; + } + elsif (/^(.*)\s+\((.+)\)\s+\[\[([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\]\s+\[(.+)\]\s+\[(.+)\]\] pdfm\s+(.*)$/) + { $before = $1; + $name = $2; # name of the reference + $xa = $3 + $xshift; # rectangular box of reference + $ya = $4 + $yshift; + $xb = $5 + $xshift; + $yb = $6 + $yshift; + $borderinfo = $7; #horizontal_corner_radius vertical_corner_radius box_line_width [dash_on_size] [dash_off_size] + $bordercolor = $8; #red green blue + $after = $9; + if ($borderinfo =~ m/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+)\s*\[\s*([0-9]+)\s+([0-9]+)\s*\]\s*$/) + { $horizontalcornerradius = $1; + $verticalcornerradius = $2; + $boxlinewidth = $3; + $dashonsize = $4; + $dashoffsize = $5; + if ($referenceborder == 0) + { $boxlinewidth = 0; + } + $borderinfo = "$horizontalcornerradius $verticalcornerradius $boxlinewidth [$dashonsize $dashoffsize]"; + } + print STDOUT "$before ($name) [[$xa $ya $xb $yb] [$borderinfo] [$bordercolor]] pdfm $after\n"; + } + elsif (/^(.*)\s+\[\[([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\]\s+\[(.+)\]\s+\[(.+)\]\]\s+\((.+)\)\s+pdfm\s+(.*)$/) + { $before = $1; + $xa = $2 + $xshift; # rectangular box of reference + $ya = $3 + $yshift; + $xb = $4 + $xshift; + $yb = $5 + $yshift; + $borderinfo = $6; #horizontal_corner_radius vertical_corner_radius box_line_width [dash_on_size] [dash_off_size] + $bordercolor = $7; #red green blue + $name = $8; + $after = $9; + if ($borderinfo =~ m/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+)\s*\[\s*([0-9]+)\s+([0-9]+)\s*\]\s*$/) + { $horizontalcornerradius = $1; + $verticalcornerradius = $2; + $boxlinewidth = $3; + $dashonsize = $4; + $dashoffsize = $5; + if ($referenceborder == 0) + { $boxlinewidth = 0; + } + $borderinfo = "$horizontalcornerradius $verticalcornerradius $boxlinewidth [$dashonsize $dashoffsize]"; + } + print STDOUT "$before [[$xa $ya $xb $yb] [$borderinfo] [$bordercolor]] ($name) pdfm $after\n"; + } + else + { print STDOUT $_; + } + } + +close(STDIN); +close(STDOUT); + +# delete auxiliary file +print STDERR "*** $REMOVEFILE $tmpfile\n"; +system("$REMOVEFILE $tmpfile"); + +if ($nopdf == 0) + { # create pdf-file by calling ghostscript + print STDERR "*** $GHOSTSCRIPT -q -dNOPAUSE -sDEVICE#pdfwrite -sOutputFile#$pdffile $psfile -c quit\n"; + system("$GHOSTSCRIPT -q -dNOPAUSE -sDEVICE#pdfwrite -sOutputFile#$pdffile $psfile -c quit"); + (!(-f "$pdffile")) && die("Error, $DVIHPS could not generate '$pdffile'"); + } diff --git a/Master/texmf-dist/source/latex/hyper/hyper.dtx b/Master/texmf-dist/source/latex/hyper/hyper.dtx new file mode 100644 index 00000000000..bf83272d0fb --- /dev/null +++ b/Master/texmf-dist/source/latex/hyper/hyper.dtx @@ -0,0 +1,3732 @@ +% \iffalse +%% File: hyper.dtx Copyright (C) 1995--1999 Michael Mehlich +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1 of the License, or any later version. +%<*driver> +\documentclass[letterpaper]{ltxdoc} +\usepackage{tabularx} +\makeatletter +\let\TX@vwarn\relax +\makeatother +\IfFileExists{hyper.sty}{% + \message{*** Generating hypertext documentation ***} + \usepackage[color,fixhyperbox,pagetop]{hyper}% +}{% + \def\hyperURL##1##2##3##4{##4} +} +\def\AmS{{\protect\usefont{OMS}{cmsy}{m}{n}% + A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}} +\def\amslatex{{\protect\AmS-\protect\LaTeXe}} +\def\CWEB{{\scshape Cweb}} +% +\def\fileversion{V4.2d} +\def\filedate{1999/03/09} +\def\docdate{1999/03/09} +%<*driver> +\begin{document} + \hbadness=10000 + \hfuzz100pt + \title{HyperText Documents with \LaTeXe\\\fileversion} + \author{Michael Mehlich} + \date{\docdate} + \maketitle + \tableofcontents + \DocInput{hyper.dtx} +\end{document} +% +% \fi +% \CheckSum{5034} +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +% \MakeShortVerb{|} +% +% \title{Hyper\LaTeXe} +% \maketitle +% +% \section{Introduction} +% Traditional texts only have a linear structure given by its series of +% characters. But this is not sufficient for any kind of documents one +% may think of. Thus, recently the number of documents using a more +% complex graphical structure (called ``hyper text'' documents) have +% increased. +% +% This package provides the generation of such documents based on the +% already given structure of \LaTeXe{}-documents without the document +% writer having to consider new commands. +% +% \section{Usage} +% +% Just insert |\usepackage{hyper}| in the preamble of your +% \LaTeX2e--document as the last package to be loaded.\par +% If you use the theorem package define the theorems via +% |\newtheorem| after inserting the hyper package.\medskip +% +% You may also give some options for the package, i.e.\ instead of +% the command above you may use |\usepackage[