Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Character Style Automation for Foreign words

Return to Member Forum

  • Author
    Posts
    • #66724
      Bambang Damayanto
      Participant

      Hi My Name is Bambang Damayanto. I would like to ask something about the way to make character style automation for foreign words. Sometimes when we write the book, we want to put the italic style for foreign words. So…, here I’m ask how to make or the way to create some automation italic or bold style for every foreign words, so I don’t have to change every word one by one. Thanks

    • #66841

      How do you specify the foreign word in a paragraph? tell me, perhaps I can write the grep for you, and that grep will be put in paragraph style ie grep style to make the foreign word italic

      • #67127
        Bambang Damayanto
        Participant

        Hi Erwan, first of all thanks a lot to help me. I use Bahasa (Indonesia Language) on my works, so in my publishing rules, every foreign words (english, french, etc) must be in italic style to differentiate our language with a foreign language. Example: “Kami di Indonesia menggunakan desktop publishing seperti InDesign dan InCopy.” In this case, cause “desktop publishing” is the English language, the phrase or word that should be in italic style.
        I hope you’ll understand what I mean. Thanks a lot, Erwan.

    • #66978
      Matt Mayerchak
      Participant

      Are the foreign words tagged in the manuscript in any special way? There needs to be something unique about them (but similar to all of the foreign words) that you can use to find them. For instance, if they are all bold in the Word file, you can use that to tag them. But if they are all just non-English words, they may not have anything about them that makes them searchable.

    • #67017
      Abbas Al-Baghdadi
      Participant

      Hi, since the first version of InDesign and yet, we suffer as users of a middle east version (ME), that the problem is inability to create a characters or paragraph style of Latin characters within paragraphs styles for Arabic, Hebrew, Urdu, etc. text. Latin text (such as english) take the same font style devoted to non latin text (such as arabic) within the text, without the ability to automation control the latin text within the same arabic text paragraph style (only manual), so 90% of InDesign ME users consider that a big shortage in the program, and wasting a lot of time and effort, they expect every time that solution comes with a new version of the InDesign, but unfortunately they might receive the same frustration, and discover that the problem remains!
      This is what happened with the latest version CC.
      It is strange that feature found in many word processing programs such MS Word (Se MS Word image) and Quark, but non-existent in InDesign. https://s13.postimg.org/9ggyhsfnr/word_para.gif
      I have tried a lot of methods to overcome this problem with GREP and other, but without utility, and I wrote to Winsoft International (the agent of Adobe ME programs version) and did not get a solution.
      I am writing to you and I expect to find a solution by use GREP or script.
      There is a perception that the solution could be by script, and handling multilingual in text as two types, one from right to left (Arabic and Hebrew, Urdu, etc.), and other from left to right (Latin, etc.), so user select the appropriate character style with the paragraph style (Se a script imagined image). https://s24.postimg.org/8v2jtrphh/2in1_Paragraph.gif
      https://s28.postimg.org/wpjlubi59/Paragraph_Style_2.jpg
      – I attached sample multilingual .txt file (Arabic & English) for use in experiments, it can also benefit Arial font for Arabic text. https://www.agraphic.dk/sample%20text.txt
      Any suggestions, please.

    • #67018
      David Blatner
      Keymaster

      Abbas: Does World Tools (in-tools.com) help?

    • #67050
      Abbas Al-Baghdadi
      Participant

      David, sorry for not responding sooner. Unfortunately World Tools does not help.

      • #67099
        Masood Ahmad
        Participant

        Abbas, I have been working with Right to Left Languages from the past 15 years. I’m a linguistic operator by profession. I too cam across the same problem while working in InDesign. I am working with InDesign ME (Middle East) since CS2. InDesign lacks the ability to define two fonts for the same paragraph. The “https://s13.postimg.org/9ggyhsfnr/word_para.gif” shows the screen grab from MS Word which has this feature since its beginning (with Language support). The ‘Complex Scripts’ font drop-down list controls the font for the Right-to-Left Languages example: Arabic, Urdu, Persian, Dari, Hebrew etc whereas ‘Latin text’ controls the font for the Left-to-Right languages example: English, French, etc. Hope Adobe, will bring some relief to us in his next launch someday; David, please pass this information to Adobe.

        When I come across such problem, I define the main Font for the complex script in my paragraph style and creates a character style for the latin text.
        Secondly, you can change the language of your complex script to something like “Arabic” and then you can easily apply some GREP or Find/Replace for the latin language ‘English UK’.

        David, can you give us some GREP code to apply formatting to a definite language, lets say ‘English UK’. We can use that code in our para style to automatically apply the character style to our latin text or vice-versa.

      • #67100
        Masood Ahmad
        Participant

        I think the question was asked by Damayanto and we mistakenly acknowledge to Abbas :)

    • #67110
      Masood Ahmad
      Participant

      Hi Damyanto / Abbas,

      I think I have achieved what is expected. The code has been tested on InDesign CS5 and is working fine.

      Here are the steps:
      1. create a Paragraph style for the Complex script (i.e. Arabic) with Arabic font-set (for example: Adobe Arabic Regular Font)

      2. create a Character style for the Latin script (i.e. English) with Latin font-set (for example: Myriad Pro Regular Font, character direction Left-to-Right, etc)

      3. Create first New GREP Style in the Paragraph Style, Apply the Character style (created for the latin script) and enter code1 in the ‘To Text’ field:
      code1:
      ([\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}])+

      4. Create second New GREP Style in the Paragraph Style, Apply the Character style (created for the latin script) and enter code2 in the ‘To Text’ field:
      code2:
      ([!”‘()-./\:;<=>\[\]^_`~\{|\} ](?=[\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}]))+

      5. Create third New GREP Style in the Paragraph Style, Apply the Character style (created for the latin script) and enter code3 in the ‘To Text’ field:
      code3:
      ((?<=[\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}])[!”‘()-./\:;<=>\[\]^_`~\{|\} ])+

      Now the BIG Question… What this code will do???
      The code will search for latin text i.e. A-Z, a-z, 0-9 and all special characters surrounded by latin text and will apply the Character Style. In real scenario, the user can directly type Arabic text using the Paragraph style and as soon as he type any English text, the code will automatically apply the Character style for the English text. Therefore, the user doesn’t have to manually change the font for the English text.

      Thanks Damayanto and Abbas for raising this issue. I’ll too use this code till Adobe comes up with something.

    • #67114
      Abbas Al-Baghdadi
      Participant

      Thanks Masood for your response and attempt. I have applied your instructions, unfortunately I got errors in the result, and you can see them in the image.
      https://s23.postimg.org/jk2et7n6z/Grep_style_2.gif
      It should be supposed to be the solution includes the assumption that some of the texts that a complex interplay between multilingual??.

    • #67116
      Abbas Al-Baghdadi
      Participant

      It should be supposed to be the solution includes the assumption that some of the texts that a complex interplay between multilingual.

    • #67146
      Masood Ahmad
      Participant

      Hi Abbas, I have tried to write a code to minimize the manual work and have included the basic latin characters used normally. I have not taken the complete list of special characters. Try to populate the GREP code to work wonders. As I said earlier that the code has been tested on CS5, but that was on MAC, however, I test the code at home on ME and tweaked it a little. Please check the InDesign file which contains the Urdu text, paragraph style and a character style:

      https://ftf-1118.yousendit.com/download/1/E3E436DE339849CE/65b7b44b39ab98da7ac1e91a4677bd9289763147/R2L-ParaStyle-With-L2R-CharStyle.indd?download_id=4710108915&user_locale=en&id=2227692811&ufid=E3E436DE339849CE&file=R2L-ParaStyle-With-L2R-CharStyle.indd

      The tweaked codes are also listed below:

      Code1:
      ([\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}])+

      Code2:
      ([!”‘()-./\:;<=>\[\]^_`~\{|\}]+(?=[\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}]))+

      Code3:
      ((?<=[\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}])[!”‘()-./\:;<=>\[\]^_`~\{|\}]+)+

      Code4:
      ([\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}]|[!”‘()-./\:;<=>\[\]^_~\{|\}])([\x{0023}-\x{0026}]|[\x{002A}-\x{002C}]|[\x{0030}-\x{0039}]|[\x{003F}-\x{005A}]|[\x{0061}-\x{007A}]|[\x{00A9}]|[!"'()-./\:;<=>\[\]^_~\{|\}])

      Apart from this, you can apply the character style manually on the left overs. Please let me know if you got something better.

    • #67162
      Abbas Al-Baghdadi
      Participant

      Hi Masood .The new attempt it look better, but still have some errors. The glyphs that are not affected by the style were Scandinavian, Cyrillic and Turkish, which are widely used in the multilingual (See image).
      https://s27.postimg.org/gumqxcelv/Grep_style_3.gif
      I attached sample multilingual glyphs file, (Scandinavian, Cyrillic and Turkish) for use in experiments.
      https://www.agraphic.dk/multilingual_glyphs.txt
      Can you collect all the codes in one?

    • #67181

      If the languages are come from different languages group, i.e ME and Western European languages, it is easy to recognise the fonts but if the languages are come from same languages group like bahasa Indonesia and English language, I think it is very hard for Indesign Grep or script to make distinguish.

      The only way is we make the script ( I don’t think grep can do this) to ask Indesign to make the word italics if the words are not found in the Indonesia dictionary, is it possible?

      But first you must installed Indonesian Dictionary in Indesign, as indesign default do not include Indonesian Dictionary.

      @ Bambang, salam kenal

    • #67223
      Masood Ahmad
      Participant

      Abbas, could you send me the InDesign, preferably CS5 or an IDML as mentioned by you in the below link:

      https://s27.postimg.org/gumqxcelv/Grep_style_3.gif

      on this forum or on my personal email address: “masoodahmad@inbox.com

      I’m trying to incorporate the codes and have achieved a bit of it.

      Erwan, your query cannot be processed with the GREP as it do not support the codes for Languages. If there could be anything like:

      [Language(Indonesian)]
      or
      [^Language(Indonesian)]

      then your query could have been resolved. Else, you have to use the Find/Change. Meanwhile, I’ll try to dig out something.

      The best way, I think, David Blatner or Michael Murphy can show us some trick or code to achieve this.

    • #67234
      Abbas Al-Baghdadi
      Participant

      Masood, I updated first code, as add the glyphs that aren’t affected in your first suggestion. The update solved 90% of the problem, and this is good result (See update). Thanks for your efforts.
      https://s9.postimg.org/c1vo9qzpr/Grep_style_4_gif.gif
      I attached 2 IDML multilingual files, your codes and update.
      https://www.agraphic.dk/R2L-ParaStyle-With-L2R-CharStyle_Update.rar

Viewing 13 reply threads
  • You must be logged in to reply to this topic.
Forum Ads