Skip to main content

Questions tagged [currfile]

The currfile package provides macros for holding the file name information (dir, base name, extension, full name and full path) for files read by LaTeX's \input and \include macros

Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

Problem with currfile and \input

my code is the following: \documentclass[ngerman,german,14pt,twoside,openany]{scrbook} \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8]{...
mario1000's user avatar
  • 336
1 vote
1 answer
47 views

Path problem with subfiles, and fontspec

I have the project with the following structure: fonts/ times.ttf timesbd.ttf timesbi.ttf timesi.ttf sections/ section1.tex main.tex My main.tex contains: \documentclass{article} \...
Enevevet's user avatar
  • 796
0 votes
1 answer
40 views

Problems with currfiledir, pgfplotsstable and compilation from a section file

My project File tree - section - mysection.tex - tools - mystandalone_data.csv - mystandalone.tex main.tex MWE main.tex \documentclass{article} \usepackage[mode=buildmissing]{standalone} \...
Enevevet's user avatar
  • 796
2 votes
1 answer
184 views

A problem with currfile

Here is my MWE: \documentclass[ngerman,german,14pt,twoside,openany]{scrbook} \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8x]{inputenc}...
mario1000's user avatar
  • 336
0 votes
0 answers
86 views

Problem with currfile and the XePersian package

I'm experiencing an issue where using the xepersian package breaks the functionality of the currfile package. I have a main tex file and several subdirectories where I store my other files, and I have ...
NEO's user avatar
  • 357
0 votes
1 answer
72 views

Get date from filename and format it

I was trying to customize the header of a document when I encountered some difficulties. I'm working on this project in which there are several .tex files and each one is named as yyyyMMdd.tex. My ...
Lorenzo's user avatar
  • 77
1 vote
0 answers
7k views

How to solve "File 'currfile.sty' not found" problem

I use the same latex code, with the same versions of TexStudio and MikTex, on my two laptops. One runs the code smoothly; the other laptop gives the subject error, i.e., "File 'currfile.sty' not ...
Abdullah1's user avatar
1 vote
1 answer
101 views

How can nested files infer their paths? Part I: From root to leaf

I have set up the following file tree. . [D] (working directory) Test.tex [F] SubFolder [D] SubTest.tex [F] SubSubFolder [D] SubSubTest.tex [F] I would like each file to print ...
Evan Aad's user avatar
  • 11.1k
0 votes
1 answer
121 views

Pass number string to setcounter

Here's my current MWE: (Note, you must save the file as lec-05.tex) \documentclass{article} \usepackage{currfile} \usepackage{substr} \def\fulllecnum{ \BehindSubString{lec-}{\scantokens\...
SingularisArt's user avatar
1 vote
1 answer
53 views

Koma-script chapter formatting with current file name (\currfilename)

I am using Koma-script for chapter formatting as it is shown on figure below and in MNWE. I found out that there is an interesting library currfile that can retrieve the name of the file from which ...
JardaFait's user avatar
  • 3,974
0 votes
0 answers
98 views

Why does \getabspath not work

The file main.tex is in the current path (./main.tex). Its content is shown below. Another file named da.tex is located in the subdirectory ddd(./ddd/da.tex). The content of da.tex is da.tex under ./...
lyl's user avatar
  • 2,747
0 votes
2 answers
172 views

Change path separator in currfile

How do I change the path separator from \ to / ? I use MikteX on Windows. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[abspath]{currfile} \begin{document} ...
JeT's user avatar
  • 3,652
0 votes
1 answer
93 views

Automatically add section label based on file name

I am trying to automatically add section label based on the file name. My structure is as such: main.tex 1.0.introduction.tex 1.1.0.foo.tex 1.1.1.bar.tex I am using \currfilename from package ...
eliasf's user avatar
  • 141
2 votes
1 answer
66 views

Currfile and acutes

I'm currently working on a document with LaTeX and I want to make all sectioning in a separate document. On main.tex I have the following \documentclass[fontsize=12pt, fonttype=arial]{article} \...
TheRepSter's user avatar
1 vote
1 answer
150 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/...
underflow's user avatar
  • 633
0 votes
0 answers
354 views

currfile does not show file path

I tried to use the currfile package to print the name + path of the source file. Here is a minimal example: \documentclass{amsart} \usepackage{currfile} \begin{document} Filename: \currfilename ...
underflow's user avatar
  • 633
3 votes
1 answer
170 views

Incorrect Results from \IfFileExists with updates to TeXLive2020

Following an update to my packages with TeXLive2020 I am seeing different behaviour than in TeXLive2019. The following test is run in the directory Testing/ which besides the MWE in the file ...
Peter Grill's user avatar
0 votes
0 answers
65 views

What is * doing for these commands and how to replicate?

I'm trying to get a project's root folder path for usage later on in the preamble. My latex knowledge is... limited... but I've gotten a solution working using a combination of the currfile, and ...
Lagix's user avatar
  • 13
4 votes
1 answer
443 views

filehook warning with some packages (currfile, standalone)

I noticed that when either of one the two packages currfile and standalone are loaded, there is a warning issued (using pdflatex or lualatex, at least): Macro \InputIfFileExists got redefined after ...
FlorianL's user avatar
  • 1,659
0 votes
1 answer
227 views

Naming a section with filename

I am making quite a big document that will be worked on by many paople. We have therefore decided to divide the project by importing every section by it self as shown below. \import{Sections/}{Test} \...
Bjorn's user avatar
  • 1
0 votes
1 answer
989 views

Include filename in a nested document

I have a large project split in multiple files. I'd like to get each subfile name in the pdf to monitor my document. From different posts on this forum I understand Currfile package could help, by ...
JeT's user avatar
  • 3,652
2 votes
2 answers
224 views

remove "./" of "\currfileabspath" when using lualatex

I have a small problem with the package currfile and the command \currfileabspath. When compiling the file using (pdf|xe)latex I get the expected result, but if I use lualatex it adds ./ to the ...
Pablo González L's user avatar
4 votes
1 answer
579 views

Avoid quotation marks when using \jobname or \currfilename

When typesetting a file (using TeXworks on a Windows machine) which includes white spaces, then the jobname will contain the file name enclosed with double quotes. pdflatex Local\ Guide.tex will set ...
Twonky's user avatar
  • 750
1 vote
0 answers
813 views

Using the \getpwd command to recover the current directory where this command was used

Does \getpwd command work only with "pdflatex --recorder file.tex" compiling process? I am using the DVI -> PS -> PDF chain to compile in TeXstudio 2.12.6 and the \getpwd is returning empty text. ...
Adriano's user avatar
  • 315
0 votes
0 answers
107 views

Absolute dir of an \input'ed file

I'm trying to make a header for all my slides that will include same image as logo. And I want that header to be correctly inputed from any tex file, i.e. use absolute path to included image. Here is ...
Alvar's user avatar
  • 347
2 votes
1 answer
221 views

counter value doubled inside \input if \currfilebase present

Using the package currfile: \setcounter{foo}{\inputlineno}% \def\barfile{.aux/\currfilebase\thefoo.bar}% \def\texfile{.aux/\currfilebase\thefoo.tex}% % ... \input{\texfile} then the counter value is ...
0 _'s user avatar
  • 998
12 votes
1 answer
234 views

What is the (relevant!) difference between \file_input:n and \input? Or has something else changed?

A while ago I answered a question with code which attempts to set the name of an externalised image, produced with TikZ's external library, to something based on the name of the input file. That ...
cfr's user avatar
  • 207k
1 vote
0 answers
266 views

Refer to the current packages file path

I'm writing my Lieder-Package right now, which provides commands to build sty-files which are basically data bases for songs. Inside these data base files, I use \includegraphics and a relative path ...
MaestroGlanz's user avatar
  • 2,348
0 votes
1 answer
535 views

Remove underscores from filename

I am using currfile package to get the file name. My file name has the form "code blah blah blah.tex" what is being displayed is "code_blah_blah_blah.tex" How can I remove the underscores? Here ...
James's user avatar
  • 105
2 votes
0 answers
169 views

Only name appears when using currfile

My problem was partly addressed in this question. Since I cannot comment yet, I will continue Ulrike Fischer's answer with a new question. The expample worked on my system as well with pdflatex, but ...
Shinoto's user avatar
  • 41
3 votes
1 answer
158 views

File Name not exactly shown

MWE \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{currfile} \begin{document} %File Name: ÖüğşiÇ.tex \jobname \...
Özgür's user avatar
  • 3,344
2 votes
2 answers
574 views

get part of the filename in the file content

I would like to print only the characters between Ch and - in the filename, so I use the packages currfile and xstring. As example : \StrBetween[1,1]{\currfilename}{Ch}{-} should gives 2 or 14 if ...
math45's user avatar
  • 341
3 votes
1 answer
286 views

File stack underflow problem

I was wondering if this is a bug in the currfile package. I am getting warning: File stack underflow! while running the given code. Also, I run into warnings: Font shape 'OT1/cmss/m/n' in size <4&...
sajid's user avatar
  • 197
15 votes
1 answer
2k views

Tikz externalize not working when jobname is specified for main document

I'm not sure if it's a well known fact or not, but using the tikz externalization library does not work very well if a LaTeX document is compiled with a jobname that is different from the filename of ...
Erlend Graff's user avatar
  • 1,140
4 votes
1 answer
1k views

Outsourcing Tikz and relative paths

Summary: How do I get includegraphics to be relative to the current file, when using tikzscale? Details Similar to pmav I like to have a .tikz file which contains only the tikzpicture environment. (...
ted's user avatar
  • 3,387
11 votes
1 answer
9k views

Is it possible to use Lua to obtain the current working directory?

Package currfile with the abspath option can obtain the absolute path of the current file. However, it relies on running pdflatex with the -recorder flag. Would it be possible to achieve the same ...
Yossi Gil's user avatar
  • 16k
2 votes
1 answer
2k views

how to display directory name

I'm trying to use the \currfiledir command on my homework template, so I can change even less of my header every time I start a new document, see mwe: \documentclass[letterpaper,12pt]{article} \...
dejongbrent's user avatar
5 votes
1 answer
533 views

Using currfile and Datetime to format a diary page

To create something like a diary, I am using a number of input files within 2 directories a MONTH directory named 01-12 and a day directory within each month...01-31 so 12/ (December) which has a ...
theobear's user avatar
  • 847
3 votes
2 answers
1k views

The currfile Package

I am using a number of input files within 2 directories: dirA/ which has a file dirA/A.tex which inputs dirA/dirB/B.text I'm using currfile to print out the currfiledir which gives me dirA/dirB is ...
theobear's user avatar
  • 847
0 votes
0 answers
280 views

Using macros in Memoir chapter for a Diary

I'm trying to create an automatic chapter head which displays the day of the week and date (kind of like a diary entry) I have a directory called "august" within which is a file called 01.tex. The ...
theobear's user avatar
  • 847
2 votes
0 answers
110 views

Getting right currfile with own class loaded from subdirectory

When writing my own class in a subdirectory, e.g. myclass/aclass.cls, and I use the currfile package to load that class's current file path, it always returns the information of my main file only. ...
Konstantin Möllers's user avatar
5 votes
1 answer
1k views

Try to use input and currfile together

I have a folder tree a little like this, "document.tex" is the root file, section1 is a folder document.tex |--[section1] | |--index.tex My document.tex code is like that: \documentclass{...
Troncador's user avatar
  • 153
8 votes
1 answer
1k views

What does "File stack underflow!" mean?

I am getting two times the error: Package currfile Warning: File stack underflow! on input line xxx. I am not explicitly loading currfile, but standalone seems to do. I am getting this warning ...
LaRiFaRi's user avatar
  • 44k
5 votes
2 answers
334 views

Can't get real currfile if used in precompiled .fmt file

Background: I am not sure if this is a bug with the currfile package, or if I not properly using the package, or perhaps an issue with using .fmt files. BTW, this is my first attempt at using .fmt ...
Peter Grill's user avatar
2 votes
0 answers
569 views

Incompatibility between currfile and enumitem? [closed]

The MWE below yields: Missing number, treated as zero. <to be read again> enit@cv@currfiledepth \item testing. for the itemize list. ...
Peter Grill's user avatar
5 votes
1 answer
390 views

Corrupted TeXLive2012 installation? (Option clash for currfile)

Background: As per Manually copy older TeXLive2011 from one Mac to a new Mac, I attempted to get TeXLive2010 and TeXLive2011 (with the latest libraries) on a newer mac. The older releases are not ...
Peter Grill's user avatar
10 votes
1 answer
1k views

In a multiple file LaTeX document, is there a way to tag each page with the file that generated it?

I've got a LaTeX document that's build from many smaller files. When I'm editing text or formulas I usually look for some characteristic text and do something like: find -name "*.tex" > t grep -n ...
Peeter Joot's user avatar
  • 3,045