{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

1
vote
1answer
29 views

Reading a text file with parent directory and file name containing spaces

I need to read the content of a text file located in a directory containing spaces. In addition, the filename might also contain spaces. For example, reading the following text file: C:\My ...
1
vote
1answer
564 views

LaTeX external document referencing from Main tex file

I have a file structure like this Main.tex chapters (folder) Chapter_1 (folder) chap1.tex Chapter_2 (folder) chap2.tex To refence diagrams and equations from chap1.tex in chap2.tex, I ...
0
votes
1answer
16 views

Inserting multiple legends in a pgfplot with one \addplot graphics

I would like to have the legends match the line plots from the diagram. I have referred to a lot of legend questions, but I couldn't find one where they were trying to make multiple legends for a ...
0
votes
0answers
13 views

Is it possible to change the output for each \excludecomment or \includecomment (comments package)?

I am trying to avoid modularizing a document into separate files (because it gets translated into 10 languages!) Instead, I am trying my luck with the comments package. Let's say I have three ...
71
votes
3answers
29k views

How to include graphics with spaces in their path?

I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces. Include image with spaces in path directory to be processed with ...
0
votes
0answers
21 views

Writing files to another directories [duplicate]

I need to write files in a specific directory on the file system where I have access to. But even if I can write files in the current working directory or any sub-directories, it seems that I am stock ...
2
votes
1answer
24 views

Reading files containing # characters

Using this code, I have no problems reading files unless they contain the character '#' (number sign, pound sign or hash character, whatever you call it) \newread\file \openin\file="C:/Some Directory/...
3
votes
1answer
59 views

Conditional evaluation of Sweave chunk

I'm using some R code to import and manipulate a time series. The code takes some minutes to run and, as a result, it generates a relatively small time series. Now, to prevent typesetting to take an ...
1
vote
1answer
26 views

Dots in filename, underscores in extension

I have the following svg I want to include, that I've nicely converted to a pdf following How to include SVG diagrams in LaTeX?. Now I want to include it in my document, however the document's name ...
10
votes
4answers
3k 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 \...
0
votes
1answer
49 views

How to obtain absolute path of Latex file, regadless if it standalone or combined

I need to find the absolute path of a latex file, as it sits on file system. Seems like a simple task, but it turns out to be harder than I thought. Here is a MWE. I have this tree /media/data/latex/...
5
votes
1answer
22k 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 ...
4
votes
1answer
113 views

How to print page number over page containing \externalfigure in ConTeXt?

I'm trying to merge a full size PDF page into my document and then to print the page number over the top in the normal position. I've read the page on the wiki about inserting PDF pages (http://wiki....
23
votes
4answers
7k 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 ...
1
vote
1answer
31 views

\nomname undefined when list of symbols is in a external file

I want to create a list of symbols in an external file using the nomencl package. Here's what my file listOfSymbols.tex looks like: \renewcommand{\nomname}{List of Symbols} \nomenclature{$v$}{volume ...
1
vote
2answers
76 views

\includegraphics, try another extension

I have a number of documents (jupyter notebooks) that are created and accessed essentially using a browser interface, and because of the browser interface the cleanest way to include external vector ...
2
votes
2answers
90 views

Printing extremely huge numbers [duplicate]

I'll go direct to the point: I'm using Haskell to calculate the numbers that I want, these numbers always have some millions of digits (usually more than 15 million digits) and I'm throwing them into ...
2
votes
1answer
44 views

Can I temporarily clear the file search path in LaTeX3?

I'm using the following code to search for a file using LaTeX3: % List of known image extensions: \clist_new:N \l__htmv_grext_clist \clist_set:Nn \l__htmv_grext_clist {png,PNG,jpg,JPG,jpeg,JPEG,gif,...
2
votes
2answers
77 views

How can I remove trailing \par when reading a file and writing the output to the log?

I put together a macro to write the contents of an external file to the log output. Unfortunately, I always read out the trailing \par that LaTeX adds when reading files. How do I test for this and ...
2
votes
1answer
56 views

Pgfplots: Scope inside axis environment or other relative positioning

I want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position. The expected result should look something like this:...
3
votes
1answer
32 views

Pgfplots: Scope inside axis environment - follow up

This is a follow-up question to this question: I still want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position....
8
votes
1answer
1k views

After MiKTeX update when using LuaLaTeX: Package pgf Error: Driver file ``pgfsys-luatex.def'' not found

I just updated my MiKTeX instance to the latest packages and am using the LuaLaTeX compiler. Whenever a document relies on pgf I get the following error: ! Package pgf Error: Driver file ``pgfsys-...
1
vote
1answer
63 views

Is there any way for LaTeX to provide a file context for better log messages?

UPDATE: In hindsight, I realize that this question is really, "Is there any way for LaTeX to keep the file context and warning/error message on the same line?" This would be fore the purpose of ...
0
votes
1answer
31 views

'LaTeX Error: Can be used only in preamble' when using \externaldocument

I'm using 'xr' package for cross referencing across files. I have three files named 'main', 'file1' and 'file2' where all the packages are decalred in the main file. I'm including the files in the ...
0
votes
1answer
46 views

Externalized pgf pictures are not centered in figure environment

I try to use pgf/tikz with externalized images as described in section 107 of the manual. I am not using the "external" tikz-library because I have problems with the required shell-escape ...
1
vote
0answers
33 views

How to \input a .tex file in a chapter from a folder in a latex (separate files) [closed]

I am working on a template which is classified into different folders. Like Chapter1, Chapter2, Chapter3, etc. In chapter one (Chapter1), I need to insert a .tex file as a figure from a subfolder (...
8
votes
4answers
172 views

Using #define value from c source to be used on .tex document

I would like to extract a value from a .h head (C language) and use this value as input to LaTeX. As an example, consider defines.h: #define MEB_COM_PACKET_ID 0x01 using this value on a table of ...
2
votes
1answer
56 views

How to combine several child files such that each child file has its own Table of Contents?

I have several child files that I want to export as one master file and each child file has its own Table of Contents. When I export the files, the first child file's Table of Contents contains all of ...
2
votes
0answers
22 views

Clickable file links from in-text reference

I am currently using natbib to reference articles that I have in Mendeley. I have figured out how to get clickable links such that clicking on the in-text reference brings me to the actual reference ...
54
votes
12answers
33k 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.
1
vote
1answer
40 views

Find files in subdirectories to use with \input

Is there a way to have TeX find all files ending on .tex in subdirectories of a certain directory to be used as \input? In my document I would like to include a large number of files from a directory-...
2
votes
0answers
14 views

view dependencies within lyx file

I have a lyx file that has a bunch of child documents (tables) embedded in it. How can I generate a list of these external files that are included in my main file when I compile (pdflatex) it? This ...
3
votes
1answer
115 views

Items from file in itemize environment

Is it possible to import items from a file into an itemize environment? For example, consider a file with just words and no formatting: Elem1 Elem2 Elem3 Elem4 ... Elem120933 I like to read in this ...
6
votes
1answer
99 views

Getting certain data out of .txt file

I'd like to use an external .txt file to provide a table in my LaTeX document with data. To achieve this I've taken into consideration the pgfplotstable package and the filecontents package. Both of ...
3
votes
1answer
57 views

creating scatter plot from data file with missing values (sparse matrix)

I have a data set with multiple columns, where some entries are blank. I want to import and plot this data using tikzpicture. However, the resulting graph looks like some values are repeated. Can ...
1
vote
1answer
29 views

listings - How to format words of a external code file under a condition

I'm using listings to put a external code file in my document. I'm trying to customize its appearance to identify when the first character of a word is a digit and then change the color of this ...
2
votes
1answer
157 views

Looking for a LaTeX resource library

I'm a teacher, writing different kinds of documents with a lot of cultural resources that I have to organise with a catalog, then filter to retrieve ressources I want to import into my document, and ...
3
votes
2answers
364 views

A Question in Compiling book Class

I am writing my thesis using book class. And I use include function so that I can have separate files for each chapter. One problem with this is that I must click run button in the main file. If I ...
2
votes
1answer
36 views

underscore in filename using getfiledate Package

I'm trying to use the getfiledate package from CTAN to get, as sugested, the last file modification date. I've imported correctly the package and tested with another file, named table/classe.tex and ...
3
votes
1answer
94 views

Dynamic Table based on Json File

I'm trying to add in a dynamic table based on a two-dimensional array that is stored as JSON in a file on the disk. I've got no control of the file, as it gets pulled in from a web-service and ...
6
votes
1answer
1k 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 ...
0
votes
1answer
104 views

modular application (g-brief & moderncv) without changing \documentclass?

im writing a job application, so id like to have just one pdf document, which would contain my cover letter and my moderncv resumee. Both parts are working for themself, but i when i \input my ...
9
votes
2answers
273 views

What is the maximum nesting depth of \input?

Large documents are best split into various files. Using \input allows to nest multiple files. What is the technical limit of \input regarding the nesting depth? I haven't found any clue searching ...
1
vote
1answer
110 views

TeXStudio doesn't recognize self-defined commands in external file

I'd like to define some tables as commands (MWE) in an external .tex file, because there are a lot of settings for them. This external file gets included in the main document by the \input{} command. ...
1
vote
2answers
55 views

SVG filename argument to \includesvg - damned if you do, damned if you don't

I'm trying to use the svg package, for some svg files I have in a graphics/ subdirectory. My includegraphics command used to be: \includegraphics{graphics/foo.png} Now, if I write: \includesvg{...
1
vote
1answer
58 views

Length of external plain text file

(Xelatex) How can one determine the maximal line length (e.g. in characters) of a external, plain text file? This file likely contains special Latex characters. Usecase is syntax highlighted code by ...
10
votes
2answers
2k 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 ...
8
votes
5answers
192 views

Importing Parameters From a Separate File

Looked a long time for a solution to my problem, but said problem did not seem to lend itself well to "google-eez"! Here's my problem: I have a Beamer presentation that I give to many different ...
1
vote
0answers
97 views

Automatically externalizing content of a PGFplot as a PNG

I've got basically the same issue as in this question: I have a rather complicated plot made with PGFplots and I can get a very significant file size reduction by using a rasterized image (PNG) ...
0
votes
0answers
19 views

Cross-reference line numbers [duplicate]

I recently found a helpful post about cross-referencing line numbers in LaTeX. This seems great for responses to reviewers, but suffers from a particular limitation. Quoting the original article, ...