There seems to be a clash between hyperref
and accents
. Reduced MWE:
\documentclass{article}
\usepackage{accents}
\usepackage{hyperref}
\begin{document}
\subsection{Estimate on $\tilde{\alpha}$}
\end{document}
Commenting out either of \usepackage{accents}
and \usepackage{hyperref}
removes the error (but does not solve the problem).
I am trying to use accents package in my document and when I include
\usepackage{accents}
to my original document, I got an error as
! TeX capacity exceeded, sorry [input stack size=5000]. \HyPsd@@LetCommand l.205 \begin{lemma}
! ==> Fatal error occurred, no output PDF file produced!
I tried to open a fresh document and copied the initial parts (up to \begin{document}
).
I am including \usepackage{accents}
to same line as in my original document and there is no error.
I don't really know what to include here but I can provide any information that might be useful.
Let me add;
End of Log File
(./epsilon_closeloop.toc
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <10> on input line 7.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <7> on input line 7.
)
\tf@toc=\write6
\openout6 = `epsilon_closeloop.toc'.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info: Try loading font information for T1+lmtt on input line 187.
(/usr/share/texmf/tex/latex/lm/t1lmtt.fd
File: t1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
! TeX capacity exceeded, sorry [input stack size=5000].
<to be read again>
\HyPsd@@LetCommand
l.205 \begin{lemma}
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of TeX's memory you used:
15098 strings out of 494923
238621 string characters out of 6180741
684258 words of memory out of 5000000
18040 multiletter control sequences out of 15000+600000
54559 words of font info for 52 fonts, out of 8000000 for 9000
175 hyphenation exceptions out of 8191
5000i,18n,8735p,922b,742s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
Lemma part
\subsection{Estimate on $\mc{W}_2(\mu_t^{N,\a,\t\a},\bar{\mu}_t^{N,\a})$}
\begin{lemma}
\begin{equation}
\frac{1}{N}\sum_j |X_t^{N,\a,\t\a,j} - \bar{X}_t^{N,\a,j}|^2 \leq
\delta^2 + \int_0^t \mc{W}_2^2(\mu_s^{N,\a,\t\a},\mu_s^\a)
\end{equation}
\end{lemma}
Lemma part End
Full Preamble
\documentclass[reqno]{amsart}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{accents}
\usepackage{lmodern}
\usepackage{mathtools} %%used for \usetagform{roman}
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,%
linkcolor=teal,%
urlcolor=teal%
}%
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{amsthm} % for proof environment.
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{float}
\usepackage[backend=biber]{biblatex}
\usepackage{showlabels}%For writing purposes. Comment at the end.
\usepackage[left=1.2in,right=1.2in,top=1in,bottom=1in]{geometry}
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true}
\newcommand{\reqnomode}{\tagsleft@false}
\makeatother
\newcommand{\weak}{\Rightarrow}
\newcommand{\ind}[1]{{\bf 1}_{\left\{ {#1} \right\}} }
\newcommand{\mb}[1]{\mathbb{#1}}
\newcommand{\mc}[1]{\mathcal{#1}}
%% \newcommand{\an}{\{a_n\}_{n=0}^{\infty}}
%% \DeclareMathOperator{\csch}{csch}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator*{\esssup}{ess\,sup}
\DeclareMathOperator*{\supp}{supp}
%% Stochastic Specific
\def\a{\alpha}
\def\t{\tilde}
\def\b{\overline} % First defined for bar.
\def\h{\hat}
\def\ub{\underline} %First defined for underbar, however underbar
%converts to text mode!
%% \newcommand{\ub}[1]{\underaccent{\bar}{#1}} %%Requires accents package.
\newtagform{roman}[\renewcommand{\theequation}{\roman{equation}}]()
\title{Close Loop}
\date{\today}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem} %%included in init
\newtheorem*{theorem*}{Theorem}
\newtheorem{lemma}{Lemma} %%included in init
\newtheorem*{lemma*}{Lemma}
\theoremstyle{definition}
\newtheorem{definition}{Definition} %%included in init
\newtheorem{note}{Note} %%included in init
\newtheorem{example}{Example} %%included in init
\newtheorem{algorithm}{Algorithm}
\newtheorem{assumption}{Assumption} %%included in init
Full Preamble
\documentclass{article} \usepackage{accents} \usepackage{hyperref} \begin{document} \subsection{Estimate on $\tilde{\alpha}$} \end{document}
. Dropping either\usepackage{accents}
or\usepackage{hyperref}
makes the error go away (but does of course not solve the problem). I will edit your question by adding this MWE at the beginning but you can of course reverse the edit (yet I think it will be cleaner to remove everything else, at least temporarily).\documentclass{article} \usepackage{hyperref} \let\oldtilde\tilde \usepackage{accents} \begin{document} \subsection{Estimate on $\oldtilde{\alpha}$} \end{document}
. So you could add\let\t\tilde
before loading\usepackage{accents}
and remove\def\t{\tilde}
from your document. This should remove this error. Having said this, I would like to discourage you from defining one-letter macros in the way you do.\def\a
,\def\t
,\def\b
,\def\h
, etc. You should initialize one letter macros with\newcommand
and if that gives errors because they're already defined, don't redefine them, they are most likely needed for font/input specific stuff.