2

I want a layout where the H1 sections are the tabs. Is there a way to do that?

It already bothers me that Rmarkdown uses H1 for section headings instead of titles, which is why this is not straightforward.

Example:

---
title: "The Actual Title"
output:
  html_notebook:
    number_sections: yes
    toc: yes
    code_folding: hide
---

# Heading 1
Stuff including lots of subheadings

# Heading 2
Stuff including lots of subheadings

# Heading 3
Stuff including lots of subheadings

Output:

            _____________
Heading 1  |  Heading 2  |  Heading 3 
abalter
  • 9,663
  • 17
  • 90
  • 145
  • Your rant *"uses H1 for section headings instead of titles"* bothers me: how are you defining your "title" versus "heading" when your yaml header includes `title:`? Is this annoyance relevant for your feature request, or is it a different request? – r2evans Feb 28 '19 at 19:48
  • @r2evans Yeah, I see your point. Maybe I just think it's weird that in HTML semantics the "title" goes in a `` tag and shows the browser tab, whereas a "top level heading" is used for things like the title of a page, title of a post, etc. One of the very few things in HTML semantics that is a little muddy. Anyway, I would like my `# Heading 1` thingies to be tabs. – abalter Feb 28 '19 at 20:28
  • 1
    An Rmarkdown file is not just for HTML files, that's just one of its outputs. `title:` translates to different things for the different output formats. I still think `title:` is appropriate, since an HTML title is for the *document*, not a section. Either way, I'll think about the "header-to-tab" thing. – r2evans Feb 28 '19 at 20:40
  • Thanks! It would be very handy. – abalter Feb 28 '19 at 20:42
  • Were you able to achieve that @abalter – Rafs Jul 28 '20 at 16:03
  • @JabroJacob -- I think @r2evans' point stands that this is simply how RMarkdown is designed. The solution is to use custom CSS. For instance, at the bottom, you can have `` to do as you wish. – abalter Jul 29 '20 at 17:06

0 Answers0