Skip to main content
SinSinSinSin
Participant
March 28, 2017
Question

How to make a 'horizontal list'

  • March 28, 2017
  • 2 replies
  • 338 views

Hi there,

I have a lot of text files (jotted down recipes) with lists formated like this:

  • 3 tablespoons all-purpose flour
  • 1/4 cup water
  • 1/2 cup white sugar

and this:

3 tablespoons all-purpose flour, 1/4 cup water, 1/2 cup white sugar

I'd like to convert both of them in the same style:

3 tablespoons all-purpose flour - 1/4 cup water - 1/2 cup white sugar

So in short; is there a quick way to make a paragraph style that converts bulleted lists into a horizontal list and replace comma's with "-" sign.

Thanks in advance!

    This topic has been closed for replies.

    2 replies

    Erica Gamet
    Inspiring
    March 28, 2017

    Steve is right that a GREP expression could probably help. If you know the text is always a comma followed by a digit, you could find

    (\l)(, )(\d)

    and replace with

    $1~=$3

    I replaced with an en dash...you'll have to change ~= to dash or em dash or whatever you want to replace it with.

    On the bulleted list, is there a paragraph style applied to the listing?

    Steve Werner
    Community Expert
    Community Expert
    March 28, 2017

    It probably would require either GREP or a script.