-1

Other posts deal with the problem that headings of level 4 downwards are not shown in other programs like latex . However, I use Markdown in combination with MS Word and wonder how I could use levels 4, 5, 6, downwards there. If I render it now, I get a simple text output.

Example for level 4 heading:

#### I am a heading 4

If there is no easy way to do that, my next step would be to mark headings with some tags and then run a word macro over it. But I would rather avoid that.

(PS: The heading in Markdown works well.)

Poza
  • 336
  • 1
  • 16
  • [according to the Rmarkdown cheatsheet](https://rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf), you are correct with your heading 4. Are you having header problems when converting to word_document? – Daniel_j_iii Nov 11 '20 at 11:54

2 Answers2

1

Did you leave a space between the text and the heading? Because

text
#### I am a heading 4

gives this result:

enter image description here

Whereas with a space between text and heading like here below

text

#### I am a heading 4

Gives this result: enter image description here

ViviG
  • 1,613
  • 1
  • 9
  • 23
0

Okay, the problem was not the code at all. I used a reference file, and in such a reference file, all necessary headings must be added to the styles gallery. You can do it by using them at least once in the text.

Poza
  • 336
  • 1
  • 16