![LOF、LOT 和 LOA 的缩进相同](https://linux22.com/image/348165/LOF%E3%80%81LOT%20%E5%92%8C%20LOA%20%E7%9A%84%E7%BC%A9%E8%BF%9B%E7%9B%B8%E5%90%8C.png)
我尝试以相同的方式格式化表格列表和缩写列表,以便首字母缩略词的缩进与表格引用的缩进相同。但是,即使使用不同的词汇表样式(例如长格式),我也无济于事。
\documentclass{article}
\usepackage{longtable,array}
\usepackage[acronym,nonumberlist,nomain,nopostdot]{glossaries}
\include{glossary}
%\setglossarystyle{long}
\makeglossaries
\newacronym{SNA}{SNA}{some nice acronym}
\begin{document}
\printglossary[title={List of Abbreviations},type=\acronymtype]
\listoftables
\begin{longtable}{|l|}
\hline
... \\ \hline
\caption{Some nice table}
\label{tbl:table1}
\end{longtable}
\end{document}
有任何想法吗?
提前非常感谢您!
答案1
使用tocloft
和\setlength{cfttabindent}{0em}
将减少table
条目的缩进为0em
,因此根本没有缩进。
\documentclass{article}
\usepackage{longtable,array}
\usepackage{tocloft}
\usepackage[acronym,nonumberlist,nomain,nopostdot]{glossaries}
\setlength{\cfttabindent}{0em}
%\include{glossary}
%\setglossarystyle{long}
\makeglossaries
\newacronym{SNA}{SNA}{some nice acronym}
\begin{document}
\gls{SNA}
\printglossary[title={List of Abbreviations},type=\acronymtype]
\listoftables
\begin{longtable}{|l|}
\hline
... \\ \hline
\caption{Some nice table}
\label{tbl:table1}
\end{longtable}
\end{document}
答案2
您还可以使用包tocbasic
(KOMA-Script 包的一部分):
\documentclass{article}
\usepackage{longtable,array}
\usepackage[acronym,nonumberlist,nomain,nopostdot]{glossaries}
%\include{glossary}
%\setglossarystyle{long}
\makeglossaries
\newacronym{SNA}{SNA}{some nice acronym}
\usepackage{tocbasic}[2016/06/14]
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}
\begin{document}
\printglossary[title={List of Abbreviations},type=\acronymtype]
\listoftables
\begin{longtable}{|l|}
\hline
... \\ \hline
\caption{Some nice table}
\label{tbl:table1}
\end{longtable}
\end{document}
或者如果你使用 KOMA-Script 类,例如你的其它问题:
\documentclass[oneside,
listof=totoc% <- all list titles goes to TOC
]{scrbook}[2016/06/14]
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}
\usepackage[acronym,nonumberlist,nomain,nopostdot,
toc% <- added
]{glossaries}
\makeglossaries
\newacronym{SNA}{SNA}{some nice acronym}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\listoftables
\printglossary[title={List of Abbreviations},type=\acronymtype]
\chapter{Chapter One}
\gls{SNA}
\captionof{table}{A table caption}
\end{document}