diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-18 18:04:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-18 18:04:32 +0000 |
commit | b26ee2030e017af00dee74ea37ca13189caa593c (patch) | |
tree | e0e1d27675ac1f3e51102650e015abd0367b5666 /Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty | |
parent | 4f5df459139365b598a08e7b946698649b36efec (diff) |
oberdiek update (17apr10)
git-svn-id: svn://tug.org/texlive/trunk@17903 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty | 66 |
1 files changed, 63 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty b/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty index b2403eda426..f715f768c7a 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/zref-titleref.sty @@ -35,12 +35,12 @@ %% zref-totpages.sty, zref-user.sty, zref-xr.sty, %% zref-example.tex, zref-example-lastpage.tex, %% zref-example-nextpage.tex, zref-test1.tex, -%% zref-test-runs.tex. +%% zref-test-runs.tex, zref-test-titleref-memoir.tex. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{zref-titleref}% - [2010/04/08 v2.10 Module titleref for zref (HO)]% -\RequirePackage{zref-base}[2010/04/08] + [2010/04/17 v2.12 Module titleref for zref (HO)]% +\RequirePackage{zref-base}[2010/04/17] \@ifundefined{ZREF@baseok}{\endinput}{} \RequirePackage{gettitlestring}[2009/12/08] \RequirePackage{keyval} @@ -150,6 +150,43 @@ \ZREF@org@@ssect{#1}{#2}{#3}{#4}{#5}% }% }% + \@ifclassloaded{memoir}{% + \ltx@IfUndefined{ifheadnameref}{}{% + \def\@chapter[#1]#2{% + \ltx@IfUndefined{ch@pt@c}{% + \zref@titleref@setcurrent{#1}% + }{% + \ifx\ch@pt@c\ltx@empty + \zref@titleref@setcurrent{#2}% + \else + \def\NR@temp{#1}% + \ifx\NR@temp\ltx@empty + \expandafter\zref@titleref@setcurrent + \expandafter{\ch@pt@c}% + \else + \ifheadnameref + \zref@titleref@setcurrent{#1}% + \else + \expandafter\zref@titleref@setcurrent + \expandafter{\ch@pt@c}% + \fi + \fi + \fi + }% + \ZREF@org@@chapter[{#1}]{#2}% + }% + \ZREF@patch{M@sect}{% + \def\M@sect#1#2#3#4#5#6[#7][#8]{% + \ifheadnameref + \zref@titleref@setcurrent{#8}% + \else + \zref@titleref@setcurrent{#7}% + \fi + \ZREF@org@M@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]% + }% + }% + }% + }{}% \@ifclassloaded{beamer}{% \ZREF@patch{beamer@section}{% \long\def\beamer@section[#1]{% @@ -199,6 +236,29 @@ }% }% }{}% + \ZREF@patch{@opargbegintheorem}{% + \def\@opargbegintheorem#1#2#3{% + \zref@titleref@setcurrent{#3}% + \ZREF@org@@opargbegintheorem{#1}{#2}{#3}% + }% + }% + \@ifpackageloaded{amsthm}{% + \begingroup + \edef\x{macro:\string#1\string#2[\string#3]}% + \@onelevel@sanitize\x + \def\y#1->#2\@nil{#1}% + \edef\z{\expandafter\y\meaning\@begintheorem->\@nil}% + \@onelevel@sanitize\z + \expandafter\endgroup + \ifx\x\z + \ZREF@patch{@begintheorem}{% + \def\@begintheorem#1#2[#3]{% + \zref@titleref@setcurrent{#3}% + \ZREF@org@@begintheorem{#1}{#2}[{#3}]% + }% + }% + \fi + }{}% } \endinput %% |