{input} is about the \input command which makes LaTeX process the content of a given file basically the same way as if it would be written instead of \input.
10
votes
2answers
3k views
Inputting multiple files in LaTeX
Suppose I have a directory containing a bunch of LaTeX source files, and I want to input all of them into a single main file. I could do this by saying
\input{dir/file1.tex}
\input{dir/file2.tex}
...
5
votes
1answer
604 views
Jobname of inputted file?
\begin{filecontents}{foo.tex}
\def\foo{\jobname}
\end{filecontents}
\documentclass{article}
\begin{document}
\input{foo}
\foo
\end{document}
This outputs the jobname of the main file not "foo". How ...
7
votes
2answers
227 views
Options for building multiple documents from the same content with different layouts
I need to produce two document layouts using the same content. I'm going to be making heavy use of the input{} command to do this, but it is more complex than just this. I'm looking for suggestions ...
7
votes
0answers
413 views
using \input and pygmentize together: trying to get line numbers to show [closed]
I am using pygments to highlight the code I insert in my lyx document.
The external file gets inserted in my document like this:
{\small \input{listings/blah.tex} }
And I use this command to ...
2
votes
1answer
284 views
Include source text from URI (e.g., Wikipedia)
Background
Wikipedia content is reasonably current and free to use. Consider the tabular content at:
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java
Problem
Copying ...
8
votes
2answers
344 views
Bind reports/articles into a book, but keep the ability to compile them individually
I see a few questions and answers about writing a book/thesis in LaTeX (here's one). But I would like to be able to compile reports separately as I write them to have a bunch of standalone documents. ...
2
votes
5answers
817 views
How to automatically inline \input commands and bibliography?
I have a document that uses some \input commands and creates the bibliography via an external .bib file and bibtex.
Now I have to inline the \input commands (i.e. replace each \input command with ...
8
votes
1answer
301 views
Is there a “selective” input command in LaTeX?
I'm likely going to have to write a document that includes some portions of source code, which I'd rather keep in separate source files. I know that I can include the contents of those files in my ...
4
votes
1answer
6k views
input index file not found
Dear experts
I am using TeXnicCentre. After compiling, while I get an output pdf file, an error is found that says Could't find input index file *pathname* nor *pathname*.idx
I am afraid I cant ...
3
votes
1answer
462 views
Escape & Sanitize User Input
Background
Generate a book with user content.
Problem
Names like Marie Curie-Sk\l{}odowska, when not escaped (e.g., MARIE CURIE-SKĊODOWSKA) cause LaTeX to fail.
Questions
What macros are ...
9
votes
2answers
1k views
How to make \include work with a quoted string path containing spaces?
In Windows, \input can work with a quoted string path containing spaces, but \include cannot. How to fix it?
\documentclass{book}
\begin{document}
%\input works!
\input{"Contents/Installing and ...
30
votes
4answers
961 views
What is the difference between font encoding and input encoding?
From list of obsolete packages and classes we must avoid, I found 2 terminologies, i.e., font-encoding and input-encoding. What is the difference between them?
9
votes
3answers
260 views
Make newlines expand to custom command
I am making a guest list which I will print on a sticker sheet, cut them out, then stick them to envelopes. This means that each guest/guest group will have a bounding box drawn around it as a cutting ...
8
votes
1answer
2k views
How to make \lstinputlisting applicable to file paths with spaces?
I am using the listings package and the path to the source code contains some spaces.
For example, the path can be /some dir/sub dir/file 1.txt and
\lstinputlisting{/some dir/sub dir/file 1.txt} does ...
1
vote
3answers
149 views
Dependencies between sections
I'm writing a document such as the following one:
\section{A}\input{A}
\section{B}\input{B}
\section{C}\input{C}
...
Each section provides some content but requires other sections to be included ...
6
votes
1answer
559 views
Temporarily changing document class in LaTeX/resetting pdfLaTeX
How can I temporarily cause pdfLaTeX to forget everything that I've told it and start with a new document class?
I've modified the example environment from the lshort document:
...
25
votes
4answers
2k views
\input only part of a file
I would like to include part of the contents of a .tex file into a different .tex file. I don't have the option of modifying the file to include. The file to include may change so simply copying and ...
23
votes
4answers
11k views
How to make the main file recognize relative paths used in the imported files?
I'm currently using doxygen to generate some documentation for a project,
and doxygen generate some LaTeX code that then can be used to generate a nice pdf.
But let's say I would like to write ...
5
votes
3answers
259 views
Avoid inputting a file multiple times
I have a revision string automatically saved to a file VERSION (it is the output of git describe and usually looks like v2.2-19-g0a51c27), and define a command
...
222
votes
4answers
67k views
When should I use \input vs. \include?
There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there ...