File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 239
239
\newcommand {\defnlibxname }[1]{\indexlibrary {\idxxname {#1}}\xname {#1}}
240
240
241
241
% term.* labels
242
- \newcommand {\termlabel }[1]{\label {term. #1 }}
242
+ \makeatletter
243
+ % define a label such that \titleref yields the name of the term
244
+ \newcommand {\termlabel }[2]{\@bsphack\begingroup %
245
+ \protected@edef\@currentlabel {\protect\M@TitleReference
246
+ {\@currentlabel }{#1}}%
247
+ \MNR@label {term.#2}%
248
+ \endgroup \@esphack }%
249
+ \makeatother
250
+
243
251
% convert space-separated phrase to dot-separated label name
244
252
\newcommand {\newtermlabelx }[1]{%
245
253
{% remove all formatting instructions
251
259
\let\oldconcept\oldconceptname %
252
260
\renewcommand {\ntbs }{ntbs}%
253
261
\renewcommand {\ntmbs }{ntmbs}%
262
+ \edef\title {#1}%
254
263
\StrSubstitute {#1}{ }{.}[\temp ]%
255
- \termlabel {\temp }%
264
+ \termlabel {\title }{ \ temp }%
256
265
}}
257
266
258
267
% Non-compound defined term.
377
386
% % Inline non-parenthesized figure reference (override memoir's \fref)
378
387
\renewcommand {\fref }[1]{\hyperref [fig:#1]{\figurerefname \nolinebreak [3] \ref* {fig: #1 }}}
379
388
389
+ % % Inline reference to a defined term
390
+ \newcommand {\termrefx }[2]{\hyperref [term.#2]{#1}\iref {term. #2 }}
391
+ \newcommand {\termref }[1]{\begingroup %
392
+ \StrSubstitute {#1}{ }{.}[\temp ]%
393
+ \titleref {term. \temp }\iref {term. \temp }%
394
+ \endgroup %
395
+ }
396
+
380
397
% % NTBS, etc.
381
398
\verbtocs {\StrTextsmaller }|\textsmaller [1]{|
382
399
\verbtocs {\StrTextsc }|\textsc {|
You can’t perform that action at this time.
0 commit comments