{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
3answers
216 views

Import pdf page selected by label instead of page number

For each figure in my main document, I import the corresponding page of a multipage .pdf containing all pictures (one picture per page). Is there a way to give a label to each picture, in order to ...
3
votes
1answer
916 views

Undefined control sequence \text when importing Matlab figures

I'm following a tutorial to import Matlab figures through tikz, however after trying to compile the .tex file I get the following error: ABD: EveryShipout initializing macros (./mysphere.tikz ! ...
4
votes
1answer
552 views

Extract all \note tags from beamer as a simple text file

There is a nice presenter tool I am using called pdfpc. Sadly it does not show notes I put in my latex presentation with \note{}. Is there a way to extract the content of all my \note{} tags to a ...
4
votes
1answer
189 views

Problem importing a table containing dollar signs in pgfplots

I use pgfplot for plotting (obviously). I load a table from a file, but I have the problem that my columns can have a dollar sign in them and then LaTeX complains: ! Extra }, or forgotten $. ...
2
votes
1answer
337 views

Externalize pgfplotstable with csv file

This is a direct follow-up question to this: Adding units to pgfplotstable header After fixing the output I tried outsourcing the table. After figuring out that standalone does not work with ...
6
votes
1answer
268 views

Adding units to pgfplotstable header

I am plotting a table using a semicolon separated .csv file and pgfplotstable. The table shows up fine, but i need to have units within the head of the table. like this: what I have looks like ...
3
votes
1answer
100 views

In which folder should I copy the image (JPEG) so that it could be found?

I used the following code to insert a JPEG image in my document but I don't know where exactly should I copy the image so that it'll be found. I know it must be somewhere in the TeX folder, but I ...
1
vote
1answer
81 views

How to include/import only specific sections when using a multiple file structure

I am writing a rather large document of which I am planning on using multiple input files. I have previous work that I would like to reuse without copying the data (for purposes of maintainability). ...
11
votes
1answer
318 views

Can filecontents write an external file in a parent directory?

Reading Are there any disadvantages of TeX being Turing complete? got me thinking about the potential of .tex files for harbouring malicious code. The filecontents package is used to write external ...
6
votes
1answer
134 views

Is there a command to define a “virtual file” in a tex document

I wonder whether there is something like the filecontents environment, but without writing the actual data to the filesystem. With the filecontents environment, I can write a texfile like this: ...
3
votes
1answer
689 views

Sublime Text 2: Building Parameter with LaTeX

How can I perform a build process of a certain tex file, different from the current one I'm editing with the Sublime Text 2 Editor? I use the Sublime Text 2 Editor with MikTex and Sumatra PDF. My ...
7
votes
1answer
695 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
736 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
659 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
352 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
437 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
242 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} ...
8
votes
1answer
542 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 ...
6
votes
1answer
142 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
154 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
157 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
159 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
956 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
449 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
459 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
249 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
181 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
524 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
2k 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
109 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
133 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
278 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
487 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
64 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
327 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
359 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 ...
16
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
808 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
374 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
130 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
181 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
207 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 ...