I need merging several research papers compiled using CAS-DC Elsevier template in single .pdf file with bibliography in each research paper and consecutive page numbering across the whole .pdf document.
I tried confproc, combine, pdfpages and subfiles packages. I stayed at subfiles package.
While compiling I see next mistake: ! LaTeX Error: Control sequence \sep: already defined.
In compiled main document I see repetition of Title, Authors, Affilations etc. For instance: In main file in second research paper there are Title, Authors, Affilations, e-mails ORCID etc. from first research paper.
Main document:
\documentclass[a4paper,fleqn,twoside]{cas-dc}
\usepackage{subfiles}
\usepackage[numbers]{natbib}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8,]{inputenc}
%\usepackage{tempora}
%\usepackage{XCharter}
\usepackage{textcomp}
\usepackage[russian,ukrainian,romanian,english]{babel}
%\usepackage[dvipsnames,x11names]{xcolor}
\renewcommand{\rmdefault}{ftm}
\usepackage{yfonts}
\usepackage{multicol}
\usepackage{lineno,hyperref}
%\modulolinenumbers[5]
\usepackage{amsmath,amsfonts,amssymb,amsthm,mathtools,enumerate,float}
\sloppy
\makeatletter
\def\ps@first{%
\let@oddhead@empty
\let@evenhead@empty
\def@oddfoot{}
\let@evenfoot@oddfoot
}
\usepackage{wrapfig}
\usepackage{graphicx}
\renewcommand{\rmdefault}{cmr}
\renewcommand{\sfdefault}{cmss}
\renewcommand{\ttdefault}{cmtt}
%\renewcommand{\rmdefault}{cmss}
\renewcommand{\ttdefault}{cmss}
%\DeclareFontSubstitution{T2A}{cmr}{m}{n}
%\DeclareSymbolFont{T2Aletters}{T2A}{cmr}{m}{it}
\usepackage{geometry}
\renewcommand{\theenumi}{\arabic{enumi}}% Меняем везде перечисления на цифра.цифра
\renewcommand{\labelenumi}{\arabic{enumi}}% Меняем везде перечисления на цифра.цифра
\renewcommand{\theenumii}{.\arabic{enumii}}% Меняем везде перечисления на цифра.цифра
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}% Меняем везде перечисления на цифра.цифра
\renewcommand{\theenumiii}{.\arabic{enumiii}}% Меняем везде перечисления на цифра.цифра
\renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}% Меняем везде перечисления на цифра.цифра
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[CO]{ }
%\fancyhead[LO] {}
\fancyhead[CE]{ }
%\fancyhead[RE] { }
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\fancyfoot[C]{}}}
{
\fancyfootoffset[R]{-12cm}
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{}
\renewcommand{\footrulewidth}{0.3 mm}
\renewcommand{\headrulewidth}{0.3 mm}
}
\setlength{\voffset}{-10mm}
\setlength{\topmargin}{0mm}
\setlength{\headheight}{5mm}
\setlength{\headsep}{5mm}
\setlength{\footskip}{6mm}
%\newcommand{\l@abcd}[2]{\hbox to\textwidth{#1\dotfill #2}}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\BR@backref}{\newblock}{\newblock(page~}{}{}
\patchcmd{\BR@backref}{\par}{)\par}{}{}
\makeatother
\usepackage[]{notes2bib}
\usepackage[nottoc]{tocbibind}
\usepackage[colorlinks]{hyperref}
%\hypersetup{pdffitwindow=true,linkcolor=LightSkyBlue,citecolor=Sienna,urlcolor=Navy,menucolor=black}
\hypersetup{
colorlinks=true,
linkcolor=magenta,
filecolor=blue,
urlcolor=blue,
citecolor=green,
anchorcolor=blue,
menucolor=blue,
backref=false,
backref=page,
pdfpagemode=UseNone,
pdfstartview=}
\RequirePackage[hyperpageref]{backref}
\renewcommand{\backref}[1]{}
\renewcommand{\backrefalt}[4]{
\ifcase #1
No cited.
\or
Cited on page #2.
\else
Cited on pages #2.
\fi}
\begin{document}
\subfile{ }
\subfile{ }
\end{document}
Subfile:
\documentclass[document]{subfiles}
\begin{document}
\title [mode = title]{ }
\tnotemark[1]
\tnotetext[1]{Research Paper}
\tnotetext[1]{This document is the result of blood, sweat, tears and taxpayer money.}
\nonumnote{This note has no numbers. In this work we demonstrate $a_b$
the formation Y_1 of a new type of polariton on the interface
between a cuprous oxide slab and a polystyrene micro-sphere placed
on the slab.}
\credit{Conceptualization of this study, Methodology, Software}
\author[2]{ }
[orcid=https://orcid.org/]
\cormark[2]
\fnmark[2]
\fntext[fn2]{ }
\ead{13335789@ukr.net}
\ead[URL]{www. }%
% Address/affiliation
\affiliation[2]{organization={National Scientific Center «Hon. Prof. M. S. Bokarius Forensic Science Institute»},
addressline={ },
city={ },
country={ }}
\credit{ }
\begin{abstract}
Abstract Text
\end{abstract}
\begin{keywords}
keywords
\vspace*{0.5\baselineskip}
\textbf{Article history:}\ Received: 30.09.2021\ Received in revised form: 19.12.2021 \Accepted: 9.01.2022 \Available online: 11.01.2022
\end{keywords}
\maketitle
\section{ }
Text
\section{ }
text
\section{ }
Text
\section{Conclusions}
Text
\section{Conclusions}
Text
\subsection{Acknowledgements}
Text
\bio{{figs/image1}}
Author biography with author photo.
\end{multicols}
\end{document}
I have tried Adobe Acrobat and PDF-XChange Editor for resolving this issue. It merges well several PDFs in single PDF. However, It is always problem with consecutive page numbering and headers. I prefer my own headers: page number and URL embedded in the header text. Cited There is a problem with backreference links. If it is good for first include PDF, it is not good for the rest. For example: Cited on page 1 is good only for first included PDF.
So I would like use subfilles package. For subfiles package I have no all these problems, but I have problemswith repetition. For instance: In main file in second research paper there are Title, Authors, Affilations, e-mails ORCID etc. from first included PDF. and problem with cross referencing. I do not see my bibliography.
Concatenating problem resolved using PDF-XChange Editor and Adobe Acrobat DC Pro.
However I need problem resolution by means of LaTex (MiKTeX, TeXstudio).
– Andriy Bublikov Oct 31 '23 at 07:26