10 Replies Latest reply on Apr 3, 2013 4:18 AM by Vamitul

    add definition

    Chang_indd

      Hi,

       

      I have to add keywords definition in one InDesign doc (target document) from other InDesign Doc (source document).

       

      Can it possible throught JS. Please help.

       

       

      Target Indesign contents are:

       

      t.png

       

       

      Source Indesign Contents are:

       

      s.png

       

      Require this:

       

      r.png

       

       

       

       

       

      Thanks,

      Chang

        • 1. Re: add definition
          Vamitul Level 4

          depends. if your source and target document are well formated, for example in both documents the keywords are maked with a special character style it should be very easy.

          If not... hmm again depends on the documents. Using just your example, again it's not very complicated, but experience has teached me that nothing is as simple as the first example.

          • 2. Re: add definition
            Chang_indd Level 1

            Yes, the documents are well formatted.

             

            Target document paragraph style is Glist and character style is DEFBOLD and Source document paragraph style is Keyword and character style is DEF.

             

            Can you please help me on this.

             

            Thanks,

            Chang

            • 3. Re: add definition
              Trevorׅ Adobe Community Professional

              Are ALL the paragraphs in the same order in both documents?

              • 4. Re: add definition
                Chang_indd Level 1

                No, they are not in the same order. The source document have lots of definition.

                 

                Whereas our target document need to extract only the definitions which keywords available in the target document.

                 

                For example, if target document does not have ASCII keywords than no need to extract ASCII definition from source document.

                 

                Thanks,

                Chang

                • 5. Re: add definition
                  Trevorׅ Adobe Community Professional

                  1) Are they in the same order?

                  i.e. the source might be ASCII, FTP, HTML and destination ASCII, HTML.

                   

                  2) The HTML example obviously has some degree of ambiguity to it as the source lacks the bracketed content that is in the destination. This means that one has to compare only the non bracketed contents of the documents, are there any other exclusions, like HTML - Hypertext ..... ?

                  • 6. Re: add definition
                    Chang_indd Level 1

                    1) Are they in the same order?

                    i.e. the source might be ASCII, FTP, HTML and destination ASCII, HTML.

                     

                    NO, They are not in order.

                     

                    2) The HTML example obviously has some degree of ambiguity to it as the source lacks the bracketed content that is in the destination. This means that one has to compare only the non bracketed contents of the documents, are there any other exclusions, like HTML - Hypertext ..... ?

                     

                    Yes, sometime there may be difference in plural and singular form i.e., Markup Language may be Markup Languages.

                    • 7. Re: add definition
                      Trevorׅ Adobe Community Professional

                      Well, over to you Vamitul,

                       

                      Too much work for a freebee from me . Could be realy quite a lot of work dealing with the ambiguities.

                       

                      Good luck Chang, If you come with a decent offer I'd consider it.

                      • 8. Re: add definition
                        Vamitul Level 4

                        i'm thinking just create a list of keywords from the target document, and use GREP for "^keyword" in the source.

                        if nothing is found, reduce "keyword" to "keywor",

                        and search again,

                        if found ask user if definition is correct

                        if not found, reduce the keyword again to "keywo"

                        etc etc.

                         

                        should make it easier..

                        • 9. Re: add definition
                          Trevorׅ Adobe Community Professional

                          If you use Vamitul's idea then it's probably a good idea to put all the no finds into a list and only process them after finishing the non-problematic ones.

                           

                          This could save the use quite a bit of boredom (depending on the documents length)

                          • 10. Re: add definition
                            Vamitul Level 4

                            Trevor.. yep, that's how i figured it too. Did something similar a while back for indexing a huge document.