4 Replies Latest reply: Apr 11, 2013 7:33 AM by HSGROW_HK RSS

    Cross reference + GREP + excluding text

    HSGROW_HK Community Member

      I would like to know if anyone has a solution to the following problem.

       

      I have a paragraph style which I use to label tables within my document. In the paragraph style I have set up numbering (under Bullets and Numbering) so that each heading appears as "Table 1.1 School Children in HK" or "Table 1.2 School Children in China" the code I have entered in the 'number' field of the paragraph style appears below:

       

      Table ^H.^#^/

       

      I have inserted the word 'Table' prior to the rest of the code so that the label is correct.

       

      When I create cross references I select 'Cross Reference Format' to be 'paragraph number' the problem is, however,  that the word 'Table' is picked up as part of the 'paragraph number' because of the settings in the Paragraph Style. The end result looking like this:

       

      03 This is what is prioduced from Cross References.png

       

      The result is fine if you are cross referencing a single table per sentence, however, if you are dealing with multiple tables in plural this is a problem. What I would like to achieve is this:

       

      04 This is what I want.png

       

      Does anyone know if there is a way to achieve this by editing the 'Cross Reference Format' so that the word 'Table' disappears when the cross reference is generated? Perhaps with GREP?

       

      I would really appreciate your help.

        • 1. Re: Cross reference + GREP + excluding text
          Tom Usrey Community Member

          Not a fix for your question, but I don't see anything wrong with having your copy read "Please refer to Table 7.1 and Table 7.2 for information"

          • 2. Re: Cross reference + GREP + excluding text
            HSGROW_HK Community Member

            Hi Tom,

             

            Im following standard English conventions (UK, if you will)  and the format at the moment is a wee bit clunky when you have to write something like 'Table 7.1, Table 7.2, Table 7.3, Table 7.4 and Table 7.5.....' as will be the case later in the document. The other arrangment of 'Tables 7.1, 7.2, 7.3, 7.4 and 7.5.....' is much shorter and easier to read - brevity is essential in this document because of limited word count.

            • 3. Re: Cross reference + GREP + excluding text
              P Spier CommunityMVP

              Isuspect it would be easier to go the other way, that is to add the "Table" or "Tables" text using Find/Change. As far as I know there is no way to remove part of the text from the paragraph number.

              • 4. Re: Cross reference + GREP + excluding text
                HSGROW_HK Community Member

                Hi Peter,

                 

                Good suggestion, although I have the para style linked to a 'List of Tables' at the front of the document which shows the complete thing "Table 1.1 School Children in Hong Kong" for example. I thought that Michael Murphy dealt with this in his book, but I am travelling at the moemtn and don't have a copy. I know that Grep can do certain things in the cross reference format window, I'm just unfamiliar with the code!