diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty b/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty new file mode 100644 index 00000000000..e914e369658 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty @@ -0,0 +1,167 @@ +%% +%% This is file `zref-titleref.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% zref.dtx (with options: `titleref') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% +%% 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". +%% +%% This Current Maintainer of this work is Heiko Oberdiek. +%% +%% This work consists of the main source file zref.dtx +%% and the derived files +%% zref.sty, zref.pdf, zref.ins, zref.drv, +%% zref-base.sty, zref-abspage.sty, zref-counter.sty, +%% zref-dotfill.sty, zref-hyperref.sty, zref-lastpage.sty, +%% zref-perpage.sty, zref-savepos.sty, zref-titleref.sty, +%% zref-totpages.sty, zref-user.sty, zref-xr.sty, +%% zref-example.tex. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{zref-titleref}% + [2006/05/25 v1.2 Module titleref for zref (HO)] +\RequirePackage{zref-base}[2006/05/25] +\@ifundefined{ZREF@baseok}{\endinput}{} +\RequirePackage{keyval} +\let\zref@titleref@current\@empty +\zref@newprop{title}{\zref@titleref@current}% +\zref@addprop\ZREF@mainlist{title}% +\newif\ifzref@titleref@expand +\let\ZREF@titleref@hook\@empty +\def\zref@titleref@cleanup#1{% + \begingroup + \toks@\expandafter{% + \ZREF@titleref@hook + #1% + }% + \expandafter\endgroup + \expandafter\def\expandafter\ZREF@titleref@hook\expandafter{% + \the\toks@ + }% +}% +\newif\ifzref@titleref@stripperiod +\zref@titleref@stripperiodtrue +\def\zref@titleref@setcurrent#1{% + \def\zref@titleref@current{#1}% + \ifzref@titleref@expand + \begingroup + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \let\markboth\@gobbletwo + \let\@mkboth\@gobbletwo + \let\markright\@gobble + \let\protect\@unexpandable@protect + \ZREF@titleref@hook + \edef\x{\endgroup + \noexpand\def\noexpand\zref@titleref@current{% + \zref@titleref@current + }% + }% + \x + \fi + \edef\zref@titleref@current{% + \detokenize\expandafter{\zref@titleref@current}% + }% + \ifzref@titleref@stripperiod + \edef\zref@titleref@current{% + \expandafter\ZREF@stripperiod\zref@titleref@current + \@empty.\@empty\@nil + }% + \fi +}% +\def\ZREF@stripperiod#1.\@empty#2\@nil{#1}% +\define@key{ZREF@TR}{expand}[true]{% + \csname zref@titleref@expand#1\endcsname +}% +\define@key{ZREF@TR}{stripperiod}[true]{% + \csname zref@titleref@stripperiod#1\endcsname +}% +\define@key{ZREF@TR}{cleanup}{% + \zref@titleref@cleanup{#1}% +}% +\define@key{ZREF@TR}{title}{% + \def\zref@titleref@current{#1}% +}% +\newcommand*{\ztitlerefsetup}{% + \setkeys{ZREF@TR}% +}% +\newcommand*{\ztitleref}{% + \zref@wrapper@babel\ZREF@titleref +}% +\def\ZREF@titleref#1{% + \begingroup + \zref@refused{#1}% + \let\label\@gobble + \zref@extract{#1}{title}% + \endgroup +}% +\AtBeginDocument{% + \ZREF@patch{@caption}{% + \long\def\@caption#1[#2]{% + \zref@titleref@setcurrent{#2}% + \ZREF@org@@caption{#1}[{#2}]% + }% + }% + \ZREF@patch{@part}{% + \def\@part[#1]{% + \zref@titleref@setcurrent{#1}% + \ZREF@org@@part[{#1}]% + }% + }% + \ZREF@patch{@chapter}{% + \def\@chapter[#1]{% + \zref@titleref@setcurrent{#1}% + \ZREF@org@@chapter[{#1}]% + }% + }% + \ZREF@patch{@sect}{% + \def\@sect#1#2#3#4#5#6[#7]{% + \zref@titleref@setcurrent{#7}% + \ZREF@org@@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]% + }% + }% + \ZREF@patch{@spart}{% + \def\@spart#1{% + \zref@titleref@setcurrent{#1}% + \ZREF@org@@spart{#1}% + }% + }% + \ZREF@patch{@schapter}{% + \def\@schapter#1{% + \zref@titleref@setcurrent{#1}% + \ZREF@org@@schapter{#1}% + }% + }% + \ZREF@patch{@ssect}{% + \def\@ssect#1#2#3#4#5{% + \zref@titleref@setcurrent{#5}% + \ZREF@org@@ssect{#1}{#2}{#3}{#4}{#5}% + }% + }% + \@ifpackageloaded{titlesec}{% + \ZREF@patch{ttl@sect@i}{% + \def\ttl@sect@i#1#2[#3]#4{% + \zref@titlesec@setcurrent{#4}% + \ZREF@org@ttl@sect@i{#1}{#2}[{#3}]{#4}% + }% + }% + }{}% +}% +\endinput +%% +%% End of file `zref-titleref.sty'. |