-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add support for floating table of contents #25
Comments
There was a user in that same issue that suggested that changing to |
Hello @Jpund In which version of academic has this ability? |
According to the issue is not built in, but according to the users on that issue thread after performing the modifications (changing |
This method seems invalid for .Rmd. How to get this toc sidebar for .Rmd? |
Did you manage to get this working for academia with .md? Because I can't get it to work on this theme, the instructions given for academic don't work under academia, there might be a few extra changes required for it to work. Also I don't know much of .Rmd files, but I had the idea that you could easily convert it to .md files easily without making any changes, for instance I found this link from RStudio where they state that one of the goals of RMarkdown is to be easily converted into another flavors of markdown, so you might wanna check out on that. |
I'm sorry, it works well on academic theme. And thanks for your answer about converting .Rmd to .md. I know this process, but if I do this converting, another annoying problem arises: the math formulas in I wrote in .Rmd get wrong in .md (after rendering on the website). All subscribt "_" must have a "\" in front of it, otherwise the formulas go wrong after rendering. I dong't know how to deal with this problem either. I' ve searched for ansewers for some days. Some people say goldmark goes well, but I don't know how to use it. |
Ah well, I have never used it before so I can't help you either. If you somehow manage to get a floating table of contents in academia, let me know, because after doing the changes as suggested in academic in academia I ended up with a broken table of contents and blog post. |
The original academic theme supports a floating table of content, mentioned in this issue.
To summarize the entire discussion simply adding the following to
/layouts/_default/single.html
:And then adding
toc: true
toindex.md
on your post would result in this (source):As you can see there's a floating toc on the right.
Here's what I did:
/layouts/_default/single.html
with the previously mentioned contenttoc: true
on my postpage_footer.html
doesn't existpage_foorter
tosite_footer
becausesite_footer.html
existspage_footer.html
from the original academic theme as well as all the others partials that were called in this fileAs as workaround I have a static toc in the beginning of the post, but I feel like this would be a good improvement and could be easy to implement, considering that it was fully functional in the academic theme.
The text was updated successfully, but these errors were encountered: