Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for lists #105

Open
iainbrighton opened this issue Jul 17, 2020 · 8 comments
Open

Support for lists #105

iainbrighton opened this issue Jul 17, 2020 · 8 comments

Comments

@iainbrighton
Copy link
Owner

Would be handy to support numbered or bullet list - with nesting/indenting,

@iainbrighton
Copy link
Owner Author

I envisage the implementation to be something like this:

## Create a single-level bullet list of items
List [-Items] [string[]]

## Create a single-level numbered list of items
List [-Items] [string[]] -Numbered

## Create a multi-level bullet list
List [-ScriptBlock] {
    Item 'apples'
    List {
        Item 'Granny smith'
        Item 'Pink lady'
    }
    Item 'bananas'
    Item 'oranges'
    List {
       Item 'Jaffa'
    }
}

## Create a multi-level numbered list
List -Numbered [-ScriptBlock] {
    Item 'apples' # 1
    List {
        Item 'Granny smith' # 1.1
        Item 'Pink lady' # 1.2
    }
    Item 'bananas' # 2
    Item 'oranges' # 3
    List {
        Item 'Jaffa' # 3.1
    }
}

Are there any other implementations or options that are needed?

@tpcarman
Copy link

An option for a custom format would be useful. I have a requirement in some of my documents to produce lists with a custom prefix and format.

e.g. XYZ-001, XYZ-002, XYZ-003

@iainbrighton
Copy link
Owner Author

@tpcarman I'm not aware of bulleted lists can have custom formats. Can you provide an example of what you're after?

@tpcarman
Copy link

Within Word it's considered a custom numbered list, not bullet list.

image

iainbrighton added a commit that referenced this issue Jul 24, 2020
@iainbrighton
Copy link
Owner Author

@tpcarman Hmmm - I can't see how that could ever be implemented in Html and/or Markdown. Putting features in just for Word seems to be in conflict with the PScribo philosophy. I'll mull on it some more.

@tpcarman
Copy link

Don’t do it If it’s specifically for Word however if there is someway that you think of to make it work for all document formats then that would be fantastic.

@iainbrighton
Copy link
Owner Author

@tpcarman this functionality is now available in the dev branch for testing (including custom number formats!). I won't publish it until I have confirmation from a few sources that it's not "broken"!

@tpcarman
Copy link

I hate to stretch the friendship @iainbrighton, but do you think it would be possible to include lists within tables at some point in the future? I can't actually see how this could work for all formats however I thought I should at least ask the question. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants