rr-markdownxquartz

Headings not working in my R markdown file


I recently finished my R notebook, and noticed something once I decided to knit the markdown file. None of the headings or bullet points were working! I had to install XQuartz to finish knitting the markdown file since I have a mac. Is this something that's normal or can I fix this?

enter image description here


Solution

  • I haven't seen your rmarkdown, but I suspect that you need to add a blank line above each heading. For example, putting a heading right after a list (or any other structure) sometimes results in problems:

    1. First item
    2. Second item
    3. Third item
    # First level heading
    

    However, adding a blank line before each heading usually fixes the problem:

    1. First item
    2. Second item
    3. Third item
    
    # First level heading