2

I'm using memoir, (optionally) hyperref, and backref. In the back references of my bibliography, I want all the references that come before the Endnotes "chapter" to be formatted differently. The hooks seem to be there. I can insert a label or anything else to identify where the Endnotes "chapter" begins. After some study and experimenting, I've proven only that I don't know LaTeX well enough to attempt this. Conceptually, I think I want something like this:

\renewcommand*{\backrefentrycount}[2]{%
\ifnum \getrefnumber{#1}>\getrefnumber{chap:Endnotes} %
#1%
\else %
\textbf{#1}%
\fi%
}%
%

But of course, something that actually works, instead of this. I (think) I really just want to end up comparing two raw page offsets without regard for any other kind of numbering issues (like preface roman numeral page numbers), but I can't figure out if there's any such mechanism available or if the job is more difficult than I imagine.

  • 1
    Would you be able to provide a minimal working example (MWE) that visualizes what you're after, rather than providing small snippets of code? – Werner Dec 14 '11 at 19:12
  • Probably what I was after was avoiding learning my 19th macro language, but such is life. After learning how to turn on macro tracing, I found that \backrefcount gets passed a first argument that looks like "\backrefxxx {109}{1.21}{chapter*.235}". Given that, I inserted a "\def\rlbpick##1##2##3##4{##2}" and then the conditional became "\ifnum \rlbpick#1>100". Fragile, breaks if given non-numeric page, and probably ugly, but it gets me going for now. I'll see if I can clean it up as I learn more. – Ron Burk Dec 15 '11 at 0:49
2

The OP answered his question in comment so I switch it to an answer.

\backrefcount gets passed a first argument that looks like \backrefxxx {109}{1.21}{chapter*.235}. Given that, I inserted a \def\rlbpick##1##2##3##4{##2} and then the conditional became \ifnum \rlbpick#1>100.

Fragile, breaks if given non-numeric page, and probably ugly, but it gets me going for now. I'll see if I can clean it up as I learn more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.