{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

1
vote
1answer
62 views

Have subfiles declare sections to be included in different places of the document

I'd like to have several Latex files, imported or included in a master document.tex file, which declare different sections to be included in the master file, like: % in file a.tex \begin{notes} My ...
1
vote
2answers
128 views

Errors produces when using `\readline`

This question, while related to this earlier question of mine, is less about removing content from the beginning of each line and more about how to preprocess lines of a file as it is read in. Here ...
5
votes
2answers
187 views

How can I use `catchfile` package to gobble first characters on a line

When using the fancyvrb environment Verbatim, you can gobble the first n characters of each line before printing it out. I'd like to be able to do something similar, but not via verbatim. In the ...
3
votes
1answer
139 views

subimport including wrong file

I am trying to learn the import package but I find it extremely unreliable - perhaps I am missing something? One case study I tried is as follows: Created 3 tex files: ./main.tex ./bla.tex ...
6
votes
1answer
337 views

Including LaTeX documentation as comments in source code

I am working on a large C# project (hundreds of source files). I am trying to add documentation on various user inputs and options. For maintainability I would ideally like to be able to write the ...
7
votes
1answer
150 views

does LaTeX support native multifile management?

This is not really a practical question, but more of an academic one: I use emacs to write my LaTeX files and in order to process multifile documents I include at the end of each file a local ...
0
votes
2answers
218 views

How to include tex files

Is there any way that I can add different .tex files (From different folders) into another folder's .tex file? I meant that all of the .tex files will be fine and separated and I just need to ...
1
vote
1answer
282 views

Including a tikz figure with a reference to a table on file, problems with folder structure

I am trying to include a tikz figure in the chapter 6 of my thesis. I am using separate folders and .tex files for each chapter, as you may notice in the example. This means that in my main document I ...
0
votes
1answer
289 views

Issues when including a tex file [closed]

I have this without any issues if I use it alone. However if I call it with input or include I get this Why?
1
vote
1answer
282 views

Automatic report generation

I am trying to automatically create a curriculum vitae (or any other document if one would prefer) from a datafile that holds all values/entries. Here are my individual files that go into this ...
7
votes
3answers
139 views

Command that expands to the contents of a file

I'd like to make a macro that expands to the contents of a file. Basically something like \def{\mycommand}{\input{file.txt}} % file.txt contains "Hello%" \anothercommand{\mycommand} ...
2
votes
1answer
148 views

How can I make German characters from \input file display correctly?

I'm working with a Rnw file in RStudio and knitr. Everything works correctly so far, but I stumbled upon a problem when I included a chapter to the report that is written in German. I wrote the ...
3
votes
0answers
77 views

Using catcode in conjunction with lstnewenvironment and lstinputlisting

(This is related to Injecting text contained in file into custom environment, but I was asked to put this in a separate post) From regular expression in listings the following code works fine : ...
4
votes
2answers
219 views

Is there a quick way to split a (very) long equation?

I'm generating LaTeX code from Mathematica, which I must insert into my input .tex file. The problem is that equations are too long to fit on the page, and it takes a long time to split them up. Is ...
2
votes
1answer
132 views

Injecting text contained in file into custom environment

how can I inject text contained in a file input.tex into a custom environment. Something like : \documentclass{report} \usepackage{listings} \lstdefinelanguage{text}{} ...
5
votes
1answer
95 views

Mark on document where input starts and what is the filename

I have a master document, and use many input{...} commands to compile the total document from many parts. I would like to mark on the working document, the start of each new input, and, what the ...
8
votes
3answers
204 views

How to join two or more external .tex file using another .tex file and then compile?

Suppose I have two tex files file1.tex and file2.tex. I want to join them in another tex file. I have tried to do this with the following one : \documentclass{book} \begin{document} ...
5
votes
2answers
405 views

Argument to \input or \include statement?

I produce a lot of plots in Matlab which I export to TikZ with matlab2tikz. In matlab2tikz I can specify the plot width and height, for instance. This works out quite nicely, but as I write my ...
4
votes
1answer
110 views

catchfile(betweentags) and obeylines

I'm writing two large documents, both containing much of the same text. To ease the maintenance, I'd like no redundant paragraphs, but rather to use catchfilebetweentags. Everything works well, ...
1
vote
0answers
201 views

Cross-referencing (input) multiple tex. files on multiple levels [closed]

I´ve recently discovered this site and you might be able to give me some advice working with LaTeX. Here´s my problem: My company is working on several user manuals. Each user manual is located in ...
1
vote
2answers
678 views

epslatex: relative path issue

Please, how one could directly include epslatex graphics into main latex file, say main.tex? main.tex has its own template provided by a third party. I used this command within main.tex file to ...
1
vote
1answer
130 views

Include a value and its uncertainty both rounded properly

The output of a program is a value and its uncertainty. I want to include them in a tex document correctly rounded. value_uncertainty.txt: 12345.67890 0.987654321 scientific_document.tex is ...
1
vote
1answer
82 views

siunitx: Error while including value

A value is saved in a file (value.txt, let's say). The command \SI{\input{value.txt}}{\someunit} gives the error: Argument of \input has an extra } How can I read numbers from an external file ...
9
votes
1answer
154 views

Can I use \input inside an \include?

I know it is not possible to nest one \include inside another, but what about \input? Is it possible to have something like: \documentclass{article} \begin{document} \include{file1} ...
9
votes
1answer
132 views

Suppress message during compilation

I use a macro with \write18 and \@@input, several times in each page of a large document. But \@@input output a message during compilation: (filename) This is very annoying and flood the other ...
2
votes
0answers
33 views

Use one tex file in different documents [duplicate]

I want to write a tex file which can be used in serveral higher order documents, but there are problems with the relative paths of the figures. Example: In folder sub1 is the file base1.tex which ...
1
vote
1answer
576 views

pdflatex “Required Page Does Not Exist” error with beamerarticle

I have several beamer tex files and need to create a manual (using beamerarticle) that incorporates all of the beamer files (with their notes) as one document. The original basis of the articlebeamer ...
4
votes
1answer
805 views

Is there a LaTeX editor capable of synctexing a live preview from an included or inputted or subfiled chapter02.tex?

As a beginner... I thought I had settled for the distraction-free Gummi; but now I'm unsure, as I gather it's not so great for larger, modularized documents, such as writing a thesis: Gummi's live ...
1
vote
1answer
833 views

How can I use \input and \include with biblatex (biber backend)?

I have a document with external files. The only reason I am using external files is to make it easier to organize my large project. I have taken a small piece of the larger project and attempted to ...
2
votes
1answer
178 views

Can't use animations with \input?

I have two different animations, made with TikZ and the animate package, that I want to include in a beamer presentation. When I had the code inside of my presentation's .tex file everything worked ...
5
votes
1answer
947 views

Special characters in input file

I want to have my sections in independent .txt files in the folder of my assignment. So I use \input{text.txt}. The problem is, I write in Danish and we have the 'æ' 'ø' 'å' characters that aren't ...
4
votes
1answer
299 views

Including figures relative to the path of the current document?

I am writing a paper simultaneously with my thesis; the paper will be included verbatim in the thesis (or at least, parts of it will). I am looking for a solution that allows me to update my paper ...
3
votes
2answers
217 views

Include file with preamble to another tex file

I have two files: paper.tex with text, title, and full preamble with authors and so on. It compiles successfully. The second file (B) has also a full preamble with title, authors, little text. It ...
4
votes
1answer
229 views

Is this the correct way to format a book in LaTeX?

I have a question that may be subjective but I will try to make it as less subjective as possible. Is this the correct way to format a book in LaTeX? What I have done is the following: ...
8
votes
1answer
155 views

How to use luatex callbacks to generate a verbatim copy of the input file

I'm trying to devise a LuaTeX solution for the question Extracting the contents of text in a specified environment into a new file, but it is turning more difficult than expected. To begin, I need to ...
1
vote
0answers
287 views

Input files relative to main file when using subfiles [closed]

I'm writing a report where I use the package subfiles to include different parts of my report. \input{misc/variables.tex} will include my variables file perfectly and render the subfiles. But if I ...
2
votes
1answer
189 views

if the remote file exists then include it, else include the local one

Here's the path where my tex file stands : /home/me/documents/foo.tex I also have one import file here : /home/me/texmf/tex/latex/personal/bar.tex However for security purpose I also include it ...
1
vote
1answer
1k views

Creating an abbreviations file [duplicate]

I'm new to the LaTeX scene as I've starting writing my thesis. I'm using a root .tex file and using \include to add in my chapters (etc). I'm also using \nomencl to add an abbreviations list. I'd like ...
1
vote
0answers
229 views

Is there a 'try' command for LaTeX? [duplicate]

What I'm trying to do is input file1 if it exists and input file2 otherwise, without having to deal with an 'I can't find file' error. I would like to accomplish this using TeX, without using symbolic ...
4
votes
1answer
164 views

Embed distributed LaTeX file/code to the PDF?

I have read of the possibility to embed the LaTeX source in a generated PDF, see the question here. Do you know of a way to do this with distributed TeX file, i.e. for a TeX file which is stored in ...
5
votes
1answer
163 views

Saving in macros plus \scantokens as an alternative to external files

I am generating a lot of TeX code automatically using Python scripts. I've been saving the TeX code to file, and then bringing those files into my documents at the appropriate places via \input. ...
6
votes
1answer
194 views

MiKTeX order of precedence for duplicate files

I am using MiKTeX under a single-user installation. My MiKTeX Options dialogue shows me, if I click on the "Show MiKTeX-maintained root directories" checkbox, directories in the following order (from ...
9
votes
2answers
259 views

How to use the contents of a file as a number

I want to create a loop including n images.The number n is the only content of a help file (created by the application that generates the images). Is it possible to read the contents of the help file ...
19
votes
1answer
537 views

Rationale to use \input{filename} on the pdflatex command line?

In a tex.SX user profile, I read the best practice recommendation Execute pdflatex \input{filename} instead of pdflatex filename. I have always used the latter one, directly, in scripts, and in ...
11
votes
3answers
806 views

force long text inside \item[{\texttt{}] to wrap

I have a LaTeX document that is automatically generated and then inserted as part of my own larger document with \input. This other document has a description environment for examples, one item for ...
3
votes
2answers
430 views

Using \input in a fancyvrb verbatim environment - problem with hyphens

I've set up a custom environment with DefineVerbatimEnvironment. Within that environment I'd like to \input{} files, which works all fine and well until one of them includes a hyphen. Here's an ...
11
votes
3answers
206 views

Read authors from file

At our university, we students write a lot of summaries in LaTeX. We have the convention of adding a CONTRIBUTORS.txt file to the repository containing the document code, which lists all contributors ...
3
votes
0answers
59 views

Store and retrieve content across documents [duplicate]

Possible Duplicate: Automating quoting across LaTeX documents I'm working on 2 documents: 1.tex and 2.tex. 2.tex is a metadocument about 1.tex, so that 2.tex has a lot of quotations from ...
0
votes
1answer
1k views

Splitting/breaking a long table from an input file

I am input a file in my main latex file but the table (inputfiles contains a table) is too long to be on apage. How can I break it on two or main pages. \usepackage{longtable} %% ...
2
votes
1answer
149 views

Complex latex document: how to locate offending package dependency [solved: was using dirty build] [closed]

For final distribution, certain appendix includes the pdfpages package. However, appendices should be skipped for normal "draft" versions, or while working on individual chapters. I am having ...