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

multi-part examples should be organized by group #23

Open
fmatter opened this issue Nov 11, 2023 · 4 comments
Open

multi-part examples should be organized by group #23

fmatter opened this issue Nov 11, 2023 · 4 comments

Comments

@fmatter
Copy link
Owner

fmatter commented Nov 11, 2023

The current way to render a multi-part example is [ex](example-1,example-2) (or [](ExampleTable#cldf:__all__?ids=example-1,example2)).

This setup may not be intuitive for some writers, it's not possible to pass example-specific parameters (title, comment...), and I've found myself getting lost in the comma-separated list. S. Nordhoff suggested using a group with individual examples inside; I think something along these lines would make sense:

/// examples
[ex](example-1?options=blabla)
[ex](example-2?options=blabla)
///

Thought on this @xrotwang?

@xrotwang
Copy link

In "pure" CLDF Markdown, there's no way for the renderer to know multiple examples belong together if they are coded as individual links (i.e. the second block above). But pylingdocs could support a convention, where the link label (ex above) is interpreted as grouping key. So, authors would use your second option, and pylingdocs would convert this to the "one link" markup.

@fmatter
Copy link
Owner Author

fmatter commented Nov 12, 2023

What do you mean by grouping key?

@xrotwang
Copy link

pylingdocs could understand that the two examples

[ex](example-1?options=blabla)
[ex](example-2?options=blabla)

should be rendered as group, because both have the label ex.

@fmatter
Copy link
Owner Author

fmatter commented Nov 12, 2023

Ah, I see. Since you need to be able to add a title to the entire multi-part example I will probably just go with some variation of the block notation above (so that arguments can be passed), and preprocess it into a single [ex].

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