![目录(图、标签、索引、词汇表和书目)分别位于“参考”部分下的子部分中](https://linux22.com/image/388351/%E7%9B%AE%E5%BD%95%EF%BC%88%E5%9B%BE%E3%80%81%E6%A0%87%E7%AD%BE%E3%80%81%E7%B4%A2%E5%BC%95%E3%80%81%E8%AF%8D%E6%B1%87%E8%A1%A8%E5%92%8C%E4%B9%A6%E7%9B%AE%EF%BC%89%E5%88%86%E5%88%AB%E4%BD%8D%E4%BA%8E%E2%80%9C%E5%8F%82%E8%80%83%E2%80%9D%E9%83%A8%E5%88%86%E4%B8%8B%E7%9A%84%E5%AD%90%E9%83%A8%E5%88%86%E4%B8%AD.png)
我如何将ToC
、LoF
、gls
和idx
列表bib
设为子部分?
我使用 lualatex 和tocbibind 包。但是参考书目没有显示,ToC
我需要获取“参考文献”部分下子部分中所有列表的条目。这可能吗?
编辑:[WIP](x = 完成)
[x] 批号
[x] LOF 数量
[x] 号码簿
[x] GLS 数量
[x] 将 BIB 列为子部分
[x] 将 GLS 列为子节
[ ] 将 LOT 列为子部分
[ ] 将 LOF 列为子节
[ ] 将 IDX 列为子部分
[ ] 数字 IDX
mwe编辑:
\documentclass{article}
\usepackage{geometry}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{caption}
\usepackage[
nottoc, % TOC in TOC as line with Pagenumber
numbib, % Number bib
numindex, % Number Idx
]{tocbibind} % add line to TOC with Fig,Tab,Ind,
\usepackage{tikz} %Support for more advanced Graphics
\usepackage{biblatex}
\usepackage{imakeidx} % Word Index
\makeindex[
intoc, % this adds the Index to TOC!
]
\usepackage[
toc,% this adds the Index to TOC!
section=subsection,
numberedsection
]{glossaries}
\makeglossaries
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@online{wikipedia,
title = {Wikipedia},
month = {10},
year = {2018},
url = {https://de.wikipedia.org/wiki/Wikipedia},
}
\end{filecontents}
\addbibresource{bib.bib}
\begin{filecontents}{glossary.tex}
\newglossaryentry{testing}{
name={testing},
description={t.b.d.},
text={testing}
}
\end{filecontents}
\input{glossary}
\renewcommand{\listoftables}{\begingroup
\tocsection
\tocfile{\listtablename}{lot}
\endgroup}
\renewcommand{\listoffigures}{\begingroup
\tocsection
\tocfile{\listfigurename}{lot}
\endgroup}
\renewcommand{\listoffigures}{\begingroup
\tocsection
\tocfile{\listfigurename}{lot}
\endgroup}
\begin{document}
\tableofcontents
\section{Section one}
test (idx)\index{test}(reference)\ref{sample}(cite)\cite{wikipedia}(glossary)\gls{testing}
\begin{figure}[!ht]
\includegraphics[width=5cm]{example-image}
\caption{sample}
\label{sample}
\end{figure}
\begin{table}[htp]
\begin{center}
\begin{tabular}{p{0.03\linewidth}}
sample table
\end{tabular}
\end{center}
\caption{default}
\label{default}
\end{table}
\section{Referenzen (German for References)}
\printbibliography[heading=subbibnumbered]
\listoffigures
\listoftables
\printindex
\printglossaries[toclevel=subsection,numberedsection]
\end{document}
答案1
没有包的建议tocbibind
:使用\indexsetup{level=\subsection
包提供的imakeidx
并且使用包tocbasic
将 LoF 和 LoT 编号为子部分。
\documentclass{article}
\usepackage{geometry}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{caption}
\usepackage{tikz}% loads also graphicx etc.
\usepackage{tocbasic}
\addtotoclist[float]{lof}
\renewcommand*\listoffigures{\listoftoc[{\listfigurename}]{lof}}
\setuptoc{lof}{numbered,leveldown}
\addtotoclist[float]{lot}
\renewcommand*\listoftables{\listoftoc[{\listtablename}]{lot}}
\setuptoc{lot}{numbered,leveldown}
\usepackage{biblatex}
\usepackage[
section=subsection,
numberedsection
]{glossaries}
\makeglossaries
\usepackage{imakeidx}
\indexsetup{
level=\subsection,
%noclearpage % does not work as expected, removes the index in this example??
}
\makeindex
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@online{wikipedia,
title = {Wikipedia},
month = {10},
year = {2018},
url = {https://de.wikipedia.org/wiki/Wikipedia},
}
\end{filecontents}
\addbibresource{bib.bib}
\begin{filecontents}{glossary.tex}
\newglossaryentry{testing}{
name={testing},
description={t.b.d.},
text={testing}
}
\end{filecontents}
\input{glossary}
\begin{document}
\tableofcontents
\section{Section one}
test (idx)\index{test}(reference)\ref{sample}(cite)\cite{wikipedia}(glossary)\gls{testing}
\begin{figure}[!ht]
\includegraphics[width=5cm]{example-image}
\caption{sample}
\label{sample}
\end{figure}
\begin{table}[htp]
\centering
\begin{tabular}{c}
sample table
\end{tabular}
\caption{default}
\label{default}
\end{table}
\section{Referenzen (German for References)}
\printbibliography[heading=subbibnumbered]
\listoffigures
\listoftables
\printindex
\printglossaries
\end{document}
结果:
答案2
我在目录中添加了一条手动行。
它没有正确对齐,但是它伪造了这些包中缺少的子部分(不太好)但很有效。
令人遗憾的是这些软件包不能更好地协同工作。
\documentclass{article}
\usepackage{geometry}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{caption}
\usepackage[
nottoc, % TOC in TOC as line with Pagenumber
numbib, % Number bib
numindex, % Number Idx
notlot,
notlof,
]{tocbibind} % add line to TOC with Fig,Tab,Ind,
\usepackage{tikz} %Support for more advanced Graphics
\usepackage{biblatex}
\usepackage{imakeidx} % Word Index
\makeindex[
%intoc, % this adds the Index to TOC!
]
\usepackage[
toc,% this adds the Index to TOC!
section=subsection,
numberedsection
]{glossaries}
\makeglossaries
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@online{wikipedia,
title = {Wikipedia},
month = {10},
year = {2018},
url = {https://de.wikipedia.org/wiki/Wikipedia},
}
\end{filecontents}
\addbibresource{bib.bib}
\begin{filecontents}{glossary.tex}
\newglossaryentry{testing}{
name={testing},
description={t.b.d.},
text={testing}
}
\end{filecontents}
\input{glossary}
\begin{document}
\tableofcontents
\section{Section one}
test (idx)\index{test}(reference)\ref{sample}(cite)\cite{wikipedia}(glossary)\gls{testing}
\begin{figure}[!ht]
\includegraphics[width=5cm]{example-image}
\caption{sample}
\label{sample}
\end{figure}
\begin{table}[htp]
\begin{center}
\begin{tabular}{p{0.03\linewidth}}
sample table
\end{tabular}
\end{center}
\caption{default}
\label{default}
\end{table}
\section{Referenzen}
%\nocite{*} %------------ BIBLIOGRAPHY --------------
\printbibliography[heading=subbibnumbered]
\stepcounter{subsection}
\newpage %---------------- FIGURES -----------------
\addcontentsline{toc}{subsection}{
\protect\numberline{\thesubsection} Abbildungsverzeichniss}
\listoffigures
\stepcounter{subsection}
%\newpage %-------------- TABLES ------------------
\addcontentsline{toc}{subsection}{
\protect\numberline{\thesubsection} Tabellenverzeichniss}
\listoftables
\stepcounter{subsection}
%\newpage %--------------- INDEX ------------------
\addcontentsline{toc}{subsection}{
\protect\numberline{\thesubsection} Index}
\printindex
%\newpage %-------------- GLOSSARY ----------------
\printglossaries[toclevel=subsection,numberedsection]
\end{document}