Questions tagged [external-files]

{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}.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Launch a program from a pdf file created with LaTeX

I have found a similar question here, but it regards opening a .pdf file from another one. I would like to open a .ods file from a link in the .pdf file, meaning it should launch LibreOffice Calc. I'm ...
0
votes
0answers
13 views

Latex and file management: chained \include{…} and reference to active directory

For each chapter of a document I am working on I have a separate folder, and all folders are contained in a common superfolder, together with a file main.tex which should put them all together. ...
2
votes
1answer
21 views

Create a nested comma-separated-list from a CSV file

In my Latex document I define a nested list that looks like this: \def\recipes{ { test1@ test2@ test3@ test4@ test5a*test5b@ test6a*test6b }, { test1@ test2@ test3@ test4@ test5a*test5b@ test6a*test6b ...
1
vote
0answers
38 views

What's a good way to add a non tex table from external file?

I'm seeking for your advice and ideas regarding a way to add all my tables in the pdf file as non tex files. The goal is to make it harder (much harder) for someone to edit the way the tables look in ...
0
votes
0answers
51 views

Luacode with several .tex files

I wrote some luacode in my main.tex and I'm a adding several other files due to \input{code.tex} I already asked this question here and it works on a standalone environment but not in my case. I can't ...
0
votes
1answer
20 views

How to make \InputIfFileExists force end the compilation with a descriptive error message when the file is missing?

The following gives me a message saying the Process exited normally with a corrupted output PDF file despite the absence of any file called dummy. So, I need to have a compilation-halting error with a ...
2
votes
1answer
44 views

Incorrect Results from \IfFileExists with updates to TeXLive2020

Following an update to my packages with TeXLive2020 I am seeing different behaviour than in TeXLive2019. The following test is run in the directory Testing/ which besides the MWE in the file ...
0
votes
0answers
16 views

Automatic creation of caching directories

The following MWE writes a cache file to the tikzcache directory \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \tikzsetexternalprefix{tikzcache/} \begin{...
0
votes
1answer
25 views

PDFLatex not finding files (tex, pdf) after exporting from R statistics software

I installed Kile 3 and MiKTeX on Windows 10 and can not include any PDF graphics nor Tikz-painted .tex files from subdirectories. Minimal example: \documentclass{scrartcl} \usepackage{tikz} \begin{...
0
votes
2answers
59 views

\input gives error, but copy-pasting the code does not

I have the following main.tex file: \documentclass{examdesign} \begin{document} \begin{examtop} {\LARGE Math Test} \end{examtop} \begin{multiplechoice}[rearrange=no] \input{myquestion.tex} \end{...
0
votes
1answer
36 views

Warning in REVTeX 4.2 for references to an external document: “… has been referenced but does not exist, replaced by a fixed one”

First, I build the following external document, ExternalDoc.tex file, 3+ times. \documentclass[prl,aps,10pt]{revtex4-2} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{thm}{Theorem} \...
0
votes
1answer
25 views

Escaping quotes when writing to a file

When using quotes as part of strings one often needs to escape the quotes. I now have a string My nice title stored in \mytitle and I want to write, from LaTeX, a JSON file which reads {title: "...
4
votes
0answers
81 views

The latest release of LaTeX2e changes behavior of \IfFileExists. Why?

The output of the following latex document has changed since the last LaTeX2e release: \documentclass{article} \begin{document} \IfFileExists {} { yes } { no } \end{document} Release 2020-02-02:...
0
votes
0answers
40 views

Input{xxx} : file not found

I'm using TexMaker and MikTex, and I created a folder called "first" where i put the .tex file and another file called xxx.txt. Now I want to import the file into latex by saying \input{xxx} ...
1
vote
0answers
17 views

Input a file from the web via Overleaf

I want to include some code in a document, but it would be very nice if that code would automatically update whenever it was updated on GitHub. Looks like I can include text from a remote file as ...
1
vote
1answer
33 views

What order does LaTeX check for image file extentions? [duplicate]

I'm reading the tutorial on LaTeX by overleaf, and in their section Adding Images they have some example code: \documentclass{article} \usepackage{graphicx} \graphicspath{ {images/} } \begin{...
0
votes
1answer
42 views

includegraphics: one single picture not found

I include about 100 pics in a LaTeX document and only one of these pics is not found: ! Package pdftex.def Error: File pic_053_001_A_ccc_SS_bb_TT21_test.pdf not found All pics are in the same folder—...
0
votes
1answer
27 views

TOC contains “Contents” in Mainfile document / DRAFT-Background without using package

if this question has already been asked, just let me know! I seperated a big document into smaller files and my table of content displays "contents" as the first entry and I want to delete ...
1
vote
1answer
49 views

Partial file input

Is there a way to input a part of a LaTeX file1.tex specified by say some markers into another LaTeX file file2.tex? (For example, I don't want to input \begin{document}, \maketitle, etc.) I know that ...
1
vote
1answer
20 views

Configuring build.lua to install images

I have a bunch of logos I want to package up into a module within a LaTeX bundle. But my build.lua file won't install them. I have a subdirectory logos a the top level of my bundle. In that ...
1
vote
0answers
25 views

How to auto-complete filenames in texstudio

I have lots of images to be used in a specific folder ./figures/, so I set \graphicspath{{./figures/}}. However, how can I auto-complete filenames of these images in \includegraphics{}?
2
votes
3answers
143 views

How to query if a file has changed (a \IfFileHasChanged conditional)?

We know \IfFileExists{<file>}{<yes>}{<no>}. How can I create a command \IfFileHasChanged{<file>}{<yes>}{<no>} for a file which has changed (and does exist!). I mean ...
0
votes
1answer
45 views

reference external figures from supplementary inside overleaf

I try to reference external figures from the supplementary information inside the main text. How to reference figures that are in the supplementary content in main text? describes an approach I try to ...
3
votes
3answers
164 views

Is it possible to conditionally input a file in LaTeX?

I'm new to LaTeX, and here's what I'm trying to accomplish: I have Markdown and LaTeX files in my working directory, say markdown_1.md and latex_1.tex. In my main LaTeX file, main.tex, I have defined ...
1
vote
1answer
44 views

code input with linenumbers

I write a thesis and want to have my code/textfile in the appendix. I dont want to copy the code, I only want to write the path of my file into tex. I already tried \verbatiminput{main.py} and \...
0
votes
1answer
58 views

Koma-Script scrartcl.cls + newfile.sty: \readstream stops after \section+newline in file

I am using newfile.sty to generate a file, which I then read again. With Koma-Script it stopped working since TeXLive 2020: If the file contains a newline after a sectioning command like \chapter or \...
1
vote
0answers
67 views

How to compile a PGF/TikZ plot several times using the standalone package?

In my main document mwe.tex is a PGF/TikZ plot integrated using the package standalone. This plot contains several frames so that several axis with different axis scalings/ axis sections are ...
1
vote
0answers
42 views

Use file with non-ascii letters in filename in \inputminted

I want to import some code into a LaTeX-File. The problem is, that in the path some special caracters appear. This still works fine: \inputminted[autogobble,breaklines]{java}{C:/Path/to/my/File.java} ...
0
votes
1answer
125 views

Include external plantuml file [duplicate]

I want to include an external .puml file and have the diagram generated. My current approach does not work and I do not understand why. Following I pasted what I think is relevant from my current ...
6
votes
2answers
160 views

Include file contents into LaTeX on the same line

I'm trying to generate a pdf file where a certain part contains user input. I want it to be put on the same line, with the same font, and without special characters messing up the parsing. I thought I ...
3
votes
2answers
62 views

Convert \input to number

I'm reading several txt-files from disk and I want to do some simple calculations on them and be able to print them on the page. Basically I have: \newcommand\getinput[2]{ \immediate\write18{do-...
0
votes
1answer
27 views

I want to remove links which direct us to our browser from my doc. How can do that?

\documentclass[letterpaper,10pt]{article} \usepackage{latexsym} \usepackage[empty]{fullpage} \usepackage{titlesec} \usepackage{marvosym} \usepackage[usenames,dvipsnames]{color} \usepackage{verbatim} \...
1
vote
1answer
81 views

Include word/pdf files in latex?

I was wondering if it is possible to integrate Word (or PDF) files in LaTeX in such a way, that one can still use the hyperlinks provided in that word / pdf.
0
votes
0answers
80 views

Graphics file not found when compiling subfile using graphicx path

I have been using subfile to manage a very large document of mine but have recently encountered an issue. I am using the subfiles package to manage chapters and sections and it has worked brilliantly ...
0
votes
1answer
47 views

Journaling calls to a function taking inline code as argument / macro param in horizontal mode issue

In the code below \Foo evaluates inline code. \Baz is a 'journal-ed' version, meaning it writes calls to \Foo to a file. Reading the file fails (Hook 2) due to a "'macro parameter character #' in ...
0
votes
0answers
31 views

Using l3file to append to a file

The code below overwrites erwlog.tex with %pdfdate:202004[more digits] Hello, world! How can I make it append instead? PS: What's wrong with 1.a? How to meet the requirement of 2.a? \documentclass{...
0
votes
0answers
26 views

Automatically elaborate an external table's data

I have to create a serie of sheets with LaTeX using informations from a LibreOffice table (but I can convert it in other formats if needed). The problem is, the table is some hundreds rows long, so it ...
0
votes
0answers
19 views

Definition of PDF-Metadata from macros doesn't work in external .tex file

I have two files. My main tex-file and a file with several definitions (not a .sty-file but another .tex-file). If I try to set my PDF-metadata from my \@title-macros with the \AtBeginDocument-...
1
vote
1answer
101 views

Get relative path to class file from inside the document class

Is it possible to get the relative path used in the call to \documentclass so that I can use \input inside a document class, to import files relative to the .cls file? Example folder structure: ./...
2
votes
2answers
72 views

How to replace a line in a file written by TeX' \write command

I try to write some content in an external file using TeX' \immediate\write command. \documentclass{scrartcl} \begin{document} \newwrite\tempfile \immediate\openout\tempfile=lists.tex \immediate\...
0
votes
0answers
31 views

File “informs1.cls” not found?

I am going to use the template of the Inform Journal but I can not run the template? Please see the error in the screen shot picture below.
0
votes
0answers
24 views

\subfloat not working if file has accented characters with \usepackage[portuguese]{babel}

If I use \usepackage[main=english,portuguese]{babel} there is no problem with files with accented characters. But I cannot write in Portuguese. But if I use \usepackage[portuguese]{babel} than using \...
1
vote
1answer
73 views

How do you copy all the images referenced in a document into a single directory?

I am finalising a book and I need to submit all the images as separated files along with the manuscript. Now, images are all saved in different places and referenced with a relative path from my ...
0
votes
1answer
277 views

Difference between \input and \include [duplicate]

Difference between \input{filename} and \input{filename} in the main tex file.
0
votes
1answer
34 views

Read link from external text file and include into hyperlinked image

I would like to incorporate a link into a picture using \href. The links are stored in text files. The .tex file should be able to read form those text files (i.e. 1.text) and generate that clickable ...
1
vote
1answer
85 views

draft mode does not respect \input command

I'm using the elsarticle document class with the draft option enabled. I thought that the draft mode would skip the files imported with the \input{} command as well but it is not the case. I use the \...
3
votes
1answer
78 views

Inserting tokens after \input

The answer for this should be pretty simple, but I just can't seem to find how to do it. I'm trying to use \afterassignment to make syntax for a section header and then use TeX's lexing for \input to ...
0
votes
1answer
33 views

create command to write with filecontents

What's the most efficient way to do this? \begin{filecontents*}{./weekly/week07.tex} % Week 7 \section{} \end{filecontents*} \begin{filecontents*}{./weekly/week08.tex} % Week 8 \section{} \end{...
2
votes
3answers
286 views

Read csv values as key-value pairs [duplicate]

I have a csv file that contains the following: "N","n","M" 200,100,50 How can I read it with LaTeX such that \N, \n_trees and \M then returns respectively 200, 100 and 50 ? Or some other internal ...
0
votes
1answer
87 views

How to get ride of the file extension in \currfilename

How to get ride of the file extension in \currfilename? The \jobname would only give me the name without the .tex, which is fine. But that's not what I want if I am using \input or \include. So \...

1
2 3 4 5
12