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

myst formatting directive with only 1 parameter #21

Open
paugier opened this issue Sep 13, 2022 · 4 comments
Open

myst formatting directive with only 1 parameter #21

paugier opened this issue Sep 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@paugier
Copy link

paugier commented Sep 13, 2022

Context

```{exercise-start}
:label: ex1
```

is formatted as

```{exercise-start}
---
label: ex1
---
```

Proposal

I think it is too verbose for this case, especially when we have several directives like that in a file.

When there is only 1 parameter, it should be kept with the syntax :label: ex1.

Tasks and updates

No response

@paugier paugier added the enhancement New feature or request label Sep 13, 2022
@welcome
Copy link

welcome bot commented Sep 13, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

1 similar comment
@welcome
Copy link

welcome bot commented Sep 20, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@hukkin hukkin transferred this issue from executablebooks/mdformat Sep 20, 2022
@hukkin
Copy link
Member

hukkin commented Sep 20, 2022

Thanks for the issue!

Transferred this to mdformat-myst as mdformat core does not format myst directives.

I feel like the current style is best in line with how mdformat typically format's things: strict, simple, consistent. But I know that e.g. @chrisjsewell probably disagrees (see the discussion), and I understand their side as well.

@paugier
Copy link
Author

paugier commented Sep 23, 2022

Another case for which really I wish to have the shorter format

```{math}
:label: rayleigh_eq
\varphi'' - k^2 \varphi - \frac{U''}{U-c} \varphi = 0
```

instead of

```{math}
---
label: rayleigh_eq
---
\varphi'' - k^2 \varphi - \frac{U''}{U-c} \varphi = 0
```

I have files with several equations like that. Two more lines per equation make the whole file much longer and less readable.

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

No branches or pull requests

2 participants