diff --git a/source/macros.tex b/source/macros.tex index fd5293136d..f8c3e2b720 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -64,6 +64,7 @@ %% Cross-references. %%-------------------------------------------------- \newcommand{\addxref}[1]{% + \hypertarget{#1}{}% \glossary[xrefindex]{\indexescape{#1}}{(\ref{\indexescape{#1}})}% } @@ -92,6 +93,7 @@ % defines a first-level section whose name is "Scope" and whose short % tag is intro.scope. The square brackets are mandatory. \def\Sec#1[#2]#3{% +\addxref{#2}% \ifcase#1\let\s=\chapter\let\l=\clauselabel \or\let\s=\section\let\l=\label \or\let\s=\subsection\let\l=\label @@ -99,7 +101,7 @@ \or\let\s=\paragraph\let\l=\label \or\let\s=\subparagraph\let\l=\label \fi% -\s[#3]{#3\hfill[#2]}\l{#2}\addxref{#2}% +\s[#3]{#3\hfill[#2]}\l{#2}% } % A convenience feature (mostly for the convenience of the Project diff --git a/source/styles.tex b/source/styles.tex index d77f983b38..9258953c1c 100644 --- a/source/styles.tex +++ b/source/styles.tex @@ -87,8 +87,8 @@ %%-------------------------------------------------- % set heading style for annexes \newcommand{\Annex}[3]{\chapter[#2]{(#3)\protect\\#2\hfill[#1]}\relax\annexlabel{#1}} -\newcommand{\infannex}[2]{\Annex{#1}{#2}{informative}\addxref{#1}} -\newcommand{\normannex}[2]{\Annex{#1}{#2}{normative}\addxref{#1}} +\newcommand{\infannex}[2]{\addxref{#1}\Annex{#1}{#2}{informative}} +\newcommand{\normannex}[2]{\addxref{#1}\Annex{#1}{#2}{normative}} %%-------------------------------------------------- %% set footnote style