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

latex preamble for writing a book

I am writing a book. I am trying to build a preamble in such a way that there is master.tex and different files for different chapters, preface, contents etc. I am 4/10 in latex knowledge. I will be ...
13
votes
2answers
152 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): ...
6
votes
1answer
169 views

Put from external file?

I need to write a command that read a line from a text file and expand to the content of this line, the next command read the next line and so on. ... \command{arg} ... \command{arg} ... ...
3
votes
0answers
30 views

Include values of \ref, \eqref into a new document [duplicate]

I have an introduction to my thesis. It includes a lot of constructions like in Section \ref{sec1} is shown or the formula is given in \eqref{eq1} whereas the corresponding Section and equation are in ...
4
votes
1answer
64 views

How to make LyX process TeX code without converting it into .lyx format?

When I do \input{file} in a .tex document I later import in LyX, LyX converts file.tex into file.lyx and changes \input{file} to \input{file.lyx}. But LyX doesn't do well with the TeX code it does not ...
2
votes
1answer
863 views

How to include PDF file in LaTex Doc from folder location?

I'm using the \usepackage{pdfpages} to include PDF files. I'm using the following convention: \includepdf[pages={1-7}]{myFile.pdf} My question is, how can you include a link to a folder that ...
3
votes
0answers
110 views

How to color groups of bars in a graph, coming form an external file?

I have a graph displaying bars and error bars, the numbers comming from an external .dat, being simply black and white. And this is how I got there: \documentclass[12pt]{report} ...
2
votes
0answers
60 views

How to maintain data to be both implemented and documented (in a personal package)

I'm looking for the best strategy for maintaining, in a personal package, a (long) list of data that has to be defined in the implementation and to be documented in the documentation. Let me be more ...
3
votes
1answer
75 views

Vertical space only after every second row in a table

I have several tables in the following custom format, to which I would like to add vertical space (e.g. 6 pt) after every second row. I know this can be done manually. I am only wondering, if there is ...
35
votes
11answers
11k views

Deleting external/auxiliary files?

Is there a way to make TeX delete files? In my document a lot of auxiliary files are created and it would be wonderful to have them removed after their content has been used.
4
votes
1answer
84 views

Loading file after converting to ASCII characters

I am writing a document on phonetics using the media9 package to include pronunciations of some of the words in the document. The words that are to be pronounced are in Danish, and thus their ...
3
votes
0answers
87 views

Cross-referencing between tex-files [closed]

I have a main TeX-file named Thesis.tex that contains this: \documentclass[11pt, a4paper, oneside]{Thesis} \begin{document} \input{./Chapters/MethodologyAndResearchStrategy} ...
6
votes
1answer
156 views

Can I define a variable that contains a URL (youtube) and call \includemedia with it?

I can successfully embed a video in my latex file using a syntax like this: \documentclass[10pt,letterpaper]{book} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...
4
votes
1answer
185 views

Texmaker: Is it possible to save all files on compile?

When I press F1 in Texmaker, is it possible to automatically save all files which belong to the "master" file? If it is relevant: I am using Texmaker 4.1.
0
votes
0answers
30 views

Show up \included files in table of content [closed]

In my "main" latex file, I use \include to include all my separate chapter_xxx.tex files. However, the \chapter and \section tags inside those chapter files do not show up in the table of contents ...
17
votes
4answers
4k views

How to iterate through the name of files in a folder

Assume I have many TeX files. For the sake of simplicity, also asssume they are in a single folder or directory. I want to input all files from within my main LaTeX document. Actually I can create a ...
3
votes
1answer
39 views

Weird image filenames

It was a pleasant surprise for me to find out that it is possible to include image named “K_{2,3}.pdf” into TeX document using \includegraphics (and pdfLaTeX). \documentclass{article} ...
1
vote
0answers
91 views

How do I reference supplementary files such as tables in Excel format?

Some of the information I need to include in my thesis are extremely long tables that will only be provided in the digital copy as supplementary files, most likely in Excel's XLS format or similar. ...
3
votes
2answers
260 views

How to ignore missing images when compiling?

I can't find a pdf figure that goes into a latex document that I am trying to edit. Obviously with the file missing, the document can't compile. Is there some way to edit the file without ...
9
votes
2answers
246 views

How can I create Table in TeX and get information from txt file

How may I input .txt file to the TeX tabular? I have a list of students (FirstName, LastName, and if this student was at school). 0 means not, 1 means yes, of course... .txt file look like this: \r ...
2
votes
1answer
106 views

Scaling External Asymptote File within the Current Document

I have diagrams generated in Asymptote stored in external files. Is it possible to input the files into my current LaTeX document and to choose the scale factor within the current document? The ...
28
votes
3answers
4k views

How to influence the name of the pdf file created with pdfLaTeX (from within the source code)?

I have a source file called 2011-05-27_Myfilename.tex and I'd like to create a PDF file from it called only Myfilename.pdf. Can this be configured from within the .tex file itself? (It seems to be ...
4
votes
0answers
81 views

hyperref link to file at position

I'm a newbie. I've figured out how to set up a hyperlink link to a file (in my case, a PDF) on the hard drive. But I would also like to change the starting position when this PDF opens up. This PDF ...
8
votes
1answer
72 views

Splitting file into lines and lines into parts

I'm working on a song book using LaTeX. It's early in the project, and the songs aren't all picked out yet, but I thought I'd fix the inner workings of it in the meantime. Since many people will ...
5
votes
0answers
111 views

Absolute path for pgf externalisation

The graphic externalisation works well when it is done in a subfolder of my TeX files with the command \tikzsetexternalprefix{figures/} However, I get an error message when I try to set a different ...
8
votes
2answers
105 views

Use labels from file in Tikz

I want to compare data from two files in a 4 by 4 grid. The data files are like this: data1.dat: A B C D ..... data2.dat: 1 2 3 4 ......... I am able to set up the grid with the ...
5
votes
1answer
175 views

Include a file passing a parameter

Is it possible, while including a file, to pass some parameters to that file and get included file rendered differently depending on those parameters? My particular case is, I have two documents, ...
8
votes
3answers
198 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 ...
6
votes
1answer
179 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*} ...
7
votes
1answer
152 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
156 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
112 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 ...
12
votes
2answers
2k views

referencing labels from other files

Sometimes I want to refer (using \ref) a \label from some other tex file. What is the right way to do it? (It's, of course, possible to \include all files in one and then use \includeonly — but it ...
1
vote
1answer
578 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
117 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 ...
8
votes
3answers
736 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
136 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 ...
5
votes
1answer
156 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[% ...
5
votes
1answer
693 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 ...
2
votes
0answers
184 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: % ...
3
votes
1answer
657 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
422 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
152 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
268 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
200 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
92 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
77 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
251 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
129 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
649 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 ...