我最近“刷新”了我的计算机,并且必须重新安装 MacTeX 和 TeXMaker。当我尝试编译特定文件时,它显示:Argument of \put has an extra }
。
如果我完全删除前后所有内容,\begin{document}
它\end{document}
就会编译,但只要我把任何东西放在那里,我就会收到错误。我很确定我没有正确配置 TeXMaker,但我不知道该怎么做。任何建议。
这是代码(警告,它是各种文件的大杂烩):
\documentclass[twoside, 10pt]{article}
\RequirePackage{latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
\usepackage{etex,harpoon}
\usepackage[ascii, latin1]{inputenc}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xfrac}
\usepackage{comment}
\usepackage{enumitem}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{amsthm}
\usepgflibrary{fpu}
\usepackage{siunitx}
\usepackage{commath}
\usepackage[T1]{fontenc}
\usepackage{comment}
%\usepackage{subcaption}
\usepackage[caption = false]{subfig}
\usetikzlibrary{arrows,decorations.pathmorphing,decorations.markings,backgrounds,positioning,fit,petri}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{float}
\restylefloat{table}
\usepackage{placeins}
\usepackage{booktabs}
\usepackage{afterpage}
\usepackage{pgfmath}
\usepackage{m-pictex}
\usepackage{pictexwd}
\usepackage{background}
\usepackage{pictex}
\usepackage{textpos}
\input pictex
\input{norm_background_files/rlpmacros}
\backgroundsetup{placement=center,angle=0,scale=1,opacity=25,
%contents=\includegraphics{GridBCD4E6_plain_math}}
%contents=\includegraphics{norm_background_files/GridBCD4E6}}
%contents=\includegraphics{norm_background_files/GridBCD4E6_no_rb}}
contents=\includegraphics{norm_background_files/GridBCD4E6_no_rb_no_horizontal_divider}}
\font\ninerm=cmr9
\font\ninei=cmmi9
\font\nines=cmsy9
\font\eightrm=cmr8
\font\eighti=cmmi8
\font\eights=cmsy8
\parindent=0pt
\newcounter{probcounter}
\newcounter{pagecounter}
%*****************************Print Margin Notes************************
%option 0: do not print margin notes
%option 1: print margin notes
\def\printmarginnotes{1}
%\setlength{\textwidth}{5in}
%\setlength{\leftmargin}{-0.6in}
%\setlength{\rightmargin}{0in}
%\setlength{\topmargin}{-0.4in}
\setlength{\headheight}{0.2in}
\setlength{\headsep}{0.05in}
%\setlength{\topskip}{0.0in}
%\setlength{\footskip}{12pt}
%\setlength{\textwidth}{5in}
%\setlength{\textheight}{9.6in}
\setlength\abovedisplayskip{5pt}
\setlength\belowdisplayskip{5pt}
\usepackage[width = 6.9in, left = 0.85in, top = 0.47in, bottom = 0in, right = .75in]{geometry}
\pagestyle{fancy}
\setlength\parindent{0pt}
\setlength{\voffset}{0pt}
\setlength{\hoffset}{0pt}
%\setstretch{1.246}
\setlength{\parskip}{3.5pt}
%\newenvironment{absolutelynopagebreak}
% {\par\nobreak\vfil\penalty0\vfilneg
% \vtop\bgroup}
%{\par\xdef\tpd{\the\prevdepth}\egroup
%\prevdepth=\tpd}
\makeatletter
\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\begin{document}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%*******************************include the preamble here******************************
%\input{m3preliminaries.tex}
\lhead{\bf Math 3 \hspace{.1in} 2021 - 2022}
\rhead{\bf Name: \hspace{1.5 in}\ \ }
%\lfoot{\eightrm June 15, 2015}
%\lfoot{\eightrm \today}
\lfoot{\eightrm }
\rfoot{\eightrm }
\cfoot{ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%\vspace*{0.12in}
\noindent
%****************************Choose what to print**********************************
%the problems, put #1 in the braces
\newcommand{\stateproblem}[1]{#1}
%the answers, put #1 in the braces
\newcommand{\stateanswer}[1]{}
%the commentary, put #1 in the braces
\newcommand{\statecomment}[1]{}
\newcommand{\ovec}{\overrightarrow}
\newcommand{\ds}{\displaystyle}
\newcommand{\Cdot}{\raisebox{1 pt}{\scalebox{.5}{$\bullet$}}}
\newcommand{\p}{^\prime}
%\newcommand{\href[2]}{\underline{#2}}
%*************************print only the answers in groups of 10**********************
%\newcommand{\stateproblem}[1]{}
%\newcounter{anscounter}
%\newcommand{\stateanswer}[1]{
% \addtocounter{anscounter}{1}
% \pgfmathparse{mod(\value{anscounter},10)}
% \pgfmathtruncatemacro{\myint}{ \pgfmathresult}
% \ifnum \myint=1 \filbreak\par\indent\rlap \fi
% %{\textbf{\arabic{probcounter}}.}\hskip 1pt~#1
% {\textbf{\arabic{probcounter}}.}~#1
% \ifnum \myint=0 \vskip .25in \fi
%}
%\newcommand{\statecomment}[1]{}
%KW shorcuts
\newcommand{\mbf}{\mathbf}
\newcommand{\mbb}{\mathbb}
\makeatletter
\newcommand*\MY@leftharpoonupfill@{%
\arrowfill@\leftharpoonup\relbar\relbar
}
\newcommand*\MY@rightharpoonupfill@{%
\arrowfill@\relbar\relbar\rightharpoonup
}
% These are not needed, for now:
% \newcommand*\MY@leftharpoondownfill@{%
% \arrowfill@\lefttharpoondown\relbar\relbar
% }
% \newcommand*\MY@rightharpoondownfill@{%
% \arrowfill@\relbar\relbar\rightharpoondown
% }
\newcommand*\overleftharpoon{%
\mathpalette{\overarrow@\MY@leftharpoonupfill@}%
}
\newcommand*\overrightharpoon{%
\mathpalette{\overarrow@\MY@rightharpoonupfill@}%
}
% Support for smaller size arrows:
\newcommand*\@dblsty@mathpalette[2]{%
% Works like "\mathpalette", but macro passed in #1 must take
% (at least) three arguments, of which the first _two_ are
% style selections.
\mathchoice
{#1\displaystyle \scriptstyle {#2}}%
{#1\textstyle \scriptstyle {#2}}%
{#1\scriptstyle \scriptscriptstyle {#2}}%
{#1\scriptscriptstyle \scriptscriptstyle {#2}}%
}
\newcommand*\@dblsty@overarrow@[4]{%
% #1 := stretchable covering arrow
% #2 := base style
% #3 := style for covering arrow
% #4 := base symbol
\vbox{\ialign{##\crcr
#1#3\crcr
\noalign{\nointerlineskip}%
$\m@th\hfil #2#4\hfil$\crcr
}}%
}
\newcommand*\smalloverleftharpoon{%
\@dblsty@mathpalette{\@dblsty@overarrow@\MY@leftharpoonupfill@}%
}
\newcommand*\smalloverrightharpoon{%
\@dblsty@mathpalette{\@dblsty@overarrow@\MY@rightharpoonupfill@}%
}
\makeatother
\newcommand{\kw}{}
\pagenumbering{arabic}
%\begin{textblock*}{5.15in}(0in, -0.05in) \label{prob40_0001} \input{prob_files/prob40_0001.tex} \end{textblock*}
答案1
这是引用问题的重复,并且适用相同的答案,但我会将其添加到您的示例文档中。我还在序言行中添加了一些注释。
\let\latexput\put
\documentclass[twoside, 10pt]{article}
\RequirePackage{latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
%%%NO! \usepackage{etex}
\usepackage{harpoon}
%%%NO! \usepackage[ascii, latin1]{inputenc}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{xfrac}
\usepackage{comment}
\usepackage{enumitem}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{amsthm}
\usepgflibrary{fpu}
\usepackage{siunitx}
% I wouldn't \usepackage{commath}
\usepackage[T1]{fontenc}
\usepackage{comment}
%\usepackage{subcaption}
\usepackage[caption = false]{subfig}
\usetikzlibrary{arrows,decorations.pathmorphing,decorations.markings,backgrounds,positioning,fit,petri}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{float}
\restylefloat{table}
\usepackage{placeins}
\usepackage{booktabs}
\usepackage{afterpage}
\usepackage{pgfmath}
\usepackage{m-pictex}
\usepackage{pictexwd}
\usepackage{background}
\usepackage{pictex}
\let\pictexput\put
\let\put\latexput
\usepackage{textpos}
%%%NO! \input pictex
% I don't have this file \input{norm_background_files/rlpmacros}
\backgroundsetup{placement=center,angle=0,scale=1,opacity=25,
%contents=\includegraphics{GridBCD4E6_plain_math}}
%contents=\includegraphics{norm_background_files/GridBCD4E6}}
%contents=\includegraphics{norm_background_files/GridBCD4E6_no_rb}}
contents=\includegraphics{example-image}}
%%%NO! \font\ninerm=cmr9
%%%NO! \font\ninei=cmmi9
%%%NO! \font\nines=cmsy9
%%%NO! \font\eightrm=cmr8
%%%NO! \font\eighti=cmmi8
%%%NO! \font\eights=cmsy8
\parindent=0pt
\newcounter{probcounter}
\newcounter{pagecounter}
%*****************************Print Margin Notes************************
%option 0: do not print margin notes
%option 1: print margin notes
\def\printmarginnotes{1}
%\setlength{\textwidth}{5in}
%\setlength{\leftmargin}{-0.6in}
%\setlength{\rightmargin}{0in}
%\setlength{\topmargin}{-0.4in}
\setlength{\headheight}{0.2in}
\setlength{\headsep}{0.05in}
%\setlength{\topskip}{0.0in}
%\setlength{\footskip}{12pt}
%\setlength{\textwidth}{5in}
%\setlength{\textheight}{9.6in}
\setlength\abovedisplayskip{5pt}
\setlength\belowdisplayskip{5pt}
\usepackage[width = 6.9in, left = 0.85in, top = 0.47in, bottom = 0in, right = .75in]{geometry}
\pagestyle{fancy}
\setlength\parindent{0pt}% You already did this above
\setlength{\voffset}{0pt}
\setlength{\hoffset}{0pt}
%\setstretch{1.246}
\setlength{\parskip}{3.5pt}
%\newenvironment{absolutelynopagebreak}
% {\par\nobreak\vfil\penalty0\vfilneg
% \vtop\bgroup}
%{\par\xdef\tpd{\the\prevdepth}\egroup
%\prevdepth=\tpd}
\makeatletter
\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\begin{document}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%*******************************include the preamble here******************************
%\input{m3preliminaries.tex}
\lhead{\bfseries Math 3 \hspace{.1in} 2021 - 2022} % \bfseries \bf has not been defined by default on latex for 30 years
\rhead{\bfseries Name: \hspace{1.5 in}\ \ }
%\lfoot{\eightrm June 15, 2015}
%\lfoot{\eightrm \today}
\lfoot{\footnotesize }% latex font commands
\rfoot{\footnotesize }% although the font is irrelevant since there is no text.
\cfoot{ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%\vspace*{0.12in}
%%%NO! \noindent
%****************************Choose what to print**********************************
%the problems, put #1 in the braces
\newcommand{\stateproblem}[1]{#1}
%the answers, put #1 in the braces
\newcommand{\stateanswer}[1]{}
%the commentary, put #1 in the braces
\newcommand{\statecomment}[1]{}
\newcommand{\ovec}{\overrightarrow}
\newcommand{\ds}{\displaystyle}
\newcommand{\Cdot}{\raisebox{1 pt}{\scalebox{.5}{$\bullet$}}}
\newcommand{\p}{^\prime}% why? it is simplet to use '
%\newcommand{\href[2]}{\underline{#2}}
%*************************print only the answers in groups of 10**********************
%\newcommand{\stateproblem}[1]{}
%\newcounter{anscounter}
%\newcommand{\stateanswer}[1]{
% \addtocounter{anscounter}{1}
% \pgfmathparse{mod(\value{anscounter},10)}
% \pgfmathtruncatemacro{\myint}{ \pgfmathresult}
% \ifnum \myint=1 \filbreak\par\indent\rlap \fi
% %{\textbf{\arabic{probcounter}}.}\hskip 1pt~#1
% {\textbf{\arabic{probcounter}}.}~#1
% \ifnum \myint=0 \vskip .25in \fi
%}
%\newcommand{\statecomment}[1]{}
%KW shorcuts
\newcommand{\mbf}{\mathbf}
\newcommand{\mbb}{\mathbb}
\makeatletter
\newcommand*\MY@leftharpoonupfill@{%
\arrowfill@\leftharpoonup\relbar\relbar
}
\newcommand*\MY@rightharpoonupfill@{%
\arrowfill@\relbar\relbar\rightharpoonup
}
% These are not needed, for now:
% \newcommand*\MY@leftharpoondownfill@{%
% \arrowfill@\lefttharpoondown\relbar\relbar
% }
% \newcommand*\MY@rightharpoondownfill@{%
% \arrowfill@\relbar\relbar\rightharpoondown
% }
\newcommand*\overleftharpoon{%
\mathpalette{\overarrow@\MY@leftharpoonupfill@}%
}
\newcommand*\overrightharpoon{%
\mathpalette{\overarrow@\MY@rightharpoonupfill@}%
}
% Support for smaller size arrows:
\newcommand*\@dblsty@mathpalette[2]{%
% Works like "\mathpalette", but macro passed in #1 must take
% (at least) three arguments, of which the first _two_ are
% style selections.
\mathchoice
{#1\displaystyle \scriptstyle {#2}}%
{#1\textstyle \scriptstyle {#2}}%
{#1\scriptstyle \scriptscriptstyle {#2}}%
{#1\scriptscriptstyle \scriptscriptstyle {#2}}%
}
\newcommand*\@dblsty@overarrow@[4]{%
% #1 := stretchable covering arrow
% #2 := base style
% #3 := style for covering arrow
% #4 := base symbol
\vbox{\ialign{##\crcr
#1#3\crcr
\noalign{\nointerlineskip}%
$\m@th\hfil #2#4\hfil$\crcr
}}%
}
\newcommand*\smalloverleftharpoon{%
\@dblsty@mathpalette{\@dblsty@overarrow@\MY@leftharpoonupfill@}%
}
\newcommand*\smalloverrightharpoon{%
\@dblsty@mathpalette{\@dblsty@overarrow@\MY@rightharpoonupfill@}%
}
\makeatother
\newcommand{\kw}{}
\pagenumbering{arabic}
%\begin{textblock*}{5.15in}(0in, -0.05in) \label{prob40_0001} \input{prob_files/prob40_0001.tex} \end{textblock*}
xxx
\end{document}