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

force line break after 50 caracters

Return to Member Forum

  • Author
    Posts
    • #94743

      Hi!

      how can I automatically force a line break after 50 characters?

    • #94745

      To find the 51th char:

      (?-s)^.{50}\K.

      To find text after 51th char until the end of the para:

      (?-s)^.{50}\K.+

      (^/)

    • #94746

      What?!

      In InDesign..! I want that to happen automatically.

    • #94747

      C’est quoi la finalité ?

      (^/)

    • #94748

      PDF

    • #94749

      ??

      Je pensais plutôt à : Pourquoi couper les lignes après le 50e caractère ! =D

      (^/)

    • #94750

      bonne question. l’idee de mon client.je dois trouver un moyen de le faire.

    • #94751

      ??

      On ne va pas avancer vite à ce train-là !! =D

    • #94752
      David Blatner
      Keymaster

      There is no easy way to do this. You could use Obi-wan’s grep trick to insert paragraph returns at the particular spot on each line (I can show you how if you want), but it will take some time. InDesign is not designed to break after a certain number of characters.

      An easy option would be to apply a mono-spaced font (like Courier) to all the text and make the text frame 50 characters wide.

      • #94770

        Yeap! It will take time! 1 second! =D

        Find: .{49}\K.
        Replace by: $0

        … if you consider a space as a char!

        If not, you’ll need more regex (3 if you consider all spaces as same ones) and more time! Maybe 2 op-seconds! =D

        Find:
        Replace ~j

        Find: .{49}\K.
        Replace by: $0

        Find: ~j
        Replace by:
        (type a normal space)

        (^/)

    • #94753

      thank you!
      im using Verdana.
      How do I do a 50 character wide frame?

    • #94755
      David Blatner
      Keymaster

      Verdana is a “proportional width” font. That means some characters are more wide and other are more narrow. So 50 “i” is going to be a very different width than 50 “m”

      So there is no way to make a 50 character wide frame.

    • #94757

      Thank you very much for your help!

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