compile one time for all file pdf/tex and combine to one file
i use TexMaker 5.0.3
i have 6 file tex (file 1,2...6), and i must compile 6 times of 6 file .tex to create 6 file pdf.
Then in main.tex, i combine 6 file pdf to only one pdf.
Total: 7 times to create main.pdf
My Minimal code in main.tex:
documentclass[a5paper]{article}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
usepackage{pdfpages}
usepackage{subfiles}
begin{document}
includepdf[pages=-]{front_cover.pdf}
includepdf[pages=-]{./Introduction/Introduction.pdf}
includepdf[pages=-]{1.pdf}
includepdf[pages=-]{2.pdf}
includepdf[pages=-]{3.pdf}
includepdf[pages=-]{4.pdf}
includepdf[pages=-]{5.pdf}
includepdf[pages=-]{6.pdf}
end{document}
With "option: Define current Document = Master Document" : Don't work with command: includepdf (i don't see any file in structrure view)
How can i compile only one time to create and combine main.pdf from 6 different file .tex (TexMaker)?
Thank in advance
compiling texmaker
add a comment |
i use TexMaker 5.0.3
i have 6 file tex (file 1,2...6), and i must compile 6 times of 6 file .tex to create 6 file pdf.
Then in main.tex, i combine 6 file pdf to only one pdf.
Total: 7 times to create main.pdf
My Minimal code in main.tex:
documentclass[a5paper]{article}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
usepackage{pdfpages}
usepackage{subfiles}
begin{document}
includepdf[pages=-]{front_cover.pdf}
includepdf[pages=-]{./Introduction/Introduction.pdf}
includepdf[pages=-]{1.pdf}
includepdf[pages=-]{2.pdf}
includepdf[pages=-]{3.pdf}
includepdf[pages=-]{4.pdf}
includepdf[pages=-]{5.pdf}
includepdf[pages=-]{6.pdf}
end{document}
With "option: Define current Document = Master Document" : Don't work with command: includepdf (i don't see any file in structrure view)
How can i compile only one time to create and combine main.pdf from 6 different file .tex (TexMaker)?
Thank in advance
compiling texmaker
1
You might be intereste dinincludeorinput. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report
– leandriis
Feb 15 at 17:53
add a comment |
i use TexMaker 5.0.3
i have 6 file tex (file 1,2...6), and i must compile 6 times of 6 file .tex to create 6 file pdf.
Then in main.tex, i combine 6 file pdf to only one pdf.
Total: 7 times to create main.pdf
My Minimal code in main.tex:
documentclass[a5paper]{article}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
usepackage{pdfpages}
usepackage{subfiles}
begin{document}
includepdf[pages=-]{front_cover.pdf}
includepdf[pages=-]{./Introduction/Introduction.pdf}
includepdf[pages=-]{1.pdf}
includepdf[pages=-]{2.pdf}
includepdf[pages=-]{3.pdf}
includepdf[pages=-]{4.pdf}
includepdf[pages=-]{5.pdf}
includepdf[pages=-]{6.pdf}
end{document}
With "option: Define current Document = Master Document" : Don't work with command: includepdf (i don't see any file in structrure view)
How can i compile only one time to create and combine main.pdf from 6 different file .tex (TexMaker)?
Thank in advance
compiling texmaker
i use TexMaker 5.0.3
i have 6 file tex (file 1,2...6), and i must compile 6 times of 6 file .tex to create 6 file pdf.
Then in main.tex, i combine 6 file pdf to only one pdf.
Total: 7 times to create main.pdf
My Minimal code in main.tex:
documentclass[a5paper]{article}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
usepackage{pdfpages}
usepackage{subfiles}
begin{document}
includepdf[pages=-]{front_cover.pdf}
includepdf[pages=-]{./Introduction/Introduction.pdf}
includepdf[pages=-]{1.pdf}
includepdf[pages=-]{2.pdf}
includepdf[pages=-]{3.pdf}
includepdf[pages=-]{4.pdf}
includepdf[pages=-]{5.pdf}
includepdf[pages=-]{6.pdf}
end{document}
With "option: Define current Document = Master Document" : Don't work with command: includepdf (i don't see any file in structrure view)
How can i compile only one time to create and combine main.pdf from 6 different file .tex (TexMaker)?
Thank in advance
compiling texmaker
compiling texmaker
edited Feb 15 at 15:46
tisaigon
asked Feb 15 at 14:35
tisaigontisaigon
1387
1387
1
You might be intereste dinincludeorinput. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report
– leandriis
Feb 15 at 17:53
add a comment |
1
You might be intereste dinincludeorinput. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report
– leandriis
Feb 15 at 17:53
1
1
You might be intereste din
include or input. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report– leandriis
Feb 15 at 17:53
You might be intereste din
include or input. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report– leandriis
Feb 15 at 17:53
add a comment |
1 Answer
1
active
oldest
votes
If the 6 subfiles are .tex, then there is no need to include them as pdf in that way. All can be compiled in one go from your main.tex. This is easiest to explain with an example. Suppose I current have the files for a title page, an abstract and a section of text, with the following directory structure:
main.tex
files/
titlepage.tex
abstract.tex
section1.tex
If main.tex has the contents:
documentclass[a5paper]{article}
usepackage{lipsum}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
begin{document}
input{files/titlepage}
input{files/abstract}
include{files/section1}
end{document}
Then all three sub files appear in the final document when compiling main.tex. The relevant commands are input{file}, which inputs the text file into main.tex, and include{file}, which does the same but introducing a newpage:

Now, this assumes that each of the subfiles are plain 'content' without preambles or begin{document}. For example, my `files/section1.tex' has
% !TeX root = ../main.tex
section{First file}
lipsum[1][1-5]
Note the first line here - this is a special command that tells the compiler that this document is being built from another file (specifically main.tex). Depending on your build system, this may not be necessary (but will do no harm either way).
If you would like to retain the ability to compile the subfiles separately, the standalone package if for you. This strips the preamble from the subfiles so you can input them without any issues. To use this package, add usepackage{standalone} to your preamble in main.tex and use documentclass{standalone} in each subfile (for more information see the documentation).
Of course, you can combine this workflow with including pdfs in the usual way (e.g. if front_cover.pdf was not from a .tex file).
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f475031%2fcompile-one-time-for-all-file-pdf-tex-and-combine-to-one-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If the 6 subfiles are .tex, then there is no need to include them as pdf in that way. All can be compiled in one go from your main.tex. This is easiest to explain with an example. Suppose I current have the files for a title page, an abstract and a section of text, with the following directory structure:
main.tex
files/
titlepage.tex
abstract.tex
section1.tex
If main.tex has the contents:
documentclass[a5paper]{article}
usepackage{lipsum}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
begin{document}
input{files/titlepage}
input{files/abstract}
include{files/section1}
end{document}
Then all three sub files appear in the final document when compiling main.tex. The relevant commands are input{file}, which inputs the text file into main.tex, and include{file}, which does the same but introducing a newpage:

Now, this assumes that each of the subfiles are plain 'content' without preambles or begin{document}. For example, my `files/section1.tex' has
% !TeX root = ../main.tex
section{First file}
lipsum[1][1-5]
Note the first line here - this is a special command that tells the compiler that this document is being built from another file (specifically main.tex). Depending on your build system, this may not be necessary (but will do no harm either way).
If you would like to retain the ability to compile the subfiles separately, the standalone package if for you. This strips the preamble from the subfiles so you can input them without any issues. To use this package, add usepackage{standalone} to your preamble in main.tex and use documentclass{standalone} in each subfile (for more information see the documentation).
Of course, you can combine this workflow with including pdfs in the usual way (e.g. if front_cover.pdf was not from a .tex file).
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
add a comment |
If the 6 subfiles are .tex, then there is no need to include them as pdf in that way. All can be compiled in one go from your main.tex. This is easiest to explain with an example. Suppose I current have the files for a title page, an abstract and a section of text, with the following directory structure:
main.tex
files/
titlepage.tex
abstract.tex
section1.tex
If main.tex has the contents:
documentclass[a5paper]{article}
usepackage{lipsum}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
begin{document}
input{files/titlepage}
input{files/abstract}
include{files/section1}
end{document}
Then all three sub files appear in the final document when compiling main.tex. The relevant commands are input{file}, which inputs the text file into main.tex, and include{file}, which does the same but introducing a newpage:

Now, this assumes that each of the subfiles are plain 'content' without preambles or begin{document}. For example, my `files/section1.tex' has
% !TeX root = ../main.tex
section{First file}
lipsum[1][1-5]
Note the first line here - this is a special command that tells the compiler that this document is being built from another file (specifically main.tex). Depending on your build system, this may not be necessary (but will do no harm either way).
If you would like to retain the ability to compile the subfiles separately, the standalone package if for you. This strips the preamble from the subfiles so you can input them without any issues. To use this package, add usepackage{standalone} to your preamble in main.tex and use documentclass{standalone} in each subfile (for more information see the documentation).
Of course, you can combine this workflow with including pdfs in the usual way (e.g. if front_cover.pdf was not from a .tex file).
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
add a comment |
If the 6 subfiles are .tex, then there is no need to include them as pdf in that way. All can be compiled in one go from your main.tex. This is easiest to explain with an example. Suppose I current have the files for a title page, an abstract and a section of text, with the following directory structure:
main.tex
files/
titlepage.tex
abstract.tex
section1.tex
If main.tex has the contents:
documentclass[a5paper]{article}
usepackage{lipsum}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
begin{document}
input{files/titlepage}
input{files/abstract}
include{files/section1}
end{document}
Then all three sub files appear in the final document when compiling main.tex. The relevant commands are input{file}, which inputs the text file into main.tex, and include{file}, which does the same but introducing a newpage:

Now, this assumes that each of the subfiles are plain 'content' without preambles or begin{document}. For example, my `files/section1.tex' has
% !TeX root = ../main.tex
section{First file}
lipsum[1][1-5]
Note the first line here - this is a special command that tells the compiler that this document is being built from another file (specifically main.tex). Depending on your build system, this may not be necessary (but will do no harm either way).
If you would like to retain the ability to compile the subfiles separately, the standalone package if for you. This strips the preamble from the subfiles so you can input them without any issues. To use this package, add usepackage{standalone} to your preamble in main.tex and use documentclass{standalone} in each subfile (for more information see the documentation).
Of course, you can combine this workflow with including pdfs in the usual way (e.g. if front_cover.pdf was not from a .tex file).
If the 6 subfiles are .tex, then there is no need to include them as pdf in that way. All can be compiled in one go from your main.tex. This is easiest to explain with an example. Suppose I current have the files for a title page, an abstract and a section of text, with the following directory structure:
main.tex
files/
titlepage.tex
abstract.tex
section1.tex
If main.tex has the contents:
documentclass[a5paper]{article}
usepackage{lipsum}
usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry}
begin{document}
input{files/titlepage}
input{files/abstract}
include{files/section1}
end{document}
Then all three sub files appear in the final document when compiling main.tex. The relevant commands are input{file}, which inputs the text file into main.tex, and include{file}, which does the same but introducing a newpage:

Now, this assumes that each of the subfiles are plain 'content' without preambles or begin{document}. For example, my `files/section1.tex' has
% !TeX root = ../main.tex
section{First file}
lipsum[1][1-5]
Note the first line here - this is a special command that tells the compiler that this document is being built from another file (specifically main.tex). Depending on your build system, this may not be necessary (but will do no harm either way).
If you would like to retain the ability to compile the subfiles separately, the standalone package if for you. This strips the preamble from the subfiles so you can input them without any issues. To use this package, add usepackage{standalone} to your preamble in main.tex and use documentclass{standalone} in each subfile (for more information see the documentation).
Of course, you can combine this workflow with including pdfs in the usual way (e.g. if front_cover.pdf was not from a .tex file).
answered Feb 15 at 17:56
Pippip19Pippip19
1,2838
1,2838
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
add a comment |
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
i tried. i used: documentclass[a5paper]{article} usepackage{lipsum} usepackage[a5paper,landscape,left=1.5cm,right=0.3cm,top=1cm,bottom=1cm]{geometry} begin{document} input{files/titlepage} input{files/abstract} include{files/section1} end{document} but many fails: imgur.com/SE1oHoF. Please look image
– tisaigon
Feb 16 at 5:57
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f475031%2fcompile-one-time-for-all-file-pdf-tex-and-combine-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
1
You might be intereste din
includeorinput. For a comparison see here: When should I use input vs. include? Regarding the 'master document' you might be interested in: this answer. Other related questions: Bind reports/articles into a book, but keep the ability to compile them individually and Combine several chapters (separate files) in to one report– leandriis
Feb 15 at 17:53