• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to make a 'horizontal list'

New Here ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

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!

Views

242

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

It probably would require either GREP or a script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 28, 2017 Mar 28, 2017

Copy link to clipboard

Copied

LATEST

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines