更改目录中的参考文献缩进

更改目录中的参考文献缩进

我该如何修复参考文献缩进ToC

我知道可以用它tocloft来调整\cftsetindents{section}章节等,但参考文献呢?我已经尝试过,\cftchapterindent }{0em}但对参考文献不起作用。我需要将参考文献缩进为章节,即使它没有编号。见末尾的图片。

\documentclass[a5paper]{memoir}
\usepackage[T1]{fontenc}        
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\selectlanguage{brazil}    
\usepackage[style=abnt-numeric,language=brazilian,backend=biber]{biblatex}
\addbibresource[]{sample.bib}    
\usepackage{filecontents}    
\begin{filecontents}{sample.bib}
@book{ASM,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}

\begin{document}

\tableofcontents*

\chapter{Bla bla 1}
\cite{ASM}
\chapter{Bla bla 3}
\chapter{Bla bla 3}    
\printbibliography
\end{document}

带缩进的参考文献

答案1

biblatex手册明确指出了与 相关的恶作剧memoir并建议heading=...\defbibheading

我用了

\defbibheading{bay}[\bibname]{%
  \chapter*{#1}%
  \markboth{#1}{#1}%
  \addcontentsline{toc}{chapter}{\protect\numberline{}\bibname}
}

chapter即像往常一样添加标题和空number条目,即该\bibname条目像其他章节条目一样缩进。

然後使用\printbibliography[heading=bay]

\documentclass[a5paper]{memoir}


\usepackage[T1]{fontenc}        
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\selectlanguage{brazil}    
\usepackage[style=numeric,language=brazilian,backend=biber]{biblatex}
\addbibresource[]{sample.bib}    
\usepackage{filecontents}    
\begin{filecontents}{sample.bib}
@book{ASM,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}


\begin{document}

\tableofcontents*

\chapter{Bla bla 1}
\cite{ASM}
\chapter{Bla bla 3}
\chapter{Bla bla 3}    
\defbibheading{bay}[\bibname]{%
  \chapter*{#1}%
  \markboth{#1}{#1}%
  \addcontentsline{toc}{chapter}{\protect\numberline{}\bibname}
}
\printbibliography[heading=bay]
\end{document}

在此处输入图片描述

答案2

@ChristianHupfer 的回答更受欢迎,因为它是基于对biblatex手册的阅读...这里有一个更麻烦的破解方法。

我添加它hyperref仅仅是为了测试兼容性。

\documentclass[a5paper]{memoir}
\usepackage[T1]{fontenc}        
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\selectlanguage{brazil}    
%\usepackage[style=abnt-numeric,language=brazilian,backend=biber]{biblatex}
\usepackage[language=brazilian,backend=biber]{biblatex}

\addbibresource[]{sample.bib}    
\usepackage{filecontents}    
\begin{filecontents}{sample.bib}
@book{ASM,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}

\usepackage{hyperref}

\makeatletter
  \newif\if@intoc

  \AtBeginDocument{%
  \let\oldbibname\bibname
  \renewcommand*{\bibname}{\tocbibname@prefix\oldbibname}%
  \DeclareRobustCommand*{\tocbibname@prefix}
                        {\if@intoc\expandafter\chapternumberline\fi{}}%
  }

  \newenvironment{intoc}{\@intoctrue}{}
\makeatother

\begin{document}

\begin{intoc}
  \tableofcontents*
\end{intoc}
\chapter{Bla bla 1}
\cite{ASM}
\chapter{Bla bla 3}
\chapter{Bla bla 3}  

\printbibliography

\end{document}

在此处输入图片描述

相关内容