我仍在研究我的论文模板,并遇到了下一个问题:
\documentclass[pdftex, 12pt, oneside]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{tocbibind}
\usepackage{titlesec}
\titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}
\usepackage[printonlyused]{acronym}
\usepackage[paper = a4paper, margin = 1in, includehead]{geometry}
\usepackage{fancyhdr}
\fancypagestyle{plain}
{
\fancyhf{}
\fancyhead[L]{\rightmark}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
}
\begin{document}
\frontmatter
\tableofcontents
\listoffigures
\listoftables
\pagestyle{plain}
\chapter*{Abkürzungsverzeichnis}
\addcontentsline{toc}{chapter}{Abkürzungsverzeichnis}
\begin{acronym}[SQL]
\acro{SQL}{Structured Query Language}
\acro{Bash}{Bourne-again shell}
\end{acronym}
\mainmatter
\chapter{Einleitung}
Texttexttexttext \ac{SQL}
Blablablablablabla \ac{Bash} and \ac{SQL}
\end{document}
正如您所看到的,首先是目录、LOF、LOT,然后我想插入缩写列表(/单位可能稍后会插入),效果很好,但我希望缩写的解释在同一行对齐。有没有办法做到这一点,\hfill
或者在缩写和解释之间留出相同的空格。
第二个问题(我知道只允许一个,但 MWE 是相同的)是,如果你看一下标题,\rightmark
我的缩写列表仍然与 LOT 中的相同。我肯定我又漏掉了什么。:(
答案1
的可选参数(acronym
如果使用)应为最广泛的首字母缩略词,因此描述将对齐。没有可用的自动化功能。
因此,如果你输入
\begin{acronym}[Bash]
\acro{SQL}{Structured Query Language}
\acro{Bash}{Bourne-again shell}
\end{acronym}
结果是
完整示例,包含获取正确头部高度和正确航向的修正:
\documentclass[12pt, oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[
paper=a4paper,
margin=1in,
includehead,
headheight=14.5pt, % <-- IMPORTANT
]{geometry}
\usepackage{fancyhdr}
\usepackage{tocbibind}
\usepackage{titlesec}
\usepackage[printonlyused]{acronym}
\titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}
\fancypagestyle{plain}
{
\fancyhf{}
\fancyhead[L]{\rightmark}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
}
\pagestyle{plain}
\begin{document}
\frontmatter
\tableofcontents
\listoffigures
\listoftables
\chapter*{Abkürzungsverzeichnis}
\markboth{\MakeUppercase{Abkürzungsverzeichnis}}
{\MakeUppercase{Abkürzungsverzeichnis}}
\addcontentsline{toc}{chapter}{Abkürzungsverzeichnis}
\begin{acronym}[Bash]
\acro{SQL}{Structured Query Language}
\acro{Bash}{Bourne-again shell}
\end{acronym}
\mainmatter
\chapter{Einleitung}
Texttexttexttext \ac{SQL}
Blablablablablabla \ac{Bash} and \ac{SQL}
\end{document}
抱歉,缩进不同,但我无法忍受。
答案2
尝试使用该longtable
包:
\documentclass[pdftex, 12pt, oneside]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\usepackage{longtable} %It's here :)
\renewcommand{\familydefault}{\sfdefault}
\usepackage{tocbibind}
\usepackage{titlesec}
\titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}
\usepackage[printonlyused]{acronym}
\usepackage[paper = a4paper, margin = 1in, includehead]{geometry}
\usepackage{fancyhdr}
\fancypagestyle{plain}
{
\fancyhf{}
\fancyhead[L]{\rightmark}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
}
\begin{document}
\frontmatter
\tableofcontents
\listoffigures
\listoftables
\input{Marito} %The file you have to input
\mainmatter
\chapter{Einleitung}
Texttexttexttext \ac{SQL}
Blablablablablabla \ac{Bash} and \ac{SQL}
\end{document}
以及\input
一个如下文件作为您的缩写列表(该文件的名称是“Marito”):
\thispagestyle{empty}
\chapter*{List of Abbreviations}
\chaptermark{List of Abbreviations}
\renewcommand*{\arraystretch}{1.5}
\begin{longtable}{@{}l @{\hspace{7mm}} p{0.8\linewidth}}
ADL & Activities of Daily Life\\
AST & Alternate Step Test\\
BMI & Body Mass Index\\
CSFT & Cross Step moving on Four Stops\\
DBN & Dynamic Bayesian Networks\\
DFRAC & Demura's Fall Risk Assessment Chart\\
EMG & Electromyography\\
FEUP & Faculdade de Engenharia da Universidade do Porto\\
FPRI & Fall Prediction and Risk Index\\
FR & Fall Probability\\
FRI & Fall Risk Index\\
GDP & Gross Domestic Product\\
GUGT & Get-Up-ang-Go Test\\
WHO & World Health Organization\\
\end{longtable}
如果您想添加更多缩写,只需将它们作为表格中的另一行添加即可。不用担心表格中有太多行,这就是您使用该longtable
包的原因:它会扩展并且不会损害页面配置的其余部分。