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
68 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 ...
  • 125
-1 votes
0 answers
20 views

xelatex and lualatex picking up old code from file

I have been using xelatex and lualatex on a file. But when I run xelatex sting.ltx and lualatex sting.ltx, the xelatex and lualatex programs are picking up old text that was present in the docement, ...
  • 67
0 votes
0 answers
20 views

Only print entries from a specific bib file [duplicate]

Using biblatex and biber, I’m editing a journal with 10+ articles per issue. Articles are added as such: \input{article1.tex} \addbibresource{bib-article1.bib} \input{article2.tex} \addbibresource{bib-...
  • 1,543
2 votes
0 answers
57 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 (...
  • 21
0 votes
0 answers
31 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 ...
  • 2,619
0 votes
1 answer
89 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, ...
  • 2,619
0 votes
1 answer
46 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:...
  • 2,619
0 votes
1 answer
75 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 \...
  • 2,619
0 votes
1 answer
55 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....
1 vote
0 answers
180 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]{...
  • 165
0 votes
0 answers
36 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\...
0 votes
0 answers
37 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 ...
  • 2,619
1 vote
2 answers
94 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{...
  • 3,126
0 votes
1 answer
48 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 \...
  • 5,194
0 votes
0 answers
53 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 ...
0 votes
0 answers
23 views

Input file filder - doesn't load graphics in multi file project

I suffer from the same problem as in thread Input file folder I tried the suggestions, so far with no different result. The last answer I tried. Just to clarify, are you giving the path names where ...
  • 1
0 votes
1 answer
114 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 ...
0 votes
1 answer
27 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 ...
  • 199
0 votes
0 answers
56 views

Latex No Files found

I do not know what happened. I tried everything I found on line. The problem is as follows: If I include \addbibresource{example.bib}, Latex stops recognizing any files. It doesn't matter what is in ...
  • 1
3 votes
1 answer
205 views

How to Avoid Fontspec When Invoking an External Font

I have recently downloaded a font from https://www.dafont.com, which, when I call it into my document, requires the fontspec package and compilation with lualatex. This has caused several problems, ...
  • 5,755
1 vote
1 answer
68 views

How Might I Use This External Font with Pdflatex?

This post adds another dimension to the question posed in Trying to Imitate an Archaic Gothic Font within a Document Compiled with Pdflatex. There are other fonts outside of TexLive that seem to ...
  • 5,755
0 votes
0 answers
19 views

Error when trying to input an external file with xltabular package `\hline ->\noalign` [duplicate]

I am trying to stack several tables one on another. For this I am using xltabular packages. I want to input text from another file. The following code works without problem when removing / commenting ...
  • 791
2 votes
1 answer
80 views

Compile on a per-chapter basis, from within subfile

My current project has many chapters, which are included via \input{chapters/chapter1.tex} from the main document. (The actual setup is a little more complex, but close enough.) When I am editing ...
  • 5,955
0 votes
1 answer
43 views

Append content to a file containing sharp

In my library, I need to be able to append some text to a file. The problem is that that file may contain the # symbol, and it turns out that every time I append something to a file containing a #, ...
  • 5,275
0 votes
0 answers
8 views

Possibility of \newdualentry with multi-paragraph descriptions having indents?

I'm wondering whether there is a way to print multiple-paragraph \dualentries with the glossaries package, having indents? While producing indented multiple-paragraphs works perfectly fine with \...
  • 87
3 votes
1 answer
68 views

Accessing characters with \symbol

I'm trying to use the \symbol{} command to output UTF8 haracters, but I can't get access any characters higher than 0x7E The following code just outputs a tilde. \documentclass[a4paper,10pt]{article} \...
0 votes
0 answers
27 views

Include `section` headers with `xcomment`

I use the package xcomment to make a stripped down version of mynotes.tex, including only theorems, definitions, etc. E.g.: \documentclass{article} \usepackage{xcomment} \usepackage{docmute} % Other ...
2 votes
2 answers
179 views

How to \include files with commas in their path

I am part of a large project working with big documents (>100 chapters and ~1000 pages per document). As it stands, we input our partial files into the main document via \input. The project would ...
  • 1,300
1 vote
0 answers
333 views

pdfLaTeX error - [closed]

\documentclass[11pt,a4paper,roman]{moderncv} \usepackage[utf8]{inputenc} \moderncvstyle{classic} \moderncvcolor{green} \usepackage[scale=0.75]{geometry} \usepackage{amsmath} \usepackage{amsthm} \...
4 votes
1 answer
143 views

Why does LaTeX tell me that my external text file has a last line which contains the token \par?

Why does LaTeX (TeX Live 2020, Debian) tell me that SomeLines.txt has a 6th line which contains the token \par? I know with \endlinechar being 13 and the catcode of char 13 (carriage return) being 5 ...
  • 24.5k
0 votes
0 answers
57 views

Is there a way to read multiple data sets from a single data file in the TikZ visualizer?

Given code: \usetikzlibrary{datavisualization} \begin{tikzpicture} \datavisualization [ scientific axes = clean, x axis = {attribute = t, length = 5cm, label = {$t$}}, y ...
  • 155
14 votes
1 answer
292 views

How to force LaTeX to error when an \include file is missing/misspelled?

The only file which was meant to be compiled in my Main.tex was specified by the following line: \include{transformtaion} It was compiled without any error using the following command: pdflatex -...
  • 284
1 vote
1 answer
46 views

problem creating tex from tex because of missing space

I have saved a name in \Name. It is ABC. So actually I wrote both possibilities this one \immediate\write\file{\read\noexpand\NoFile to \\Name} and this one \immediate\write\file{\read\noexpand\...
  • 119
0 votes
0 answers
35 views

allocate to Variables

I want to use the numbers in Blues.tex, but the number are real number like 234.65 but \setcounter can just use integer like 234. But this is not possible by using \setcounter. I Want to use many txt ...
  • 119
0 votes
1 answer
76 views

Generate an expandable error message when a file does not exist

I would like to understand how to use the expl3 command \msg_expandable_error (as used here) with \IfFileExists to get an expandable error message if some external file does not exist. I deliberately ...
  • 8,839
1 vote
2 answers
128 views

How to use standalone correctly? Scaling issue between standalone and \input

I have to deal with multiple rather large tikz images which I'd like to run isolated as a standalone file. Now, when integrating these images into my main file, the scaling is off. Meaning that I ...
  • 65
0 votes
1 answer
51 views

How to print the value of a counter to a file?

I'm trying to write the value of a counter to a file: \documentclass{article} \begin{document} \newcommand\print[1]{ \newwrite\foo \immediate\openout\foo=foo.txt\relax \immediate\write\foo{#1} ...
  • 10.3k
0 votes
0 answers
45 views

Appending Text to Each Line of an External File Using expl3 Syntax

Let us suppose I have an external questionfileone.tex file where each line of this external file represents a particular question text. It is something that I can use, for example, as a test database ...
1 vote
1 answer
125 views

tikz figure from file

Lets say i have a tikz figure in a file called tik_fig1.tex and tik_fig2.tex with \documentclass[tikz]{standalone} Is it then possible to add these to a main.tex with \documentclass{article} by ...
0 votes
0 answers
22 views

List of extra files used [duplicate]

Is there a way to know the files used to compile a .tex file? This should contain things like... Files imported or "included". Graphics like images (cf \includegraphics for example). ...
  • 11.6k
2 votes
2 answers
137 views

Find if a string exists within external files

I'm trying to look for a way to determine if a particular text or string is present in external .tex files. It is like accepting a text input from a user and determining if that text can be found in ...
0 votes
1 answer
73 views

Redefinition of \includegraphics for inclusion of default figure fails

In an earlier question (Automatic detection of Overleaf for fallback images) I wanted to automatically detect if I am on Overleaf or locally to choose fallback images when on Overleaf, or to re-...
  • 1,691
1 vote
2 answers
105 views

Automatically composing documents from multiple text files which are not LaTeX formatted?

I'm looking for a way to create a songbook out of individual song files. Each song file is a self-contained block of text data consisting of: Song name Song author Some details (optional) Lyrics with ...
0 votes
0 answers
55 views

LaTeX Error: File `scan1' not found

Currently, I am trying to generate a LaTeX document with the R package tinytex. The file the package tries to compile looks as follows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{...
0 votes
2 answers
360 views

"\includegraphics{}" but for .pgf files?

I'm trying to implement a command that makes it easier to put .pgf files in my document (plots from matplotlib), similar to how \includegraphics[scale=...]{...} works for image files. However, because ...
1 vote
4 answers
920 views

Using relative path in \input and \includegraphics commands

I have the following directory structure Thesis/ main.tex Chapter1/ section1.tex subsection1.1.tex figure1.png figure2.png ...
  • 13
2 votes
0 answers
154 views

Include bibliography of xr (xcite) citations, that only contains the relevant entries

Short description of my Question: I am using the xr or xcite package in my derivative project supplementary.tex to give references/citations the same number that they already have in an external ...
  • 663
0 votes
0 answers
95 views

Issues in hyperlink to an external document

I have two latex files: one for the actual paper and one for the appendix. In the paper, I want to refer to section of the appendix. I follow what I found around on referring to external dcouments but ...
  • 307
1 vote
1 answer
79 views

How to reuse color profile file in multiple documents?

I am trying to reuse files in multiple documents, but I am having problems with the color profile file. The idea is to have the .icc file in the icc folder inside the main folder and access that file ...
  • 443
1 vote
0 answers
15 views

Sub file references main file, but references do not appear when compiling main file

I am trying to write a large document, and for the sake of organized editing, it makes sense to have each chapter as a standalone document. I am using the standalone package to accomplish this. I have ...

1
2 3 4 5
13