{external-files} is about external files included in a document, e.g., pictures via \includegraphics, or parts of a document via \input or \include. For questions about files automatically generated by LaTeX (.aux, .log, .out, .toc, ...) use {auxiliary-files}.

learn more… | top users | synonyms

8
votes
2answers
1k views

IfFileExists and filecontents causes an error

I would like to use the filecontents environment in my document. I get a warning LaTeX Warning: File `test.txt' already exists on the system. Not generating it from this source. If I run multiple ...
9
votes
2answers
206 views

Hooks into mathmode

Short version Is there a way to pipe every symbol in a math environment unevaluated to an external program w/o manipulating the (La)TeX file directly (except for adding header files) or patching TeX ...
4
votes
1answer
333 views

Using listings for R code with ## in rangeprefix

In R, comments are preceded by the symbol #. Moreover, to avoid messing with the indentation, it's usually ## instead of #. Therefore, as I want to include some R code in a LaTeX document, I am using ...
4
votes
1answer
1k views

Showing only specific lines using the listings package

I am very new to TeX. My source code is in an external file, let's call it source.java, and I use \lstinputlisting{source.java}. How could I use only the lines 3-5 for my code listing? (and not the ...
3
votes
1answer
505 views

Wrong TikZ filepaths when included used input

I'm using TikZ for my thesis but have run into a small problem. In order to maintain some overview of the main tex file I have split all images into separate TikZ files (This also allows me to edit ...
1
vote
2answers
522 views

How to disable package used by external document?

Doxygen uses its own doxygen.sty style file, but I'd like to keep the style of my document where I want to put the Doxygen's output. So I'd prefer to somehow to turn of its settings. For example, ...
3
votes
1answer
197 views

Url of the picture in final PDF

Using ConTeXt I want to create a pdf with pictures from the internet. I don't want to include those pictures into the pdf, but I want only links to these pictures, and the pictures themselves shall be ...
6
votes
1answer
696 views

\input only part of a file using catchfilebetweentags package

I would like to include only a part of a .tex file into a different .tex file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package. I tried the ...
11
votes
2answers
3k views

Where can I put biblatex style modifications?

Guidelines for customizing biblatex styles says: Finally, assuming that I'll want to use my style adjustments in a multitude of documents: Where do I put the relevant macro stuff? The ...
7
votes
1answer
182 views

Processing input files

What is the easiest technique to get the n-th line from a input file called input and pass it on to a macro called \process. Please note that I'm not asking about outputing the n-th line verbatim but ...
8
votes
4answers
267 views

Having multiple commands with underscores and numbers that start with same text

Recently me and some friends really got into "making everything compilable". More specifically, we need to do a lot of matlab calculations, and then we need to put the results into a tex document. ...
7
votes
2answers
919 views

Using the xr package in LyX (for cross-referencing an external LyX document)

Question: What steps are required to use the xr package in LyX in order to reference items in other, independent LyX documents? Steps already taken: The tools package (that contains the xr package) ...
2
votes
1answer
268 views

How to reference list items in another TeX document?

Problem in a nutshell: I would like to reference items in an external LyX document (containing a list of definitions and theorems). Problem in detail: I am a Math student. I maintain a LyX document ...
15
votes
3answers
455 views

How to trim .tex for each filename read from an external file?

I have an external text file that contains a list of names of TeX input files. The names have trailing extensions .tex. For example, the external text file named data.txt contains the following list: ...
6
votes
2answers
150 views

Input Auto-Generated Figures Captions

I'm trying to include an Matlab-auto-generated figure-caption tex-file using \caption{\input{Spectrogram-2011-09-28-S003.title.tex}} but if fails with error ERROR: Argument of \@caption has an ...
17
votes
3answers
6k views

Scaling a TikZ figure from an external file

I would like to insert figures which were created with TikZ to my LaTeX document. I suppose that if I create the TikZ figure inside the document, that wouldn't be a problem - I'd just play with the ...
5
votes
1answer
2k views

Including all files within a directory [duplicate]

Possible Duplicate: How to iterate through the name of files in a folder Using \input{filename}, I can input a file canned "filename.tex". I have a directory containing all of the files I ...
12
votes
1answer
1k views

How can I pass underscore to \newcommand properly?

I'd like to simplify my code appendix with this command definition: \usepackage{listings} % ... \newcommand{\CodeListing}[1]{% \lstinputlisting[caption=#1]{#1}% } That is, the caption should be ...
7
votes
2answers
2k views

Data from file as list in \foreach in Tikz

I have data stored in files I named x.dat and y.dat. In the file are two columns and each row stands for one point. These points I plot in the beginning. But then I want some arrows from the x-points ...
6
votes
2answers
223 views

Storing captions in a file

I would like to have LaTeX read figure captions from a list stored in some file rather than writing their text directly in the \caption{} command. However I've not been able to figure out if this can ...
8
votes
1answer
2k views

pgfplots from file: search path, looking for \graphicspath equivalent

I have recently discovered the wonderful pgfplots package and I've started coding my Python code to output tabular data of whatever is plotted (at least for simple plots). In my LaTeX source code, I ...
7
votes
2answers
2k views

LaTeX cannot embed images located inside a folder

I have a few JPEG images inside a folder. I use the following code to embed images \begin{figurehere} \centering \includegraphics[width=0.5\textwidth]{folder\test.jpg} \caption{Example ...
7
votes
1answer
190 views

expansion of loop macro

I have a macro that contains a loop using \@for and it works until I try to write its output to a file. The following document shows the problem. \documentclass{article} \makeatletter ...
14
votes
2answers
271 views

Write to /dev/null?

I'm working on package that (among other things) writes an external file during compilation. I'd like to provide an option to the package to not write the external file. I know I can set up a ...
6
votes
4answers
2k views

How to decrease the font size of a table in an \input file

I have: \documentclass[11pt]{article} \begin{document} This is the main tex document. \input{tables} \end{document} In the tables.tex file, I only have numerical tables. I want to decrease the ...
2
votes
2answers
1k views

input filename as caption in listing

I'm working on the following piece of code \newcommand{\mycin}[1]{% new command for icluding piece of code from external files \lstinputlisting{#1} } I want to add a caption that reflects the ...
8
votes
1answer
343 views

Numbers in text, without having to update values from external files by hand?

I am writing a paper discussing numerical results of simulations. I am still tuning those simulations itself, so the results keep changing slightly. I don't want to re-type numbers over from what I ...
9
votes
1answer
161 views

How to read from an external dictionary in LaTeX?

I'm wondering how to define a LaTeX command \x that prints "def1" when I write \x{name1}, reading from an external (dictionary) file having a structure like {name1}{def1} {name2}{def2} etc.
7
votes
4answers
2k views

Using external tables in TikZ

How do I use tabela.xls as a data source to a LaTeX table or even a table made with TikZ with the following command? Note: I wanted to use tabela.xls as a data source for multiple files. Tex and that ...
5
votes
2answers
242 views

how to write content of a command into a file

This question is a possible solution to question Code fails with Emergency stop, when using \expandafter\csname and such in listings, though not really an answer. I have defined a command which may ...
4
votes
1answer
3k views

Using \verbatiminput on filenames with underscores

I'm trying to include some source files using \verbatiminput{}. Some of these filenames have underscores in them. This works fine by default. But if I try to include the underscore package so that I ...
4
votes
1answer
155 views

Adding Source of Document as Footnote with External Files

I have a beamer presentation where I am including a set of external slides using includepdf from pdfpages. I want to be able to add a footnote to each of these external slides, which attributes them ...
8
votes
1answer
958 views

Use bibliography numbers and citation from other file

This question led to a new package: xcite I want to reference to citations from other file. Similar to what xr package does to labels, but I want to apply it for the bibliography. If I'm able ...
3
votes
1answer
184 views

Delimit a single auxiliary file into chunks, and include these at separate places?

I have a LaTeX file for inclusion, automatically generated by a code-documentation tool, so the fact it’s a single file is non-negotiable. However, I want to include it not all at once, but some ...
2
votes
2answers
422 views

How to detect a blank line inserted by TeX when reading an external file line by line?

I want to make a macro to import all TeX input files in a directory in which the input file containing the macro exists. When reading an external file, TeX appends a blank line to the last iteration. ...
4
votes
1answer
788 views

Find a extremal value in external data file with pgfplot

Basically I'm plotting many curves stacked one after the other in pseudo 3D to show transient behaviors. I need every x axis to be at the same place so I use a ymin and ymax optional entry for the ...
36
votes
11answers
12k views

Deleting external/auxiliary files?

Is there a way to make TeX delete files? In my document a lot of auxiliary files are created and it would be wonderful to have them removed after their content has been used.
12
votes
2answers
872 views

How to avoid automatic .tex extension in filenames?

I am in an mildly unfortunate situation in which, because of the way I prepared the files automatically, I ended up with a file to be attached but also another file with the same name but ending in ...
14
votes
3answers
2k views

Create list of all external files used by master LaTeX document?

Is there an easy way to create a list of all external files (complete path) which are used by a LaTeX document (and its "sub-documents") by \input \include \includegraphics ? (may I have forgotten ...
9
votes
1answer
214 views

Parsing a file name

What is the precise syntax for file names in various common distributions? This is relevant for three primitives: \input<filename> (renamed \@@input in LaTeX) \openin<4-bit ...
5
votes
1answer
616 views

How to append data to a temporary file?

I want to create a new temporary file (named main-temp.tex), append data to it multiple times, and import the contents later. I haven't learnt how to use TeX file operation, both reading and writing. ...
5
votes
2answers
1k views

Reading data from an ODS file in LaTeX?

I've been using csvtools to read data from CSV files. Is there any way to read data directly from a ODS file, to put the data into a LaTeX document?
1
vote
1answer
197 views

How to refer to sections in different files? [duplicate]

Possible Duplicate: Cross-referencing between different files I am new to LaTeX. I am using \ref{sec:relat-work-import} to refer to sections in different places in the file. I would like ...
8
votes
4answers
12k views

Inserting a .EMF file into a LaTeX document.

I had a question about a file extension I was dealing with after creating a graphics file using the computing software Maxima. When I created the plot I wanted, I saved the file and it saved as a .EMF ...
4
votes
3answers
392 views

Can i automatically load chapters and sections based on the filesystem?

I was interested in knowing if i can load chapters and sections of my book based on the filesystem. For example: Chapter 1/ Section 1.tex Section 2.tex Section 3.tex Chapter 2/ Section 1.tex ...
1
vote
1answer
257 views

pgfplots: correlation for data values from file works, but with errors

maybe I do not to see the wood for the trees, but I'm always getting error messages for compiling the following pgf code, while the output looks like the way it should. Does anyone see whats wrong ...
16
votes
3answers
2k views

Drawing different tikz shapes parameterized by data from a file

I have a file with three columns of data, x, y, r. # x y r 1 1 0.1 2 2 0.5 3 3 1.2 and so on. I'd like to loop over the rows, and draw a circle at x,y with radius r for each row. I first thought ...
29
votes
3answers
4k views

How to influence the name of the pdf file created with pdfLaTeX (from within the source code)?

I have a source file called 2011-05-27_Myfilename.tex and I'd like to create a PDF file from it called only Myfilename.pdf. Can this be configured from within the .tex file itself? (It seems to be ...
11
votes
2answers
945 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 ...
12
votes
1answer
2k views

How do I make an attached file display like a link?

I'm embedding an external file in my pdf with \usepackage{attachfile2} and\textattachfile[color=1 1 1]{description}{file.pdf}. How can I make the text look the same as it would if I had used the ...