{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

12
votes
2answers
136 views

Filecontents and newenvironment issue

I need to write some inlined code on an external file, then load it with listings. I would like to define a new environment, but if I do, filecontents does not save the first line of code (see MWE): ...
7
votes
1answer
140 views

Extract problem and solution from files and create problem collection

I have a set of problems and solutions, and I wish to include (some of) them in several different documents. I would like to be able to choose if the solutions should be presented last, or immediate ...
4
votes
1answer
126 views

Using a non-centralized structure for tex files - similar to \graphicspath

I have a fairly large document, that I have picked apart into different sections etc, each in their own file. To include graphics that are not in one central directory I use \graphicspath which works ...
1
vote
0answers
81 views

Knitr/LaTeX: conditional execution based on external parameters

I'm using knitr to create LaTeX documents with integrated R code. Now I'd like to readout some external parameters (saved in a TXT or CSV file) and create a document based on the conditions specified ...
6
votes
1answer
164 views

filecontents* cannot write to file in Windows

With the following MWE: \documentclass{article} \usepackage{filecontents,hyperref,listings} \begin{filecontents*}{script.bat} @echo off echo "Hello, World!" pause \end{filecontents*} ...
1
vote
1answer
438 views

Geogebra import into latex doesn't work

I created this file : \documentclass[10pt]{article} \usepackage{pstricks-add} \pagestyle{empty} \begin{document} \newrgbcolor{zzttqq}{0.6 0.2 0} ...
1
vote
2answers
106 views

Resorting the *.bib file as appeared in *.tex and rewriting to a new *bib file (biblatex)

I have quite a huge database of citations, but not all of them are included in the document. And of course they are not ordered by appearance in the text, because sometimes I have to go back to some ...
7
votes
3answers
518 views

How can I properly resolve relative paths in `\usepackage`?

I have a dedicated directory for my project; within that are nested directories source/, output/ and styles/ that contain the .tex, .pdf and .sty files. I was surprised to find that while ...
7
votes
1answer
127 views

does LaTeX support native multifile management?

This is not really a practical question, but more of an academic one: I use emacs to write my LaTeX files and in order to process multifile documents I include at the end of each file a local ...
2
votes
0answers
145 views

.aux file not found or empty while cross-referencing between files [closed]

I have an issue similar to this one. In oppose to that thread, I use xelatex. Don't know, though, if this is the issue or not. I have two files. In the first one (Characteristics.tex) I have: % ...
8
votes
3answers
188 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
506 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
330 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
131 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
220 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
178 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
89 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
73 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
184 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
126 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
598 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
406 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
372 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
450 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
282 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 ...
2
votes
0answers
263 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
170 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} ...
5
votes
1answer
312 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
30 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
90 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
114 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
110 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
138 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
134 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} ...
5
votes
1answer
491 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 ...
4
votes
1answer
281 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
336 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 ...
1
vote
1answer
144 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
43 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
156 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
347 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
890 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
66 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
106 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
198 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 ...
5
votes
4answers
292 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
53 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
242 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
256 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 ...