{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

1
vote
0answers
67 views

Multifile and dvi output from the 'master.tex'

I have a report composed of multiple files where I name the master file as 'master.tex' and set (setq-default TeX-master "master") in my .emacs file. I compile the master file and try to click the ...
2
votes
1answer
360 views

Metapost External Figure

I have a metapost file image.mp containing the following lines: beginfig(0); draw p0; externalfigure "/Users/dsg/tex/images/image.png" xyscaled r0 shifted r1; endfig; When I run mptopdf scene.mp ...
5
votes
2answers
380 views

Renaming section levels?

I have several reports I've written up in article format. I want to keep them in separate files but combine them into a larger report. I've removed the headers, but don't want to go through each file ...
17
votes
1answer
3k views

Can I test if a file exists? [duplicate]

Can I somehow test if a file exists? And can I use this to do only things when it exists? I like to do something like if(exist('members.csv')) { do something }
3
votes
1answer
897 views

Reference file relative to the home directory

How can I refer to a file (e.g. in \includegraphics{}) that lives in my home directory (I am on linux)? \documentclass{article} \usepackage{graphicx} \begin{document} not working: $\sim$/foo.png ...
4
votes
1answer
401 views

Read in number of citations from aux file

In the aux file produced by latex, I see the following line: \newlabel{LastBibItem}{{30}{10}{}{}{}} How can I pull the 30 (the total number of citations) into a counter in the preamble of another ...
4
votes
0answers
149 views

pdflatex does not overwrite existing PDF files upon compilation when using TikZ external [duplicate]

I have a LaTeX/pgf/TikZ file that I'm trying to compile. I included the library external so that I could export the file. However, the problem is that \tikzexternalize apparently doesn't have a ...
2
votes
1answer
133 views

Combining Multiple Files Nicely

I am fairly inexperienced with Latex and would like to create a special document of paper summaries. I am trying to create a large number of files where each file contains the summary of a technical ...
5
votes
1answer
207 views

includepdf does not find file with comma

I am already using grffile to ensure that all files are found on the file system (windows 7), but now I have an example where the second file is not found. \documentclass[]{scrbook} % \usepackage[% ...
2
votes
1answer
1k views

How to compile LaTeX out-of-source while using bibtex?

I often use the out-of-source compilation on my LaTeX code to separate the generated files from the source files, thus I can conveniently commit my code to the repository. The command is like this: ...
9
votes
1answer
1k views

How to read value from table, assign to variable and use it in x expr=\thisrow{}

How can I read the first value from the first column of a table, assign it to a variable and the use it in some math expression with x expr=\thisrow{}? The code would be something like this, but in ...
11
votes
3answers
213 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 ...
4
votes
1answer
126 views

Distribute LaTeX Package with Document

TLDR Is there a way to distribute a LaTeX package with a document and to use it during compilation? Situation At our university, we're writing a lot of lecture summaries with LaTeX. Sometimes those ...
6
votes
1answer
5k views

Including XML file into LaTeX

I am using LaTeX for very first time and have very basic knowledge about it. I am using the template from here to write my thesis. I am using Ubuntu 12.04. When I try to include a small XML file in ...
1
vote
1answer
871 views

How to merge several files in LaTeX [closed]

I am writing thesis in LaTeX and I am beginner in LaTeX. I read about combining files into main file, but it didn't help me much and my problem persists. I am giving minimal code what I am trying to ...
0
votes
2answers
1k views

! LaTeX Error: File 'figures/UILogoLG3L' not found [closed]

I'm trying to follow this tutorial: http://www.matthewjmiller.net/howtos/customized-cover-letter-scripts/ I downloaded the cover letter.tex, and I'm trying to 'typeset' it. So I press the green play ...
1
vote
0answers
49 views

Loop to include multiple files [duplicate]

Possible Duplicate: How to iterate through the name of files in a folder I would like to include all the *.tex files from a directory in a document. To avoid me having to add manually the ...
3
votes
1answer
129 views

Auto include specific part of source files

I'm creating a lot of code to our small projects (in computer science), and finding myself copy/pasting my comments into the document. Would it be possible to make a reference point in the code file ...
1
vote
0answers
84 views

Adding the date of adding todo-note [closed]

As is -I suspect- usual is that while writing documents sometimes one skips writing certain parts for a cornucopia of reasons. For me that is usually because I am too lazy at the moment. In an case, ...
28
votes
6answers
1k views

Is it possible to write all mathematical formulas in a separate file and add them in main file on-demand?

Consider this scenario: I have a report to write and I want to write all mathematical formulas in a separate file and then add them in the main report file on demand (i.e. include/import/add/call a ...
3
votes
3answers
356 views

How to deal with zero padding using multiframe in the animate package?

In the animate package, using \multiframe, how to deal with zero padding? For example if I have 101 pictures from pic0000.jpg to pic0100.jpg and I want to do something like that: ...
10
votes
6answers
322 views

How can I '\input' a file without getting the implicit newline?

Intro I'm working on a lightweight package that allows you to put any content (typically LaTeX code) in an environment, then use that content multiple times, each time scanned separately, so you can ...
3
votes
1answer
116 views

Part of the file name of my image is printed in the document, twice [duplicate]

Possible Duplicate: How to include graphics with spaces in their path? When I add a piece of code of figure insertion to the context I'm faced with a problem: a number of irrelevant words ...
2
votes
1answer
385 views

.bat file execution from a .tex document during compilation

Is there a way to execute a .bat file directly from a latex document when I compile that document? I would something like this: \documentclass{article} \begin{document} \chapter{test} bla bla bla ...
5
votes
1answer
358 views

\write and \\ command

Why I get some errors with the code below, and how can I fix that behaviour? \documentclass{article} \begin{document} \newwrite\indexist \immediate\openout\indexist=classic.ist ...
4
votes
1answer
401 views

Include one TeX file into another

I have main.tex file with: \documentclass[]{report} \begin{document} \input{filename.tex} \end{document} Let say filename.tex have the following content: \begin{abstract} text \end{abstract} ...
10
votes
3answers
5k views

How to create and include .tikz files in your manuscript?

Recently, I learnt about the matlab code matlab2tikz. The output of this code is a .tikz file that can be used, I guess, alongside standard figure packages with a simple line \input{mysphere.tikz} in ...
49
votes
3answers
7k views

Outsourcing TikZ code

My Tex files get very confusing since I have multiple long TikZ code in them. How do you organize your files when it comes to TikZ?
4
votes
1answer
200 views

How to write the documentclass into a file

Suppose I have received a selfcontained LaTeX source file, main.tex. It includes a file of macro definitions, my_macros.tex, that the author included in the preamble. This macro file is under my ...
4
votes
2answers
465 views

How to write the preamble into a file

Can one define a bunch of macros, include them in a LaTeX source file main.tex and after issuing $ latex main.tex find the preamble of main.tex in a file, say main.nem ? It is a requirement, that ...
14
votes
1answer
230 views

Poor man's “namespaces”

I have searched for "namespaces", but all of these posts seem to ask for something way more advanced. The problem I encounter can be solved by renaming everything, but that does not seem "right". ...
6
votes
3answers
1k views

undefined control sequence when cross-referencing with xr-hyper

I'm trying to create references between two documents. Normally it works great, but I can't figure out why using siunitx inside a chapter name, causes build errors. Simple example: doc1.tex ...
14
votes
1answer
395 views

Can Footnotes reside in another file?

I want to know if is there a possibility/method/package, by which I can uniquely label all footnote positions in book.tex. And another file, footnote.tex, containing the footnotes and matching labels, ...
3
votes
1answer
2k views

\lstinputlisting for a normal text file?

sometimes im using \lstinputlisting to show some code examples in my pdf. Now I just would like to insert a normal textfile. Everything is fine, I like this box around my text and the numbers every ...
0
votes
0answers
46 views

Creating tables from files [duplicate]

Possible Duplicate: How typeset a numeric table from a CSV file I use the pgfplots package to add graphics to my LaTeX documents. Usually I have a data set in a .dat (plain text) document ...
27
votes
2answers
2k views

Graphics file extensions and their order of inclusion when not specified

When using graphicx's \includegraphics you can specify the file extension or not. For generic use and perhaps portability, extensions are commonly dropped. The types of "approved" inclusions and their ...
2
votes
1answer
196 views

Location of EPS file while inserting into LaTeX file

Where should my files be located for inserting them into LaTeX document. Please help me. \begin{figure} \centering \includegraphics[scale=.87]{Plot_Left_Right.eps} \caption{Banknote Left vs ...
4
votes
2answers
2k views

Inserting Code in multiple pages as an appendix

I am trying to insert a script (bash shell code) to the appendix of my document. I am trying to import the script from separate file. The script file name is Event_Db_BckUp_Script.als. The problem is ...
8
votes
1answer
643 views

Accessing randomly selected problems via the probsoln package

I have two datasets, each containing problems dealing with a specific topic. These problems are stored in external files (again, one file per topic) and loaded into the datasets in a random order. I ...
8
votes
1answer
987 views

Hyperref to external pdf that will open at particular label

Suppose you have a tex file (lets call it B) with some labels, and another one file (call it A) , xr package will allow us to make hyperref from A->B , but I previously found couple cases (I don't ...
2
votes
2answers
647 views

Hyperref to external file in LyX

I have two separated folders, each includes LyX files with the needed attachments (pictures...etc.) , I found that I need to to use zref-xr package to make hyper cross references between those files ...
3
votes
2answers
515 views

How to outsource \hypersetup to an external file?

I use the hyperref package and defined custom settings as follows: \usepackage{color} \usepackage[dvipsnames]{xcolor} \usepackage{url} \usepackage{hyperref} \hypersetup{ bookmarks=true, ...
7
votes
1answer
1k views

Include figure (from macro) with underscore in filename

I have a system of where a .tex is generated from a program. The final .tex file has a (simplified) structure like this: \newcommand{\PlotFrame}[1]{% \begin{frame} \frametitle{...} ... ... ...
6
votes
2answers
3k views

Is it possible to create a LaTeX preamble “header”?

Is it possible to create a header in LaTeX containing my usual preamble, functioning similar to a header in C? Specifically, can I write a text document (or something similar) with the preamble that I ...
3
votes
1answer
375 views

Including a .bib file with \input does not work

In the following simple document, the bibliography does not work : \documentclass{article} \usepackage[numbers]{natbib} \usepackage{inputenc} \inputencoding{utf8} \begin{filecontents}{\jobname.bib} ...
9
votes
2answers
523 views

How do I typeset a file containing ASCII art using a fixed-width character font?

I have a string with the text precisely spaced the way I want it displayed. It's sort of an ASCII art project. I want to convert this text to a PDF so I can print a poster with the text at my local ...
1
vote
1answer
296 views

How to strip curly-braces from variable before using it as a filename?

I'm trying to use a variable to pass a filename to \includegraphics. I'm having trouble because my filename is built up from other variables. This leaves an empty curly-brace inside the filename. The ...
1
vote
1answer
168 views

Adding condition to \DTLplot (dataplot package)

I'm working with the package datatool for a while now, and I'd like to make graphs of my created databases. But I do not want to plot all rows in my database so I'd like to use the condition. This is ...
2
votes
1answer
570 views

How to keep filecontents* from getting confused when it encloses \begin{document}..\end{document}?

I TeX the following code with pdflatex --shell-escape but the compilation got paused because of an error as the produced prepare.tex does not contain \end{document}. \documentclass{article} ...
5
votes
1answer
422 views

No room for a new \read/\write

I've already searched a lot about it and there seems to be no possible way of increasing the number of files (La)TeX can open. This for example, gives an explanation about the error message. I've also ...