我对 Latex 还比较陌生。我在标题方面遇到了问题。在我的文档中,标题在“目录”、“图片列表”、“表格列表”部分工作正常,但在“首字母缩略词”部分,我看到标题为表格列表(上一节的标题)。之后,章节中的标题可以正常工作。如何摆脱它。
我提供了一个最小工作示例,其中只有目录和缩写,可以看到这个问题。在最小工作示例中,首字母缩略词的标题是内容。
文档类别: 双面书
最小工作示例:
\documentclass[a4paper,11pt,twoside]{book}
\usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr
\usepackage[printonlyused]{acronym}
\fancyhead{}
\fancyfoot{}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot{}
\fancyhead[LE,RO]{\small \thepage}
\fancyhead[RE]{\small \slshape \leftmark}
\fancyhead[LO]{\small \slshape \rightmark}
\def\headrulewidth{0.4pt}
\def\footrulewidth{0 pt}
\begin{document}
\tableofcontents
\chapter*{List of Acronyms}
\addcontentsline{toc}{chapter}{List of Acronyms}
\begin{acronym}[SEPSEPSEP]
\setlength{\itemsep}{-0.3\parsep}
%A
\acro{ack}[ACK]{acknowledgement}
\acro{ann}[ANN]{Arificial Neural Network}
\acro{ap}[AP]{Access Point}
\acro{aqm}[AQM]{Active Queue Management}
\acro{arp}[ARP]{Address Resolution Protocol}
\acro{auc}[AUC]{Area under the ROC curve}
%B
\acro{ber}[BER]{Bit Error Rate}
%C
\acro{cbr}[CBR]{Constant Bit Rate}
\acro{cdn}[CDN]{Content Distribution Networks}
\acro{ci}[CI]{Confidence Interval}
\acro{codec}[CODEC]{Coder-Decoder}
\acro{cpu}[CPU]{Central Processing Unit}
\acro{cv}[CV]{Cross Validation}
\acro{cts}[CTS]{Clear to Send}
%D
\acro{dash}[DASH]{Dynamic Adaptive Streaming over HTTP}
\acro{dfwmac}[DFWMAC]{distributed foundation wireless MAC}
%E
\acro{edca}[EDCA]{Enhanced Distributed Channel Access}
\acro{eit}[EIT]{Elektro och Informationsteknik}
%F
\acro{fec}[FEC]{Forward Error Correction}
\acro{fifo}[FIFO]{First In First Out}
\acro{ftp}[FTP]{File Transfer Protocol}
%G
%H
\acro{hd}[HD]{High Definition}
\acro{hp}[HP]{Hewlett-Packard}
\acro{http}[HTTP]{Hypertext Transfer Protocol}
%I
\acro{ieee}[IEEE]{Institute of Electrical and Electronics Engineers}
\acro{ietf}[IETF]{Internet Engineering Task Force}
\acro{ip}[IP]{Internet Protocol}
\acro{ipdv}[IPDV]{Inter Packet Delay Variance}
\acro{ippm}[IPPM]{IP Performance metric}
\acro{isp}[ISP]{Internet Service Provider}
\acro{isps}[ISPs]{Internet Service Providers}
\acro{itu}[ITU]{International Telecommunication Union}
\acro{itut}[ITU-T]{International Telecommunication Union - Telecommunication Standardization Sector}
%R
\acro{rbfn}[RBFN]{Radial Basis Function Networks}
\acro{ram}[RAM]{Random Access Memory}
\acro{rat}[RAT]{Radio Access Technology}
\acro{rbf}[RBF]{Radial Basis Function}
\acro{rfc}[RFC]{Request for Comments}
\acro{rfe}[RFE]{Recursive Feature Elimination}
\acro{roc}[ROC]{Receiver Operating Characteristic}
\acro{rssi}[RSSI]{Recieved Signal Strength Indicator}
\acro{rto}[RTOs]{Retransmission Time Outs}
\acro{rts}[RTS]{Request to Send}
\acro{rtt}[RTT]{Round Trip Time}
%S
\acro{sla}[SLA]{Service Level Agreement}
\acro{snr}[SNR]{Signal to Noise Ratio}
\acro{ssim}[SSIM]{Structural Similarity}
\acro{svc}[SVC]{Support Vector Classification}
\acro{svm}[SVM]{Support Vector Machine}
%T
\acro{tcp}[TCP]{Transmission Control Protocol}
\acro{tv}[TV]{Television}
\acro{twamp}[TWAMP]{Two-Way Active Measurement Protocol}
%U
\acro{udp}[UDP]{User Datagram Protocol}
\acro{ue}[UE]{User Equipment}
\acro{umts}[UMTS]{Universal Mobile Telecommunications Services}
\acro{url}[URL]{Uniform Resource Locator}
%V
\acro{vod}[VOD]{Video on Demand}
\acro{voip}[VOIP]{Voice over Internet Protocol}
\acro{vqm}[VQM]{Video Quality Metric}
%W
\acro{wifi}[Wi-Fi]{Wireless Fidelity}
\acro{wlan}[WLAN]{Wireless LAN}
%X
%Y
%Z
\end{acronym}
\chapter{Test}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \ac{wifi} blah blah blah blah blah blah \ac{wlan} blah blah blah blah blah blah \ac{vqm} blah blah blah blah blah blah \ac{voip} blah blah blah \ac{vod} blah blah blah blah blah blah \ac{url} blah blah blah \ac{umts} blah blah blah \ac{tv} blah blah blah \ac{ue} blah blah blah \ac{udp} blah blah blah \ac{twamp} blah blah blah \ac{tcp} blah blah blah \ac{svm} blah blah blah \ac{svc} blah blah blah \ac{ssim} blah blah blah blah blah blah \ac{snr} blah blah blah \ac{sla} blah blah blah \ac{rtt} blah blah blah \ac{rts} blah blah blah \ac{rto} blah blah blah \ac{rssi} blah blah blah {roc} blah blah blah \ac{ann} blah blah blah \ac{ap} blah blah blah \ac{ber} blah blah blah \ac{cbr} blah blah blah \ac{cdn} blah blah blah \ac{cpu} blah blah blah \ac{dash} blah blah blah \ac{eit} blah blah blah \ac{ftp} blah blah blah \ac{hd} blah blah blah \ac{http} blah blah blah \ac{ieee} blah blah blah \ac{ietf} blah blah blah \ac{ip} blah blah blah \ac{ipdv} blah blah blah blah blah blah \ac{isp} blah blah blah \ac{isps} blah blah blah \ac{itu}
\end{document}
生成的 pdf 图像如下所示,错误可以在图 3 中看到,其中标题是内容,尽管它应该是“首字母缩略词列表”,而在图 2 中,标题是正确的,即内容
答案1
您应该使用\frontmatter
和\mainmatter
,但您还需要进行一些调整,因为您使用的fancyhdr
有重新定义 的坏习惯\chaptermark
。
\documentclass[a4paper,11pt,twoside]{book}
\usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr
\usepackage[printonlyused]{acronym}
\fancyhf{}
\fancyhead[LE,RO]{\small \thepage}
\fancyhead[RE]{\small\slshape\leftmark}
\fancyhead[LO]{\small \slshape \rightmark}
\renewcommand\headrulewidth{0.4pt}
\renewcommand\footrulewidth{0pt}
\let\standardchaptermark\chaptermark
\pagestyle{fancy}
\let\chaptermark\standardchaptermark
\begin{document}
\frontmatter
\tableofcontents
\chapter{List of Acronyms}
\begin{acronym}[SEPSEPSEP]
\setlength{\itemsep}{-0.3\parsep}
%A
\acro{ack}[ACK]{acknowledgement}
\acro{ann}[ANN]{Arificial Neural Network}
\acro{ap}[AP]{Access Point}
\acro{aqm}[AQM]{Active Queue Management}
\acro{arp}[ARP]{Address Resolution Protocol}
\acro{auc}[AUC]{Area under the ROC curve}
%B
\acro{ber}[BER]{Bit Error Rate}
%C
\acro{cbr}[CBR]{Constant Bit Rate}
\acro{cdn}[CDN]{Content Distribution Networks}
\acro{ci}[CI]{Confidence Interval}
\acro{codec}[CODEC]{Coder-Decoder}
\acro{cpu}[CPU]{Central Processing Unit}
\acro{cv}[CV]{Cross Validation}
\acro{cts}[CTS]{Clear to Send}
%D
\acro{dash}[DASH]{Dynamic Adaptive Streaming over HTTP}
\acro{dfwmac}[DFWMAC]{distributed foundation wireless MAC}
%E
\acro{edca}[EDCA]{Enhanced Distributed Channel Access}
\acro{eit}[EIT]{Elektro och Informationsteknik}
%F
\acro{fec}[FEC]{Forward Error Correction}
\acro{fifo}[FIFO]{First In First Out}
\acro{ftp}[FTP]{File Transfer Protocol}
%G
%H
\acro{hd}[HD]{High Definition}
\acro{hp}[HP]{Hewlett-Packard}
\acro{http}[HTTP]{Hypertext Transfer Protocol}
%I
\acro{ieee}[IEEE]{Institute of Electrical and Electronics Engineers}
\acro{ietf}[IETF]{Internet Engineering Task Force}
\acro{ip}[IP]{Internet Protocol}
\acro{ipdv}[IPDV]{Inter Packet Delay Variance}
\acro{ippm}[IPPM]{IP Performance metric}
\acro{isp}[ISP]{Internet Service Provider}
\acro{isps}[ISPs]{Internet Service Providers}
\acro{itu}[ITU]{International Telecommunication Union}
\acro{itut}[ITU-T]{International Telecommunication Union - Telecommunication Standardization Sector}
%R
\acro{rbfn}[RBFN]{Radial Basis Function Networks}
\acro{ram}[RAM]{Random Access Memory}
\acro{rat}[RAT]{Radio Access Technology}
\acro{rbf}[RBF]{Radial Basis Function}
\acro{rfc}[RFC]{Request for Comments}
\acro{rfe}[RFE]{Recursive Feature Elimination}
\acro{roc}[ROC]{Receiver Operating Characteristic}
\acro{rssi}[RSSI]{Recieved Signal Strength Indicator}
\acro{rto}[RTOs]{Retransmission Time Outs}
\acro{rts}[RTS]{Request to Send}
\acro{rtt}[RTT]{Round Trip Time}
%S
\acro{sla}[SLA]{Service Level Agreement}
\acro{snr}[SNR]{Signal to Noise Ratio}
\acro{ssim}[SSIM]{Structural Similarity}
\acro{svc}[SVC]{Support Vector Classification}
\acro{svm}[SVM]{Support Vector Machine}
%T
\acro{tcp}[TCP]{Transmission Control Protocol}
\acro{tv}[TV]{Television}
\acro{twamp}[TWAMP]{Two-Way Active Measurement Protocol}
%U
\acro{udp}[UDP]{User Datagram Protocol}
\acro{ue}[UE]{User Equipment}
\acro{umts}[UMTS]{Universal Mobile Telecommunications Services}
\acro{url}[URL]{Uniform Resource Locator}
%V
\acro{vod}[VOD]{Video on Demand}
\acro{voip}[VOIP]{Voice over Internet Protocol}
\acro{vqm}[VQM]{Video Quality Metric}
%W
\acro{wifi}[Wi-Fi]{Wireless Fidelity}
\acro{wlan}[WLAN]{Wireless LAN}
%X
%Y
%Z
\end{acronym}
\mainmatter
\chapter{Test}
\section{Test}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\ac{wifi} blah blah blah blah blah blah \ac{wlan} blah blah blah blah blah blah \ac{vqm}
blah blah blah blah blah blah \ac{voip} blah blah blah \ac{vod} blah blah blah blah blah
blah \ac{url} blah blah blah \ac{umts} blah blah blah \ac{tv} blah blah blah \ac{ue} blah
blah blah \ac{udp} blah blah blah \ac{twamp} blah blah blah \ac{tcp} blah blah blah
\ac{svm} blah blah blah \ac{svc} blah blah blah \ac{ssim} blah blah blah blah blah blah
\ac{snr} blah blah blah \ac{sla} blah blah blah \ac{rtt} blah blah blah \ac{rts} blah blah
blah \ac{rto} blah blah blah \ac{rssi} blah blah blah {roc} blah blah blah \ac{ann} blah
blah blah \ac{ap} blah blah blah \ac{ber} blah blah blah \ac{cbr} blah blah blah \ac{cdn}
blah blah blah \ac{cpu} blah blah blah \ac{dash} blah blah blah \ac{eit} blah blah blah
\ac{ftp} blah blah blah \ac{hd} blah blah blah \ac{http} blah blah blah \ac{ieee} blah
blah blah \ac{ietf} blah blah blah \ac{ip} blah blah blah \ac{ipdv} blah blah blah blah
blah blah \ac{isp} blah blah blah \ac{isps} blah blah blah \ac{itu}
% populate the toc
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\chapter{A}\section{B}\section{C}\section{D}
\end{document}