summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-19 01:02:58 +0000
committerKarl Berry <karl@freefriends.org>2006-12-19 01:02:58 +0000
commit1103128be3749c33d08fd931e52a0b4f07080207 (patch)
tree26b95aa8c34c75d6cf6f21af6f1626cda97b0b6f /Master/texmf-dist
parent4f682edd48d4737aeaa4926675aa72a93b9c0ec8 (diff)
new package gmiflink (18dec06)
git-svn-id: svn://tug.org/texlive/trunk@2802 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/gmiflink/README69
-rw-r--r--Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.pdfbin0 -> 224602 bytes
-rw-r--r--Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.tex15
-rw-r--r--Master/texmf-dist/tex/latex/gmiflink/gmiflink.sty192
-rw-r--r--Master/texmf-dist/tpm/gmiflink.tpm27
5 files changed, 303 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/gmiflink/README b/Master/texmf-dist/doc/latex/gmiflink/README
new file mode 100644
index 00000000000..695b67bc086
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gmiflink/README
@@ -0,0 +1,69 @@
+The gmiflink.sty LaTeX package
+is a work of Grzegorz `Natror' Murzynowski,
+<natror at o2 dot pl>
+
+
+1. Copyright 2005, 2006 by Grzegorz `Natror' Murzynowski
+
+This program is subject to the LaTeX Project Public License.
+See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+for the details of that license.
+
+
+2. Introduction
+
+The gmiflink.sty package protects you against an error when a link is
+dangling and typesets some plain text instead of a hyperlink then. It
+is intended for use with the hyperref.sty package.
+
+I used it for typesetting the names of the objects in a documentation
+of a computer program. If the object had been defined a \hyperlink to its
+definition was made, otherwise a plain object's name was typeset.
+I also use this package in automatic making of hyperlinking indexes.
+
+It provides the macros \gmiflink, \gmifref and
+\gmhypertarget for conditional making of hyperlinks in your document.
+
+\gmhypertarget makes a \hypertarget and a \label of the given name.
+
+\gmiflink makes a \hyperlink to the given \hypertarget if the
+correspondent label exists, otherwise typesets an ordinary text.
+
+\gmifref makes a (hyper-)\ref to the given label if the label exists,
+otherwise it typesets an ordinary text.
+
+
+3. Installation
+
+Just put the gmiflink.sty somewhere in the texmf/tex/latex
+branch. Creating a /texmf/tex/latex/gm directory may be advisable if
+you consider using other packages written by me.
+
+Then you should refresh your TeX distribution's files'
+database most probably.
+
+
+4. Contents
+
+The distribution of this package consists of the following four files.
+
+gmiflink.sty
+README
+gmiflinkDoc.tex
+gmiflinkDoc.pdf
+
+
+5. Documentation
+
+The last of the above files (the .pdf) is a documentation compiled
+from the .sty file by running LaTeX (twice) on the gmiflinkDoc.tex
+file. Compiling of the documentation requires the packages: gmdoc
+(gmdoc.sty and gmdocc.cls), gmverb.sty, gmutils.sty and also some
+standard packages: hyperref.sty, color.sty, geometry.sty,
+multicol.sty, lmodern.sty, fontenc.sty that should be installed
+on your computer by default.
+
+If you have not installed the mwart.cls class (available on CTAN in
+mwcls package), the result of your compilation may differ a bit from
+the .pdf provided in this .zip archive in formattings: If you have not
+installed mwart.cls, the standard article.cls will be used.
diff --git a/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.pdf b/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.pdf
new file mode 100644
index 00000000000..033f1a02acf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.tex b/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.tex
new file mode 100644
index 00000000000..a74877e53b2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gmiflink/gmiflinkDoc.tex
@@ -0,0 +1,15 @@
+% This file is just a~driver. To learn how to use it, read the README
+% or the documentation in .pdf
+\documentclass[noindex,nochanges]{gmdocc}% the package is to small to
+% make an index of its macros and it's too old to have the |\changes| ^^A(
+% history ;-)\,.
+\begin{document}
+\DocInput{gmiflink.sty}
+\end{document}
+
+% The following is just my GNU Emacs stuff.
+%
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End: \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/gmiflink/gmiflink.sty b/Master/texmf-dist/tex/latex/gmiflink/gmiflink.sty
new file mode 100644
index 00000000000..3bd01e73911
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/gmiflink/gmiflink.sty
@@ -0,0 +1,192 @@
+%
+% \GetFileInfo{gmiflink.sty}
+% \title{The \pk{gmiflink} Package\thfileinfo}
+% \author{Grzegorz `Natror' Murzynowski}
+% \maketitle
+%
+%
+% \begin{copyrnote}
+%
+%% Written by Grzegorz `Natror' Murzynowski,
+%% natror at o2 dot pl
+%%
+%% \copyright\,2005, 2006 by Grzegorz `Natror' Murzynowski.
+%%
+%% This program is subject to the \LaTeX\ Project Public License.
+%% See ^^A
+%% \url{http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html} ^^A
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".\par
+%
+%\end{copyrnote}
+%
+% \CheckSum{61}
+%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmiflink}
+ [2006/08/16 v0.97 Conditionally hyperlinking package (GM)]
+
+%%
+%% \division{Introduction, usage}
+%%
+%% This package protects you against an error when a link is
+%% dangling and typesets some plain text instead of a hyperlink then. It
+%% is intended for use with the \pk{hyperref} package. Needs
+%% \emph{two} \LaTeX\ runs.
+%
+% I used it for typesetting the names of the objects in
+% a~documentation of a~computer program. If the object had been
+% defined a \cs{hyperlink} to its definition was made, otherwise a
+% plain object's name was typeset. I also use this package in
+% authomatic making of hyperlinking indexes.
+% \dekmedskip
+%
+% The package provides the macros \cs{gmiflink}, \cs{gmifref} and
+% \cs{gmhypertarget} for conditional making of hyperlinks in your
+% document.
+%
+% \newcommand*\aName{\gmiflink[@name]{\hskip-1.5pt @name}}
+% \TextUsage\gmhypertarget\oarg{name}\marg{\gmiflink{text}} makes
+% a~\cs{hypertarget\marg{\aName}\marg{text}} and \possfil
+% a~\cs{label\marg{\aName}}.
+%
+% \TextUsage\gmiflink\oarg{name}\marg{text} makes
+% a~\cs{hyperlink\marg{\aName}\marg{text}} to a~proper hypertarget if
+% the corresponding \emph{label} exists, otherwise it typesets
+% \<text>.
+%
+% \TextUsage\gmifref\oarg{name}\marg{text} makes a~(hyper-)
+% \cs{ref\marg{\aName}} to the given label if the label exists,
+% otherwise it typesets \<text>.
+%
+% The \raisebox{1em}[0pt]{\gmhypertarget[@name]{}}\<\hskip-1.5pt @name>
+% ^^A~raisebox 'cause Acrobat sets the hypertarget at the baseline
+% argument is just \<name> if the \<name>
+% is given, otherwise it's \<text> in all three macros.
+%
+% For the example(s) of use, examine the \pk{gmiflink.sty} file, lines
+% 45--58.
+%
+% \begin{gmlonely}
+% \subdivision{Installation}
+%
+% Just put the \pk{gmiflink.sty} somewhere in the \file{texmf/\:tex/\:latex}
+% branch. Creating a~\file{texmf/\:tex/\:latex/\:gm} directory may be advisable
+% if you consider using other packages written by me.
+%
+% Then you should refresh your \TeX\ distribution's files' database
+% most probably.
+% \end{gmlonely}
+%
+%
+% \subdivision{Contents of the \pk{gmiflink.zip} archive}
+%
+% The distribution of the \pk{gmiflink} package consists of the
+% following four files.
+% \begin{verse}
+% \pk{gmiflink.sty}\\
+% \pk{README}\\
+% \pk{gmiflinkDoc.tex}\\
+% \pk{gmiflinkDoc.pdf}
+% \end{verse}
+%
+%
+% \begin{gmlonely}
+% \subdivision{Compiling the Documentation}
+%
+% The last of the above files (the \pk{.pdf}, i.e., \emph{this
+% file}) is a~documentation compiled from the \pk{.sty} file by
+% running \LaTeX\ on the \pk{gmiflinkDoc.tex} file.
+% Compiling the documentation requires the packages: \pk{gmdoc}
+% (\pk{gmdoc.sty} and \pk{gmdocc.cls}), \pk{gmverb.sty},
+% \pk{gmutils.sty}, \pk{gmiflink.sty} and also some standard
+% packages: \pk{hyperref.sty}, \pk{color.sty}, \pk{geometry.sty},
+% \pk{multicol.sty}, \pk{lmodern.sty}, \pk{fontenc.sty} that should
+% be installed on your computer by default.
+%
+% If you had not installed the \pk{mwcls} classes (available on
+% CTAN and present in \TeX\ Live e.g.), the result of your
+% compilation might differ a~bit from the \pk{.pdf} provided in this
+% \pk{.zip} archive in formatting: If you had not installed
+% \pk{mwcls}, the standard \pk{article.cls} class would be used.
+% \end{gmlonely}
+%
+% \StopEventually{\NoEOF}
+%
+%
+% \division{The Code}
+
+\@ifpackageloaded{hyperref}{}{\message {^^J^^J gmiflink package:
+ There's no use of me without hyperref package, I end my input.^^J}\endinput}
+
+\providecommand\empty{}
+% A~new counter, just in case
+\newcounter{GMhlabel}
+\setcounter{GMhlabel}{0}
+
+% The macro given below creates both hypertarget and hyperlabel,
+% so that you may reference both ways: via |\hyperlink| and via |\ref|.
+% It's pattern is the |\label| macro, see \LaTeX\ Source2e, file x, line 32.
+%
+% But we don't want to gobble spaces before and after.
+% First argument will be a~name of the hypertarget,
+% by default the same as typeset text, i.e., argument |#2|.
+% \CodeDefine\gmhypertarget
+\DeclareRobustCommand*\gmhypertarget{%
+ \@ifnextchar{[}{\gm@hypertarget}{\@dblarg{\gm@hypertarget}}}
+%^^A]
+
+\def\gm@hypertarget[#1]#2{% ^^A
+ % If argument |#1|\equals|\empty|, then we'll use |#2|, i.e., the same as
+ % name of hypertarget.
+ \refstepcounter{GMhlabel}% ^^A
+ % we |\label{\gmht@firstpar}|
+ \hypertarget{#1}{#2}%
+ \protected@write\@auxout{}{%
+ \string\newlabel{#1}{{#2}{\thepage}{\relax}{GMhlabel.\arabic{GMhlabel}}{}}}%
+}% end of |\gm@hypertartget|.
+
+% We define a~macro such that if the target exists, it makes
+% |\ref|, else it typesets ordinary text.
+% \CodeDefine\gmifref
+\DeclareRobustCommand*\gmifref{\@ifnextchar{[}{\gm@ifref}{%]
+ \@dblarg{\gm@ifref}}}
+
+\def\gm@ifref[#1]#2{%
+ \expandafter\ifx\csname r@#1\endcsname\relax\relax%
+ #2\else\ref{#1}\fi%
+}% end of |\gm@ifref|
+
+% \CodeDefine\gmiflink
+\DeclareRobustCommand*\gmiflink{\@ifnextchar{[}{\gm@iflink}{%^^A]
+ \@dblarg{\gm@iflink}}}
+
+\def\gm@iflink[#1]#2{%
+ \expandafter\ifx\csname r@#1\endcsname\relax\relax%
+ #2\else\hyperlink{#1}{#2}\fi%
+}% end of |\gm@iflink|
+%
+% It's robust because when just |\newcommand*|ed, use of |\gmiflink| in an
+% indexing macro resulted in errors: |\@ifnextchar| has to be
+% |\noexpand|ed in |\edef|s.
+
+\endinput
+
+% The old version --- all three were this way primarily.
+%\begin{verbatim}
+\newcommand*\gmiflink[2][\empty]{{%
+ \def\gmht@test{\empty}\def\gmht@firstpar{#1}%
+ \ifx\gmht@test\gmht@firstpar\def\gmht@firstpar{#2}\fi%
+ \expandafter\ifx\csname r@\gmht@firstpar\endcsname\relax\relax%
+ #2\else\hyperlink{\gmht@firstpar}{#2}\fi%
+}}
+% \end{verbatim}
+% \Finale
+
+% (For my GNU Emacs:)
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "e:/LaTeX/TeXGuru/gmiflink/gmiflinkDoc"
+%%% End:
diff --git a/Master/texmf-dist/tpm/gmiflink.tpm b/Master/texmf-dist/tpm/gmiflink.tpm
new file mode 100644
index 00000000000..8eacc37aa47
--- /dev/null
+++ b/Master/texmf-dist/tpm/gmiflink.tpm
@@ -0,0 +1,27 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/gmiflink.zip">
+ <TPM:Name>gmiflink</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2006/11/16 13:03:00</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The gmiflink package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>233769</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="7337">
+texmf-dist/tex/latex/gmiflink/gmiflink.sty
+texmf-dist/tpm/gmiflink.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="227396">
+texmf-dist/doc/latex/gmiflink/README
+texmf-dist/doc/latex/gmiflink/gmiflinkDoc.pdf
+texmf-dist/doc/latex/gmiflink/gmiflinkDoc.tex
+ </TPM:DocFiles>
+ <TPM:Provides>Package/gmiflink</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+