Skip to main content

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
1 answer
52 views

Extract some sections from a external tex?

I have a large source tex, structured by sections, and I need to extract a lot of them to a new file. The goal is doing the same as the function \input, but only with some selected sections, not the ...
kyrta's user avatar
  • 1
0 votes
0 answers
17 views

How to add a link to the local audio file in pdf via latex?

For example, if I use \url{https://tex.stackexchange.com/}, it can open the website when I click it. But if I use \url{D:/文件/1.m4a}, it don't have a reaction when I click it on the PDF and the Chinese ...
Weixiao Laugh's user avatar
0 votes
0 answers
36 views

Latex: Add pdf page without split the text content

I want to add a pdf page to my current latex pdf file, but i got a problem. When i use \includepdf, then the position where i put this command will auto add a pagebreak, like the image below. This is ...
MY_NAME_S3M's user avatar
0 votes
1 answer
75 views

How can I input external files by using a list of names?

My code is the following: \documentclass[ngerman,german,14pt,twoside,openany]{scrbook} \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8]{...
mario1000's user avatar
  • 502
2 votes
1 answer
54 views

fill values of a Push button from a file

In a beamer, I want to have a button which will gave a random value of a list when clicked upon. Here's an example of a start \documentclass{article} %\usepackage{ocgx2} \usepackage{hyperref} \begin{...
dyaku's user avatar
  • 55
0 votes
0 answers
25 views

How to include same library/bibtex citations in externally linked document with different numbering schemes?

I have a table that was moved from a main document and into a supporting information document, which is linked by externaldocument I want the citation, for example, Su2018, to be included in both the ...
con's user avatar
  • 351
0 votes
0 answers
44 views

Check if a file has been modified since last compile in Overleaf

I have an if-statement that I call in my .tex document in Overleaf \IfFileExists{mypdf.pdf} {\includegraphics[width=1\textwidth}{mypdf.pdf}} {\includestandalone[width=1\...
David G.'s user avatar
  • 329
0 votes
2 answers
35 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
51 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
57 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
87 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
57 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
  • 61
0 votes
1 answer
43 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
  • 796
1 vote
1 answer
89 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
59 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,251
1 vote
0 answers
40 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
  • 181
5 votes
4 answers
267 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
  • 53
2 votes
1 answer
135 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
21 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
286 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
231 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
51 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
1 answer
231 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
79 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
25 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,551
1 vote
0 answers
72 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,683
0 votes
0 answers
32 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
78 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
105 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
66 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,559
0 votes
1 answer
86 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
103 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
414 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
254 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
273 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
96 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,720
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.3k
0 votes
1 answer
157 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.3k
1 vote
2 answers
161 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.3k
1 vote
1 answer
219 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
  • 317
2 votes
0 answers
335 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
60 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,787
0 votes
1 answer
404 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,787
0 votes
1 answer
121 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,787
0 votes
1 answer
158 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,787
0 votes
1 answer
269 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
201 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

1
2 3 4 5
14