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
multiple-files document-size
add a comment |
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
multiple-files document-size
Possible Duplicate: Splitting a large document into several files
– Martin Scharrer♦
yesterday
add a comment |
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
multiple-files document-size
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
multiple-files document-size
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
add a comment |
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
add a comment |
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.
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 thesection
andsubsection
commands into your filesmult.tex
anddiv.tex
.
– jarauh
Nov 4 '15 at 14:57
A good read aboutinput
vs.include
is tex.stackexchange.com/q/246/2975
– Martin Scharrer♦
yesterday
add a comment |
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}
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
add a comment |
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, nobegin{document}
, and noend{document}
.File
div.tex
: Just the body of the division-related material, no preamble, nobegin{document}
, and noend{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).
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 filesmult.tex
anddiv.tex
containingsection
,subsection
, etc directives. If, say,div.tex
comes aftermult.tex
in the driver file, and if you want to compile justdiv.tex
while keeping its main section number at2
, all you'd need to do is provide the instructionaddtocounter{section}{1}
just ahead ofinput div
.
– Mico
Nov 4 '15 at 15:09
add a comment |
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.
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 thesection
andsubsection
commands into your filesmult.tex
anddiv.tex
.
– jarauh
Nov 4 '15 at 14:57
A good read aboutinput
vs.include
is tex.stackexchange.com/q/246/2975
– Martin Scharrer♦
yesterday
add a comment |
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.
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 thesection
andsubsection
commands into your filesmult.tex
anddiv.tex
.
– jarauh
Nov 4 '15 at 14:57
A good read aboutinput
vs.include
is tex.stackexchange.com/q/246/2975
– Martin Scharrer♦
yesterday
add a comment |
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.
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.
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 thesection
andsubsection
commands into your filesmult.tex
anddiv.tex
.
– jarauh
Nov 4 '15 at 14:57
A good read aboutinput
vs.include
is tex.stackexchange.com/q/246/2975
– Martin Scharrer♦
yesterday
add a comment |
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 thesection
andsubsection
commands into your filesmult.tex
anddiv.tex
.
– jarauh
Nov 4 '15 at 14:57
A good read aboutinput
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
add a comment |
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}
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
add a comment |
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}
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
add a comment |
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}
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}
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
add a comment |
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
add a comment |
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, nobegin{document}
, and noend{document}
.File
div.tex
: Just the body of the division-related material, no preamble, nobegin{document}
, and noend{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).
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 filesmult.tex
anddiv.tex
containingsection
,subsection
, etc directives. If, say,div.tex
comes aftermult.tex
in the driver file, and if you want to compile justdiv.tex
while keeping its main section number at2
, all you'd need to do is provide the instructionaddtocounter{section}{1}
just ahead ofinput div
.
– Mico
Nov 4 '15 at 15:09
add a comment |
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, nobegin{document}
, and noend{document}
.File
div.tex
: Just the body of the division-related material, no preamble, nobegin{document}
, and noend{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).
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 filesmult.tex
anddiv.tex
containingsection
,subsection
, etc directives. If, say,div.tex
comes aftermult.tex
in the driver file, and if you want to compile justdiv.tex
while keeping its main section number at2
, all you'd need to do is provide the instructionaddtocounter{section}{1}
just ahead ofinput div
.
– Mico
Nov 4 '15 at 15:09
add a comment |
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, nobegin{document}
, and noend{document}
.File
div.tex
: Just the body of the division-related material, no preamble, nobegin{document}
, and noend{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).
You could organize your material in three separate files:
File
mult.tex
: Just the body of the multiplication-related material, no preamble, nobegin{document}
, and noend{document}
.File
div.tex
: Just the body of the division-related material, no preamble, nobegin{document}
, and noend{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).
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 filesmult.tex
anddiv.tex
containingsection
,subsection
, etc directives. If, say,div.tex
comes aftermult.tex
in the driver file, and if you want to compile justdiv.tex
while keeping its main section number at2
, all you'd need to do is provide the instructionaddtocounter{section}{1}
just ahead ofinput div
.
– Mico
Nov 4 '15 at 15:09
add a comment |
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 filesmult.tex
anddiv.tex
containingsection
,subsection
, etc directives. If, say,div.tex
comes aftermult.tex
in the driver file, and if you want to compile justdiv.tex
while keeping its main section number at2
, all you'd need to do is provide the instructionaddtocounter{section}{1}
just ahead ofinput 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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Possible Duplicate: Splitting a large document into several files
– Martin Scharrer♦
yesterday