如何合并两个 tex 文件以便每个文件都有自己的引用

如何合并两个 tex 文件以便每个文件都有自己的引用

我的论文有一个补充文件,我想将其提交到 arXiv。我首先尝试将它们转换为 PDF 并使用 Adob​​e 软件合并它们。但是 arXiv 强制我发送实际的源代码。回到问题,如果我只是使用

...
\bibliographystyle{ieeetr}
{ \scriptsize
\bibliography{refs} 
}

\newpage
\input{SuppMaterial} 

我没有得到我想要的,我的意思是 refs 块被重复了,因为我的 SuppMaterial 也有引用,所以我在 SuppMaterial 的末尾也得到了整个引用。
我怎样才能合并这两个文件,以便每个文件都有自己的 refs 块?(第一个文件以其 refs 开始和结束,然后第二个文件以其自己的 refs 开始和结束)

更准确地说,这里有一个这两个文件的示例: main.tex看起来像这样:

\documentclass[journal]{IEEEtran}
\usepackage{subcaption}     % for subfigures
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc}    % use 8-bit T1 fonts
\usepackage{hyperref}       % hyperlinks
\usepackage{url}            % simple URL typesetting
\usepackage{booktabs}       % professional-quality tables
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{nicefrac}       % compact symbols for 1/2, etc.
\usepackage{microtype}      % microtypography
\usepackage{epsfig}
\usepackage{graphicx}
\hypersetup{colorlinks=true, linkcolor=red}

\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{sci}
\usepackage{xfrac}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{filecontents,pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,shapes,snakes,positioning,matrix,arrows,decorations.pathmorphing,decorations.text}
\usepackage[sort&compress,square,comma,numbers]{natbib}
\makeatletter
\renewcommand\bibsection%
{
  \section*{\refname
    \@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}}
}
\makeatother

% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}


\begin{document}

%
% paper title

\title{Title}
%

%\author{XXX, YYY,ZZZ%,~\IEEEmembership{Member,~IEEE,}% <-this % stops a space
}


% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}




% make the title area
\maketitle


\begin{abstract}
Here is the abstract
\end{abstract}

% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Deep Learning, Convolutional Neural Networks (CNNS), Efficiency. 
\end{IEEEkeywords}

\section{Introduction}

...

\bibliographystyle{ieeetr}
{ \scriptsize
\bibliography{refs} 
}
\end{document}

supp.tex看起来像这样:

\documentclass[journal]{IEEEtran}

\usepackage{subcaption}     % for subfigures
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc}    % use 8-bit T1 fonts
\usepackage{hyperref}       % hyperlinks
\usepackage{url}            % simple URL typesetting
\usepackage{booktabs}       % professional-quality tables
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{nicefrac}       % compact symbols for 1/2, etc.
\usepackage{microtype}      % microtypography
\usepackage{epsfig}
\usepackage{graphicx}
\hypersetup{colorlinks=true, linkcolor=red}

\usepackage{tabulary}

\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{sci}
\usepackage{xfrac}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{filecontents,pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,shapes,snakes,positioning,matrix,arrows,decorations.pathmorphing,decorations.text}

% To number supplemental material with 'S': 
\renewcommand{\thepage}{S\arabic{page}}  
\renewcommand{\thesection}{S\arabic{section}}   
\renewcommand{\thetable}{S\arabic{table}}   
\renewcommand{\thefigure}{S\arabic{figure}}


\begin{document}

\title{Title}

%\author{X, Y, Z,%,~\IEEEmembership{Member,~IEEE,}% <-this % stops a space


\maketitle

% \begin{abstract}
% \end{abstract}


\section{Discussions}

\subsection{Subject 1}

...

\ifCLASSOPTIONcaptionsoff
  \newpage
\fi


\bibliographystyle{ieeetr}
{ \scriptsize
\bibliography{refs} 
}
% \begin{thebibliography}{10}

% \end{thebibliography}

\end{document}

它们两者使用的 ref.bib 如下所示:

@inproceedings{AlexKrizhevsky_imgnet_2012,
   author = {Alex, Krizhevsky and Sutskever, Ilya and Geoffrey, E. Hinton},
   title = {ImageNet Classification with Deep Convolutional Neural Networks},
   pages = {1097--1105},
   booktitle = {NIPS},
   year = {2012},
}

@inproceedings{Ba_DoDeepNets_nd_B_Deep_2014,
   author = {Ba, Jimmy and Caruana, Rich},
   title = {Do deep nets really need to be deep?},
   booktitle = {NIPS},
   pages = {2654-2662},
   type = {Conference Proceedings}
}

@inproceedings{Bucilua_Model_compression_2006,
   author = {Buciluǎ, Cristian and Caruana, Rich and Niculescu-Mizil, Alexandru},
   title = {Model compression},
   booktitle = {SIGKDD},
   publisher = {ACM},
   pages = {535-541},
   ISBN = {1595933395},
   type = {Conference Proceedings}
}

相关内容