找不到 nag 识别的问题

找不到 nag 识别的问题

我对 LaTeX 还不太熟悉,但目前正在做一个项目(尝试使用 pdflatex 自动渲染 .pdf 报告)。我刚刚了解到

\RequirePackage[l2tabu, orthodox]{nag}

今天,我根据它的建议做了很多修改,但仍然有四个抱怨被报告,我找不到原因。有人能告诉我我还需要做什么来修复我的源文档吗?

我正在运行 texlive 并在 Ubuntu Server 12.04 LTS 和另一个基于 Debian 的安装上获得相同的结果。

-

以下是一些令人烦恼的错误:

软件包 nag 警告:命令 \sl 是旧的 LaTeX 2.09 命令。(nag)在输入行 131 上改用 \slshape 或 \textsl。

软件包 nag 警告:命令 \sl 是旧的 LaTeX 2.09 命令。(nag)在输入行 131 上改用 \slshape 或 \textsl。

软件包 nag 警告:命令 \sl 是旧的 LaTeX 2.09 命令。(nag)在输入行 209 上改用 \slshape 或 \textsl。

软件包 nag 警告:命令 \sl 是旧的 LaTeX 2.09 命令。(nag)在输入行 209 上改用 \slshape 或 \textsl。

包裹抱怨警告:共计 4 起投诉。

清理后的源文件:

\RequirePackage[l2tabu, orthodox]{nag}

\documentclass[11pt,letterpaper]{article}
\usepackage[top=0.4in,left=0.5in,right=0.5in,bottom=0.5in,includehead,includefoot]{geometry}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{tabulary}
\usepackage{longtable,tabu,booktabs}
\usepackage{calc}
\usepackage{lastpage}

\pagestyle{fancy}

\newlength{\defaultparindent}
\setlength{\defaultparindent}{\the\parindent}

\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}

\begin{document}
\setlength{\parindent}{0pt}
\setlength\headheight{18pt}
\renewcommand{\headrulewidth}{0pt}
\chead{\textbf{\Large Board~of~Revision~Standard~Report}}
\cfoot{\textbf{Page \thepage\ of \pageref{LastPage}}}

\begin{minipage}{\textwidth}
\begin{center}
\section*{Salient~Facts\label{sec:salientfacts}}
\end{center}

\begin{tabulary}{\textwidth}{rLrL}
Case~\#:&2012-xxxxx&\hspace{1em}Phone:&\mbox{removed}\\
Owner: &REMOVED&Agent:&\\
Appraiser:&ZEIGLER JR., GARY&&\\
\end{tabulary}
\vspace{\baselineskip}

\begin{center}
\textbf{Address:}~~REMOVED
\end{center}
\end{minipage}

\vspace{-1.0\baselineskip}

\begin{center}
\begin{longtabu} to \textwidth {rlrrrrr}
\toprule
&\textbf{Parcel}&\textbf{Land}&\textbf{Building}&\textbf{OBXF}&\textbf{TOTAL}&\textbf{Sought~Value}\\
\cmidrule{2-7}
\endfirsthead
\multicolumn{7}{l}{{\ldots continued from previous page}}\\
&\textbf{Parcel}&\textbf{Land}&\textbf{Building}&\textbf{OBXF}&\textbf{TOTAL}&\textbf{Sought~Value}\\
\cmidrule{2-7}
\endhead
\addlinespace
\multicolumn{7}{r}{{Continued on next page\ldots}}\\
\endfoot
\bottomrule
\endlastfoot
1.)&removed&\$7,300&\$26,100&\$0&\$33,400&\$8,000\\
\cmidrule{2-7}
\addlinespace
&TOTALS&\$7,300&\$26,100&\$0&\$33,400&\textbf{\$8,000}\\
\end{longtabu}
\end{center}

\vspace{-2.0\baselineskip}

\begin{center}
\section*{Sale~History~(for~past~three~years)\label{sec:salehistory}}
\end{center}
\nopagebreak
\vspace{-1.0\baselineskip}
\nopagebreak
\begin{center}
\begin{longtabu}to \textwidth{X[l]X[l]crrcc}
\toprule
\textbf{Grantor~(Seller)}&\textbf{Grantee~(Buyer)}&\textbf{Date}&\textbf{Sale~Price}&\textbf{\#}&\textbf{AL}&\textbf{Qual}\\
\midrule
\endfirsthead
\multicolumn{7}{l}{{Continued from previous page\ldots}}\\
\textbf{Grantor~(Seller)}&\textbf{Grantee~(Buyer)}&\textbf{Date}&\textbf{Sale~Price}&\textbf{\#}&\textbf{AL}&\textbf{Qual}\\
\midrule
\endhead
\addlinespace
\multicolumn{7}{r}{{Continued on next page\ldots}}\\
\endfoot
\bottomrule
\endlastfoot
\multicolumn{7}{c}{{No Sales in the past three years}}\\
\end{longtabu}
\end{center}

\begin{tabu} to \textwidth{lXr}
Split/Combine/Annex:&&N/A\\
Prior~Board~of~Revision:&&N/A\\
Nature~of~Complaint:&&OVERVALUATION\\
\end{tabu}

\vspace{2.0\baselineskip}

\begin{minipage}{\textwidth}
\begin{center}
\section*{Attachments\label{sec:attachments}}
\end{center}

\begin{center}
\begin{tabu} to \textwidth{lc}

\end{tabu}
\end{center}
\end{minipage}

\vspace{2.0\baselineskip}

\begin{minipage}{\textwidth}
\begin{center}
\section*{Index\label{sec:index}}
\end{center}

\begin{center}
\begin{tabu}{lc}
Salient Facts&Page \pageref{sec:salientfacts}\\
Sale History&Page \pageref{sec:salehistory}\\
Attachments&Page \pageref{sec:attachments}\\
Appraiser Findings&Page \pageref{sec:appraiserfindings}\\
\end{tabu}
\end{center}
\end{minipage}

\newpage
\begin{center}
\section*{Appraiser Findings\label{sec:appraiserfindings}}
\end{center}
\textbf{Inspection~Type:}~~\hfill \textbf{Insp.~Date:}~~\hfill \textbf{Present~at~Inspection:}~~

\vspace{\baselineskip}

\begin{minipage}{\textwidth}
\textbf{Did you make any changes/corrections to the property record as a result of the inspection noted above? (if yes, please list changes)}

\hspace{\the\defaultparindent}


\end{minipage}
\vspace{\baselineskip}

\begin{minipage}{\textwidth}
\textbf{Did you contact the complainant regarding the complaint? (if yes, specify date and nature of \mbox{contact})}

\hspace{\the\defaultparindent}

\end{minipage}
\vspace{\baselineskip}

\begin{minipage}{\textwidth}
\textbf{What evidence did you consider when reviewing the value for this property?}

\hspace{\the\defaultparindent}

\end{minipage}
\vspace{\baselineskip}

\begin{minipage}{\textwidth}
\textbf{Briefly explain all the facts considered and conclusions you made regarding the validity of the evidence submitted along with any evidence you have provided through your work:}

\hspace{\the\defaultparindent}

\end{minipage}
\vspace{\baselineskip}

\textbf{Please state your recommendation of value below:}
\nopagebreak
\vspace{\baselineskip}
\nopagebreak
\begin{center}
\begin{longtabu} to \textwidth {rlrrrr}
\toprule
&\textbf{Parcel}&\textbf{Land}&\textbf{Building}&\textbf{OBXF}&\textbf{TOTAL}\\
\cmidrule{2-6}
\endfirsthead
\multicolumn{6}{l}{{\ldots continued from previous page}}\\
&\textbf{Parcel}&\textbf{Land}&\textbf{Building}&\textbf{OBXF}&\textbf{TOTAL}\\
\cmidrule{2-6}
\endhead
\addlinespace
\multicolumn{6}{r}{{Continued on next page\ldots}}\\
\endfoot
\bottomrule
\endlastfoot
1.)&REMOVED&\$0&\$0&\$0&\$0\\

\cmidrule{2-6}
\addlinespace
&TOTALS&\$0&\$0&\$0&\textbf{\$0}\\
\end{longtabu}
\end{center}

\begin{tabu} to \textwidth{lXr}
Respectfully Submitted,&&\\
\\
\includegraphics[draft]{removed.png}&&\includegraphics[draft]{removed.png}\\
\\
ZEIGLER JR., GARY&&FROST, JASON\\
\\
Appraiser&&Reviewer\\
\end{tabu}

\end{document}

答案1

在这种情况下,问题不在于你,而在于fancyhdr.sty使用旧的字体命令:

\if@twoside
  \fancyhead[el,or]{\fancyplain{}{\sl\rightmark}}
  \fancyhead[er,ol]{\fancyplain{}{\sl\leftmark}}
\else
  \fancyhead[l]{\fancyplain{}{\sl\rightmark}}
  \fancyhead[r]{\fancyplain{}{\sl\leftmark}}
\fi

这些线应该是

\if@twoside
  \fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}}
  \fancyhead[er,ol]{\fancyplain{}{\slshape\leftmark}}
\else
  \fancyhead[l]{\fancyplain{}{\slshape\rightmark}}
  \fancyhead[r]{\fancyplain{}{\slshape\leftmark}}
\fi

由于问题实际上不是来自您的文档,所以真正受到困扰的是的作者fancyhdr;为了防止投诉,请\fancyhf{}在定义之前使用(清除所有预定义字段,特别是产生投诉的字段):

\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\chead{\textbf{\Large Board~of~Revision~Standard~Report}}
\cfoot{\textbf{Page \thepage\ of \pageref{LastPage}}}

顺便说一句,最好使用更现代的界面\fancyhead\fancyfoot例如

\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[C]{\textbf{\Large Board~of~Revision~Standard~Report}}
\fancyfoot[C]{\textbf{Page \thepage\ of \pageref{LastPage}}}

相关内容