{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

7
votes
2answers
880 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
266 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
444 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
5k 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 ...
7
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
187 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
962 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
342 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
154 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
911 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
180 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
411 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
764 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
842 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
213 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
605 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
196 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
391 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
254 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 ...
28
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 ...
10
votes
2answers
908 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
1k 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 ...
6
votes
1answer
365 views

Accelerating LaTeX packages using a make like functionality

I use gnuplottex package quite a lot to draw graphs, and my own bashful package to write include computer output in a document I write. Yet another package of this sort allows one to include metapost ...
13
votes
2answers
862 views

Parsing files through LuaTeX

This question has two parts: How would one generally parse a file with LuaTeX, assuming the file only holds data that is delimited either by spaces, commas or semicolons. How would you parse the ...
4
votes
1answer
714 views

Tikz externalize + macro's ? Or how would you do it?

I'm currently building courses for some of my college teachers. The aim is to make their Word/MS paint generated study material into high grade Latex/Tikz material. I'm aiming for high consistency in ...
33
votes
2answers
15k views

Cross-referencing between different files

I want to cross-reference between different .tex files, just because I want to put every chapters separately. Let's say in file chapterI.tex I have \label{a} and I want to access this in file ...
12
votes
1answer
575 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 ...
3
votes
2answers
749 views

Recommended directory structure for separating presentation and content

For my bachelor thesis I am going to structure the files for my LaTeX document in a more sophisticated way, which means I would like to use different folders for different file types. Is there a ...
2
votes
2answers
2k views

TeXShop not finding Gnuplot

I'm working in TeXShop on my mac and I love it. There is one slight problem though. I use TikZ wich sometimes uses gnuplot to create it's plots. One would think that running TeXShop alone is enough ...
4
votes
3answers
374 views

References to lists in theorem-like environments/writing # symbol to files

A little warning in advance: This will be quite lenghty. I spent quite some time over the last few days trying to solve the following problem: I'm typesetting mathematical lecture notes and have used ...
13
votes
3answers
888 views

How can I open a file in “append” mode?

Could not find anything in the TeXBook, but this could be just me. I guess it is always possible to open the file for reading, copy its content to another file, and then continue writing to that ...
5
votes
1answer
1k views

pdfpages and linktodoc

I'm trying to link to a specific page in an external document. This has been discussed previously under the topic, How to link to specified page of an outer pdf document?, and the answer suggests ...
11
votes
1answer
5k views

pgfplot: Datafile format for datetime field

I have a datafile (which I may manipulate to any format), it contains a date-time stamp currently in the form "year-month-day hour:min" and a single variable for each recorded time. When I attempt to ...