Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
2 answers
32 views

How to read from external file and compare to given string [duplicate]

I am trying to extract text from an external file (someexternalfile.txt) and compare it with a given string (sometext) but it is saying that the external text and the given string are not the same (...
fsr_j's user avatar
  • 75
0 votes
1 answer
47 views

How to include minted file with "[ ]" in filename

I use bash to generate list of files and make sections git ls-files *js | while read i; do name=${i//\/\\/ } name=${name//_/\\_} echo "\newpage" &...
eri's user avatar
  • 103
0 votes
1 answer
46 views

Can I use an image located on the web specifically in Overleaf?

This question isn't a duplicate of Can I use an image located on the web in a LaTeX document? but a more specific version of it for Overleaf, since none of the answers given there work on that E.g. ...
mma's user avatar
  • 103
0 votes
0 answers
12 views

Control file details from master

Good morning I have many latex file added in a master with the \input command. I want to choose some details (for example a color for some table cells) from the master in order to write it only once ...
Luca Spagnolo's user avatar
0 votes
0 answers
42 views

How \externaldocument into xr-hyper works?

I am using xr-hyper for referencing to an external document on my pc and I elaborated the following code. \documentclass[10pt]{report} \usepackage{xr-hyper} \usepackage{hyperref} \usepackage{...
Antonio Maria Di Mauro's user avatar
0 votes
1 answer
36 views

Consistent numbering of linguex-examples across chapters

I am using a template for my thesis, which imports separate .tex files for each chapter into the main.tex. Using linguex, my examples start to renumber from (1) each chapter and I cannot seem to ...
Iris's user avatar
  • 41
0 votes
1 answer
36 views

Problems with currfiledir, pgfplotsstable and compilation from a section file

My project File tree - section - mysection.tex - tools - mystandalone_data.csv - mystandalone.tex main.tex MWE main.tex \documentclass{article} \usepackage[mode=buildmissing]{standalone} \...
Enevevet's user avatar
  • 772
1 vote
1 answer
74 views

Export all minted code fragments to files

I would like to export all the code fragments of a lectures book I wrote in a ordered tree structure as <chapter>/<section>/<some name or number>.<ext>. the code is in variuous ...
max's user avatar
  • 51
0 votes
1 answer
50 views

Compile LaTeX code in verbatim/lstlisting

For a presentation (in beamer) with the topic How to use LaTeX for your thesis at my university, I wanted to add lots of LaTeX code snippets and compile them. At the moment, I have a separate .tex ...
Gargantuar's user avatar
1 vote
0 answers
33 views

graphicspath and OneDrive

I am trying to move my files to OneDrive and have had problem using graphicspath. I have used it successfully before but when I use it to specify a folder on OneDrive, I cannot get it to work. The ...
jwrudn's user avatar
  • 51
0 votes
1 answer
57 views

Shorttitles after included external file

I have included an external pdf document with literature references in my TeX document. Afterwards, I have to cite one of the cited books again later in my normal TeX document. My problem: I work with ...
test's user avatar
  • 159
4 votes
4 answers
231 views

Using \input for command arguments

I'm making an rpg system. I want to separate the contents of the spell from the formatting of the spell to, for example, be able to format the spells differently for character sheets vs a dedicated ...
Amit's user avatar
  • 43
2 votes
1 answer
125 views

\Include working on mac, but not on windows

I am working on a big LaTeX document (thesis), that's broken down into multiple .tex files, and I thus have only a thesismain.tex file to compile that uses \include. On a MacBook, compilation goes ...
Kal8578's user avatar
  • 175
0 votes
0 answers
20 views

Cite a reference with the possibility of opening an internal pdf file at the right page number

I want to cite a reference in my document with the possibility of opening this reference, which is stored as a pdf file in my directory, on the right page. It should look something like this: [1, ...
ANT Learner's user avatar
0 votes
0 answers
145 views

How to find the directory for my LaTeX document

I am very new to LaTeX and not very good with computers to begin with. I am using TeXworks. I want to add an image to my document, but I do not know where to place the image file in order for the ...
user110391's user avatar
6 votes
2 answers
224 views

Using expl3 to load geometry parameters from a file

expl3 has defeated me again so I'm relying on the kindness of strangers again. I think the underlying problem is more about splitting input rather than the file reading. Context: I want to load the ...
Doc Octal's user avatar
  • 369
2 votes
0 answers
45 views

Automatic distribution of data onto groupplots with violinplots

I am rather new to latex and pgfplots, but have to plot a rather complicated plot. I need a set of (120+) violinplots and it would be great if I could provide the data from a file (in any format, ...
LocalHorst's user avatar
0 votes
0 answers
27 views

Problems with externalize figures in PGFplots

I have a MWE as following where i need to build a surface externalizing it: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{external} \tikzexternalize[prefix=tikz/] \begin{document}...
Angelo Aliano Filho's user avatar
0 votes
1 answer
185 views

Include a file path (.bib) containing spaces & special characters

I have this path "~/Library/Mobile Documents/com~apple~CloudDocs/Sync/160329_3DPP.bib". I cannot change that since the .bib file is synced through iCloud and updated frequently. I read that ...
massisenergy's user avatar
0 votes
1 answer
71 views

Advice for file structure

I made a customized document class called note and since I added a lot of additional features (e.g., fonts, tikz) so I feel that my file structure needs some modifications/improvements and I'd like ...
Yiyang Yan's user avatar
0 votes
0 answers
24 views

Get verbatim file content into exif data trought hyperref

The goal I have the following external main.bib file containing: @book{fauve2023TheSuperBook, title = {The Super Book}, author = {Fauve}, publisher = {MadPublisher}, year = {3 June 2023} } I ...
fauve's user avatar
  • 2,521
1 vote
0 answers
70 views

On TEXINPUTS, input@path, graphicspath, l_file_search_path_seq etc

There appears to be multiple methods to customize the locations where (La)TeX search for files, as well as packages like import etc. What are they/how to use them? Why were they introduced? Why are ...
user202729's user avatar
  • 7,293
0 votes
0 answers
30 views

Cross-referencing to a static set of labels

I need to cross reference from the file new.tex to the file master.tex. I have read the question Cross-referencing between different files and tried the xr package. It works, but the way it handles ...
brad's user avatar
  • 527
2 votes
1 answer
75 views

Writing a for loop that iterates through filenames in a text file

I would like to create beamer slides where each slide contains an image. I have a file that contains a list of all the image locations. This is my code: \documentclass{beamer} % Import necessary ...
Michal's user avatar
  • 123
1 vote
0 answers
67 views

Creating a clickable link to a local file only in source code

The following situation: I use a program for my data analysis. The program creates a project file. From this file I export the graphics I'm including as figures in the TeX code. Is there a way to ...
dropbear's user avatar
0 votes
0 answers
60 views

Externalizing arbitrary stuff

I find that working with tikzexteralize can become quite complicated. I am therefore wondering if tikzexternalize is really the best approach. I guess I am thinking something like: Can we externalize ...
Bubaya's user avatar
  • 2,475
0 votes
1 answer
83 views

Import a picture in LaTeX? [duplicate]

I just started writing in LaTeX. I want to import a picture but failing. The picture is .png format.
Festona's user avatar
  • 39
0 votes
1 answer
86 views

\input function doesn't work: trying to include contents of external text file

I want to include the contents of an external text file into my LaTeX document. I've tried \input{./message}, but all I get is an error containing the very last line of the text file: (./message.txt ! ...
GPWR's user avatar
  • 267
1 vote
2 answers
317 views

"! Undefined control sequence." when I use "\def"

Here is a MWE: \documentclass{extbook} \usepackage{xspace} \usepackage{xstring} \usepackage{ifthen} \newcommand\foo[1]{% \def\tempfoo{#1}% #1% } \newcommand\separation[1]{% [\the\numexpr #1\relax ]%...
Pierre Dufays's user avatar
5 votes
1 answer
248 views

How do I persuade (La)TeX(3) to read a file character by character?

I'm doing the Advent of Code (2022) in LaTeX3 (no, really I am). Each challenge involves some input, which for Day 6 consists of a single line which is very long (4096 characters). This line needs ...
Andrew Stacey's user avatar
3 votes
3 answers
269 views

Struggling to Implement FileSystem Based Includes

I'm trying to follow along with this answer to automagically include files based on the filesystem hierarchy. My file structure looks like: article.tex sections/ |-- 00-introductions.tex |-- 10-data....
ScottishTapWater's user avatar
3 votes
1 answer
94 views

Read and process file content line by line with expl3

In a multi-file project organized as: mainfile.tex subfile1/subfile1.tex subfile2/subfile2.tex ... in order to make every subfile compilable on its own and make possible of referencing between ...
Jinwen's user avatar
  • 8,568
0 votes
0 answers
22 views

Why \read adds extra space to the end of content? [duplicate]

I have file foo.txt with a single byte inside: x. Here is my code: \documentclass{article} \begin{document} \newread\foo \immediate\openin\foo=foo.txt \read\foo to \content \immediate\closein\foo \...
yegor256's user avatar
  • 12.1k
0 votes
1 answer
147 views

Is it possible to get the value of --output-directory programmatically from LaTeX code? [duplicate]

I'm trying to save a file first, using \VerbatimOut. Then, I'm using this file in \ShellEscape, where I need to know its absolute path name. Everything works well, until --output-directory is changed ...
yegor256's user avatar
  • 12.1k
1 vote
2 answers
145 views

Is it possible to \typeout the content of a file?

I'm trying to do something like this (\read is a pseudo command): \typeout{The content of the file a.tex is: \read{a.tex}} Is it at all possible?
yegor256's user avatar
  • 12.1k
1 vote
1 answer
196 views

Accurately display pixel image from data

I am working in image de-noising and therefore want to display an image as accurately as possible (e.g. before and after de-noising). I have my grayscale image represented in a file with 256^2 = 65536 ...
Franz's user avatar
  • 175
2 votes
0 answers
296 views

Reduce file size of imported graphics and their fonts

I am looking to reduce the file size of the final version of my thesis as much as possible without real hassle and any loss of quality. At the moment it is around 7 MB. I read much about it (...
ACCakut's user avatar
  • 31
0 votes
0 answers
55 views

How to check if different file path refer to the same file

A file may be accessed by different paths. For example, - subpath/myfile.tex - ./subpath/myfile.tex - ../current path/subpath/myfile.tex, - /d/.../current path/subpath/myfile.tex They refer to ...
lyl's user avatar
  • 2,727
0 votes
1 answer
336 views

How to obtain absolute path of a file

Many languages provide functions to obtain the absolute path of a file. I wonder if Tex/LaTex has also such macros. In the following example, given a file name, test if this file really exists. Then, ...
lyl's user avatar
  • 2,727
0 votes
1 answer
101 views

Wrong file location by \IfFileExists

The following code is the content of my main.tex. The file a.tex is in the subdirectory tmp under the directory where main.tex is, that is to say: ./main.tex and ./tmp/a.tex. The problem of my code is:...
lyl's user avatar
  • 2,727
0 votes
1 answer
144 views

How to test if files have been input before by \input

I wonder if there are methods to test if a file(or files) has been input by \input before to avoid multiple inputting which may cause LaTeX Error: Command ... already defined. Example \...
lyl's user avatar
  • 2,727
0 votes
1 answer
254 views

Loop through directory structure and include all *.pdf files

I have a document that is constructed from a number of *.tex files stored in a directory organized as follows: -2022 -07 -01 -note.tex -file1.pdf -differentfilename....
pQ12branch's user avatar
2 votes
0 answers
2k views

BibLaTeX - addbibresource not working

I am using a self-hosted instance of Overleaf/ShareLaTeX, and I cannot get BibLaTeX to work. My preamble looks like this: \documentclass{report} \usepackage[utf8]{inputenc} \usepackage[margin=1in]{...
Ben Zelnick's user avatar
0 votes
0 answers
191 views

Including a file with absolute path

I have a python script which compiles a tex file on my D drive. I would like to include a data file into my tex file. This data file is located on the following directory on Windows: \\filesrv\xxx-sc\...
thomkell's user avatar
  • 101
0 votes
0 answers
79 views

How to input multi parts of a file

I have a .tex document(external.tex, for example) whose content is like this: ... ... %*#<start> some code %*#<end> ... ... %*#<start> some other code %*#<end> ... ... I want ...
lyl's user avatar
  • 2,727
1 vote
2 answers
326 views

How can I read the whole file content verbatim into a (expl3) string variable?

Problem Description As in the title. MWE: \documentclass{article} \begin{document} % first write some file content for demo... \begin{filecontents*}{test test.txt} line 1 !?#\xyz line 2 \end{...
user202729's user avatar
  • 7,293
0 votes
1 answer
67 views

Write lines to file in expl3 [duplicate]

Common programming languages (PL), e.g. Python allow append lines to opened file like file_object = open('sample.txt', 'a'). How it is possible to do in expl3 PL? My MWE adds only last argument of \...
sergiokapone's user avatar
  • 5,588
0 votes
0 answers
112 views

\filecontents worked once but always with error messages. What should I do?

I get error messages that don't make sense running code which I've adapted from https://ftp.acc.umu.se/mirror/CTAN/graphics/circuit_macros/doc/Circuit_macros.pdf. I've rewritten the code with the ...
Lasse Karagiannis's user avatar
0 votes
1 answer
284 views

Framework for interactive graphics in LaTeX documents

I've written a prototype LaTeX package and associated viewing framework to allow LaTeX documents to be viewed in an environment that allows for interaction with figures. The figure might have points ...
Randall Fairman's user avatar
0 votes
1 answer
38 views

Using answers package in macros

I am compiling a set of problems for my students with hints, and using the answers package for that. The goal would be to have the problems and hints grouped by exercise session, but still within the ...
Rolf's user avatar
  • 229

1
2 3 4 5
14