Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crossreferencing figures 2

Status
Not open for further replies.

vesper

Programmer
Jan 7, 2004
37
I am cross referencing figures for my dissertation.

I want to include only label and number. However when do this the output is "Figure 1:" when i actually want it in small letters "As shown in figure 1,"

How can i resolve this.
 



Hi,

Before the xref ...
[tt]
[highlight]as shown in [/highlight]
[/tt]
Select the xref and Format > Change Case -- lower case

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip I know that its possible to do it like that but I have loads of figures referenced and I can't do it one by one!
 



Make XRefs lower case...
Code:
Sub LCaseXRef()
    Dim fld As Field
    
    For Each fld In ThisDocument.Fields
        With fld
            If .Type = wdFieldRef Then
                fld.Result.Case = wdLowerCase
            End If
        End With
    Next
End Sub
Add text to XRefs...
[/code]
Sub AddTextToXRef()
Dim fld As Field

For Each fld In ThisDocument.Fields
With fld
If .Type = wdFieldRef Then
fld.Result.Previous(Unit:=wdWord, Count:=1).Text = " as shown in "
End If
End With
Next
End Sub
[/code]

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
This option is not useful since it will remove all the first letters from capitals. I have some sentences which start with the word Figure 1 and hence the first letter needs to be capital.

Is there some easier & or alternative way
 



This option is not useful since it will remove all the first letters from capitals.

HUH??? Not in my document!

Besides, it is not removing ANYTHING. It IS making the XRef results ALL lower case.



Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Yes.. I do not want ALL.. i want just those in the middle of a sentence...
 
how fumei? I am a novice to this kind of cross referening.. I need someone to guide me step by step...
 
Hi Vesper,

If you currently have a cross-reference that appears as "Figure 1" or "Figure 1: Yaddah Yaddah" and what you want is just "figure 1", you can tell word to show only the 'label and number', then manually add a '\* lower' switch to the field. For example, if the field code (which you can see via Alt-F9) is '{REF _Ref223400044 \h}', you can change it to '{REF _Ref223400044 \* lower \h}'. Note that the '\* lower' switch should occur before '\h'switches, if you have one.

If you currently have a cross-reference that appears as "Figure 1: Yaddah Yaddah" and what you want is "figure 1: Yaddah Yaddah", you can use two cross-references - one for the 'label and number', formatted as above, then another for 'only caption text'. The colon from the original refernce will be lost, but you can insert that (and the space) manually between the two fields.

Unfortunately, there is no 'easy' solution if you've got lots of these to do, though it could be automated with vba.

Skip: Your code forces the caption text to lower case also, which may not be what Vesper wants.

Cheers

[MS MVP - Word]
 


He is not referecing the caption. But your switch is preferable.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi,

I tried using macropod, suggestion

Figure 2.2) REF _Ref216838912 \* lower \h \* MERGEFORMAT

is the present code.

The text is remaining in the Upper Case!

 
Ok managed.. had to update field.

Excellent job congrats.
 



vesper,


I notice that over the past 5 years, you have posted a handful of time and have received many good tips related to your stated needs. Yet, you have responded not once, to
[blue]
Thank Tek-Tip Contributor
for this valuable post!
[/blue].

Saying "Excellent job congrats" to macropod is OK, but the [purple]little purple Stars[/purple] accomplish several important things.

First, it gives positive feedback to contributors, that their posts have been helpful.

Second, it identifies threads as containing helpful posts, so that other members can benefit.

And third, it identifies the original poster (that's YOU, BTW), as a grateful member, that not only receives, but is willing to give visible tokens of thanks.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top