Skip to main content
Participant
December 16, 2020
Question

How to hyphenate numbers?

  • December 16, 2020
  • 1 reply
  • 835 views

Hello,

how can I hyphenate numbers?

 

I have the following problem:
In my catalog are many tables with Article-Numbers, which consists of numbers and letters, f.e. ABC123XYZ. I need to hyphen this Article- Numbers in the corresponding column, so the content fits (and line-breaks if needed) and causes no overset errors. Unfortunately indesign doesnt hyphenate numbers, even when I add the Article-Number with hyphens to the user-dictionary through Edit>Spelling>UserDictionary...

 

Because of many entries, I need this to happen automatically and not manually by adding Type>InsertSpecialCharacter>HypensAndDashes>DiscretionaryHyphens.

 

How can I solve this?

Thanks...

This topic has been closed for replies.

1 reply

Legend
December 16, 2020

This is a job for GREP find/change - (edited for discretionary hypen instead of a dash)

This expression will work even if your number of letters and numbers is not always the same.

It finds a full "word" consisting of any number of upper case letters followed by any number of digits, and replaces it with the letters, a discretionary hyphen, then the numbers

 

faseolliAuthor
Participant
December 17, 2020

Thanks, it works, but theres a small drawback, the search applies to the complete document. Is it possible to specify the search and apply only on tables in the document?

Legend
December 17, 2020

If the text in your tables has a different paragraph- or character style formatting (or different formatting), you could use that (in the Find Format box of the GREP dialog) to isolate the change to the tables.