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
1answer
12 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
124 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
36 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
26 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
64 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 ...
0
votes
0answers
27 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
36 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
151 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
51 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
25 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
62 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
38 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
27 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
23 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
17 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
63 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
54 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
26 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
23 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
56 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
104 views

Difference between \input and \include [duplicate]

Difference between \input{filename} and \input{filename} in the main tex file.
0
votes
1answer
29 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
56 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
67 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
28 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
204 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
62 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
vote
1answer
48 views

Can I add the download date of a file as a watermark?

I would like to see if is possible to add something like the download date of a document I created in LaTeX. If yes, how could I do this?
0
votes
2answers
88 views

How to quickly switch .tex-file by passing arguments to filename?

For example I have two TeX Projects with a similar filename structure: The master.tex has a structure like this: \input{preamble.tex} % <- \bibliography{Projekt_A_Literature} in preamble % ... ...
0
votes
0answers
27 views

Latex Log File Customization

I use TexMaker, pdflatex. I have a tex file for which I am using the console to debug my functions and check to make sure my functions are working properly. However there is too much junk in the log ...
0
votes
1answer
98 views

Minted using imported .m-files with å ä ö in code

Firstly, some hopefully useful information: Python version: 3.8.0 Pygments version 2.5.1 TexLive 2019 Texmaker 5.0.3 Build using PDFLaTeX (tried XeLaTeX and LuaLaTeX as well) Windows 10 (if that ...
5
votes
1answer
240 views

It is possible to reuse TikZ code?

Let say one create the following figure and save it in a file figure.tex: \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{ arrows.meta, bending, ...
3
votes
1answer
55 views

Why is \everyeof{\noexpand} needed to avoid “File ended while scanning definition of” with expandable read from file?

Consider this code: \documentclass{article} \usepackage{filecontents} \begin{filecontents}{foo.txt} abc \end{filecontents} \begin{filecontents}{bar.txt} abc \end{filecontents} \begin{document} \...
1
vote
1answer
34 views

Write macro to file at runtime and \input the content

Let me give it as an example: I want to write some commands to a file \newwrite\tempfile \immediate\openout\tempfile=mycommands \immediate\write\tempfile{"\toprule"}%Yes it don't work like this! \...
2
votes
2answers
81 views

Accumulate text inside verbatim blocks

Is there a way to accumulate all the text inside verbatim blocks to an external file? I know of the package extract, but it seems to be accumulating the environment \begin{verbatim} and \end{verbatim}...
3
votes
1answer
59 views

Files not found because of \endlinechar (space) character

A recent MikTeX update broke some code that I'm using. I have many files filled with filenames, the code reads these filenames, and then does some stuff with the contents of the corresponding file. ...
0
votes
1answer
67 views

how do I check the \listfiles command

How do I check that the \listfiles command works? When I give it in front of \begin{document} OR I delete it, no difference appears to happen.
6
votes
1answer
74 views

How can I set \l_file_search_path_seq so \file_input:n finds files in Texlive 2019 as it did in Texlive 2018?

I have code which used to use \file_path_include:n, but now tries to adjust \l_file_search_path_seq as follows. With Texlive 2018, this works, but with Texlive 2019, it doesn't. What am I missing? ...
1
vote
1answer
49 views

File I/O to create exercise set with tasks package: missing \item

Background: I'm attempting to use some exercises from an open text that are distributed across many files. I've rewritten the input mechanism and have it working fine. I can use multicols and ...
2
votes
0answers
48 views

Different file extension for \input files?

Is there a conventional choice for a different file-extension given to source files prepared for \input (i.e. containing LateX source, but not something you can process on its own)? The context here ...
1
vote
1answer
18 views

Open file under cursor in \include instruction

I'm looking for a way to easily open files that are included in a document. For example if my document includes another tex document like this \include{content/chapter1} I want to be able to place ...
5
votes
1answer
104 views

How to use dynamically generated filenames in \IfFileExists?

I have a file 0012 in the directory of the following tex file. I want to check the existence or non-existence of files inside the \forloop from 11 to 13. \documentclass{article} \usepackage{...
0
votes
1answer
56 views

Mint code inline reading from file

Is there a way to mint a line of code inline, where the code is read from a file? \mintinline can only typeset code that is passed directly to the command, in between two delimiters (e.g. \mintinline{...
1
vote
1answer
77 views

Can input command in pdflatex read files with extra long file names on Windows?

Is LaTeX (pdflatex) able to read files with extra long file names on Windows? (up to 32767 unicode characters) https://ss64.com/nt/syntax-filenames.html The NTFS file system supports large paths ...
0
votes
0answers
82 views

Using cref to cross-reference from extra document (with different \crefname)

As a novice to latex I am writing a paper with supplementary material in an extra file. I cross-reference the supplementary stuff in the main text with xr-hyper. To do this conveniently I have set up ...
1
vote
1answer
110 views

Getting a valid makefile from tikz-externalize when using `-output-directory` and input

The following mwe does produce an invalid makefile when used with latexmk's -output-directory option. (The example is from the pgfplots manual) latexmk mwe.tex -output-directory=build \documentclass{...
1
vote
0answers
144 views

Using external (delimited) data files for Asymptote contour plots

I need to plot two-dimensional data, which I would like to do in a contour plot. From my personal experience in trying to get nice contour plots using pgf/tikz and what I read in Fill a contour-plot, ...
0
votes
1answer
85 views

Using listinputlisting to include a specific (git) commit

I am discussing code which is in version control and would like to specify which version of the code to include. I did some research and found packages like gitlatex and gitinfo, but though useful, ...
3
votes
1answer
111 views

What does the BBL file-extension stand for in LaTeX?

The file format extension of .bib stands for the "bibliography"; a file that the BibTeX engine gets as an input. The file-format-extension of .bst has been derived from the expression of "...

1
2 3 4 5
12