Skip to content

Referencing

Richard Zach edited this page Jan 14, 2015 · 3 revisions

Each file containing a section should contain, right after \begin{document}, both

  • \olfileid{ part }{ chapter }{ section }
  • \olsection{ title }

where part, chapter, and section, are three-letter codes identifying the section and chapter and part the section is categorized under. title is the full title of the section. For instance, the section first-order-logic/syntax-and-semantics/satisfaction.tex contains \olfileid{fol}{syn}{sat}.

Within a section, the commands \ollabel, \olref, and \Olref work just like LaTeX's \label and cleverref's \cref commands, except they automatically add part: chapter: section: to the beginning of any label. This means that authors need only make sure labels within a section are unique.

To refer to a label defined in another section, use optional arguments to \olref. E.g., if \ollabel{satisfaction} occurs in first-order-logic/syntax-and-semantics/satisfaction.tex, then it can be referenced in another file as \olref[fol][syn][sat]{satisfaction}. The part and chapter specifications can be left out if the label declaration appears in the same part or chapter as the \olref command. Always include the full specification in problems, as these may be deferred, e.g., to an appendix when it's no longer known which part, chapter, or section they came from.

\olsection automatically issues an \ollabel definition of part: chapter: section:sec, so any section can be referenced as \olref[ part ][ chapter ][ section ]{sec}.

\olref and \Olref are implemented using to cleverref.sty's \cref and \Cref commands which produce the correct text to go with the reference (e.g., "section", "theorem"). The \Olref version produces capitalized text for use at the beginning of a sentence.

Clone this wiki locally