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

Automatically insert space during typing

Return to Member Forum

  • Author
    Posts
    • #84321
      Kambro
      Member

      Dear Indesigners,

      Is it possible that Indesing insert automatically non-breaking spaces during typing the text, for example before a double point?
      Thank you by forehand and excuse me for my bad english.

      Koenraad

    • #84327
      Matt Isaac
      Participant

      You can do this with paragraph styles as a grep style.
      You’ll need to create a character style with the “no break” setting.
      Then in the paragraph style options under the GREP Styles add a New GREP Style
      In the Apply Style: field you will select the “no break” character style. In the To Text: field you will put (?=\.\.)
      This will create a nonbreaking space at every space followed by two periods.

    • #84335
      Kambro
      Member

      Thank you for your answer. Unfortunately it failed.
      1. Do I need to create a character style “no break” without specific setting into?
      2. My purpose is to obtain that the nonbreaking space should be created as soon as I type a colon character (and not a double point; I misspoke) without type a space. For example, if I type “City: New York” it appears “City : New York” with a nonbreaking space between City and the colon. In Microsoft Word, its a default option, at least for French Users.

      Again excuse for my very bad english.

      Koenraad

      • #84345
        Ari Singer
        Member

        Unfortunately this does not seem to be possible to do automatically in InDesign. What you can do is to insert all the desired spaces in one fell swoop with GREP Find/Change.

        Following are the settings:
        Find What: (\S)(:)
        Change To: $1~S$2

        As soon as you hit Change All, all the colons in your story will be preceded by a non-breaking space.

      • #84347
        Kambro
        Member

        Thank you, Ari S. Your tip seems the best solution.

        Koenraad Moreau

      • #84349
        Matt Isaac
        Participant

        Ari’s solution was my next suggestion but i had to test a new possibility before i posted..

        Although it is not possible to add characters automatically, this can still be automated using tracking. Again just as in my first post you will need to create a Character style. Though this time instead of creating a “no break” style, you will set only a tracking value of around 300 (this can be adjusted later to your liking.) In the paragraph styles options you will use the GREP Style to apply your tracking style to text: (?=\:).

      • #84352
        Kambro
        Member

        Thank you. Now, I understand it. Its very ingenious!

      • #84380
        Ari Singer
        Member

        Smart tip!

    • #84381

      There’s an old discussion (from the CS3/CS3 era) on this subject, in particular what kind of space to put before colons in French, here:
      https://forums.adobe.com/thread/326089
      where “Jongware” (who contributes to this forum) has a script to clean up text

      Bonne chance,
      Chris.

      • #84389
        Kambro
        Member

        Thanks ThompsonText. Very interesting thread.

Viewing 3 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads