[Tex/LaTex] Uneven space between number and text in bibliography

bibliographies

I am using a simple and separate bibliography.tex file. The space between the number and text are even for the entries from 1-9. But from entry 10 it becomes uneven. Here I attached the code and screenshot.

\begin{thebibliography}{10}
    \item\[{\[1\]}\]  Tahat, L., Korel, B., Koutsogiannakis, G., et al.: `State-based models in regression test suite prioritization', Softw. Qual. J., 2016, 25, pp. 703-742\vspace*{6pt}
    \item\[{\[2\]}\] Zhang, C., Chen, Z., Zhao, Z., et al.: `An improved regression test selection technique by clustering execution profiles', Proc. 10th Int. Conf. Quality Softw. (QSIC), Zhangjiajie, China, Sep. 2010, pp. 171-179 \vspace*{6pt}
    \item\[{\[3\]}\] Lin, C.-T., Tang, K.-W., Wang, J. S., et al.: `Empirically evaluating Greedy-based test suite reduction methods at different levels of test suite complexity', Sci. of Comput. Programming, 2017, 150, pp. 1-25\vspace*{6pt}
\end{thebibliography}

enter image description here

Can anyone please tell me how to solve this problem?

Best Answer

It looks like you've built the bibliography by hand.

Instead of hand-numbering the items and, as you've discovered, having to adjust some of the spacing around item numbers once you get to numbers 10 and above, you may want to employ LaTeX's own simple machinery for bibliographies, viz., use \bibitem directives instead of \item directives.

In the case of your bibliography, all you'd have to change is (a) replace all instances of \item inside the thebibliography environment with \bibitem and (b) replace the explicit numbers with keys, one per item, unique to each item, surrounded by curly braces. I.e., something like this:

\frenchspacing % no extra whitespace after dots ("periods", "full stops")
\begin{thebibliography}{10}

\bibitem{tahat:2016} Tahat, L., Korel, B., Koutsogiannakis, G., et~al.: 
`State-based models in regression test suite prioritization', 
Softw. Qual. J., 2016, 25, pp. 703--742

\bibitem{zhang:2010} Zhang, C., Chen, Z., Zhao, Z., et~al.: 
`An improved regression test selection technique by clustering 
execution profiles', Proc. 10th Int. Conf. Quality Softw. (QSIC), 
Zhangjiajie, China, Sep. 2010, pp. 171--179

\bibitem{lin:2017} Lin, C.-T., Tang, K.-W., Wang, J. S., et~al.: 
`Empirically evaluating Greedy-based test suite reduction methods 
at different levels of test suite complexity', Sci. of Comput. Programming, 
2017, 150, pp. 1--25

\end{thebibliography}

Since you provided the instruction \begin{thebibliography}{10} (\begin{thebibliography}{99} would do just as well), LaTeX automatically reserves enough space for 2-digit item numbers (surrounded by square brackets). If your bibliography has more than 99 entries, you should employ \begin{thebibliography}{100}.

The following screenshot shows the result of this change. (In case you're curious how I generated the screenshot: I had to provide multiple instances of your three entries, providing new keys as needed for items 4 thru 12.)

enter image description here


Another benefit of this setup is that you could cite these items in the body of the document by writing \cite{tahat} or \cite{lin}. At the moment, I assume, you're writing [1] and [3] by hand, right? By using \cite instructions, LaTeX automatically takes care of coming up with the correct numbers.

In principle, the only requirement on the keys is that they be unique. However, by making the keys at least somewhat descriptive of the contents of the bibliogaphic items (as I did in the code chunk shown above), it'll be much more straightforward to use them as the arguments of \cite instructions.

Related Question