Closed gregcaporaso closed 2 years ago
Have you tested out the q2doc.question
directive defined in sphinx-ext-qiime2? If so, does it not apply the correct styling?
I hadn't, thanks for the reminder, forget we had that defined already. Trying to get it working on this JB but haven't yet. Not sure what I'm doing wrong (code is here) - will try more tomorrow.
I played with this a bit this morning, I don't think the q2doc.question directive will work as-is here. Sounds like we should just add some custom CSS to match the question
class you're using here, and call it a day: https://jupyterbook.org/advanced/html.html#an-example-custom-admonitions
Sounds like a plan, thanks for looking into it. I'm going to revert my change to _config.yml
and continue to just use question
as my admonition class. If someone can add the CSS for this, that would be great.
What if we used this ebp extension, instead? https://ebp-sphinx-exercise.readthedocs.io/en/latest/syntax.html
Love it! :100:
Documenting here, a really easy way around the long-line issue in the admonition title is to use a JB substitution variable:
https://jupyterbook.org/content/content-blocks.html#substitutions-and-variables-in-markdown
Confirming that substitutions worked for the long-line issue (added in #42)- thanks @thermokarst!
I'm adding some admonition blocks through-out that pose questions to the user. I'm defining these as class question, but since that's not define they just show up as generic admonitions. We should define
question
as a custom admonition so we can style it different - for example, a question mark on the left side of the admonition box.I'm also using the
dropdown
class for these so the answer can be hidden from the user as they work through the tutorial. For example:The source for this looks like the following:
One issue is that I don't think I can split the first line (the question) across multiple lines in the source or it will put the second and all remaining lines in the body of the admonition block rather than the header. If we could handle that with the custom admonition (if there isn't another way) that'd be pretty handy too.