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

Enable automatic section numbering #207

Merged
merged 9 commits into from
Apr 16, 2020
Merged

Conversation

agitter
Copy link
Collaborator

@agitter agitter commented Apr 14, 2020

Closes #205

@AppVeyorBot
Copy link

AppVeyor build 1.0.408 for commit 7ac4db6 by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@agitter agitter marked this pull request as ready for review April 14, 2020 22:03
@agitter
Copy link
Collaborator Author

agitter commented Apr 14, 2020

Modifying the Pandoc defaults file worked. Pandoc numbers some sections that we would rather not, like the Authors. I'm testing some other Pandoc settings, but you can check the artifacts now to see how it looks.

@rando2 rando2 added the Technical Technical concerns, enhancements, etc. for the GitHub enthusiasts label Apr 14, 2020
@AppVeyorBot
Copy link

AppVeyor build 1.0.417 for commit 02b1c86 by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@agitter
Copy link
Collaborator Author

agitter commented Apr 14, 2020

I'm happy with the latest combination of numbering settings. I found a way to disable numbering on some sections.

@AppVeyorBot
Copy link

AppVeyor build 1.0.428 for commit 577f7b6 by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@rdvelazquez
Copy link
Collaborator

Section numbering will be nice! Is there a way to make it start at 1 rather than 1.1?

Currently it's 1.1 Introduction, 1.1.1 General Background ..., 1.2 Pathogenesis ...
But 1 Introduction, 1.1 General Background ..., 2 Pathogenesis ... makes more sense to me.

@agitter
Copy link
Collaborator Author

agitter commented Apr 15, 2020

Section numbering will be nice! Is there a way to make it start at 1 rather than 1.1?

There is a way to adjust that. manuscript-1.0.417-02b1c86.html above shows what it would look like, though the actual numbering was broken in that build. There are disagreements between how Manubot and Pandoc treat h1 and h2 HTML headers. Manubot wants to use it for the title only so they are centered in the CSS. Pandoc uses them as section headers. manubot/rootstock#273 discusses a related topic.

I believe that if we wanted to start the Introduction at 1 instead of 1.1 we would have to adjust the CSS. I'm open to that but would want to save it for a later issue and pull request. I'm not good with front-end tweaks.

@rdvelazquez
Copy link
Collaborator

Gotcha; makes sense. And saving for later sounds good!
I'll try to take a look at a workaround when (if) I have time.

Github won't let me review but this LGTM.

@agitter
Copy link
Collaborator Author

agitter commented Apr 16, 2020

If any of us do work on that later, it would likely involve:

  • using the Pandoc shift-heading-level-by setting from 02b1c86
  • modifying some of default.html so that h1 headers aren't centered, probably these lines
    /* biggest heading */
    h1 {
    margin: 40px 0;
    text-align: center;
    }
    /* second biggest heading */
    h2 {
    margin-top: 30px;
    padding-bottom: 5px;
    border-bottom: solid 1px #bdbdbd;
    }
    /* -------------------------------------------------- */
    /* manuscript header */
    /* -------------------------------------------------- */
    /* manuscript title */
    header > h1 {
    margin: 0;
    }
    /* manuscript title caption text (ie "automatically generated on") */
    header + p {
    text-align: center;
    margin-top: 10px;
    }
  • centering the h1 header with the title class:
<h1 class="title">SARS-CoV-2 and COVID-19: An Evolving Review of Diagnostics and Therapeutics</h1>

@AppVeyorBot
Copy link

AppVeyor build 1.0.475 for commit 5925cdb by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@rando2
Copy link
Contributor

rando2 commented Apr 16, 2020

Gotcha; makes sense. And saving for later sounds good!
I'll try to take a look at a workaround when (if) I have time.

Github won't let me review but this LGTM.

@rdvelazquez sorry about that, I upped you to maintainer so hopefully you won't run into this issue again!

@AppVeyorBot
Copy link

AppVeyor build 1.0.477 for commit 9822c74 by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@rando2 rando2 requested a review from rdvelazquez April 16, 2020 17:27
@agitter
Copy link
Collaborator Author

agitter commented Apr 16, 2020

@rdvelazquez this pull request was still open so I implemented your numbering suggestion. How does manuscript-1.0.477-9822c74.html look?

This will also help with the manuscript's many levels of headers. Each section header will be bumped up a size.

@rando2 does the latest build here look good to you aesthetically?

@rando2
Copy link
Contributor

rando2 commented Apr 16, 2020

@rdvelazquez this pull request was still open so I implemented your numbering suggestion. How does manuscript-1.0.477-9822c74.html look?

This will also help with the manuscript's many levels of headers. Each section header will be bumped up a size.

@rando2 does the latest build here look good to you aesthetically?

@agitter Looks great! Thank you so much for doing this, I think it will really help to keep track of where we are in the broader structure. We have a lot of levels in therapeutics right but hopefully down the line we'll be able to streamline a bit. This will really help keep track of which sections go with what!

Copy link
Collaborator

@rdvelazquez rdvelazquez left a comment

Choose a reason for hiding this comment

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

Looks great!

@AppVeyorBot
Copy link

AppVeyor build 1.0.487 for commit 24b4b7e by @agitter is now complete. The rendered manuscript from this build is temporarily available for download at:

@agitter agitter merged commit 0ad98f2 into greenelab:master Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Technical Technical concerns, enhancements, etc. for the GitHub enthusiasts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic Section Numbers
4 participants