I would like to be able to link within a document to another section without having to explicitly put a label after that other section command.
hyperref does this with the TOC labels, so I think that this isn't an insane desire or anything. I've got a very large document that I'm converting to LaTeX (1100 pages) and much of the conversion has been automated in terms of
\subsubsection declarations. But I also need to be able to link to other sections based on their name.
As an example, the text (a game's rulebook) will refer to rules written in another section such as:
Creatures immune to acid's caustic properties might still drown in it if they are totally immersed (see Drowning).
and then "(see Drowning)" should have the word Drowning be a link to the section (or subsection) titled Drowning.
It's not always clear which other parts will be sections or subsections as I'm going through and adding links (because of the size of the work, I can't remember all of it all the time), so I'd like sections, subsections, and subsubsections to all have the same "prefix" on their label, 'sec:'
Right now I have a command
and then an associated command
Given that no two sections, subsections, or subsubsections will ever have duplicate names, and also that a whole lot of the document is already written so that I don't want to just use a custom command, It seems like the logical solution would be to redefine
\@makesectionhead so that it includes
\subsubsection command definitions (with
#1 here being the name of the section to be created), and a custom shortcut command such as:
then in the appropriate places I just write
) and things all connect up properly. Stop me now if this sounds crazy so far.
The catch is that I don't know what the
\section command is actually doing. I do have a custom chapter appearance which involves altering
\@makechapterhead, so I assume that to change how sections work it would be
\@makesectionhead, but I don't know what the default definition of
\@makesectionhead is and I can't seem to find it with a google search (probably because I don't know what to search for).
So the question is: What do I write to redefine
\subsubsection so that they contain labels as above, but without altering their appearance or anything like that. I'm using the Memoir class if it's relevant (which I think it is). I'm also not using any custom appearance for any of the sectioning commands (though I am for
\chapter), because I like the default appearance of them just fine.