Linked Questions
24 questions linked to/from Replace \input{fileX} by the content of fileX automatically
11 votes
3 answers
11k views
Generating a single TeX file by merging different TeX files [duplicate]
I have a main TeX file which inputs many other TeX files i.e. for example \documentclass{article} \begin{document} \input{input1.tex} \input{input2.tex} \input{input3.tex} \end{document} Let's call ...
0 votes
1 answer
823 views
Preprocess LaTeX file, a latex -E equivalent [duplicate]
Possible Duplicate: Replace \input{fileX} by the content of fileX automatically I'm developping a framework for managing LaTeX project's dependencies but I can't figure out if there is a simple ...
2 votes
1 answer
362 views
Creating one .tex file form a structured large document [duplicate]
I just finished my Ph.D thesis using LaTeX and I create it in a structured way with several folders and .tex documents inside. I have a master main.tex file and add the different chapters, sections ...
1 vote
1 answer
124 views
how to insert the contents of an `\input`ed file into the source? [duplicate]
Is there a utility that will take a LaTeX source file, find all the \input{some_external_file} lines, and insert the contents of those external files into the master document without compiling to PDF? ...
2 votes
0 answers
73 views
Consolidated latex code [duplicate]
My latex document consists of hundreds of TeX files that are loaded by the main file using the \input command. I need to submit the TeX code to the publisher of a scientific journal for publishing. Is ...
2 votes
0 answers
63 views
Get fully expanded tex file [duplicate]
I'm using TexLive 2016. Is there a way I can get the expanded Latex BEFORE it is converted to PDF? Quick example in case I'm asking the wrong question! i.e. main.tex: \documentclass[12pt]{article} \...
1 vote
0 answers
60 views
Switching between multiple .tex files and single .tex file [duplicate]
I'm using LaTeX to draft a journal paper and I'm writing with TeXMaker. To make the navigation easier, I broke down the paper into several .tex files. The master .tex file looks like this: \section{...
0 votes
0 answers
44 views
Merging multiple tex files into one standalone tex file [duplicate]
Suppose I have two tex files, document.tex and content.tex document.tex: \documentclass{article} \begin{document} This is some content. \input{content.tex} \end{document} content.tex: This is ...
0 votes
0 answers
29 views
Is there a way to create an all inclusive master tex file from many imported tex files [duplicate]
I have a main tex file which includes many import statements. I'm compiling with pdflatex to generate a PDF. I'd like to create a new .tex file that includes all the content from the main .tex file, ...
49 votes
4 answers
78k views
\input and absolute paths
Sometimes it is convenient to use an absolute path to include a preamble. To do so, I use the following "hack": \documentclass[a4paper, 12pt]{article} \newcommand{\folder}{/path/to/folder} \input{\...
37 votes
4 answers
6k views
LaTeX + GIT - mark differences since specific commit
I store LaTeX document in local GIT repository. Once I accomplish appropriate part of document I compile it to PDF and send it to my supervisor who is not familiar with LaTeX nor GIT. However, he ...
43 votes
4 answers
9k views
Submitting a journal article as a single tex file
Although many academic journals readily accept submissions in some format of TeX, indeed some enlightened ones insist on it, it is rare that one can simply send exactly the same document that one has ...
21 votes
3 answers
33k views
How to interpret message "Invalid UTF-8 stream" when trying to convert a tex-file to a rtf-file using pandoc?
I want to convert a .tex file into something that is possible to open in MS Word (.doc, .docx, .rtf, ...) by means of the pandoc command line software. A minimum .tex file is attached below. I use ...
24 votes
3 answers
25k views
Latexdiff with subfiles
Is there a way to make latexdiff work with the 'subfiles' package ? I use subfiles to include parts of the document from different .tex files. Latexdiff does not seem to mark changes in the subfiles....
10 votes
3 answers
9k views
How do I combine several tex files into one?
In my paper I have several tex files, mainly produced by some other tools (.bbl by bibtex, .eps_tex by inkscape etc.). I would like to combine them into a single tex file as required by my publisher. ...
11 votes
2 answers
4k views
Build one single .tex file from a .tex file with multiple \input
Edit: I think this question is sufficiently distinct from this question because I am specifically asking for a method within TeX itself, i.e. not running some Perl script separately to do this, but ...
6 votes
1 answer
3k views
Generate a merged LaTeX file, with \input code in place?
I'm currently working on an experiment that involves re-typesetting a digitized physical book from OCRed images. For various reasons involving the workflow, the resulting project architecture is a "...
12 votes
1 answer
2k views
Make a "standalone" version of multiple files: all document in one .tex file
Disclaimer: this question is not related to the standalone package. When writing an article, I split the content between several files, to ease the versionning notably. At the time of writing, most ...
9 votes
1 answer
510 views
TeX equivalent to #line
In C there is #line which allows stating the origin of a particular line of code. This is useful for autogenerated C source files: The (unreadable) code in the generated file is mapped back to the ...
1 vote
1 answer
883 views
Best-practice project architecture for creating a LaTeX3 package / class
I would like to take my .cls file and refactor it into a locally used package. Specifically I would like to: Divide it into multiple files for easier readability (separation of concerns). Have it ...
0 votes
1 answer
623 views
build index from more \include{file} files
is there any easy way (Iʼm not a programmist) how to build and print Czech-sorted index in document which contains more \include files? I donʼt know how to put here a minimal example. so Iʼm working ...
2 votes
1 answer
532 views
Is there any possibility to print a single tex file from a multifile project using a LaTeX compiler?
I would like to retain the multifile structure of my LaTeX projects, but journals usually require a single .tex file. Is there any way to print such a combined document as a 'cached' file with the ...
2 votes
1 answer
256 views
Exporting LyX file to TeX, with child documents (TeX codes)
I need to export a LyX document to TeX. The LyX document has child documents (I use input{} to refer to some .tex-files). These child documents have other child documents themselves (I again use \...
0 votes
0 answers
245 views
Slow/Buggy Compilation with \input
I've been noticing that some of my files take a really long time to compile. It'll often be sluggish to compile and then produce an "invalid or corrupted file" error for a long time before ...