# \begin{document} Undefined control sequence

I just have copied of Lyx files to one computer to another and i am facing above subjected problem. Complete log is given below.

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2012.12.19)  8 JAN 2013 21:37
entering extended mode
**chapter-1.tex
...
LaTeX Info: Redefining \ref on input line 87.
LaTeX Info: Redefining \pageref on input line 87.
LaTeX Info: Redefining \nameref on input line 87.
(C:\Users\Mani\AppData\Local\Temp\lyx_tmpdir.p11848\lyx_tmpbuf2\chapter-1.out)
(C:\Users\Mani\AppData\Local\Temp\lyx_tmpdir.p11848\lyx_tmpbuf2\chapter-1.out)
\@outlinefile=\write3
! Undefined control sequence.
\@begindocumenthook ...ox {\autoref {##1}}}\addto
\extrasenglish { \renewcom...
l.87 \begin{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
{ \renewcommand {\equation...
l.87 \begin{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
...

-
Instead of posting the whole log file here could you please prepare a minimal working example (MWE) that shows the erroneous behaviour? –  Benedikt Bauer Jan 8 '13 at 21:16
I don't think you needed to post the whole thing, normally you can use the {} button to indent by 4 spaces which marks up a code section but that exceeds the site posting length –  David Carlisle Jan 8 '13 at 21:22
 ! Undefined control sequence.\@begindocumenthook ...#1}}}\addto\extrasenglish  means that you have commands assuming babel but you have not loaded babel add \usepackage[english]{babel} –  David Carlisle Jan 8 '13 at 21:23
babel via the LyX GUI: Document --> Settings --> Language: Set Lanuguage pack. –  Torbjørn T. Jan 8 '13 at 21:25
I shortend your log file to show only the important part. I hope it is okay for you. –  Kurt Jan 9 '13 at 1:41

You need to add

\usepackage[english]{babel}


(and perhaps other languages, according to your needs) to your document. Or remove whatever files that you are loading that depend on babel. \extrasenglish is a babel command used in customising document settings for English language use.

An interface to babel in the lynx GUI has been given by Torbjørn T. in the comments

Document --> Settings --> Language: Set Language pack.

-
Thanks for solving my problem. And i will be carefull next time in posting "log" file. –  user4299 Jan 9 '13 at 7:32