参考书目列表的第二行以外没有缩进

参考书目列表的第二行以外没有缩进

尊敬的专家您好!

我的设置是:西拉特克斯编译器,比布拉特克斯书目和文档类的包是外文。我试图在我的参考书目列表中实现这种缩进样式:在此处输入图片描述

如您所见,我需要缩进第一行(我有解决方案),而其他行不应缩进。我尝试了此主题中的解决方案...

参考文献第二行不缩进

...但这对我没有帮助。我不知道该解决方案有什么问题。

这是我的.tex 代码:

\documentclass[a4paper,14pt]{extarticle}
\usepackage[sorting=none]{biblatex} %Imports biblatex package
\usepackage{enumitem}

\addbibresource{sample.bib} %Import the bibliography file

\DeclareFieldFormat{labelnumberwidth}{\hspace{9mm}#1.\hspace{-7pt}}
\setlength\bibitemsep{0mm}

\makeatletter
\renewenvironment{thebibliography}[1]
     {\chapter*{\bibname}%
      \setbox2\hbox{\@biblabel{#1}}
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      \begin{enumerate}[itemindent=!,leftmargin=0pt,label={\@biblabel{\@arabic\c@enumiv}\setbox2\hbox{\@biblabel{\@arabic\c@enumiv}}\hspace{\labelwidth}\hspace{-1mm}},labelwidth=1mm]
            \usecounter{enumiv}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \end{enumerate}}
\makeatother

\begin{document}

Lets put some links in text. For example \cite{LINK1}. Secondly, this is another link \cite{LINK2}.

\printbibliography %Prints bibliography

\end{document}

我的 .bib 文件如下:

@misc{LINK1,
    note   = "A. J. Krasznahorkay et al. Observation of anomalous internal pair creation in $\mathrm{^8Be}$: a possible indication of a light, neutral boson. Phys. Rev. Lett. PRL 116, 042501 (2016)"
}

@misc{LINK2,
    note   = "George D. Greenwade The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN}) (2013)"
}

您能否针对我的目标建议其他解决方案或提出一些我可能错过的问题?

答案1

您找到的答案适用于 BibTeX,但您正在使用biblatex,它完全重新实现了引文和参考书目,并且不使用thebibliography

你可以尝试

\documentclass[a4paper,14pt]{extarticle}
\usepackage[sorting=none]{biblatex}

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
\setlength{\biblabelsep}{\labelsep}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{-\labelnumberwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \setlength{\leftmargin}{0pt}%
      \setlength{\itemindent}{\bibhang}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lets put some links in text. For example \cite{sigfridsson}.
Secondly, this is another link \cite{worman}.

\printbibliography
\end{document}

参考书目第一行缩进,后续行不缩进。

您可能需要研究gost-numeric使用biblatex-gost。这更接近于您在图像中展示的整体书目风格。

\documentclass[a4paper,14pt]{extarticle}
\usepackage[style=gost-numeric]{biblatex}

\setlength{\biblabelsep}{\labelsep}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{-\labelnumberwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \setlength{\leftmargin}{0pt}%
      \setlength{\itemindent}{\bibhang}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lets put some links in text. For example \cite{sigfridsson}.
Secondly, this is another link \cite{worman}.

\printbibliography
\end{document}

GOST 样式书目,首行缩进

.bib问题中的条目及其条目中的所有数据看起来note有点像是试图手动控制参考书目样式。这违背了 BibTeX 和 的精神biblatex,其理念是,您将数据放在语义上有用的字段中,然后让样式决定如何排版。

相关内容