I want to do cross-references manually in microsoft word 2010 (similarly to latex \label - \ref or \cite - \bibliography). I found that the Field function does almost excactly what I want (the syntax is a bit weird). If I type the following to the document (wave brackets are field marks produced by ctrl+f9):
{set dischargeRate {seq Figure}}Figure {ref dischargeRate}: Discharge rate vs. hole diameter. Figure is from Reference [{ref authorA}].
The results are shown in Figure {ref dischargeRate} and published previously in [{ref authorB}] and [{ref authorA}].
References:
{set authorA {seq cites}}[{ref authorA}] author, title, journal, year
{set authorB {seq cites}}[{ref authorB}] author, title, journal, year
the above produces:
Figure 1: Discharge rate vs. hole diameter. Figure is from Reference [1].
The results are shown in Figure 1 and published previously in [2] and [1].
References:
[1] author, title, journal, year
[2] author, title, journal, year
Is there a way to define increment and reference with one command instead of those three commands: set, seq and ref? Or how do I create a macro that does this for me. I am looking something like {setOrRef sequencename labelname} that shows a number i+1 that can be later referenced by {setOrRef sequencename labelname}.
Also there should be a check that labels are not redefined. For example: If the label does not exist, the sequence (Figure or cites) is incremented by one and that number is assigned to the label. If the label exists the existing number for the label is used.
I consider this as a programming question as it so close to macros and automating Ms Word.