diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-12 00:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-12 00:31:31 +0000 |
commit | 70e387eb63ce4723858c48592208e193dec294f3 (patch) | |
tree | 61ec42df871a70687151ed4a6d1bc6a5c81dc53c /Master/texmf-dist/tex/latex/stex/sref | |
parent | 2cee8f6dcf8e9596b5cfe9d1f3e55c61b261a320 (diff) |
stex 0.9.3 (11nov10)
git-svn-id: svn://tug.org/texlive/trunk@20410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/sref')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/sref/sref.sty | 20 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml | 6 |
2 files changed, 15 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/sref/sref.sty b/Master/texmf-dist/tex/latex/stex/sref/sref.sty index 52f4b1c7d12..36d10f60386 100644 --- a/Master/texmf-dist/tex/latex/stex/sref/sref.sty +++ b/Master/texmf-dist/tex/latex/stex/sref/sref.sty @@ -8,10 +8,11 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{sref}[2010/06/25 v0.9 Semantic Cross-References] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \newif\ifextrefs\extrefsfalse \DeclareOption{extrefs}{\extrefstrue} \ProcessOptions -\RequirePackage{omd} +\RequirePackage{metakeys} \newcommand{\sref}[2][]{% \@ifundefined{sref@part}{\sref@hlink[#1]{#2}}{\sref@hlink[#1]{\sref@part @#2}}} \newcommand{\srefs}[3][]{% @@ -33,17 +34,20 @@ \ifextrefs\newwrite\refs@file\else\def\refs@file{\@auxout}\fi \def\sref@def#1#2#3{%\@sref@def{#1}{#2}{#3}% \protected@write\refs@file{}{\string\@sref@def{#1}{#2}{#3}}} -\omdaddkey{srefaddidkey}{prefix} -\newcommand\srefaddidkey[2][]{\omdsetkeys{srefaddidkey}{#1}% -\@omd@ext@clear@keys{#2}{sref@id}{}% id cannot have a default -\define@key{#2}{id}{\edef\sref@id{\srefaddidkey@prefix ##1}}} +\addmetakey{srefaddidkey}{prefix} +\newcommand\srefaddidkey[2][]{\metasetkeys{srefaddidkey}{#1}% +\@metakeys@ext@clear@keys{#2}{sref@id}{}% id cannot have a default +\metakeys@ext@clear@keys{#2}{id}{}% +\metakeys@ext@showkeys{#2}{id}% +\define@key{#2}{id}{\edef\sref@id{\srefaddidkey@prefix ##1}% +\expandafter\edef\csname #2@id\endcsname{\srefaddidkey@prefix ##1}}} \def\makeextrefs#1{\gdef\sref@part{#1}% \makeatletter \IfFileExists{\jobname.refs}{\input{\jobname.refs}}{}% \immediate\openout\refs@file=\jobname.refs \makeatother} \def\sref@label#1#2{% -\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{page}{\thepage} +\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{page}{\thepage}% \sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{label}{#1}} \def\sref@label@id#1{\ifx\sref@id\@empty\else\sref@label{#1}{\sref@id}\fi} \newcommand{\sref@hlink}[2][]{\def\@test{#1}% @@ -78,12 +82,12 @@ \makeatother} \srefaddidkey{sequation} \def\sref@sequation@heading{equation} -\newenvironment{sequation}[1][]{\omdsetkeys{sequation}{#1}% +\newenvironment{sequation}[1][]{\metasetkeys{sequation}{#1}% \ifx\sref@id\@empty\begin{displaymath}\else% no id, using equation* \begin{equation}\sref@target\sref@label@id{\sref@sequation@heading~(\theequation)}\fi} {\ifx\sref@id\@empty\end{displaymath}\else\end{equation}\fi} \newenvironment{seqnarray}[1][]% -{\omdsetkeys{sequation}{#1}\begin{eqnarray*}\sref@target% +{\metasetkeys{sequation}{#1}\begin{eqnarray*}\sref@target% \sref@label@id{\sref@sequation@heading~(\theequation)}} {\end{eqnarray*}} \endinput diff --git a/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml b/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml index 2157be90a8a..557ec67bd64 100644 --- a/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml +++ b/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml @@ -2,7 +2,7 @@ package LaTeXML::Package::Pool; use strict; use LaTeXML::Package; DeclareOption('extrefs',''); -RequirePackage('omd'); +RequirePackage('metakeys'); DefConstructor('\sref[]{}', "Section <omdoc:ref type='cite' xref='#2'/>"); DefConstructor('\srefs[]{}', @@ -12,8 +12,8 @@ DefConstructor('\srefl[]{}', DefConstructor('\spageref[]{}', "Section <omdoc:ref type='cite' xref='#2'/>"); DefConstructor('\makeextrefs{}',''); -DefConstructor('\extref[]{}', - "Section <omdoc:ref type='cite' xref='#2'/>"); +DefConstructor('\extref[]{}{}', + "<omdoc:ref type='cite' xref='#2@#3'/>"); DefConstructor('\theextref',''); DefConstructor('\extrefstyle{}{}',""); DefConstructor('\inputrefs{}{}',''); |