如何将 .bib 编译为 LaTeX

如何将 .bib 编译为 LaTeX

我一直在使用 .bib 文件和 apacite 撰写稿件,但我提交的期刊要求将参考书目手动包含在 .tex 文件中,如下所示

Johnson, A. \& Smith, B. (2014). Paper title. \textit{Journal Name, 101}(1), 111--123.

更具体地说,现在我的 .tex 文件如下所示:

\documentclass[twocolumn]{article}
\usepackage{apacite}

\begin{document}
This is some previous work \cite{article1}.

\bibliographystyle{apacite}
\bibliography{ref.bib}

\end{document}

ref.bib 文件如下所示:

@article{article1,
    Author = {Johnson, Adam},
    Journal = {Journal Name},
    Number = {101},
    Pages = {111--123},
    Title = {Paper title},
    Volume = {11},
    Year = {2014}}

但期刊希望它看起来像这样:

\documentclass[twocolumn]{article}
\usepackage{hanging}

\begin{document}
This is some previous work (Johnson, 2014).

\section*{Reference}
\begin{hangparas}{2em}{1}
Johnson, A. (2014). Paper title. \textit{Journal Name, 11}(101), 111-–123.
\end{hangparas}

\end{document}

我如何将 .tex 文件转换为所需的格式?谢谢。

顺便说一下,.bbl 看起来像这样:

\begin{thebibliography}{}

\bibitem [\protect \citeauthoryear {%
Johnson%
}{%
Johnson%
}{%
{\protect \APACyear {2014}}%
}]{%
article1}
\APACinsertmetastar {%
article1}%
\begin{APACrefauthors}%
Johnson, A.%
\end{APACrefauthors}%
\unskip\
\newblock
\APACrefYearMonthDay{2014}{}{}.
\newblock
{\BBOQ}\APACrefatitle {Paper title} {Paper title}.{\BBCQ}
\newblock
\APACjournalVolNumPages{Journal Name}{11}{101}{111--123}.
\PrintBackRefs{\CurrentBib}

\end{thebibliography}

答案1

将您创建的.bbl文件复制到\begin|\end{thebibliography您的文档中并定义一些 apacity 宏:

\documentclass[twocolumn]{article}
\usepackage{hanging}
\renewcommand\bibitem[2][]{}
\def\citeauthoryear#1#2#3{}
\newenvironment{APACrefauthors}{}{}
\def\APACrefYearMonthDay#1#2#3{(#1)}
\def\APACinsertmetastar#1{}
\def\APACyear#1{}
\def\BBOQ{}\def\BBCQ{}
\def\newblock#1{#1}
\def\APACrefatitle#1#2{#1}
\def\APACjournalVolNumPages#1#2#3#4{\textit{#1, #2}(#3), #4}
\def\PrintBackRefs#1{}
\begin{document}
This is some previous work (Johnson, 2014).

\section*{Reference}
\begin{hangparas}{2em}{1}
\bibitem [\protect \citeauthoryear {% 
  Johnson% 
}{% 
  Johnson% 
  }{%
   {\protect \APACyear {2014}}% 
   }]{% 
   article1} \APACinsertmetastar {% 
   article1}% 
   \begin{APACrefauthors}% 
   Johnson, A.% 
   \end{APACrefauthors}% 
   \unskip\ \newblock \APACrefYearMonthDay{2014}{}{}. \newblock {\BBOQ}\APACrefatitle {Paper title} {Paper title}.{\BBCQ} \newblock \APACjournalVolNumPages{Journal Name}{11}{101}{111--123}. \PrintBackRefs{\CurrentBib} 
\end{hangparas}

\end{document}

在此处输入图片描述

然而,如果你这样做,事情会容易得多不是使用该包apacite,那么您不必重新定义所有 apa 命令。

相关内容