0

I have basic-miktex-22.10-x on Windows 10. I saw a discussion of similar error in the Internet but did not see an answer clear for me (I am a simple user without deep understanding of the program). I have been using earlier versions of LaTeX for many years but never encountered such a problem. Help would be greatly appreciated.

\documentclass[preprint,aps,amsmath,eqsecnum,fleqn]{revtex4}
 \usepackage{bm}
 \usepackage[dvips]{graphicx}
 \newcommand{\arccosh}{\mbox{arccosh}}
 \begin{document} 
In $n$ region of the material there are charged donors and electrons excited from these donors 
 \end{document}

and texing gives

! Extra \endgroup. \document ->\endgroup \init@documenthook \set@typesize@hook \normalsize \set... l.10 \begin{document} ? ! LaTeX Error: Missing \begin{document}

2
  • 2
    Welcome to the TeX.SE. Where have you seen "Extra \endgroup ... \begin{document} ... LaTeX Error: Missing \begin{document}"? Have you an example that you can put here?
    – Sebastiano
    Apr 14 at 19:15
  • Here is an example of tex file that produces the error \documentclass[preprint,aps,amsmath,eqsecnum,fleqn]{revtex4} \usepackage{bm} \usepackage[dvips]{graphicx} \newcommand{\arccosh}{\mbox{arccosh}} \begin{document} In $n$ region of the material there are charged donors and electrons excited from these donors \end{document} and texing gives ! Extra \endgroup. \document ->\endgroup \init@documenthook \set@typesize@hook \normalsize \set... l.10 \begin{document} ? ! LaTeX Error: Missing \begin{document}.
    – Boris
    Apr 15 at 20:31

1 Answer 1

1

I think that your error is due to improper use of newcommand or a not updated version of the LaTeX's distribution or a basic MikTeX (You are probably using commands that are not contained in the basic version). Here there is your full compilable example.

 \documentclass[preprint,aps,amsmath,eqsecnum,fleqn]{revtex4}
 \usepackage{bm}
 \usepackage[dvips]{graphicx}
 \DeclareMathOperator{\arccosh}{arccosh}
 \begin{document} 
In $n$ region of the material there are charged donors and electrons excited from these donors $\arccosh x=0.253$.
 \end{document}

Here there is the screenshot:

enter image description here

See also this link \document ->\endgroup ERROR

2
  • 1
    +1, but is option dvips at graphicx really needed?
    – Zarko
    Apr 16 at 13:44
  • @Zarko In my opinion I would have removed dvips. I left it because I thought the user had .eps files as an image in his document. Thank you very much.
    – Sebastiano
    Apr 16 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .