Questions tagged [filesystem-access]
The filesystem-access tag has no usage guidance.
117
questions
0
votes
0
answers
52
views
TeXLive 2022 tries to use /root/.texlive2022 directory for an ordinary user
I installed TeXLive 2022 on Linux Slackware 15.0 PC. The installation was done as root. Then I added a script texlive.sh to /etc/profile dir:
#!/bin/bash
export PATH=$PATH:/usr/local/texlive/2022/bin/...
0
votes
0
answers
47
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 ...
4
votes
0
answers
71
views
Can you detect from within TeX how the name of a file accessed by TeX is encoded?
This question is inspired by the question Input dynamically generated file name which basically is about truncating a given filename/the expansion of \jobname by two characters.
In utf-8 the byte-...
0
votes
1
answer
37
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 #, ...
1
vote
1
answer
157
views
Execute System Command In LuaTeX
In a minimal testing environment (see
Minimal Testing Environment For LuaMetaTeX)
I can do the initial memory dump
luatex --ini ./plain.tex \dump
and then I would expect the following command to ...
0
votes
0
answers
41
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
74
views
how to display part of the path
I use the currfile package to help keep track of the source of my latex files. I use Linux, and the full path of the file looks like this:
/home/username/(various directories)/project-one/proposal/...
2
votes
1
answer
96
views
\include pattern instead of filename
I'm fairly new to LaTeX. I am using Overleaf for my thesis, and, in order for Overleaf to display my chapters in the right order, I've prepended a number next to each of them:
01-intro.tex
02-...
-1
votes
1
answer
50
views
TeXstudio unable to notice different files that have the same name
I have duplicated a project contains "./TeX_files/chapter01..05". Now I am editing the new one. However, when I try to open "./TeX_files/chapterX" from the old one, TeXstduio opens ...
1
vote
1
answer
67
views
File extension *.pag when compiling document with pdflatex and bibtex
I'm compiling my document with pdflatex and bibtex, using the following command:
pdflatex main && bibtex main && pdflatex main && pdflatex main
This generated a couple of ...
2
votes
3
answers
165
views
How to query if a file has changed (a \IfFileHasChanged conditional)?
We know \IfFileExists{<file>}{<yes>}{<no>}.
How can I create a command \IfFileHasChanged{<file>}{<yes>}{<no>}
for a file which has changed (and does exist!).
I mean ...
2
votes
0
answers
90
views
Why my \AtBeginDocument and \AtEndDocument don't work in .sty file...?
I'm looking to set up a class that allows me to type a document for both teacher (complete) and students (with holes instead of text) that is differentiated using an \ifprof boolean. My macros and my ...
1
vote
0
answers
38
views
Problem with latex files
I have a problem with one of my latex files. I was writing when my laptop stopped working. I don't know why, but I had to force it to restart and when I turned it on I had problem with my latex file: ...
1
vote
0
answers
67
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
1
answer
42
views
Conditionally overriding the includegraphics command to print file size in the corresponding caption
I want to analyze the file size of each graphics file used in my report. Therefore, I am trying to implement a new command by conditionally overriding the includegraphics command to print file size in ...
0
votes
1
answer
124
views
Permission problems in accessing my local folder
I am having problems with file permissions in Windows 10. I am using
TeX Live 2020. PdfLaTeX/LuaLaTeX is unable to access files in my local texmf tree. I am getting the following error:
Process ...
2
votes
1
answer
70
views
LuaLaTeX: How to include a generated file size in document?
How to include a generated file size in document with LuaLaTeX? Similar question was answered, but for pdflatex case here. The solution does not work with LuaLaTeX.
2
votes
1
answer
78
views
Which files can be found by \(pdf)filesize?
Compiling the following code with pdfTeX:
\documentclass{article}
\begin{document}
1 \pdffilesize{XITS-Regular.otf} \par
2 \pdffilesize{/usr/local/texlive/2020/texmf-dist/fonts/opentype/public/xits/...
0
votes
0
answers
81
views
Accidentally restricted TexShop from a folder
I made an extremely stupid error. I installed TexShop on a new computer and the first time I went to compile a document, it asked me if it was ok for TexShop to access the Documents folder. I, ...
0
votes
1
answer
516
views
XeLaTeX Can't Write to File [duplicate]
Occasionally, when running xelatex (using TeX Live 2018 on Linux Mint 19.2), I
encounter the following error message:
(/usr/local/texlive/2018/texmf-dist/tex/latex/microtype/mt-cmr.cfg))
(/usr/local/...
1
vote
0
answers
227
views
Filenames and ps2pdf
System: Windows 10, MikTeX 2.9, WinEdt 10.2
Workflow: tex -> ps -> pdf
Problem: I created a file named "TeoriaTehtäviä.tex" containing two characters outside the 7 bit ASCII range. Here's what ...
1
vote
1
answer
149
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 ...
4
votes
3
answers
569
views
Read file contents to variable and iterate over each character in file (hexdump)
I need to read file content as string (binary file) to variable, then iterate over each character in that string, convert each character to its hexadecimal representation, use comma (or any other ...
1
vote
0
answers
48
views
filename contains Chinese characters unable to be compiled by XeLaTeX [closed]
windows 10
TeXstudio 2.12.16
texlive2019 default installation
it said:
Could not start Build & View:XeLaTeX: xelatex.exe -synctex=1
-interaction=nonstopmode "hashujixian-副本".tex
but it ...
1
vote
1
answer
875
views
opening a local .tex file in overleaf
I'd like to open a .tex file on my local system in overleaf.
The api allows for this over by passing the uri
https://www.overleaf.com/docs?snip_uri=http://pathtoyourfile.tex
I would like to do
...
1
vote
1
answer
192
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
0
answers
26
views
Where is the spelling exception list that TeXShop uses?
Does someone know where this file is on a Mac? I would like to access this file in order to make a copy of it, just in case TeXShop looses it...
1
vote
1
answer
485
views
LuaLaTeX: How to correctly resolve absolute path with \directlua on Windows
I need to resolve absolute path to fonts:
\setmainjfont[
Path = \currfileabsdir,
UprightFont = fonts/HGS_Mincho/HGRMB.ttc,
BoldFont = fonts/HGS_Mincho/HGRME.ttc
]{HGS ...
0
votes
1
answer
160
views
make tex glossaries files accessible for all documents across system
I created some rather big glossaries files with symbols, acronyms, ...
Glossary_Acronyms.tex
Glossary_Glossary.tex
Glossary_Symbols.tex
for a programming project with multiple tex documents as their ...
3
votes
1
answer
475
views
Different file opened by \openin (was: between 2017 and 2018)
Short version:
It seems that some trivial behavior of file opening (\openin) changed between TeX Live 2017 and 2018 differs between environment. Only Overleaf one behaves differently. I did not see ...
6
votes
1
answer
541
views
Include standalone files in subdirectories which read other files
I want to use package standalone together with PGFPlots and TikZ to generate figures.
In particular, I want figures to be generated only if missing, using buildmissing package option for standalone ...
3
votes
2
answers
275
views
File name not handled correctly in /foreach loop
For some reason when I try to specify a file name for \includegraphics in a loop, either using \foreach or using \clist, I get a file not found error. The error displays a valid path for the file, and ...
4
votes
2
answers
2k
views
LaTeX Fonts with fontspec-package
Today i figured out how to use system-installed-fonts with the fontspec-package and LuaLaTeX. But i can't figure out how to use fonts, that are installed in my texmf-tree!
The fontspec-Manual says (...
2
votes
1
answer
351
views
Write to a file outside of the current folder
Is it possible with TeX to write somewhere else than in the current folder?
The following does not work:
\documentclass{article}
\begin{document}
\newwrite\tempfile
\openout\tempfile=/Users/colas/...
0
votes
0
answers
47
views
Save data from all my .tex files to a global file
I want to keep track of some info of my .tex files.
More precisely, I give an id (an integer) to my math exercises and would like to keep somewhere the maximal id already given (and maybe other info)....
0
votes
1
answer
234
views
Shared MikTex install on windows server 2012 to generate PDF from IIS
I'm trying to install a shared MikTex on a Windows server 2012, so my web application (Perl CGI / IIS 8) can generate PDF files on the fly through pdflatex, and send them to the user.
I managed to ...
0
votes
1
answer
259
views
Export code samples AND display verbatim
I'd like to write a LaTeX document with code samples in a verbatim environment. I'd also like to export those code samples to named files so that they can be built and run. This allows me to easily ...
4
votes
1
answer
307
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 ...
1
vote
0
answers
248
views
Where does TeXworks hide temporary files?
I am running TeXWorks under Windows 10.
If I've made some changes to a .tex file, but have not yet saved those changes, then there surely must be a temporary file someplace where TeXworks keeps the ...
2
votes
1
answer
56
views
Proper way of passing parametric filenames to \openin using xstring
I would like to open a file programmatically within latex depending on its filename. For example, if the filenames begin with '0' I know the path is in some folder, if it starts with '1' in another ...
10
votes
3
answers
2k
views
Read a file and store its contents in a variable
I am trying to implement single sourcing such that same document can be conditionally typeset for number of purposes. This is what I would like to do.
\IfFileExists{../DecMaker.txt}{
var x = ...
3
votes
0
answers
169
views
Compiling issues with minted: I can't write on file `thesis.pyg' [closed]
In my thesis I am using minted
for listings and lots of short inline references.
I'm running TeXLive on Windows with python 3.6.
I am also using the cache, kpsewhich and outputdir options:
\...
6
votes
2
answers
880
views
includepdf and file with comma
How can I use filenames with commas with pdfpages?
The grffile package didn't help, the \detokenize command didn't help either
Also the \string command doesn't work. For ex.
\includepdf{\string"C:/...
2
votes
1
answer
666
views
How to delete a file in latex code?
How to delete a file in latex code with normal complie tex. I create temporary files and when i finish using them I want to delete them. It not delete by bash or editor.
Thankyou!
1
vote
2
answers
2k
views
! I can't find file `tikzlibraryshape.code.tex'
I am using LaTeX and do not know how to fix this error
! I can't find file `tikzlibraryshape.code.tex'.
<argument> ...nput tikzlibrary\pgf@temp .code.tex
\catcode `\@ =\csname tikz...
l.5 \...
3
votes
0
answers
1k
views
List all files in a folder [duplicate]
Does anybody know how I can read all the files in a specific folder and use the filenames in my LaTeX document?
I want to automatically create a seating chart with the fotos in a folder.
2
votes
2
answers
127
views
tlmgr installs files outside /usr/local during update --all in TL2016
texlive 2016 was installed locally in /usr/local/texlive/2016/ on a gentoo Linux system by the install-tl -gui installer.
An update with tlmgr returns:
/usr/local/texlive/2016/bin/x86_64-linux# ./...
1
vote
1
answer
68
views
How do I copy the contents of a file with a given prefix to another file in restricted write18 enabled mode?
I know the prefix of a file - and I also know that there exists exactly 1 file with that prefix.
I am running pdftex in restricted write18 enabled mode.
I want to copy the contents of that file to a ...
5
votes
1
answer
63
views
Are open \newwriter files closed when LaTeX exits prematurely with errors?
I am writing a package that needs to write at various times to an external file. For that I am using the \newwrite\mywriter and \immediate\openout\mywriter method. I know to use \closeout when done ...
8
votes
2
answers
954
views
What are the naming rules for \newwrites in TeX? Can \newwrites be created dynamically?
I can create a \newwrite like this:
\newwrite\filehandle
\immediate\openout\filehandle=\jobname-semantically_useful_suffix.txt
\immediate\closeout\filehandle
Let's say I have languages stored in a ...