如何從參考書目中刪除換行符

如何從參考書目中刪除換行符

我正在為空間有限的媒介寫作,我需要我的參考書目盡可能緊湊。這意味著從參考書目條目中刪除幾乎所有空格,甚至在 \bibitems 之間跳過段落。

而不是像這樣的參考書目:

[1] A.安東等人。參考書目格式化技術,ArXiv,2020。

[2] BB 布雷特和 B. 巴洛特。參考書目格式,BAM,2020。

[3] C.庫姆。良好的參考書目格式的特徵,Corr,2020。

我希望它是這樣的:

[1]A.安東等人。參考書目格式化技術,ArXiv,2020。[2]BB 布雷特和 B. 巴洛特。參考書目格式,BAM,2020。[3]C.庫姆。良好的參考書目格式的特徵,Corr,2020。

我在網路上找到了這個建議:

http://bibdesk-users.661331.n2.nabble.com/Very-compact-bibliography-styles-td1332196.html

但他的解決方案在每個 bibititem 之後產生奇怪的間距(它似乎試圖以某種奇怪的方式證明文本的合理性)。我嘗試過幹擾他的建議,刪除項目,但沒有配置給我我想要的東西。

我正在使用背頁來編譯乳膠文件。這是一個工作範例:

\documentclass[twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage{paralist}

\begin{filecontents}{main.bib}
@misc{a,
  author    = {A. Anton and
               others},
  title     = {A Technique for Formatting Bibliographies},
  journal = {ArXiv},
  year      = {2020}
}

@misc{b,
  author    = {B. Brett and
               B. Ballot},
  title     = {Bibliographies Formatting},
  journal = {BAM},
  year      = {2020}
}

@misc{c,
  author    = {C. Coomb},
  title     = {Characteristics of a Good Bibliography Formatting},
  journal = {Corr},
  year      = {2020}
}

@misc{d,
    author  = {D. Damiani and
                others},
    title   = {Direct Bibliographies for Latex: A Study on How to Produce Direct Bibliographies},
    journal = {DankJournal},
    year    = {2020}
}
\end{filecontents}

\makeatletter
\renewenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \begin{inparaenum}%
      \list{\textbf{\@biblabel{\@arabic\c@enumiv}}}%
           {\@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist\end{inparaenum}}
\renewcommand\newblock{}
\makeatother

\title{Bibliography Example}
\author{\LaTeX{} Stack Exchange User}
\date{August 2019}

\begin{document}

\maketitle

\section{Introduction}

Here we cite \cite{a,b,c} and \cite{d}.

\bibliographystyle{plain}
\bibliography{main}

\end{document}

引用 1、2、3 和 4 給出以下輸出:

第一個和第二個 bibitem 之間有很大的空間

雖然只引用了 1,2 和 3

\section{Introduction}

Here we cite \cite{a,b,c} and nothing else.

\bibliographystyle{plain}
\bibliography{main}

第一次進入前有巨大的空間

有什麼方法可以在 LaTeX 中實現參考書目的這種格式嗎?

相關內容