{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

3
votes
0answers
385 views

How to correctly set a colorbar for an external graphic? [closed]

I created a pdf file from a Matlab imagesc plot. I have remove the colorbar and axis and now I want to have this image in my tex document. I manged to get the axes almost as I want them, but the ...
5
votes
1answer
1k views

External graphics and tikz externalize won't work together

I am using the tikz library external a lot and with success - so far. Now, I need to import an external file (eps, png, pdf... I don't care), and add the axes. I know I can do this with \addplot ...
2
votes
1answer
79 views

No %.aux file in a particular directory

I have the following line in my report.tex \include{intro/introduction} \include{prlm/preliminary} \include{svy/survey} and the corresponding directory structure. The directory structure is ...
2
votes
1answer
116 views

Use a bibtex file with a different extension

Is it possible to tell bibtex to use a file with a specific extension? If you do \bibliography{mybib.org}, then bibtex simply looks for a file called mybib.org.bib. Is there any way to avoid the .bib ...
4
votes
1answer
224 views

Command to insert filename in caption of a listing

I would like to have a command to insert listings that contain the filename in the caption. This works well as long as there is no "_" etc. in the filename. I also tried the suggestion from a ...
10
votes
4answers
373 views

Check for a valid file before using \includegraphics

I know how to check if a given argument represents an existing file (see this question). But is there also a possibility to check if this file can be included by \includegraphics? What I want to ...
1
vote
0answers
56 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
268 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
289 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 ...
14
votes
1answer
2k 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
601 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
311 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
148 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
117 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
152 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
788 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
797 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
201 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
117 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 ...
5
votes
1answer
3k 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
559 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
969 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
46 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
123 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
79 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
929 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 ...
2
votes
3answers
255 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: ...
8
votes
6answers
270 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
109 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
309 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
264 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
262 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} ...
8
votes
3answers
3k 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 ...
42
votes
3answers
4k 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
193 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
347 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
223 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
888 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 ...
13
votes
1answer
333 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, ...
2
votes
1answer
1k 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
44 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
1k 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
163 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
1k 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
515 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
705 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
515 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
471 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, ...
6
votes
1answer
986 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{...} ... ... ...
5
votes
2answers
2k 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 ...