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

Sorting documents numbered >99 unexpectedly positioned in front of 99.back-matter #106

Closed
slochower opened this issue Apr 18, 2019 · 4 comments · Fixed by manubot/rootstock#222

Comments

@slochower
Copy link
Collaborator

paths = sorted(section_dir.glob('[0-9]*.md'))

I naively created 100.si.md that I thought would be sorted after 99.back-matter (where the references are) but it gets sorted in front.

Manuscript content parts:
00.front-matter
01.abstract
02.main-text
03.results
100.si
99.back-matter
@agitter
Copy link
Member

agitter commented Apr 18, 2019

Do you think this behavior is a problem, or rather does it need to be better documented? I think it is reasonable for the filenames to be sorted in this manner, which matches how GitHub sorts them. We do need to make sure that users know how to place text in the desired location though.

One convention would be to switch to a three digit 000, 001, etc. file naming scheme to add the supplement in the desired location.

@slochower
Copy link
Collaborator Author

slochower commented Apr 18, 2019

Do you think this behavior is a problem, or rather does it need to be better documented?

Probably just this. I could add a one sentence PR to USAGE that explains this, probably. Just noting it here.

Although I'm currently debating having the SI in the same manuscript versus not. Having it there makes references and other things better, on the other hand, lot of journals want things like different figure numbering for SI (restart the counter and use S1, S2, ...) which is tough with a our current framework of smooshing all the separate Markdown documents together before rendering.

@dhimmel
Copy link
Member

dhimmel commented Apr 19, 2019

One convention would be to switch to a three digit 000, 001, etc. file naming scheme to add the supplement in the desired location.

Better would be to move back-matter to 90.

@slochower
Copy link
Collaborator Author

This is true, no reason to go to triple digits unless necessary :)

dhimmel added a commit to dhimmel/manubot-rootstock that referenced this issue May 17, 2019
Closes manubot/manubot#106

Enables creating two-digit prefixed content markdown files that
will sort to come after back-matter. While back matter is intended
to be the final markdown file, some users may want to place content
after it.
dhimmel added a commit to manubot/rootstock that referenced this issue May 17, 2019
Merges #222
Closes manubot/manubot#106

Enables creating two-digit prefixed content markdown files that
will sort to come after back-matter. While back matter is intended
to be the final markdown file, some users may want to place content
after it.
dhimmel added a commit to manubot/rootstock that referenced this issue May 17, 2019
This build is based on
dcb3cc4.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/manubot/rootstock/builds/112283019
https://travis-ci.com/manubot/rootstock/jobs/201161222

[ci skip]

The full commit message that triggered this build is copied below:

Use 90. prefix for back-matter.md

Merges #222
Closes manubot/manubot#106

Enables creating two-digit prefixed content markdown files that
will sort to come after back-matter. While back matter is intended
to be the final markdown file, some users may want to place content
after it.
dhimmel added a commit to manubot/rootstock that referenced this issue May 17, 2019
This build is based on
dcb3cc4.

This commit was created by the following Travis CI build and job:
https://travis-ci.com/manubot/rootstock/builds/112283019
https://travis-ci.com/manubot/rootstock/jobs/201161222

[ci skip]

The full commit message that triggered this build is copied below:

Use 90. prefix for back-matter.md

Merges #222
Closes manubot/manubot#106

Enables creating two-digit prefixed content markdown files that
will sort to come after back-matter. While back matter is intended
to be the final markdown file, some users may want to place content
after it.
adebali pushed a commit to CompGenomeLab/lemur-manuscript-archive that referenced this issue Mar 4, 2020
Merges manubot/rootstock#222
Closes manubot/manubot#106

Enables creating two-digit prefixed content markdown files that
will sort to come after back-matter. While back matter is intended
to be the final markdown file, some users may want to place content
after it.
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 a pull request may close this issue.

3 participants