0
\documentclass{article}
\usepackage{amssymb, amsfonts, stmaryrd,fancyhdr,amsmath,amsthm,amsbsy,amsfonts, titletoc} 
\usepackage{fnpct} % I used following package for footnotes when using \footnote{text1}\footnote{text2} instead of using \footnote{text1}$^{,}$\footnote{text2}
% I think this is the reason I got Error for 
%... \@begindocumenthook ...ent@language \fi \expanded ... break here .... {\noexpand \forcsvlist {\n...


% =================== main document ======================= 
\begin{document}
{\Large\bf my title is here}\\
\centerline{Author \footnote{Address1}\footnote{Address2}}

\end{document}

The Output:

! Undefined control sequence.
\@begindocumenthook ...ent@language \fi \expanded 
                                                  {\noexpand \forcsvlist {\n...
l.46 \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.
SulinW
  • 76
  • 3
  • Welcome to TeX.SX! Please provide a MWE for people to be able to reproduce your error and help you. – KersouMan Jun 08 '20 at 13:30
  • texmaker is just the editor you are using, the error comes from your tex installation, and you do not say how old that is. – David Carlisle Jun 08 '20 at 13:46
  • @KersouMan I edited the question, and included my latex. I know the error comes from the use of package{fnpct} for ... \footnote{Address1}\footnote{Address2}... – SulinW Jun 08 '20 at 15:42
  • @DavidCarlisle .... This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6730) (preloaded format=pdflatex 2018.7.11) .... – SulinW Jun 08 '20 at 15:44
  • but you must have updated the package code without updating your tex. you have a 2018 miktex format, I don't use miktex but just use its standard update options to get a 2020 one. – David Carlisle Jun 08 '20 at 15:58
  • note your question title is misleading, the undefined command is \expanded not \@begindocumenthook – David Carlisle Jun 08 '20 at 16:00

1 Answers1

1

\expanded has been available in luatex for some time but was added to pdftex and xetex last year, so you need to update the tex distribution that you are using with texmaker (or use a suitably old macro set that does not use that command)

David Carlisle
  • 757,742