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

core: add itemization-ordered style property #403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sorawee
Copy link
Contributor

@sorawee sorawee commented Jan 6, 2024

itemization-ordered makes it possible to start an ordered itemization at an arbitrary number. This style property is supported in all backends.

Also implement ordered itemization for the Markdown and text backends (previously, all itemizations are considered unordered).

`itemization-ordered` makes it possible to start an ordered itemization
at an arbitrary number. This style property is supported in all backends.

Also implement ordered itemization for the Markdown and text backends
(previously, all itemizations are considered unordered).
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resyntax analyzed 5 files in this pull request and found no issues.

github-actions[bot]

This comment was marked as duplicate.

@sorawee
Copy link
Contributor Author

sorawee commented Jan 6, 2024

Which one is better?

  1. The itemization-ordered style property must always be used with the 'ordered style name for things to work correctly (this PR, though there's no check).
  2. The itemization-ordered style property overrides the style name to be 'ordered.

I don't like 1) since it has an illegal representation, but 2) also seems bad. E.g., what if I have a 'compact style name and itemization-ordered style property? What do I do?

Is there better solutions?

@samth
Copy link
Sponsor Member

samth commented Jan 6, 2024

The scenario you describe seems like it should be an error.

@sorawee
Copy link
Contributor Author

sorawee commented Jan 6, 2024

OK, so it sounds like @samth favors (1) but with a check (and I agree).

If I use itemization-ordered on non itemization, should that cause an error too?

Note that Scribble generally has no check for anything like this at all. For example:

#lang scribble/manual

@title{Some title}

@itemlist[
 #:style 'style-name-that-Scribble-doesnt-recognize
 @item{first item}
 @item{second item}
]

currently works fine, even though the invalid style name should cause an error. I don't know if they are allowed for forward compatibility or any other reasons.

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

Successfully merging this pull request may close these issues.

None yet

2 participants