___ Cross reference macros ____ .\" -- Initialise mode for run 0 (collect strings) or 1 (format paper) .nr RUN 1 .ie \n[RUN]<1 .open defstrings fig_strings.thesis .el .mso fig_strings.thesis .\" -- End initialisation .\" .\" Setup a system for handling cross-references .\" to Figures, Tables and Sections (.sh). .\" The system will be primitive: .\" Figure and table texts are invoked with the command .\" .Fi/.Ta .\" These macros will then print to a file a command which .\" will later create a string called , .\" which contains the number of the figure/table. .\" Two runs are thus necessary: one to create the file .\" which sets up the string definitions, and one which formats .\" the paper using these definitions. .\" The figure and table numbers are added to two indices -- f and t .\" but this will not meet the requirements for a printed list of .\" figures and tables. .\" .\" -- Define Figure and Table entry macros -- .\" -- Reference macros. Usage: .Xx (punctuation, optional) .de Fr \" Figure reference \\&Figure \\*[FIG_\\$1]\\$2 .. .de Tr \" Table reference \\&Table \\*[TAB_\\$1]\\$2 .. .de Sr \" Section reference \\&Section \\*[SH_\\$1]\\$2 .. .\" -- Reference macros end .\" .\" -- Insertion macros .\" .de Fi \" Usage: .Fi
.if \\n[RUN]<1 \ \{\ . nr FIGREG +1 1 . write defstrings \ . ds FIG_\\$1 \\n(ch.\\n[FIGREG] .\} .(x f\" Insert figure number + page numer in index "f" \&Figure \\*[FIG_\\$1] .)x .sz -1 \fIFigure \\*[FIG_\\$1].\fP \0 \\$2 .sz +1 .sp .. .de Ta \" Usage: .Ta .if \\n[RUN]<1 \ \{\ . nr TABREG +1 1 . write defstrings \ . ds TAB_\\$1 \\n(ch.\\n[TABREG] .\} .(x t\" Insert table number + page numer in index "t" \&\Table \\*[TAB_\\$1] .)x .sz -1 \fI\Table \\*[TAB_\\$1].\fP \0 \\$2 .sz +1 .sp .. .\" -- End define Figure and Table entry macros -- .\" .\" .\" Define a new macro .SH which calls .sh .\" Usage: .SH .de SH .ds NM \\$1 .sh \\$2 \\$3 \\$4 \\$5 \\$6 $7 .. .\" .\" Define macros to generate index from .sh and .+c entries .de $0 .\" -- Set font in section headings (disabled) .ie \\$3<2 \{\ . nr PF 3\} .el .nr PF 1 .(x .ti \\$3 \\f\\n(PF \\$2 \\$1\\f1 .)x .. .de $C .\" Define chapter name to use in headings .ds CH "\\$1 \\$2.\ \\$3 .(x \\s+4\\fB\\$1 \\$2 \\$3\\fP\\s-4 .)x _ .. .\" -- End definition of index macros .\"