Compile multiple .tex files to one file











up vote
2
down vote

favorite












I am making a math formulary collection but the file is getting too big and too long!

So i was wondering if it is possible to make a .tex for for multiplication and one .tex file for division. And then make a third .tex file where i am importing the other two files and still be able to make TOC?
and lets say each .tex files also have multiple sections and sub(sub)sections










share|improve this question
























  • Possible Duplicate: Splitting a large document into several files
    – Martin Scharrer
    yesterday















up vote
2
down vote

favorite












I am making a math formulary collection but the file is getting too big and too long!

So i was wondering if it is possible to make a .tex for for multiplication and one .tex file for division. And then make a third .tex file where i am importing the other two files and still be able to make TOC?
and lets say each .tex files also have multiple sections and sub(sub)sections










share|improve this question
























  • Possible Duplicate: Splitting a large document into several files
    – Martin Scharrer
    yesterday













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I am making a math formulary collection but the file is getting too big and too long!

So i was wondering if it is possible to make a .tex for for multiplication and one .tex file for division. And then make a third .tex file where i am importing the other two files and still be able to make TOC?
and lets say each .tex files also have multiple sections and sub(sub)sections










share|improve this question















I am making a math formulary collection but the file is getting too big and too long!

So i was wondering if it is possible to make a .tex for for multiplication and one .tex file for division. And then make a third .tex file where i am importing the other two files and still be able to make TOC?
and lets say each .tex files also have multiple sections and sub(sub)sections







multiple-files document-size






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Martin Scharrer

197k44629811




197k44629811










asked Nov 4 '15 at 14:25









Daniel Guldberg Aaes

1367




1367












  • Possible Duplicate: Splitting a large document into several files
    – Martin Scharrer
    yesterday


















  • Possible Duplicate: Splitting a large document into several files
    – Martin Scharrer
    yesterday
















Possible Duplicate: Splitting a large document into several files
– Martin Scharrer
yesterday




Possible Duplicate: Splitting a large document into several files
– Martin Scharrer
yesterday










3 Answers
3






active

oldest

votes

















up vote
3
down vote













In order to selectively include parts of your document and still get page numbers and table of contents right, you can use include and includeonly. Your main file should look like this:



documentclass{whatever}
% put preamble here

% includeonly{mult}
% includeonly{div}
% includeonly{mult,div}
begin{document}
tableofcontents
include{mult}
include{div}
end{document}


The files mult.tex and div.tex should then only contain the corresponding text and formulas, but no preamble (no documentclass, no begin{document}, etc.).



Note that include always starts a new page. This is necessary in order to get consistent layout and page numbers. On the other hand, input does not insert a new page, but then you do not get the right table of contents, and page numbers change when you comment out one of the files.






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
    – jarauh
    Nov 4 '15 at 14:57










  • A good read about input vs. include is tex.stackexchange.com/q/246/2975
    – Martin Scharrer
    yesterday




















up vote
3
down vote













Applying "divide and conquer" approach to your project -- by splitting your project into several smaller input files -- is a good practice.



In addition to this, it will be better if you can compile each smaller input file so you can see the result on which you focus. Compiling each smaller input file, of course, takes shorter time compared to compiling the project as a whole.



The following imitates your case. Consider you have 2 smaller input files called dif.tex and int.tex. Both are compilable as follows.



dif.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definition}
[
lim_{hto 0}frac{f(x+h)-f(x)}{h} = f'(x)
]

section{Partial differentiation}
[
textrm{d}(AB) = B,textrm{d}A +A,textrm{d}B
]
end{document}


int.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definite integral}
[
int_a^b f(x), textrm{d}x = F(b) - F(a)
]

section{Partial integral}
[
int A, textrm{d}B = AB -int B , textrm{d}A
]
end{document}


Now you can import both smaller files from your main input file (called main.tex) as follows. Note that we need to load docmute in the main.tex. The purpose of this package is to make input only import contents between begin{document} and end{document}.



main.tex



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif}
input{int}

end{document}


Update based on the additional comments



If your project is structured as follows,



.../main/main.tex
.../main/dif/dif.tex
.../main/int/int.tex


The main.tex has to be slightly modified as follows,



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif/dif}
input{int/int}

end{document}





share|improve this answer























  • What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
    – Daniel Guldberg Aaes
    Nov 4 '15 at 21:29


















up vote
1
down vote













You could organize your material in three separate files:




  • File mult.tex: Just the body of the multiplication-related material, no preamble, no begin{document}, and no end{document}.


  • File div.tex: Just the body of the division-related material, no preamble, no begin{document}, and no end{document}.



  • File driver.tex, organized as follows:



    documentclass[<options, if any>]{article} % or `report`, or `book`, etc
    ... % preamble material, such as page size, etc
    begin{document}
    tableofcontents
    input mult
    clearpage
    input div
    end{document}



If you want to compile just the mult material, or just the div material, comment out one of the other input statements, and be sure to recompile twice in order to propagate all changes (including the table of contents).






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • @DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
    – Mico
    Nov 4 '15 at 15:09











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f276580%2fcompile-multiple-tex-files-to-one-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













In order to selectively include parts of your document and still get page numbers and table of contents right, you can use include and includeonly. Your main file should look like this:



documentclass{whatever}
% put preamble here

% includeonly{mult}
% includeonly{div}
% includeonly{mult,div}
begin{document}
tableofcontents
include{mult}
include{div}
end{document}


The files mult.tex and div.tex should then only contain the corresponding text and formulas, but no preamble (no documentclass, no begin{document}, etc.).



Note that include always starts a new page. This is necessary in order to get consistent layout and page numbers. On the other hand, input does not insert a new page, but then you do not get the right table of contents, and page numbers change when you comment out one of the files.






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
    – jarauh
    Nov 4 '15 at 14:57










  • A good read about input vs. include is tex.stackexchange.com/q/246/2975
    – Martin Scharrer
    yesterday

















up vote
3
down vote













In order to selectively include parts of your document and still get page numbers and table of contents right, you can use include and includeonly. Your main file should look like this:



documentclass{whatever}
% put preamble here

% includeonly{mult}
% includeonly{div}
% includeonly{mult,div}
begin{document}
tableofcontents
include{mult}
include{div}
end{document}


The files mult.tex and div.tex should then only contain the corresponding text and formulas, but no preamble (no documentclass, no begin{document}, etc.).



Note that include always starts a new page. This is necessary in order to get consistent layout and page numbers. On the other hand, input does not insert a new page, but then you do not get the right table of contents, and page numbers change when you comment out one of the files.






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
    – jarauh
    Nov 4 '15 at 14:57










  • A good read about input vs. include is tex.stackexchange.com/q/246/2975
    – Martin Scharrer
    yesterday















up vote
3
down vote










up vote
3
down vote









In order to selectively include parts of your document and still get page numbers and table of contents right, you can use include and includeonly. Your main file should look like this:



documentclass{whatever}
% put preamble here

% includeonly{mult}
% includeonly{div}
% includeonly{mult,div}
begin{document}
tableofcontents
include{mult}
include{div}
end{document}


The files mult.tex and div.tex should then only contain the corresponding text and formulas, but no preamble (no documentclass, no begin{document}, etc.).



Note that include always starts a new page. This is necessary in order to get consistent layout and page numbers. On the other hand, input does not insert a new page, but then you do not get the right table of contents, and page numbers change when you comment out one of the files.






share|improve this answer












In order to selectively include parts of your document and still get page numbers and table of contents right, you can use include and includeonly. Your main file should look like this:



documentclass{whatever}
% put preamble here

% includeonly{mult}
% includeonly{div}
% includeonly{mult,div}
begin{document}
tableofcontents
include{mult}
include{div}
end{document}


The files mult.tex and div.tex should then only contain the corresponding text and formulas, but no preamble (no documentclass, no begin{document}, etc.).



Note that include always starts a new page. This is necessary in order to get consistent layout and page numbers. On the other hand, input does not insert a new page, but then you do not get the right table of contents, and page numbers change when you comment out one of the files.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 4 '15 at 14:50









jarauh

2,204520




2,204520












  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
    – jarauh
    Nov 4 '15 at 14:57










  • A good read about input vs. include is tex.stackexchange.com/q/246/2975
    – Martin Scharrer
    yesterday




















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
    – jarauh
    Nov 4 '15 at 14:57










  • A good read about input vs. include is tex.stackexchange.com/q/246/2975
    – Martin Scharrer
    yesterday


















Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
– Daniel Guldberg Aaes
Nov 4 '15 at 14:55




Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
– Daniel Guldberg Aaes
Nov 4 '15 at 14:55












No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
– jarauh
Nov 4 '15 at 14:57




No problem with that. Just put the section and subsection commands into your files mult.tex and div.tex.
– jarauh
Nov 4 '15 at 14:57












A good read about input vs. include is tex.stackexchange.com/q/246/2975
– Martin Scharrer
yesterday






A good read about input vs. include is tex.stackexchange.com/q/246/2975
– Martin Scharrer
yesterday












up vote
3
down vote













Applying "divide and conquer" approach to your project -- by splitting your project into several smaller input files -- is a good practice.



In addition to this, it will be better if you can compile each smaller input file so you can see the result on which you focus. Compiling each smaller input file, of course, takes shorter time compared to compiling the project as a whole.



The following imitates your case. Consider you have 2 smaller input files called dif.tex and int.tex. Both are compilable as follows.



dif.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definition}
[
lim_{hto 0}frac{f(x+h)-f(x)}{h} = f'(x)
]

section{Partial differentiation}
[
textrm{d}(AB) = B,textrm{d}A +A,textrm{d}B
]
end{document}


int.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definite integral}
[
int_a^b f(x), textrm{d}x = F(b) - F(a)
]

section{Partial integral}
[
int A, textrm{d}B = AB -int B , textrm{d}A
]
end{document}


Now you can import both smaller files from your main input file (called main.tex) as follows. Note that we need to load docmute in the main.tex. The purpose of this package is to make input only import contents between begin{document} and end{document}.



main.tex



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif}
input{int}

end{document}


Update based on the additional comments



If your project is structured as follows,



.../main/main.tex
.../main/dif/dif.tex
.../main/int/int.tex


The main.tex has to be slightly modified as follows,



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif/dif}
input{int/int}

end{document}





share|improve this answer























  • What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
    – Daniel Guldberg Aaes
    Nov 4 '15 at 21:29















up vote
3
down vote













Applying "divide and conquer" approach to your project -- by splitting your project into several smaller input files -- is a good practice.



In addition to this, it will be better if you can compile each smaller input file so you can see the result on which you focus. Compiling each smaller input file, of course, takes shorter time compared to compiling the project as a whole.



The following imitates your case. Consider you have 2 smaller input files called dif.tex and int.tex. Both are compilable as follows.



dif.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definition}
[
lim_{hto 0}frac{f(x+h)-f(x)}{h} = f'(x)
]

section{Partial differentiation}
[
textrm{d}(AB) = B,textrm{d}A +A,textrm{d}B
]
end{document}


int.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definite integral}
[
int_a^b f(x), textrm{d}x = F(b) - F(a)
]

section{Partial integral}
[
int A, textrm{d}B = AB -int B , textrm{d}A
]
end{document}


Now you can import both smaller files from your main input file (called main.tex) as follows. Note that we need to load docmute in the main.tex. The purpose of this package is to make input only import contents between begin{document} and end{document}.



main.tex



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif}
input{int}

end{document}


Update based on the additional comments



If your project is structured as follows,



.../main/main.tex
.../main/dif/dif.tex
.../main/int/int.tex


The main.tex has to be slightly modified as follows,



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif/dif}
input{int/int}

end{document}





share|improve this answer























  • What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
    – Daniel Guldberg Aaes
    Nov 4 '15 at 21:29













up vote
3
down vote










up vote
3
down vote









Applying "divide and conquer" approach to your project -- by splitting your project into several smaller input files -- is a good practice.



In addition to this, it will be better if you can compile each smaller input file so you can see the result on which you focus. Compiling each smaller input file, of course, takes shorter time compared to compiling the project as a whole.



The following imitates your case. Consider you have 2 smaller input files called dif.tex and int.tex. Both are compilable as follows.



dif.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definition}
[
lim_{hto 0}frac{f(x+h)-f(x)}{h} = f'(x)
]

section{Partial differentiation}
[
textrm{d}(AB) = B,textrm{d}A +A,textrm{d}B
]
end{document}


int.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definite integral}
[
int_a^b f(x), textrm{d}x = F(b) - F(a)
]

section{Partial integral}
[
int A, textrm{d}B = AB -int B , textrm{d}A
]
end{document}


Now you can import both smaller files from your main input file (called main.tex) as follows. Note that we need to load docmute in the main.tex. The purpose of this package is to make input only import contents between begin{document} and end{document}.



main.tex



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif}
input{int}

end{document}


Update based on the additional comments



If your project is structured as follows,



.../main/main.tex
.../main/dif/dif.tex
.../main/int/int.tex


The main.tex has to be slightly modified as follows,



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif/dif}
input{int/int}

end{document}





share|improve this answer














Applying "divide and conquer" approach to your project -- by splitting your project into several smaller input files -- is a good practice.



In addition to this, it will be better if you can compile each smaller input file so you can see the result on which you focus. Compiling each smaller input file, of course, takes shorter time compared to compiling the project as a whole.



The following imitates your case. Consider you have 2 smaller input files called dif.tex and int.tex. Both are compilable as follows.



dif.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definition}
[
lim_{hto 0}frac{f(x+h)-f(x)}{h} = f'(x)
]

section{Partial differentiation}
[
textrm{d}(AB) = B,textrm{d}A +A,textrm{d}B
]
end{document}


int.tex



documentclass{article}
usepackage{amsmath}

begin{document}
section{Definite integral}
[
int_a^b f(x), textrm{d}x = F(b) - F(a)
]

section{Partial integral}
[
int A, textrm{d}B = AB -int B , textrm{d}A
]
end{document}


Now you can import both smaller files from your main input file (called main.tex) as follows. Note that we need to load docmute in the main.tex. The purpose of this package is to make input only import contents between begin{document} and end{document}.



main.tex



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif}
input{int}

end{document}


Update based on the additional comments



If your project is structured as follows,



.../main/main.tex
.../main/dif/dif.tex
.../main/int/int.tex


The main.tex has to be slightly modified as follows,



documentclass{article}
usepackage{docmute}
usepackage{amsmath}


begin{document}

input{dif/dif}
input{int/int}

end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 4 '15 at 23:07

























answered Nov 4 '15 at 15:27









Artificial Stupidity

4,6091832




4,6091832












  • What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
    – Daniel Guldberg Aaes
    Nov 4 '15 at 21:29


















  • What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
    – Daniel Guldberg Aaes
    Nov 4 '15 at 21:29
















What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
– Daniel Guldberg Aaes
Nov 4 '15 at 21:29




What if i have main.tex in a folder called main and then dif.tex in a subfolder named dif (/main/dif/dif.tex. How could I then import dif.?
– Daniel Guldberg Aaes
Nov 4 '15 at 21:29










up vote
1
down vote













You could organize your material in three separate files:




  • File mult.tex: Just the body of the multiplication-related material, no preamble, no begin{document}, and no end{document}.


  • File div.tex: Just the body of the division-related material, no preamble, no begin{document}, and no end{document}.



  • File driver.tex, organized as follows:



    documentclass[<options, if any>]{article} % or `report`, or `book`, etc
    ... % preamble material, such as page size, etc
    begin{document}
    tableofcontents
    input mult
    clearpage
    input div
    end{document}



If you want to compile just the mult material, or just the div material, comment out one of the other input statements, and be sure to recompile twice in order to propagate all changes (including the table of contents).






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • @DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
    – Mico
    Nov 4 '15 at 15:09















up vote
1
down vote













You could organize your material in three separate files:




  • File mult.tex: Just the body of the multiplication-related material, no preamble, no begin{document}, and no end{document}.


  • File div.tex: Just the body of the division-related material, no preamble, no begin{document}, and no end{document}.



  • File driver.tex, organized as follows:



    documentclass[<options, if any>]{article} % or `report`, or `book`, etc
    ... % preamble material, such as page size, etc
    begin{document}
    tableofcontents
    input mult
    clearpage
    input div
    end{document}



If you want to compile just the mult material, or just the div material, comment out one of the other input statements, and be sure to recompile twice in order to propagate all changes (including the table of contents).






share|improve this answer





















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • @DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
    – Mico
    Nov 4 '15 at 15:09













up vote
1
down vote










up vote
1
down vote









You could organize your material in three separate files:




  • File mult.tex: Just the body of the multiplication-related material, no preamble, no begin{document}, and no end{document}.


  • File div.tex: Just the body of the division-related material, no preamble, no begin{document}, and no end{document}.



  • File driver.tex, organized as follows:



    documentclass[<options, if any>]{article} % or `report`, or `book`, etc
    ... % preamble material, such as page size, etc
    begin{document}
    tableofcontents
    input mult
    clearpage
    input div
    end{document}



If you want to compile just the mult material, or just the div material, comment out one of the other input statements, and be sure to recompile twice in order to propagate all changes (including the table of contents).






share|improve this answer












You could organize your material in three separate files:




  • File mult.tex: Just the body of the multiplication-related material, no preamble, no begin{document}, and no end{document}.


  • File div.tex: Just the body of the division-related material, no preamble, no begin{document}, and no end{document}.



  • File driver.tex, organized as follows:



    documentclass[<options, if any>]{article} % or `report`, or `book`, etc
    ... % preamble material, such as page size, etc
    begin{document}
    tableofcontents
    input mult
    clearpage
    input div
    end{document}



If you want to compile just the mult material, or just the div material, comment out one of the other input statements, and be sure to recompile twice in order to propagate all changes (including the table of contents).







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 4 '15 at 14:40









Mico

269k30367751




269k30367751












  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • @DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
    – Mico
    Nov 4 '15 at 15:09


















  • Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
    – Daniel Guldberg Aaes
    Nov 4 '15 at 14:55










  • @DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
    – Mico
    Nov 4 '15 at 15:09
















Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
– Daniel Guldberg Aaes
Nov 4 '15 at 14:55




Thanks for the anwser! I have edited the last line in the Question, i hope you have a great anwser for that
– Daniel Guldberg Aaes
Nov 4 '15 at 14:55












@DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
– Mico
Nov 4 '15 at 15:09




@DanielGuldbergAaes - There would be no problem at all with the files mult.tex and div.tex containing section, subsection, etc directives. If, say, div.tex comes after mult.tex in the driver file, and if you want to compile just div.tex while keeping its main section number at 2, all you'd need to do is provide the instruction addtocounter{section}{1} just ahead of input div.
– Mico
Nov 4 '15 at 15:09


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f276580%2fcompile-multiple-tex-files-to-one-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt