{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.

learn more… | top users | synonyms

8
votes
1answer
3k 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 ...
2
votes
1answer
458 views

Use input file in \thanks{}

Is it possible to acheive something similar to \title{\myTitle \thanks{ \input{../acknowledgement} }} (which doesn't work?) in order to load the content for \thanks on the fly?
10
votes
2answers
780 views

Space inserted after “\input” call

I've noticed a significant issue with the \input command, it seems. For some reason, I can't seem to prevent it from adding a space after it reads its input. Even if there is no newlines or spaces ...
4
votes
1answer
670 views

How can I input part of a file in verbatim?

I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or ...
30
votes
4answers
3k 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 ...
10
votes
1answer
521 views

Tabs in output file written by xelatex and pdflatex are different

I'm trying out pgfplots with gnuplot to generate the data. This works by having pgfplots write some stuff to an external file, run gnuplot on the file, and then use the generated data to plot the ...
12
votes
1answer
548 views

How do I create a macro which reads the content of a file when the macro is defined?

I am trying to do something like: \newcommand{\sometext}{\input{somefile.txt}} This works, but requires inputting the file every time the macro is used in the document. I would like to know a way ...
1
vote
3answers
154 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 ...
5
votes
1answer
739 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
267 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
514 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
334 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 ...
2
votes
5answers
1k 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
322 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 ...
3
votes
1answer
540 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 ...
6
votes
1answer
628 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: ...
9
votes
3answers
271 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 ...
6
votes
3answers
271 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 ...