I've asked a few newbie questions about formatting cross references,
explicitly (thread
and within a thread
where Jürgen Spitzmüller helped me define a custom boxfloat inset. After
many (many) hours, I've finally managed to figure out how to do it all,
so... I thought it might be of some small use to report back. A big part of
the problem was me not thinking to say up front that I was using the thesis
template example posted to this list previously, which employs *KOMA-Script
(book)* document class. Another issue which finally let me solve it all was
realising that specifying a different English dialect was breaking the
intended functionality.

My goal was: 1. to get the custom boxfloat cross reference working as for
floats, tables, etc, with the text 'Box' prepended; and 2. change default
behaviour so that section, subsection, subsubsection are all referred to as


   - by default references in this are simply the numbers, and you have to
   do something to them to get the naming we want. Jürgen quite rightly
   suggested the use of


   - but note that this only works with *Formatted reference* type, as the
      command is specific to \prettyref

   - now the thesis template preamble included these lines to redefine the
   normal \ref command, using the \autoref functionality in {*hyperref*}. *It
   was not working for me.*


   - the most important point here is that the reference type commands are
      configured to be* language specific*, and I had not realised that my
      documents being set to language=British simply didn't match extras*

   - so by changing \extrasenglish to \extrasbritish, these reference
   formatting commands now work correctly.
   - the last issue was a crossref for the custom boxfloat inset. (*NB: the
   label for any boxfloat must be inserted with the caption for numbering to
   work properly.*) I haven't been able to figure out how to define the
   \autoref version for a custom counter type, so for now all boxes must use
   *Formatted reference* type, which allows this command to take effect:


   - rather than the format suggested by Jürgen (above), I used \hyperref
      and the {Box } text to be consistent with \autoref — the prepended label
      text is then *part of* the hyperlink. And to my happy surprise, it all


~:Justin Wood:~
PhD candidate, *Energy & Engineering school*, Murdoch

Reply via email to