0
\documentclass[14.49998pt, a4paper, oneside]{article}
\usepackage[english]{babel} % English language/hyphenation
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage[utf8x]{inputenc}
\usepackage{xfrac}
%\usepackage[sc]{mathpazo}
\usepackage{sectsty} % Allows customizing section commands
\usepackage{tikz, pgfplots, pgfplotstable} %to plot figure
\usepackage{array, blkarray, tabularx, longtable, multirow,threeparttable, makecell, booktabs, caption} 
\theadset{\renewcommand{\arraystretch}{0.6}}
\renewcommand\theadfont{\normalsize}
%\usepackage{multirow}
%\usepackage{tikz}
%\usepackage{booktabs}         %to use \toprule and \bottomrule without error message
\usepackage{pgfplots, pgfplotstable} %to plot figure
\usepackage{threeparttable} 
\usepackage{booktabs,tabularx,caption}
\newcolumntype{C}{>{\centering\arraybackslash}X} % centered version of "X" column type
\usepackage{booktabs,siunitx}
\sisetup{table-format=1.3} % default numerical column spec
\usepackage{multirow,tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\renewcommand\arraystretch{1.5}
\renewcommand{\tabcolsep}{5pt} % default is 6pt
\usepackage{pgfplots}   
\pgfplotsset{compat=1.5}
\usepackage{subfigure}        % to add subfigures
\usepackage{gensymb}
\usepackage{siunitx}
\usepackage{caption}
\newcommand*{\head}[1]{\textbf{#1}}%  to make heads of table in BOLD, it is used with booktabs package and \head
\usepackage{url} \makeatletter \g@addto@macro{\UrlBreaks}{\UrlOrds} \makeatother
\usepackage{cleveref}
\usepackage{url} \makeatletter \g@addto@macro{\UrlBreaks}{\UrlOrds} \makeatother
\usepackage[justification=centering]{caption}
\PassOptionsToPackage{hyphens}{url}
%\usepackage{hyperref}
\usepackage{float}
%\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
%\usepackage[a4paper, portrait, margin=1in]{geometry}
\usepackage{adjustbox}
\usepackage{tabularx}
\usepackage{pgfplots, pgfplotstable}
\usepackage{booktabs,csvsimple}
\usepackage{pdflscape}
\usepackage{amsmath, amsfonts, amsthm} % needed for command eqref or Math packages
\usepackage{amssymb} % needed for math fonts
\usepackage[
    colorlinks=true
   ,breaklinks
   %, ngerman
    ] {hyperref} % needed for creating hyperlinks in the docuent, the option colorlink=true gets rid of the awful boxes, breaklinks breaks lonk links (list of figures), and the ngerman sets everthing for german s default hyperlink languages.
%\usepackage[hyphenbreaks]{breakurl} 
\usepackage{cleveref}
\usepackage{xcolor}
\definecolor {c1}{rgb}{0,0, 1} % blue
\definecolor {c2}{rgb}{0.3,0.3, 0.9} % light blue
\definecolor {c3}{rgb}{0.3,0.3, 0.9} % red blue
\hypersetup{
   linkcolor={c1}, % internal links
    citecolor={c2}, % citations 
    urlcolor={c3} % external links/urls
}

%\usepackage[round, authoryear]{natbib} % needed for abbrvant bibliography style
%\usepackage[nottoc]{tocbibind} % needed for displaying bibliography and other in the table of contents
\usepackage{graphicx} % needed for\includegraphics
%\imp{graphicx}
\usepackage{longtable} % needed for long tables over pages
\usepackage{bigstrut} % needed for the  command \bigstrut
\usepackage{enumerate} % needed for some options in enumerate
\usepackage{blkarray}
%\usepackage{todonotes} % needed for todos
\usepackage{makeidx}  % needed for creating an index
%\usepackage{xcolor}
\usepackage{blindtext} % needed for creating dummy text passage
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage[nottoc, notlot, notlof]{tocbibind}
\usepackage[nottoc]{tocbibind} % needed for displayng bibliography and other in the able of contents
%\usepackage{figures}
\usepackage{xspace}
\usepackage{makecell}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
%\usepackage[T]{fontenc}
\usepackage{rotating,booktabs}
\usepackage{lscape}
\usepackage{array}
\usepackage{caption}
\captionsetup[figure]{font=footnotesize,
                    labelsep=period}
\captionsetup[table]{font={footnotesize,sc},
                      labelsep=newline,
                      justification=centering}

\makeatletter
\long\def\ifnodedefined#1#2#3{%
    \@ifundefined{pgf@sh@ns@#1}{#3}{#2}%
}

\pgfplotsset{
    discontinuous/.style={
    scatter,
    scatter/@pre marker code/.code={
        \ifnodedefined{marker}{
            \pgfpointdiff{\pgfpointanchor{marker}{center}}%
             {\pgfpoint{0}{0}}%
             \ifdim\pgf@y>0pt
                \tikzset{options/.style={mark=*, fill=white}}
                \draw [densely dashed,blue] (marker-|0,0) -- (0,0);
                \draw plot [mark=*] coordinates {(marker-|0,0)};
             \else
                \tikzset{options/.style={mark=none}}
             \fi
        }{
            \tikzset{options/.style={mark=none}}        
        }
        \coordinate (marker) at (0,0);
        \begin{scope}[options]
    },
    scatter/@post marker code/.code={\end{scope}}
    }
}

\makeatother

%% page settings%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[top=2cm, bottom=1.8cm, left=2.5cm, right=2.5cm]{geometry} % needed for page border stteings 
\parindent=0cm % for spece of first line of new text block
\sloppy % for writing with hypenless justification (tries to)
%\usepackage[round, authoryear]{natbib} % needed for cite and abbrvnat bibliograph style

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\parindent 0ex
\pagestyle{fancy}
\fancyhf{}
\fancyhead {}
\frenchspacing
\fancyfoot{}
\fancyhead[L]{\slshape \MakeUppercase {Multidimensional Poverty Index (MPI) in Ethiopia}}
\fancyfoot[C]{\thepage}
%\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\baselinestretch}{1.5}%This affects the in spacing of my paragraphes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theadset{\renewcommand{\arraystretch}{0.6}}
\renewcommand\theadfont{\small}
\renewcommand\theadalign{bc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{Section_1}
\input{Section_2}
\input{Section_3}
\input{Section_4}
\input{Section_5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\includeonly{Chapter_1,Chapter_4}  % compile just chapters 1 and 4, space characters not permitted
\begin{document}
\include{Chapter_1}                % omit the '.tex' extension
\include{Chapter_2}
\include{Chapter_3}
\include{Chapter_4}
%both of these options did not help!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\graphicspath{ {images/} }
\begin{titlepage}
\begin{center}
\vspace*{1cm}
\pagestyle{empty}
\pagestyle{plain}
\Large{\textbf{Household Well-being in Ethiopia: Multidimensional Poverty, Time  Use to Work and Labor Productivity, and Nutrition Insecurity}}\\
\Large{\textbf{Multidimensional Poverty Index (MPI) in Ethiopia}}\\

\vfill
\line(1,0){400}\\ [1mm]%automatically putting vetical space btween the two elments to fill the page
\huge{\textbf{This is a sample title}}\\[3mm]
%\lipsum[1]
%{\setstretch{1.0}\color{blue}
%\lipsum[2]
%}
%\lipsum[3]
%\Large{\textbf{-This is a sample subtitle-}}\\[1mm]
\line(1,0){400}\\
\vfill    %Now it is centered at the page
By WELDESLASSIE HAILAI\\
Candidate\#:{214585063}\\
Supervisor Dr. Claire Vermaak\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\date {\today}
%\maketitle
\end{center}
\end{titlepage}
\tableofcontents
\thispagestyle{empty} %This helps you to remove the page # in the table of contents part
\clearpage
%\chapter{Background and Justification}
\pagestyle{fancy}
%\fancyhf{}
%\fancyhead[OC]{\leftmark}
%\fancyhead[EC]{\rightmark}
%\renewcommand{\footrulewidth}{1pt} % needed to add a line at the bottom
\cfoot{\thepage}
\setcounter{page}{1} %Now the f

\section{Background and Justifications}
...............

That is \include{Chapter} , \input{---}, \subfile{filename}, \documentclass{standalone} did not help or I failed to properly use these options... please HELP ASAP! Thank you!

10
  • 2
    Welcome to TeX.se, but please don't post all your actual code here, If you want to understand how to do things, make a sample document that shows the problem you're having. Most of the code you've posted has nothing to do with the problem at hand, so remove it. It's also not clear what you want to do: include chapters into a larger document or include documents with different preambles into a larger document.
    – Alan Munn
    Aug 14 '17 at 22:13
  • 2
    you have posted a lot of code but the question is completely unclear, and the code does not help us to understand it as we can not run it as it includes files we do not have. Please state clearly what output you get and what output you want. Also you appear to have the titlepage after chapter 4?? Aug 14 '17 at 22:13
  • you should really clean up your preamble for example you load array twice, blkarray twice, tabuarx 4!! times, you load demo packages like lipsum, etc etc Aug 14 '17 at 22:17
  • @AlanMunn Thank you for your constructive comment. The question is simply how do I combine three independent threads of a research topic into one Thesis (book form)? Aug 14 '17 at 22:28
  • @DavidCarlisle I'm very appreciative for your constructive and problem-solving thoughts Sir. Yes. I strongly agree on that the preamble is very bad as I am the first time user of LaTex and was rushing to compile my first research work. I had to collect all stuff (including unimportant ones). I am editing it now, I am very appreciative and all comments and assistance will be welcome and well captured. The whole issue I had to learn by try and error, I am sorry for the clumsy presentations. Aug 14 '17 at 22:35
3
\documentclass[14.49998pt, a4paper, oneside]{article}

there is no 14.49998pt option, this must give a warning

\usepackage[english]{babel} % English language/hyphenation
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{xcolor}

\usepackage[utf8x]{inputenc}

I would use the standard utf8 option unless you have a definite need for some of the utf8x features.

\usepackage{xfrac}
%\usepackage[sc]{mathpazo}
\usepackage{sectsty} % Allows customizing section commands
\usepackage{tikz, pgfplots, pgfplotstable} %to plot figure
\usepackage{array, blkarray, tabularx, longtable, 
            multirow,threeparttable, makecell, booktabs, caption} 
\theadset{\renewcommand{\arraystretch}{0.6}}
\renewcommand\theadfont{\normalsize}
%\usepackage{multirow}
%\usepackage{tikz}


%\usepackage{booktabs}         %to use \toprule and \bottomrule without error message

The above line does nothing, the package is loaded above

\usepackage{pgfplots, pgfplotstable} %to plot figure

The above line does nothing, the packages are loaded above

\usepackage{threeparttable} 

The above line does nothing, the package is loaded above

\usepackage{booktabs,tabularx,caption}

The above line just loads caption, the other packages are loaded above

\newcolumntype{C}{>{\centering\arraybackslash}X} % centered version of "X" column type
\usepackage{booktabs,siunitx}

The above line just loads siunitx, the other packages are loaded above

\sisetup{table-format=1.3} % default numerical column spec
\usepackage{multirow,tabularx}

The above line does nothing the packages are loaded above

\newcolumntype{Y}{>{\centering\arraybackslash}X}

OK but you defined Y to be the same as C

\renewcommand\arraystretch{1.5}
\renewcommand{\tabcolsep}{5pt} % default is 6pt
\usepackage{pgfplots}

The above line does nothing, package loaded above

\pgfplotsset{compat=1.5}
\usepackage{subfigure}        % to add subfigures
\usepackage{gensymb}
\usepackage{siunitx}

The above line does nothing, package loaded above

\usepackage{caption}

The above line does nothing, package loaded above

\newcommand*{\head}[1]{\textbf{#1}}%  to make heads of table in BOLD, it is used with booktabs package and \head
\usepackage{url} \makeatletter \g@addto@macro{\UrlBreaks}{\UrlOrds}\makeatother
\usepackage{cleveref}
\usepackage{url} \makeatletter \g@addto@macro{\UrlBreaks}{\UrlOrds} 
 \makeatother

The \usepackage line does nothing, package loaded above , then you add UrlOrds a second time to UrlBreaks, which won't error but slows down all url processing

\usepackage[justification=centering]{caption}

This will generate an error as you have already loaded caption without this option

\PassOptionsToPackage{hyphens}{url}

This will do nothing as you can not pass oprions to a package after it is loaded

%\usepackage{hyperref}
\usepackage{float}
%\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
%\usepackage[a4paper, portrait, margin=1in]{geometry}
\usepackage{adjustbox}
\usepackage{tabularx}

The above line does nothing, package loaded above

\usepackage{pgfplots, pgfplotstable}

The above line does nothing, packages loaded above

\usepackage{booktabs,csvsimple}

The above just loads cvssimple, booktabs package loaded above

\usepackage{pdflscape}

\usepackage{amsmath, amsfonts, amsthm} % needed for command eqref or Math packages
\usepackage{amssymb} % needed for math fonts
\usepackage[
    colorlinks=true
   ,breaklinks
   %, ngerman
    ] {hyperref} % needed for creating hyperlinks in the docuent, the option colorlink=true gets rid of the awful boxes, breaklinks breaks lonk links (list of figures), and the ngerman sets everthing for german s default hyperlink languages.
%\usepackage[hyphenbreaks]{breakurl} 
\usepackage{cleveref}

The above line does nothing, package loaded above

\usepackage{xcolor}

The above line does nothing, package loaded above

\definecolor {c1}{rgb}{0,0, 1} % blue
\definecolor {c2}{rgb}{0.3,0.3, 0.9} % light blue
\definecolor {c3}{rgb}{0.3,0.3, 0.9} % red blue
\hypersetup{
   linkcolor={c1}, % internal links
    citecolor={c2}, % citations 
    urlcolor={c3} % external links/urls
}

%\usepackage[round, authoryear]{natbib} % needed for abbrvant bibliography style
%\usepackage[nottoc]{tocbibind} % needed for displaying bibliography and other in the table of contents
\usepackage{graphicx} % needed for\includegraphics
%\imp{graphicx}
\usepackage{longtable} % needed for long tables over pages

The above line does nothing, package loaded above

\usepackage{bigstrut} % needed for the  command \bigstrut
\usepackage{enumerate} % needed for some options in enumerate
\usepackage{blkarray}
%\usepackage{todonotes} % needed for todos
\usepackage{makeidx}  % needed for creating an index
%\usepackage{xcolor}
\usepackage{blindtext} % needed for creating dummy text passage

You shouldn't have this in a real document

\usepackage{lipsum}

or this

\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage[nottoc, notlot, notlof]{tocbibind}
\usepackage[nottoc]{tocbibind} % needed for displayng bibliography and other in the able of contents

The above line does nothing, package loaded above

%\usepackage{figures}
\usepackage{xspace}
\usepackage{makecell}
\usepackage{pgfplots}

The above line does nothing, package loaded above

\usepackage{pgfplotstable}

The above line does nothing, package loaded above

%\usepackage[T1]{fontenc}

This is commented out but is the one package that you ought to be using

\usepackage{rotating,booktabs}

The above just loads rotating, booktabs package loaded above

\usepackage{lscape}

This has already been included by pdflascape

\usepackage{array}

The above line does nothing, package loaded above

\usepackage{caption}

The above line does nothing, package loaded above

\captionsetup[figure]{font=footnotesize,
                    labelsep=period}
\captionsetup[table]{font={footnotesize,sc},
                      labelsep=newline,
                      justification=centering}

\makeatletter
\long\def\ifnodedefined#1#2#3{%
    \@ifundefined{pgf@sh@ns@#1}{#3}{#2}%
}

\pgfplotsset{
    discontinuous/.style={
    scatter,
    scatter/@pre marker code/.code={
        \ifnodedefined{marker}{
            \pgfpointdiff{\pgfpointanchor{marker}{center}}%
             {\pgfpoint{0}{0}}%
             \ifdim\pgf@y>0pt
                \tikzset{options/.style={mark=*, fill=white}}
                \draw [densely dashed,blue] (marker-|0,0) -- (0,0);
                \draw plot [mark=*] coordinates {(marker-|0,0)};
             \else
                \tikzset{options/.style={mark=none}}
             \fi
        }{
            \tikzset{options/.style={mark=none}}        
        }
        \coordinate (marker) at (0,0);
        \begin{scope}[options]
    },
    scatter/@post marker code/.code={\end{scope}}
    }
}

\makeatother

%% page settings%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[top=2cm, bottom=1.8cm, left=2.5cm, right=2.5cm]{geometry} % needed for page border stteings 
\parindent=0cm % for spece of first line of new text block
\sloppy % for writing with hypenless justification (tries to)
%\usepackage[round, authoryear]{natbib} % needed for cite and abbrvnat bibliograph style

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\parindent 0ex
\pagestyle{fancy}
\fancyhf{}
\fancyhead {}
\frenchspacing
\fancyfoot{}
\fancyhead[L]{\slshape \MakeUppercase {Multidimensional Poverty Index (MPI) in Ethiopia}}
\fancyfoot[C]{\thepage}
%\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\baselinestretch}{1.5}%This affects the in spacing of my paragraphes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theadset{\renewcommand{\arraystretch}{0.6}}
\renewcommand\theadfont{\small}
\renewcommand\theadalign{bc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

end of pramble...

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{Section_1}
\input{Section_2}
\input{Section_3}
\input{Section_4}
\input{Section_5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\includeonly{Chapter_1,Chapter_4}  % compile just chapters 1 and 4, space characters not permitted

\includeonly should be in the document preamble, not here

\begin{document}

The above line will give an error you can not have two \begin{document}

\include{Chapter_1}                % omit the '.tex' extension
\include{Chapter_2}
\include{Chapter_3}
\include{Chapter_4}
%both of these options did not help!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\graphicspath{ {images/} }
\begin{titlepage}
\begin{center}
\vspace*{1cm}
\pagestyle{empty}
\pagestyle{plain}
\Large{\textbf{Household Well-being in Ethiopia: Multidimensional Poverty,

size commands do not take an argument, the syntax is {\large abc} not \large{abc}

Time Use to Work and Labor Productivity, and Nutrition Insecurity}}\ \Large{\textbf{Multidimensional Poverty Index (MPI) in Ethiopia}}\

{\Large not \Large{

\vfill
\line(1,0){400}\\ [1mm]%automatically putting vetical space btween the two elments to fill the page
\huge{\textbf{This is a sample title}}\\[3mm]

{\huge not huge{

%\lipsum[1]
%{\setstretch{1.0}\color{blue}
%\lipsum[2]
%}
%\lipsum[3]
%\Large{\textbf{-This is a sample subtitle-}}\\[1mm]
\line(1,0){400}\\
\vfill    %Now it is centered at the page
By WELDESLASSIE HAILAI\\
Candidate\#:{214585063}\\
Supervisor Dr. Claire Vermaak\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\date {\today}
%\maketitle
\end{center}
\end{titlepage}
\tableofcontents
\thispagestyle{empty} %This helps you to remove the page # in the table of contents part
\clearpage
%\chapter{Background and Justification}
\pagestyle{fancy}
%\fancyhf{}
%\fancyhead[OC]{\leftmark}
%\fancyhead[EC]{\rightmark}
%\renewcommand{\footrulewidth}{1pt} % needed to add a line at the bottom
\cfoot{\thepage}
\setcounter{page}{1} %Now the f

\section{Background and Justifications}
...............



To make a document consisting of three other documents just arrange things so each of the small documents looks like

\documentclass{article}
  \usepackage{..}
\begin{document}
\input{document_1_body}
\end{document}

where document_1_body.tex, document_2_body.tex, document_3_body.tex are the texts of the documents without the preamble, then your combined document is simply

\documentclass{book}
\usepackage{....}
\begin{document}
\chapter{doc one}
\input{document_1_body}
\chapter{doc two}
\input{document_2_body}
\chapter{doc three}
\input{document_3_body}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.