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

Lightweight enumerations and bullet lists #1365

Merged
merged 6 commits into from
Jun 22, 2022

Conversation

Omikhleia
Copy link
Member

@Omikhleia Omikhleia commented Apr 15, 2022

I am proposing here a lightweight enumeration and bullet list package, with two aims in mind:

It is, actually, a "trimmed-down" version of the feature-rich but more experimental "enumitem" package I have in my own repository (https://github.com/Omikhleia/omikhleia-sile-packages). By "trimmed-down", I mean it doesn't use my experimental (and as-of-yet unfinished) "styles" system and has a bit less flexibility (with respect to customization, etc.). But otherwise it supports the same types of settings and has the same default general appearance (and also shares a good number of non-regression tests). So at this point at least, it's compatible with the things I have been using on my side for some months now.

As can be seen in the implementation, I tried to make it as robust as possible with respect to structure, paragraph skips, outer and inner parskips, as well as proper nesting. Regarding the latter, it supports two ways of nesting, a simple one (but less powerful) and a more powerful one (which, for the record, is what I now use for converted markdown in my unpublished proof-of-concept attempts, but at least you now know I tried to ensure I could use it in that context!).

Tuning the beast proved a bit hard, hence the number of tests. Are there too many tests? I can't say, except that each of them was added after I found a potential bug that wouldn't break the previous ones, or to check a documentation claim was indeed honored.

@alerque alerque added enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages labels Apr 15, 2022
@alerque alerque added this to the v0.13.0 milestone Apr 18, 2022
@alerque
Copy link
Member

alerque commented Apr 21, 2022

What happened to my review? I know I wrote up something for this a couple days ago ... 🤷 ... forgot to hit "send"? Still have the tab open somewhere?

documentation/macros.sil Show resolved Hide resolved
packages/enumitem-lite.lua Outdated Show resolved Hide resolved
tests/enumitem-010-itemize.sil Outdated Show resolved Hide resolved
@alerque alerque modified the milestones: v0.13.0, v0.13.x Jun 9, 2022
@Omikhleia
Copy link
Member Author

Omikhleia commented Jun 19, 2022

Moving on:

  • Rebased on master + fixed conflicts at this date in affected package documentations and the manual.
  • Renamed "lists" as per review (and settings also scoped to that namespace)
  • Updated to resolve deprecation warnings (= updated to SILE.settings:*, class:formatCounter)

Next tasks to come:

  • Rework the tests
  • Add some additional options which prove useful for use in e.g. Markdown conversion

@Omikhleia
Copy link
Member Author

Moving on:

  • Tests reduced to 3
  • Newly introduced options (custom bullet at itemize or item level; enumeration start and style override at enumerate level) allowed me to implement Markdown lists with all of Pandoc's subtleties on a separate project, so the package is kind of neater now ;)

@Omikhleia Omikhleia requested a review from alerque June 19, 2022 23:03
@alerque alerque merged commit f901848 into sile-typesetter:master Jun 22, 2022
@alerque
Copy link
Member

alerque commented Jun 22, 2022

Thanks for all the refactoring on this, and sorry it was such a long haul for a relatively simple thing. I'm much happier with the state now and think this package will get a lot of millage in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request modules:packages Issue relates to core or 3rd party packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants