{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
1answer
625 views

Including pictures in subdirectories with standalone package

After using standalone package extensively, I ran into one problem, which I cannot solve. The problem is that I need to include a TikZ picture in main files subdirectory. What is more I want to build ...
1
vote
0answers
28 views

How do I reference an online image from a LaTeX document? [duplicate]

I've tried this chunk of code: \usepackage{graphicx} \usepackage{hyperref} \begin{figure} \href{http://commons.wikimedia.org/wiki/File:Pachydyptes_ponderosus.jpg} ...
2
votes
1answer
663 views

Lstinputlisting and listings styles

To further extend my recent question about new listings environments, found here: Multiple listings styles. How do I define a new lstlistings environment, via the command \lstnewenvironment, and, be ...
5
votes
1answer
610 views

bibdata command

My .aux file says \bibdata{all}. How can I find out which of several files named all.bib is being interrogated? Presumably this depends on some path defined in my copy of TeX. How do I find out which ...
11
votes
1answer
336 views

Organizing images for multiple latex files

This is kind of a soft question. In my work, I generate a lot of images (graphs with data, sketches of the experimental system, etc..) which I later use in various latex files (papers, beamer ...
3
votes
1answer
418 views

href does not run properly

I have been working with Mac and TeX Live, the newest version. I want to run videos by a mouse click on the PDF generated by a beamer presentation. I tried with shells and I also used appify to ...
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} ...
6
votes
1answer
476 views

Listings line numbers that match the linerange specification

This is a follow-up question to First line number in lstinputlisting environment. Consider the MWE: \documentclass{article} %\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox ...
0
votes
0answers
31 views

How to specify a source directory for images and chapter files? [duplicate]

I am doing a Thesis report in a modular fashion which includes a lot of different pictures and several chapters. I figured out how to specify a source directory for all my images ...
9
votes
2answers
95 views

Including PDF pages from URL

Does anyone know a way of including an external PDF document from a URL? When using pdfpages the following will not work: \includepdf[pages=-]{http://www.mydomain.com/myfile.pdf} My reason for ...
5
votes
1answer
137 views

Writing file names used with graphicx

I'm trying to modify the command \includegraphics{}to write the name of the included file, including its path and extension, to a text file. What I have so far is: \makeatletter \newwrite\myfile ...
2
votes
1answer
140 views

How to include symlinked graphics with spaces?

I symlink to images and reference the symlink in the code. This works well as long the filename ends in an extension. However, the method I use to create symlinks creates symlinked files with the ...
6
votes
2answers
152 views

Flagging/tracing in roughdraft source document location

Surely I must be reinventing the wheel here. I'm writing a rather lengthy document for which each section corresponds to its own input file. Basically, I have a mother document which looks ...
1
vote
0answers
150 views

Why is centering a TikZ picture from an external file not the same as a centering a .png figure? [closed]

Why can't I put a Tikz picture inside \makebox? \begin{figure}[!ht] \centering \makebox[\textwidth][c]{\includegraphics[width=.8\textwidth]{./Figures/chapter5/procedure_contacts.pdf}} \end{figure} ...
6
votes
1answer
844 views

How does 'filecontents' keep LaTeX parsing while temporarily stop writing output

We all know filecontents.sty can do \documentcalss{article} \usepackage{filecontents} \begin{document} Hello World \begin{filecontents}{dummy.txt} No one will read this if I don't use it ...
6
votes
1answer
402 views

At which point does \immediate\write write to file?

Assume I have opened a file myfile and write to it with \immediate\write\myfile{My cat is too old} I have multiple such statements in my document and do calculations in between which influence the ...
2
votes
1answer
434 views

Trouble including a Matlab surf plot (pdf or png) with pgfplots

I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics. I found some ...
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 ...
1
vote
0answers
44 views

Can I create a shortcut to another program with LaTeX Beamer class? [duplicate]

I am just about to create my beamer file for my upcoming presentation in which I need to open another program (NetLogo if it helps) to show it to the audience. Is there any possibility to create a ...
9
votes
1answer
175 views

Loop Over Grid File

I have a grid file with data such as: 5 4 0 0 0 0 0 0 1 1 2 0 0 2 2 1 0 3 0 0 3 1 where 5 is the width of the grid, 4 is the height, and each number in the grid corresponds to an elevation. I can ...
3
votes
0answers
485 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
98 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
128 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
251 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
443 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
63 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
304 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
330 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
741 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
350 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
125 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
172 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
957 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
970 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
204 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
123 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
4k 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
702 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
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
127 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
83 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
976 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
296 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
302 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
113 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
332 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 ...