"정의되지 않은 제어 시퀀스" heisenbug

"정의되지 않은 제어 시퀀스" heisenbug

아래 파일을 편집하고 있는데 "정의되지 않은 제어 시퀀스" 오류가 발생하기 시작했습니다. 문제는 코드에 오류가 있다고 생각하지 않는다는 것입니다. 실제로 항목 6에서는 두 번째 수학 디스플레이가 첫 번째에서 복사되지만 두 번째 줄이 있으면 오류가 발생하지만 두 번째 줄을 삭제하고 첫 번째 줄만 있으면 오류가 발생하지 않습니다. 마찬가지로 파일의 다른 임의 부분을 삭제하면 파일이 제대로 컴파일됩니다. 내 생각엔 이것이 소프트웨어 어딘가의 버그일 수도 있지만 이를 처리하는 방법을 잘 모르겠습니다. 텍스메이커 4.5를 사용하고 있습니다. 누군가 이 문제를 해결하는 방법이나 버그를 보고할 수 있는 그룹을 알려줄 수 있다면 좋을 것입니다. 오류 및 코드는 아래와 같습니다.

! Undefined control sequence.
\f@ncyorh ->\myauthor 
                      \strut 
l.120 \end{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.
[2] (./PainRankinErrata.aux) )
Here is how much of TeX's memory you used:
13472 strings out of 493089
262778 string characters out of 6134842
311803 words of memory out of 5000000
16685 multiletter control sequences out of 15000+600000
6590 words of font info for 26 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
55i,12n,67p,425b,262s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2015/texmf-dist/fonts/type1/p
ublic/amsfonts/cm/cmmi10.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmmi7.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/publ
ic/amsfonts/cm/cmr10.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public
/amsfonts/cm/cmr5.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/am
sfonts/cm/cmr7.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmss10.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfon
ts/cm/cmsy10.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfont
s/cm/cmsy7.pfb></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/
cm/cmti10.pfb>
Output written on PainRankinErrata.pdf (2 pages, 86516 bytes).
PDF statistics:
50 PDF objects out of 1000 (max. 8388607)
36 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
13 words of extra memory for PDF output out of 10000 (max. 10000000)

그리고 코드

\documentclass[10pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{comment}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{calc}
\pagestyle{fancy}
\usepackage{enumerate}

\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\erfc}{erfc}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\I}{\mathbb{I}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\lb}{\lbrace}
\newcommand{\rb}{\rbrace}
\newcommand{\exist}{\exists}
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\seq}[1]{\left\lb#1\right\rb}

\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}

\newcommand{\mytitle}{Errata for Introduction to Vibrations and Waves by H. J. Pain and Patricia Rankin}
\newcommand{\mydate}{February 11, 2018}

\newcommand{\mymaketitle}{
\centering{\mytitle\\
\mydate\\
}
}

\lhead{\mydate}
\chead{\mytitle}
\rhead{\myauthor}

\begin{document}\thispagestyle{empty}

\mymaketitle
\bigskip
\begin{enumerate}
\item Page 9, Worked Example. The following text\\
\bigskip
\fbox{\begin{minipage}{4 in}
In Figure 1.1(g) the energy equation is
\begin{gather*}
E = \frac{1}{2}m\dot x^2 + A\rho gx^2\\
\frac{\mathrm{d}E}{\mathrm{d}t} = (m\ddot x + 2A\rho gx)\dot x = 0\\
m\ddot x + sx = 0
\end{gather*}
with
\begin{gather*}
s=2A\rho g\\
\omega^2 = \frac{2A\rho g}{m} = \frac{2g}{l}
\end{gather*}
\end{minipage}}\\
\bigskip
should be replaced with\\
\bigskip
\fbox{\begin{minipage}{4 in}
In Figure 1.1(g) the energy equation is
\begin{gather*}
E = \frac{1}{2}m\dot x^2 + \frac{1}{2}A\rho gx^2\\
\frac{\mathrm{d}E}{\mathrm{d}t} = (m\ddot x + A\rho gx)\dot x = 0\\
m\ddot x + sx = 0
\end{gather*}
with
\begin{gather*}
s=A\rho g\\
\omega^2 = \frac{A\rho g}{m} = \frac{g}{l}
\end{gather*}
\end{minipage}}\\
\bigskip
This makes the formula for $\omega^2$ match that in Figure 1.1(g).

\item Page 12, Figure 1.5. Change the label

\begin{equation*}
\mathsf{L\dot q + \frac{q}{c} = 0}
\end{equation*}
to
\begin{equation*}
\mathsf{L\ddot q + \frac{q}{c} = 0}
\end{equation*}
\item Page 14, Figure 1.6. Change the angle for $\phi_2$ to indicate the angle between the x-axis and the vector with length $a_2$.
\item Page 18, Problem 1.10. Change ``a spring of length \textit{1}'' to ``a spring of length $l$''.
\item Page 35, last line. Change
\begin{equation*}
A^2 = A_0^2 e^{(-rt/2m)^2}
\end{equation*}
to
\begin{equation*}
A^2 = A_0^2 (e^{-rt/2m})^2
\end{equation*}

\item Page 37, first equation. Change
\begin{equation*}
-\Delta E = \frac{\mathrm{d}E}{\mathrm{d}t} \Delta t = \frac{-r}{m} E \frac{1}{\nu'}
\end{equation*}
to
\begin{equation*}
-\Delta E = \frac{\mathrm{d}E}{\mathrm{d}t} \Delta t = \frac{-r}{m} E \frac{1}{\nu'}
\end{equation*}

\item Page 39, Worked Example solution, first line. Change ``Critical dumping:'' to ``Critical damping:''.
\end{enumerate}

\begin{flushleft}

\end{flushleft}

\end{document}

답변1

오류 메시지를 보면,

! Undefined control sequence.
\f@ncyorh ->\myauthor 
                      \strut 

\myauthor이는 명령 (TeX 전문 용어로 제어 순서)이 정의되지 않았다는 의미입니다 . 그리고 문서를 보면 \mytitle및 을(를) 정의 \mydate하지만 은(는) 정의하지 않습니다 \myauthor.

이 버그는 "멋진" 헤더를 빌드할 때만 발생하기 때문에 Heisenbug처럼 보입니다. 첫 번째 페이지에는 머리글이나 바닥글( )이 없으므로 \thispagestyle{empty}문서가 다른 페이지를 생성할 만큼 충분히 긴 경우에만 발생합니다.

\f@ncyorh"멋진"(사실상 패키지의 내부 "변수" 및 "함수"는 fancyhdr다른 패키지와의 충돌을 피하기 위해 해당 접두사와 함께 저장됨)을 상기시키기 때문에 의심할 수 있습니다 .

그래서

\newcommand{\myauthor}{user109923} 

그것을 고칠 것입니다.

관련 정보