This feature allows users to quickly manage all possible references within a document that do not currently have a cross-reference applied to them. On selecting the option from the ribbon, it will present a task pane within word showing all suggested areas to add a cross-reference to as below.
How it works
- On selection each numbered paragraph is indexed.
- The document is then searched for the inclusion of pre-defined ‘Prefixes’ such as Appendix, Part, Paragraph etc. The module configuration contains the list of these prefixes (see 4 Configuration for details on this configuration).
- Where these are found, they are then presented to the user in the task pane as described below.
- Where these are found, but no obvious cross reference match is found, these are presented in a different section of the same task pane.
Configuration
CMD
<Cmd case="BaseExtensions:cross-ref-tool" ConfigPath="Cross Referencing\refs.json"/>
Parameters
ConfigPath
This parameter holds the path to the corresponding config file for the feature. It uses Content\BaseExtensions\Cross Referencing as the base folder.
Config file
An example of this is shown here:
{
"wdRefTypeNumberedItem": {
"MatchCase": true,
"Prefix": ["Appendix","appendix","Schedule", "schedule","Part", "part","Clause", "clause","Clauses", "clauses","Paragraph", "paragraph","Paragraphs", "paragraphs"],
"DefaultReferenceKind": "wdNumberNoContext",
"IncludePosition": false,
"SeparatorWord": "and"
}
}
MatchCase
defines whether the prefix search should be case sensitive. If true the search is case sensitive.
Prefix
defines an array of prefixes that should be searched for. As the example shows it is needed to defined all the casing cases that should be considered if MatchCase is true.
DefaultReferenceKind
defines the default selected (in dropdown) kind of reference that should be inserted. The possible choices are different dependent on the WdReferenceType defined in the root.
IncludePosition
defines whether the checkbox to include above/below should be checked or not by default. If true the checkbox is checked by default and false is not.
SeparatorWord
defines the word that can be a separator for prefixes. An example from a client is that they sometimes writes "paragraphs 1 and 4" and in this case we should detect "and 4" as a possible reference too. Therefore "and" should be defined as the SeparatorWord for NameName' english speakers.
Using the feature
A description of each item within the task pane can be found below the image.
- This is the text as shown within the document. Clicking on this will take the user to the text within the document. NOTE that there may be multiple entries of the same text within a document. In these cases, each entry will be listed separately.
- This is the Ignore Selecting this let’s the tool know that it can simply ignore the cross-reference when the Apply to all button is selected. Nothing needs to be inserted.
- This dropdown lists the possible paragraphs that the text should be cross refenced to. This selection is filtered to show only the relevant paragraphs. For example, in the above image, there is only one option for Schedule 1. However, for Clause 5.11 clause 5 AND clause 5.11 are listed within the drop down.
- These options are the same as are available through the standard word cross-reference insertion dialog and can be accessed by selecting anywhere on the light purple area for each entry.
- Clicking on the Insert button will immediately add the selected cross-reference to the selected text. NOTE that this will then remove all options for this entry.
- Selecting Apply to all will immediately add the selected cross-references to ALL entries except for those that have been selected to ignore. Any entries that have been ignored will be highlighted within the document in pink so that they can be easily identified. Running the tool again, will ONLY highlight these ignored entries.
Comments
0 comments
Please sign in to leave a comment.