Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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}.

11
votes
2answers
1k views

Is it possible to print the file size of a file?

Is it possible to print the size of a given file in latex? For instance, suppose I have a file ./foo.jpg whose size is 381.3 KiB. I want a command \printfilesize so that \printfilesize{./foo.jpg} ...
2
votes
0answers
15 views

Change path to tcbinputlisting to just reflect file name

In the code given below, I have many Matlab files. I put the files into a folder called "Project/Matlab". The name that appears in the first line is now "Project/Matlab/sample.m". [Note: I have ...
5
votes
2answers
174 views

\immediate\write with plain text

I have read the question in TeX.SE, but I don't want user to add ^^J manually. That is, I want writer to output content originally. \documentclass{article} \begin{document} \newwrite\file \immediate\...
2
votes
0answers
30 views

\footnotesize in output stream generates unexpected “Undefined control sequence”

I am writing styled text to an external file (using the newfile package). I can successfully style the text with many attributes, e.g., \large\mdseries\itshape. But, very puzzling to me, when I style ...
0
votes
0answers
57 views

There isn't the figure in PDF file after compiling Latex file

I use the following commands and text in TeXstudio, but after compiling to PDF, it doesn't show the figure. There is not any error or warning … \documentclass[12pt,a4paper,apex,twocolumn]{jjap3} \...
0
votes
0answers
34 views

Possible to get included file path?

I know that I can check if a file exists with \IfFileExists{}{}{}. Is it also possible to get the absolute path to that found file? The reason I am asking is that I have a custom documentclass that ...
1
vote
1answer
40 views

Print content only on even pages with notes on odd

I'm creating a series of student worksheets and want to simultaneously create an instructor's guide. Using the multiaudience package, creating content that only instructors see is straightforward. ...
1
vote
1answer
30 views

Is this possible to fix this requirement (explain briefly in this question)?

My code is as follows: \documentclass{book} \usepackage{lipsum} \begin{document} blah blah blah blah blah blah \lipsum[1-2] \begin{figure} \includegraphics{...eps} \caption{caption text} \end{...
0
votes
0answers
33 views

PGFplot select cells from dat file

I want to show a two dimensional bar plot with PGFplots in ConTeXt using multiple .dat files. The .dat files contain a lot of information. I only need 7 rows. Questions: how to select a specific ...
1
vote
0answers
20 views

How to cross reference between tex files [duplicate]

I have looked at all the previously posted answers. None have answered my questions. This is my example: I have a main document called paper.tex: \documentclass[11pt,twoside,a4paper]{article} \...
1
vote
1answer
57 views

Reuse external file with user commands in both main file and standalone files

This is a problem I encounter frequently, and for which I don't have a good (i.e., scalable and automatic) solution. Suppose I have a main document MWE.tex, a macro file with custom commands macros....
0
votes
1answer
11 views

how to insert the contents of an `\input`ed file into the source? [duplicate]

Is there a utility that will take a LaTeX source file, find all the \input{some_external_file} lines, and insert the contents of those external files into the master document without compiling to PDF? ...
0
votes
0answers
39 views

What temp files generated by latex can I delete without risk? [duplicate]

My projectfolder consist of several 'real' files and is full of files I don't know. There are some cleaning procedures which deletes specified endings after a run but I am not sure which filetypes I ...
2
votes
1answer
100 views

Read YAML field from LaTeX

Let me explain my problem. I have a simple YAML file automatically generated with a series of experiments that looks like as follows error-metric1: method1: value method2: value method3: ...
0
votes
2answers
42 views

using \newcommand with \immediate\write inside beamer

I'm trying to write some strings to an external file using the \immediate\write as in the MWE below \documentclass[a4paper,9pt]{beamer} \begin{document} \begin{frame}[plain] %< comment out for ...
3
votes
1answer
45 views

Problem to plot data with dates using an external file

Using logs to make statistics, I have a large number of data which contains two columns, like this (dd-mm-aaaa hh-mm float) 27-04-2018 04:43 7.78269552 27-04-2018 04:44 7.901522832 27-04-2018 ...
2
votes
1answer
165 views

Setting axis limits (xmin, xmax, ymin, ymax) from external .dat file

I am importing the data for my plot from a .dat file produced in matlab. I would also like to set axis limits from a .dat file. Is there a way to set xmin, xmax, ymin and ymax from a table in a .dat ...
1
vote
1answer
83 views

Draw signals in TikZ

I am trying to typeset some examples of given signals using tikz/pgf. My initial thought was to plot them from ascii files using pgfplots. My code is the following \documentclass[border=10pt]{...
4
votes
1answer
273 views

Auxiliary files - what does the file-extension '.fof' mean?

Pertaining exactly to the topic of this question which asks about the various auxiliary files produced by tex and friends, I'd like to ask specifically about the .fof file extension. If the main file ...
1
vote
3answers
203 views

Loading glossaries from separate file using TexStudio

I am trying to load many definitions from a separate file into my main file. I tried: \documentclass[a4paper,11pt]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[...
0
votes
0answers
112 views

Referencing multiple labels from diffrent file

I am working on some type of library. In one file I have list of authors, and in another list of books. I need to have references to all books written by author in his entry. To this point I used \...
1
vote
1answer
61 views

How to read a counter register from a file in Plain TeX?

I am a TeX user, and I would like to read a number from an auxiliary file in order to achieve things like: printing at the footing "page number X out of Total". I was trying to use the primitives ...
5
votes
1answer
71 views

How to import / print a bibliography created from a separate / external document?

I have a document with a bibliography that I create using biblatex with the biber backend. I.e., somewhere in this document, there is a line \printbibliography which prints the bibliography (say ...
1
vote
1answer
60 views

Export datas which we derived in Maple to Latex

I have a numerical solution for an ODE. (You can find the attached Maple code: numerical_solution.mw) What are the simple methods in order to create a table in Latex as follows by using these datas ...
1
vote
0answers
36 views

Is there a convenient way to lower the resolution of pictures without additional software? [duplicate]

Background is that in my lab it is common and convenient to document stuff by simply making a picture of it. Once a project is finished, I will merge these pictures into one file which I will give to ...
0
votes
0answers
66 views

OriginPro figures blurred

I have exported the figure in EPS format from OriginPro. However, when I use it in LaTeX the figure appears to be bit blurred and the legends are hazed. Could anyone suggest what has to be the size of ...
2
votes
1answer
66 views

why is pstool-psfrag reducing pdf file size?

I am using pstool & psfrag (with pdflatex) to replace text in eps files generated by Adobe Illustator. I noticed that the pdf files produced by pstool (using the \psfragfig command) are way ...
0
votes
0answers
113 views

Can a GLE code be empaded in Latex document?

I am searching for a good tool for graphs and charts and found Graphics Layout Engine. Am I able to include a code written in GLE within a latex document? The aim is not including it as a file in the ...
2
votes
1answer
83 views

Folders in a latex project/thesis

How do you make folders in a latex project ? I created a folder inside my main folder but my structure window doesn't show it. I am using OSX and Texmaker latest version? This is the folder that I ...
0
votes
0answers
44 views

verbatiminput on a file without .txt extention

I'm wanting to include the git hash automatically into a document using verbatiminput. However I seem to be unable to use verbatiminput on a file name does that not end with an extention. \...
13
votes
1answer
230 views

Embed non-PDF files (e.g., BibTex) into PDF with hyperlink in the PDF

This question led to a new package: intopdf Aim I want to achieve following: Embed paper.bib into PDF paper.bib should be opened with the OS tool associated with mimetype application/x-bibtex ...
1
vote
1answer
73 views

Execute external bash file

This is a follow up to Get write18 to execute after file parsing With the code \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{graphicx,grffile} \newcommand{\filename}...
1
vote
1answer
43 views

Get write18 to execute after file parsing

Follow up to Get write18 to accept / expand command I want to crop a pdf and print it. My \the\pdfshellescape is 1, so my shell-escape is working. My MWE is \documentclass[a4paper,10pt]{article} \...
4
votes
1answer
155 views

Get write18 to accept / expand command

I am trying to use write18 to crop a pdf. The code is \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \newcommand{\filename}{} \newcommand{\croppedfilename}{}...
1
vote
2answers
56 views

why is the directory trimmed from my path argument in includegraphics?

Hi community I have a weird problem. It seems that includegraphics won't accept the entire argument, it always trims off the directory part! The argument was manipulated and concatenated in another ...
0
votes
1answer
105 views

Gnuplottex: Pass latex command to gnuplot script

I want to access and plot the same data from different LaTeX documents (a paper and a beamer presentation) using gnuplottex. The data and the gnuplot script is stored at some individual position ...
0
votes
1answer
43 views

Generate a list of figure sources from figure captions containing \source{}

This question stems from the same book project described in Generate a list of figure numbers and filenames from \includegraphics. The answers there provide the basic code to generate a text file of ...
1
vote
3answers
77 views

Export float to pdf

I have used \tikzexternalize successfully with various plots in my document, and I am looking for a way to do this for arbitrary latex code. For example, suppose I have the document: \documentclass{...
4
votes
1answer
87 views

morewrites: Failure to Compile, “Bad Number”

I have a project for which I have needed to resort to the morewrites package due to getting a No room for new \write. Up until a few months ago (which was when I last worked on it), this worked quite ...
0
votes
0answers
51 views

how to plot a lot of points from external file?

I want to analyse program so I measure the time and I have about 1000 point. How can I make a good plot from them in a external file? I used the following code but I got an error: Dimension too ...
2
votes
1answer
53 views

Loading pgfkeys key values from an external file without Expl3?

This is a followup of this question. Briefly, I want to load from an external file the argument to give to \pgfkeys, but this is not trivial. Here is an example of what I tried to do, which however ...
1
vote
1answer
250 views

Using \verbatiminput{} on files containing $

I'm fairly new to LaTEX and I'm trying to include a file in the appendix using the following instructions: \begin{multicols}{2} \footnotesize{\verbatiminput{pattern-representations}} \end{multicols}...
0
votes
0answers
432 views

Import file from another folder

Hi I need to import a file.tex (I cannot move it from this folder) file from a different folder of the main file. is it possible? how i should do?
3
votes
1answer
106 views

Set counter to a value written in another file

I got a file 'month.tex' containing only an integer. I want to set a counter to this integer and tried \newcounter{billmonth} \setcounter{billmonth}{\input{month.tex}} This isn't working as the ...
1
vote
1answer
58 views

Standard way to read parameters from header in pgfplots

Suppose I have experimental data that I want to read from a file with parameters in the header. What is the standard way to read the parameters and make them available as tex macros. Consider the ...
1
vote
1answer
320 views

Uploaded file to Sharelatex, can it be automatically updated when updating locally?

So i am using the mcode.sty package in Sharelatex to import my MATLAB files into my project, works great! But when I want to edit some of the code, I need to re-upload the updated code file.. Is ...
0
votes
0answers
37 views

What is an appropriate way to insert structured data from an on-line source into a Tex/LaTeX document? From within, or externally?

Let's say there is a structured list of items on some on-line source. For example, the website https://nothing.better.to.do-a.shame might contain the following data: A blueberry <tag>...
4
votes
1answer
592 views

Generating QR code from text file

I'm trying to generate a QR code from a text file using the qrcode package. Using \qrcode{\input{file.txt}} fails with this error message: ! Undefined control sequence. \in@ #1#2->\begingroup \...
11
votes
2answers
339 views

How to check from LaTeX whether a pfb file exists?

I need to write a tex file which checks whether certain files can be found by kpathsea library. It is easy to check whether a sty or an `fd file can be found: \IfFileExists{hyperref.sty}{Hyperref ...
4
votes
1answer
109 views

Generate a list of figure numbers and filenames from \includegraphics

For a book project with lots of figures, I need to generate a list of the filenames of all figures included via includegraphics{} and their figure numbers. Something like: 1.1 ch01-intro/fig/lascaux....