Composing a dictionary from an Excel table

Learn / Forums / General InDesign Topics / Composing a dictionary from an Excel table

Viewing 7 reply threads
  • Author
    Posts
    • #76403
      M Lopusny
      Member

      Hi all,
      I am fairly new to InDesign, still only learning.
      I have a task to create a bilingual dictionary (that will be printed as a book). It will contain app 9.000 words, which will make it app 150 pages. The source file with the words and their translations is an excel table with 2 columns – 1st column: ENG words, 2nd column: SVK words (translation).
      I would like to have 2 columns of translations on 1 page (standard dictionary format).
      What I am struggling with is how to merge those 2 columns in Excel together and keeping text from both columns (or cells), so I can import them to InDesign without having to manually select each and every word, copy it’s translation and format it (i.e. bold, italic, etc…).
      Has anybody experience with such work, composing a dictionary?
      Thanks in advance for your effort to help.

    • #76404
      Rivkah Lewis
      Member

      You can either import it as a table and then apply a different style to an entire column in the table, or -what I did when I did a dictionary – import it as tabbed text. You can then use nested styles to apply the style to the words located after the tab.

    • #76408
      David Blatner
      Keymaster

      [This reply is from M Lopusny. For strange technical reasons, it was deleted and I had to restore it… which means my name was associated with it.]

      Hi Rivkah,

      thank you very much for your promp reply.
      It really helped.
      But can you tell me, how did you cope with “multi-word” words, or expressions. I managed to get the 1-st word (I guess that that is the 1-st tab) styled according to my needs, but it only applied the style to the 1-st word.
      Some words are expressions consisting of 4 words (in the excel table they were located in single colmn), if I use the style again, it styles the following words, but many of them are already translations (single-word translations), which I want to haves styled differently from the ENG words. Will I have to do the rest manually, or is there a way to select nad style only the multi-words (do I have to manually insert tabs? – I tried this, but could not get them right)?

    • #76409
      David Blatner
      Keymaster

      M Lopusny: To select an entire column in the table, you can place the cursor in one cell and then choose Table > Select > Column. When the whole column is selected in InDesign, then you can apply a paragraph style and it will affect all the text in all those cells.

    • #76435
      M Lopusny
      Member

      Hi David,

      thank you for your reply.
      I managed to get it right with the tabs (as Rivkah suggested in the 1-st post). I now have all the words and expressions styled as I needed.
      But another problem arose.
      When I am trying to apply different style to the rest of the words and put them together, or to explain better, to have them divided by a space, not a Tab (the words are divided by the Tab) and when I am trying to do this, the words after Space automatically take the style of the previous words (before the Space). I think I tried all the versions of Space available in the list and could not solve this problem. It does it even when I am doing it manually (adding the Space and deleting the Tab) and I also tried to apply different nested styles (of course, I kept the first one), still struggling. Has anybody had this problem and rose the flag above it? :-)

      Rivkah, in your dictionary, did you keep the Tabs between the words, or did you get them closer togehter with a space?

    • #76438
      Rivkah Lewis
      Member

      I made 2 different kinds for different books.

      One of them had the word or words in a foreign language followed by a tab followed by the English words (and the other way around in the next sections: English word or words followed by a tab followed by the foreign language word/s). This was in a text box of 2 columns.

      The second one was also formatted in a 2 column text box, but it had left aligned text and looked like this:
      Word in foreign language / transliteration / translation
      with a rule under it to separate one from the next.

      In both examples above, the 2 languages were the same font.

      Do you have tabs between your words of a single phrase?

    • #76477
      M Lopusny
      Member

      I managed to get it right using the nested styles as you recommended in your 1st post, then cleaned it up using some simple GREP commands in Find-Replace.
      The source excel table was a nightmare with various cell formating, fonts, spaces, filters, etc…!; but now it finally looks nice and tidy in InDesign. <b>Also thank you guys for your time and help.</b>
      So now I am moving on the next step of the battle – headers and footers, footers not being such an issue, but custom headers on each page. Maybe I will bother again… :-P

    • #76494
      M Lopusny
      Member

      Hi all,

      so, thanks to grace given, I was able to prepare a basic 2 column dictionary and learned something on the way.
      As you guys also helped me, I feel I shoud share how it worked for me and maybe it will help somebody else later on…
      Apart from the videos I did not find a knowledge base, so I am posting it here.

      The dictionary is a standard 2 column format (1. foreign word or phrase 2. translation), displaying on each page header the first and the last foreign word from the selection

      1. Format Excel table (or Word, or LibreWriter,…): 2 columns – 1. foreign word 2. translation
      2. Import to InDesign (no formatting, no styles, just a raw table)
      3. Format Columns to desired Font type, size, etc. (e. g. 1-st column – foreign words format to Myriad Pro, 12, bold; 2nd column – translations format to Myriad Pro, 12, Regular) – this being just an example
      4. Remove the table by converting it to text using a script (open Adobe Extended Script Toolkit and type either this in 1 line:
      app.activeDocument.textFrames.everyItem().tables.everyItem().convertToText(“\t”,”\r”);)
      or this in 3 lines:
      var myDoc=app.activeDocument;
      tableList = myDoc.textFrames.everyItem().tables.everyItem();
      tableList.convertToText(“\t”,”\r”);
      Choose Adobe InDesign 6 (or the version you are using) and hit the play button (both scripts do the same thing, they remove the table and put the text from columns next to each other divided by a tab); depending on your PC “strenght,” it can take from 10 seconds to more…(dont know, I have a powerful PC at work)
      5. Replace the tabs with En spaces using GREP and then clean up the text (remove extra spaces, etc.)
      6. Define a new Paragraph style to body (change the font type and size, but remember not to change the the thickness, leave it on Regular and it will keep the foreign words bold and the translation Regular)
      7. Define nested styles in to the body style (1. being for the foreing words – bold ending on tab, 2. being for the translation – Regular, ending on Words – the rest of the text, and keep their array)
      8. Create another Paragraph style for the master page – will be used as the header style (arranged to the outer sides)
      9. Insert a CrossReference (very good explained here https://www.youtube.com/watch?v=sBgBQJLErCM), define a character style for the foreign word that will be in the header, edit it so that in definition you will add to the start via @ End nested style (this will ensure that in the headers of the pages only foreign words will be displayed and not their translation)
      10. Define text variables, choose Running headers (based on Character style – choose the one for the foreign word from the nested styles and make it the First on page, then define another variable the same way, but make it the Last on page).
      11. On the master page, create the header text field, insert the created variables (First on page on the left and Last on page on the right). And then you can apply the Paragraph style we created before for this header.
      You should now have a dictionary 2 column dictionary displaying the first and last foreign word in the header.

      Hope it may help somebody, or at least lead to maybe a better idea of composing a dictionary.

      M.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.
>