0

I am trying to write a research manuscript in rmarkdown. Everything was working ok, but when I start trying to use \newpage for a page break I got the following error -

! Improper \prevdepth.
\newpage ...everypar {}\fi \par \ifdim \prevdepth 
                                                  >\z@ \vskip -\ifdim \prevd...
l.187 \newpage

I actually write the \newpage this way -

\newpage
# Literature Review & Hypotheses Development 
\justify

## Role of ABC 
       blah blah blah .......

However, if I put a line/word (e.g., the word "W") like the following way, it knits well -

\newpage
# Literature Review & Hypotheses Development 
\justify
W

## Role of ABC 
       blah blah blah .......

Any idea to solve it. I visited https://tex.stackexchange.com/questions/405980/why-does-xgalley-require-a-blank-line-before-enddocument, but I do not know how to approach it. Thanks

Sharif
  • 163
  • 1
  • 9
  • 1
    Can you give us your YAML header? – J_F Jun 04 '20 at 07:10
  • I think it´s not a problem with `\newpage` rather than with `\justify`. If you use the package `ragged2e` and then `\justifying` everything works well. – J_F Jun 04 '20 at 07:40
  • @J_F Thank you very much for your response. It works perfect now. Actually I already used the `ragged2e` package but I did use the term `justify` not `justifying`. When I change it to `justifying`, it works Ok. Thanks again for your response. – Sharif Jun 04 '20 at 15:56

0 Answers0