不要缩进参考书目

不要缩进参考书目

如何防止参考书目中的项目自动向右移动约 1 厘米?

如果我使用,\bibitem[label]{...}它们会与其余文本很好地对齐,但如果我只是使用\bibitem{...},以便它们自动编号(这是我想要的),它们会移动到右侧,就像我上面解释的那样。

例子:

在此处输入图片描述

我想要对第一行进行自动编号,但对最后一行进行缩进。

创建上述输出的代码:

% Created with LyX
\documentclass[english]{article}
\usepackage[OT1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage[unicode=true,
 bookmarks=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}
\usepackage{breakurl}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{enumitem}       % customizable list environments
\newlength{\lyxlabelwidth}      % auxiliary length 

\makeatother

\begin{document}
\begin{thebibliography}{References}
\bibitem{key-1} these lines are what happens when I only use                 \textbackslash{}bibitem\{....\}

\bibitem{key-2} these lines are what happens when I only use                 \textbackslash{}bibitem\{....\}

\bibitem[bla]{key-3} these lines are what happens when I use                 \textbackslash{}bibitem{[}bla{]}\{....\}

\bibitem[blabla]{key-4} these lines are what happens when I use                 \textbackslash{}bibitem{[}blabla{]}\{....                    \}\end{thebibliography}

\end{document}`

答案1

环境的论点bibliography不是参考书目部分的标题(从代码中可以看出)但字符串代表列表中最大的标签。通常,9如果您有 <10 个参考文献,并且99参考文献少于 100 个但多于 9 个,则会出现这种情况。

\documentclass[english]{article}
\usepackage{babel}
\begin{document}
\begin{thebibliography}{9}
\bibitem{key-1} these lines are what happens when I only use \textbackslash{}bibitem\{....\}

\bibitem{key-2} these lines are what happens when I only use \textbackslash{}bibitem\{....\}

\bibitem[bla]{key-3} these lines are what happens when I use \textbackslash{}bibitem{[}bla{]}\{....\}

\bibitem[blabla]{key-4} these lines are what happens when I use  \textbackslash{}bibitem{[}blabla{]}\{.... \}
\end{thebibliography}

\end{document}

代码输出

相关内容