![無論我做什麼,都會出現此錯誤 TeX 容量超出,抱歉 [輸入堆疊大小 = 5000]。請幫忙](https://rvso.com/image/423759/%E7%84%A1%E8%AB%96%E6%88%91%E5%81%9A%E4%BB%80%E9%BA%BC%EF%BC%8C%E9%83%BD%E6%9C%83%E5%87%BA%E7%8F%BE%E6%AD%A4%E9%8C%AF%E8%AA%A4%20TeX%20%E5%AE%B9%E9%87%8F%E8%B6%85%E5%87%BA%EF%BC%8C%E6%8A%B1%E6%AD%89%20%5B%E8%BC%B8%E5%85%A5%E5%A0%86%E7%96%8A%E5%A4%A7%E5%B0%8F%20%3D%205000%5D%E3%80%82%E8%AB%8B%E5%B9%AB%E5%BF%99.png)
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{answers}
\usepackage{amsmath}
\usepackage{attachfile}
\usepackage{todo}
\usepackage{hyper}
\Newassociation{sol}{Solution}{ans}
\newtheorem{ex}{Exercise}
\title{Packages in LATEX}
\author{anandajiththarol }
\date{November 2020}
\begin{document}
\maketitle
\section{answers}
Answers is package used to create question and answer sheet using latex very easily.This package is a modification of the previous style option answers,which has been in use for a few years, and was based upon the TEXbook idea of binding solutions to exercises.
\newline
\textbf{\textit{Example:}}
\Opensolutionfile{ans}[ans1]
\subsection{Problems}
\begin{ex}
First exercise
\begin{sol}
First solution.
\end{sol}
\end{ex}
\begin{ex}
Second exercise
\begin{sol}
Second solution.
\end{sol}
\end{ex}
\Closesolutionfile{ans}
\subsection{Solutions}
\input{ans1}
\section{newcommand}
Newcommand is a latex package to define new macros. Only one argument can be designated as optional, it must be the first argument, and it must appear within square brackets. Defining macros that take multiple optional arguments or in which an optional argument appears in the middle of the argument list is possible but is somewhat complicated.
\newline
\textbf{\textit{Example}}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{align*}
x &=ut+\frac{1}{2}*(at^2)\\
x &=\frac{1}{2}*gt^2\\
g &=\frac{2x}{t^2} \numberthis\label{eq1}
\end{align*}
In the above quation a custom macro, numberthis is used to label an equation.
\section{Attachfile}
his package defines an attachfilecommand that lets you attach arbitrary files to a pdf document. These files are embedded right in the pdf file, so they get transmitted along with it. The package also gives you control over the corresponding icon’s properties and various other associated metadata.
\newline
\textbf{\textit{Example}}
\attachfile{attach.txt}\\
Here a sample txt is attached to the document using the attchfile package.\\
\end{document}
答案1
我以前從未見過這個hyper
包裹。這似乎是問題所在。看看這個hyper
包已經20年沒有更新了。使用更現代的hyperref
軟體包可能是一個更好的主意。請記住,hyperref
必須作為最後一個包加載(有少量例外)。