[texhax] in-section references

Martin F Krafft madduck at madduck.net
Sun Jan 28 16:41:59 CET 2007

Thanks to Tom's bootstrapping help, I now whacked up the code down
below and combined it with varioref. I can now do this:

  See \vrref{section}{secA}
    would become either of:
      See section 1.2.3        (ref a different section)
      See the next page        (near ref to same section)
      See page 5               (far ref to smae section)

This works nicely. The only thing I have left to do now is to deal
with stuff like "In \vrref{section}{secB}", which could become "In
the next page". Obviously, I'd want that to be "on the next page".

The ideal but possibly also most hackish way would be to make text
figure out the word immediately before the \vrref call and to
replace in with on and In with On for in-section references. I am
not sure this is possible.

Another solution might be through the use of optional arguments,


but I don't like this at all really.

Any ideas?

\def\reftextfaceafter {the \reftextvario{facing}{next} page}%
\def\reftextfacebefore{the \reftextvario{facing}{preceding} page}%
\def\reftextafter     {the \reftextvario{following}{next} page}%
\def\reftextbefore    {the \reftextvario{preceding}{previous} page}%
\def\reftextcurrent   {\reftextvario{this}{the current} page}%

martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
spamtraps: madduck.bogus at madduck.net
"if a packet hits a pocket on a socket on a port, and the bus is
 interrupted at a very last resort, and the access of the memory makes
 your floppy disk abort, then the socket packet pocket has an error to
                                                      -- <speedstream>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://tug.org/pipermail/texhax/attachments/20070128/08227201/attachment.bin 

More information about the texhax mailing list