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

Difference between \input and \include [duplicate]

Difference between \input{filename} and \input{filename} in the main tex file.
0
votes
1answer
23 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
36 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
56 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
18 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
101 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
40 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
44 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
83 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
22 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
50 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
230 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
46 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
32 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
78 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
51 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
32 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
71 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
34 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
16 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
94 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
35 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{...
0
votes
1answer
56 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
48 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 ...
0
votes
1answer
40 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
124 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
61 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
100 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
vote
2answers
35 views

Print number of lines of an external file

I would like to print in a .tex file the number of lines of some other file (not the content, just how many lines). For example in the following code I would like to have 3 print in the text \...
0
votes
0answers
21 views

Override assumed extension in compiling with pdflatex

I compile all my latex documents using pdflatex. Now, I have a bunch of figures from some simulations with filenames of the style of fig1_N32s5.0t0.5.pdf. If I do \includegraphics[width=0.3\linewidth]...
0
votes
0answers
16 views

Figure width and height stored to a new file [duplicate]

I am trying to store the figure height and width into a separate file, for this I write the code (please excuse me, if these are not in a standard method) as below: \documentclass{book} \...
1
vote
0answers
23 views

datatool: How to read out values, if *.table-format is given

I have an external file, named jobname.word.table (*.table-format!), with its content # aaa # bbb # x y type 3.1415927e+000 5.0000000e+000 i 2.0000000e+000 3.0000000e+000 i (BTW: I can not change ...
1
vote
1answer
680 views

Color table with data from csv file with colors from csv file

I am trying to create a table (which is from a csv file) which cells are colored (from another csv file (this way I can do preprocessing externally)). I have looked briefly at tools such as datatool, ...
1
vote
1answer
49 views

LaTeX code with input dependent on some integer parameters

Suppose that I have a large number of .tex files with names 1.tex, 2.tex, ..., N.tex (with N = some integer). I would like to write a LaTeX document, where I set some parameters for example: howMany ...
2
votes
1answer
48 views

How to make `kpse.find_file` aware of `\input@path` modifications?

I'm working on a \graphicspath like feature for GregorioTeX and having some problems making \input@path work with our Lua code. Basically, while \input@path works for \input statements, before we ...
1
vote
1answer
74 views

Recursively search parent directories when including/inputting file

I'm wondering if it's possible to modify the function of the \input command so that e.g. \input{macros} would work recursively. Variant 1 Check if macros.tex exists in the current directory. If ...
0
votes
2answers
48 views

How to include an image whose path is set by a user macro?

Assume the following scenario. Some user is required to complete a macro ImagePath{} in order to automatically include an image at some predefined place of the document. No hypothesis is done about ...
0
votes
0answers
19 views

File Path inside Bibliography

I'm trying to include the file location of my bibliography entry but I can't get it to work: @report{Calc, author = {A BV}, title = {{Report Calculations}}, year = {2019}, location = {\\NAS.local\...
0
votes
0answers
180 views

File `expl3.sty' not found in TeXStudio

While I am trying to compile a LaTeX file in TeXStudio the following message appeared: File `expl3.sty' not found. \RequirePackage{expl3}[2018/10/31] However the same file compiled well in ...
1
vote
1answer
60 views

How to write to a text file sequentially in the same text line?

I would like to write a text file from a LaTeX document with the following format: A,C,D,B where A, C, D and B are to be written into the text file from different places of the LaTeX document. Thus, ...
0
votes
0answers
187 views

change the default path where Latex looks for everything

I'm trying to throw different projects into one document that are in different folders. These folders include images and texfiles. I know that I can always include files with \input{} or \include{} ...
2
votes
3answers
87 views

Plot data from external file with floating numbers

I found yesterday this beautiful simple code: \documentclass{article} \usepackage{pgfplotstable} \usepackage{pgfplots} \pagestyle{empty} \begin{document} %\pgfplotstabletypeset{data.dat} \vspace{...
5
votes
2answers
90 views

filecontents: select rows of group to display

I have a file that contains 1,000 rows of product data. I want to select only a specific product type to print in my document. Minimal code in main.tex: \documentclass{article} \usepackage{...
5
votes
4answers
371 views

Global variable Array

I have control_array.tex and 10 templateA.tex, templateB.tex, ... TeX files. In control_array.tex: ArrayName = [Name1,Name2,...Name10] ArrayColor = [Color1,Color2,...Color10] With Array in ...
13
votes
3answers
567 views

Populate information from a csv file into a LaTeX document (specifically into the fields/arguments of commands therein)

I have some personal information stored in a plain CSV file personal_info.csv in the following format: personal_info.csv 83 Fancy Avenue,Nowheresville,Gotham City 24061 123 456 7890 someone@xyz.com ...
1
vote
1answer
36 views

Compilation doesn't end when outsourcing tikz standalone file

Here is the code for my Tikz document: \documentclass[tikz,14pt,border=10pt]{standalone} \usepackage{textcomp} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \begin{document} % ...
0
votes
0answers
127 views

Can I store .bib files in an external folder?

I would like to, having the following file structure books/ --callen.bib --munster.bib source/ --thermodynamics.tex where callen.bib and munster.bib store the bibtex information for the respective ...
0
votes
0answers
157 views

Reading data from hdf5 file to plot a graph

Normally when one wishes to to plot some data from a file (.txt, .csv or the like), one would do something like \documentclass[border=5mm]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{...
0
votes
0answers
42 views

LaTeX include filepath/name with non-ascii characters [duplicate]

Trying to compile \documentclass{article} \begin{document} \include{übergröße} \end{document} with pdflatex and the file übergröße.tex in the same directory leads to the error: This is pdfTeX, ...

1 2 3 4 5 11