summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-21 15:38:55 +0000
committerKarl Berry <karl@freefriends.org>2010-05-21 15:38:55 +0000
commit7fc06eca6c0ee78b8b1583c51420c48d6fbdc96f (patch)
tree802fe75d52a83fec782f41ce7932dd157315eb86 /Master
parent5aa57a7fb2052901bc8c765f2b9719ad3c33441c (diff)
titleref own pkg, doc
git-svn-id: svn://tug.org/texlive/trunk@18404 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/titleref/titleref.pdfbin0 -> 205135 bytes
-rw-r--r--Master/texmf-dist/doc/latex/titleref/titleref.tex89
-rw-r--r--Master/texmf-dist/tex/latex/titleref/miscdoc.sty115
-rw-r--r--Master/texmf-dist/tex/latex/titleref/titleref.sty (renamed from Master/texmf-dist/tex/latex/ltxmisc/titleref.sty)0
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check6
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/titleref.tlpsrc0
7 files changed, 208 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/titleref/titleref.pdf b/Master/texmf-dist/doc/latex/titleref/titleref.pdf
new file mode 100644
index 00000000000..2659c942b05
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/titleref/titleref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/titleref/titleref.tex b/Master/texmf-dist/doc/latex/titleref/titleref.tex
new file mode 100644
index 00000000000..4542d475fa3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/titleref/titleref.tex
@@ -0,0 +1,89 @@
+\documentclass[a4paper]{article}
+\usepackage[a4paper]{geometry}
+\usepackage{miscdoc}
+\usepackage[scaled=0.85]{luximono}
+\begin{document}
+\title{The \Package{truncate} package}
+\author{Donald Arseneau\thanks{Documentation file assembled by Robin
+ Fairbairns}}
+\date{5th April 2005, version 3.1}
+\maketitle
+
+The package provides a command \cs{titleref} to cross-reference the
+titles of sections (etc.). The \cs{label} command is changed to
+remember the title for such a reference. You can use \cs{titleref}
+just as you use \cs{ref} and \cs{pageref}.
+
+Titles for numbered sectioning units and for floats with captions are
+the same as the respective \textsc{toc}, \textsc{lof}, or \textsc{lot}
+entry (even when no \textsc{toc}, or whatever, is printed). When a
+short title is provided (\cmdinvoke{section}[short]{long}, etc.\@) it
+will be used for the \cs{titleref}. This is especially useful for
+figure captions. Unnumbered sections take their title reference from
+the printed title. Beware!~--- This turns the title into a moving
+argument when it normally is not, and will cause weird errors if there
+are `fragile' commands present.
+
+Enumerated lists do not have titles and simply inherit the title of
+their section.
+
+The format of the title reference is controlled by the command
+\cs{theTitleReference}, which can be redefined with \cs{renewcommand}.
+It takes two parameters: the number and the title. The number is
+just the regular \cs{ref} and it is WRONG in unnumbered sections.
+Beware! The default definition is the unadorned title. You could
+do, for example,
+\cmdinvoke{renewcommand}{\cs{theTitleReference}}[2]{\#1\cs{\ }\cs{emph}{\#2}}
+
+The title of the current section is also available without \cs{label}:
+use the command \cs{currenttitle} to generate a \cs{titleref} to the
+current section. If you have redefined \cs{theTitleReference} to
+print the number with the title, be aware that the two may not
+correspond: in a numbered list the number will show the current item
+but the title will show the current section, while in an unnumbered
+section the number will show some previous section number.
+
+\section*{Options: \option[usetoc] and \option[nostar]}
+
+In the default operation, the titles are recorded by a command
+inserted into the various sectioning commands (\cs{@sect},
+\cs{@ssect}, \cs{@chapter}, \cs{@schapter}, \cs{@part}, \cs{@spart},
+and \cs{@caption}). If this creates conflicts with some other
+package, you can use an entirely different method by specifying
+\cmdinvoke{usepackage}[usetoc]{titleref}. As the name implies, this
+option records the titles from the table-of-contents entry without
+redefining the sectioning commands. (This method was used in older
+versions of the package.)
+
+Since there are no \textsc{toc} entries for the `star' versions of
+sectioning commands, they are still redefined. The additional option
+\option[nostar] (\cmdinvoke{usepackage}[usetoc,nostar]{titleref})
+prevents the redefinitions, but then "\cs{section*}" will not generate
+a title reference. If you try to refer to the title of an unnumbered
+section while \option[nostar] is in effect, you will get the title of
+the previous section.
+
+Under the \option[usetoc] option, the current title will always be
+overridden by an \cs{addcontentsline} command before the \cs{label},
+even for starred section commands under the \option[nostar] option.
+
+The big problem with the \option[usetoc] method is that \cs{titleref}
+will not refer to a \cs{label} which was given in the title or caption
+itself; the label must be placed after the sectioning command or the
+caption. If you make a title-reference to a label given in a title,
+you will get a warning message.
+
+\section*{Compatibility}
+
+The package was early in the field with this functionality, but it now
+has competitors. The package \emph{will not} work with other packages
+that manipulate the labelling mechanism, such as \Package{hyperref};
+for that title references with \Package{hyperref} you must use the
+\Package{nameref} package in place of \Package{titleref}.
+
+The \Package{zref} package also diddles with the \cs{label}--\cs{ref}
+mechanism, and will equally not work with \Package{titleref}.
+\Package{zref} itself doesn't provide a title reference facility: you
+need to use \Package{hyperref} and \Package{nameref} for that.
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/titleref/miscdoc.sty b/Master/texmf-dist/tex/latex/titleref/miscdoc.sty
new file mode 100644
index 00000000000..da1f2a5fdba
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/titleref/miscdoc.sty
@@ -0,0 +1,115 @@
+\ProvidesPackage{miscdoc}[2010/01/20 v1.2 documentation macros misc latex pkgs]
+
+% miscdoc.sty
+% Copyright 2010 Robin Fairbairns
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Robin Fairbairns.
+%
+% This work consists of the file miscdoc.sty (only)
+
+\setcounter{errorcontextlines}{1274}
+
+% The package arose from a small exercise to document packages whose
+% previous documentation consisted solely of comments in the package files.
+% The macros here defined are lifted from the author's faq.sty
+% (written for the UK TeX FAQ, CTAN:help/uk-tex-faq) or are inspired
+% by others' work (credited where the author is known) ... except
+% where they came as a flash of inspiration while actually writing the
+% documentation.
+
+% this option suggested by Heiko Oberdiek, 2010-01-29
+\DeclareOption{hyper}{%
+ \AtEndOfPackage{%
+ \RequirePackage[pdfusetitle]{hyperref}
+ \RequirePackage{bookmark}
+ \bookmarksetup{numbered,open,openlevel=1}
+ }
+}
+\ProcessOptions\relax
+
+% note: T1 encoding assumed
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{booktabs}
+
+% from faq.sty
+\newcommand\cs[1]{\texttt{\char`\\#1}}
+\let\csx\cs
+\def\bsbs{\cs{\char`\\}}
+
+% \cmdinvoke\cs<argument sequence>
+% \cs typeset as above
+% <argument sequence> may consist of optional or mandatory arguments;
+%
+% the `arguments' are simply typesett \texttt, as yet -- if something
+% fancier is needed, there's a bunch of code needs rewriting here...
+\DeclareRobustCommand\cmdinvoke{\@ifstar
+ {\let\@tempa\emph\@scmdinvoke}%
+ {\let\@tempa\relax\@scmdinvoke}%
+}
+\def\@scmdinvoke#1{\texttt{\symbol{92}#1}%
+ \futurelet\@let@token\@cmdinvoke
+}
+\def\@cmdinvoke{\ifx\@let@token\bgroup
+ \let\@tempb\@cmdinvoke@lbrace
+ \else
+ \ifx\@let@token[% ]
+ \let\@tempb\@cmdinvoke@lbrack
+ \else
+ \ifx\@let@token(% )
+ \let\@tempb\@cmdinvoke@lparen
+ \else
+ \let\@tempb\@empty
+ \fi
+ \fi
+ \fi
+ \@tempb
+}
+\def\@cmdinvoke@lbrace#1{\penalty0\hskip0pt\relax
+ \texttt{\symbol{123}\@tempa{#1}\symbol{125}}%
+ \futurelet\@let@token\@cmdinvoke
+}
+\def\@cmdinvoke@lbrack[#1]{\penalty-150\hskip0pt\relax
+ \texttt{[\@tempa{#1}]}%
+ \futurelet\@let@token\@cmdinvoke
+}
+\def\@cmdinvoke@lparen(#1){\penalty-150\hskip0pt\relax
+ \texttt{(\@tempa{#1})}%
+ \futurelet\@let@token\@cmdinvoke
+}
+% and extension -- versions that take a single extra (delimiter)
+% argument, such as \delcmdinvoke{lscrunge}( ... awful syntax, but...
+\DeclareRobustCommand\delcmdinvoke{\@ifstar
+ {\let\@tempa\emph\@sdelcmdinvoke}%
+ {\let\@tempa\relax\@sdelcmdinvoke}%
+}
+\def\@sdelcmdinvoke#1#2{\texttt{\symbol{92}#1#2}%
+ \futurelet\@let@token\@cmdinvoke
+}
+
+% sui generis
+\newcommand\newitem{\par\addvspace{1ex}\noindent}
+
+% inspired by doc.sty in latex distribution
+\newcommand\meta[1]{\ensuremath{\langle}\emph{#1}\ensuremath{\rangle}}
+
+% meaningful names, as in faq.sty
+\newcommand\environment[1]{\texttt{#1}}
+\newcommand\pkgoption[1]{\texttt{#1}}
+\newcommand\extension[1]{\texttt{.#1}}
+\newcommand\Package[1]{\textsf{#1}}
+\def\option{\@ifnextchar[\@optionb\@option}% ]
+\def\@optionb[#1]{{\normalfont\ttfamily[#1]}}
+\def\@option#1{\texttt{#1}}
+
+\let\FontName\textsf \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/titleref.sty b/Master/texmf-dist/tex/latex/titleref/titleref.sty
index 33b09411d21..33b09411d21 100644
--- a/Master/texmf-dist/tex/latex/ltxmisc/titleref.sty
+++ b/Master/texmf-dist/tex/latex/titleref/titleref.sty
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index c754fbe2d76..e56a2e91b5d 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -296,9 +296,9 @@ my @TLP_working = qw(
textcase textfit textopo textpath textpos
thailatex theoremref thesis-titlepage-fhac
thinsp thmbox thmtools threeparttable threeparttablex
- thumb thumbpdf thumby thuthesis ticket
- tikz-3dplot tikz-inet tikz-qtree tikz-timing timetable tipa
- titlefoot titlepages titlepic titlesec titling
+ thumb thumbpdf thumby thuthesis
+ ticket tikz-3dplot tikz-inet tikz-qtree tikz-timing timetable tipa
+ titlefoot titlepages titlepic titleref titlesec titling
tkz-doc tkz-linknodes tkz-orm tkz-tab
tocbibind tocloft tocvsec2 todo todonotes
tokenizer toolbox tools toptesi totcount totpages tracking
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 06cb9d29c49..415423029fd 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -632,6 +632,7 @@ depend timesht
depend timing
depend titlefoot
depend titlepic
+depend titleref
depend titlesec
depend titling
depend tocbibind
diff --git a/Master/tlpkg/tlpsrc/titleref.tlpsrc b/Master/tlpkg/tlpsrc/titleref.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/titleref.tlpsrc