Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with currfile while using xepersian #27

Open
5 tasks done
neo-apz opened this issue Apr 15, 2023 · 1 comment
Open
5 tasks done

Problem with currfile while using xepersian #27

neo-apz opened this issue Apr 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@neo-apz
Copy link

neo-apz commented Apr 15, 2023

Brief outline of the issue

I'm experiencing an issue where using the xepersian/bidi 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 some helper macros that facilitate inclusion of these files in the subdirectories, and those rely on \currfilebase and \currfilename. But for some reason I'm always getting the main file's name even inside the other files. This only happens when the xeperian package is imported and without it everything works fine.

The issue seems to be related to the bidi package redefining some of the underlying commands (like InputIfFileExists) and breaking the hooks (see the discussion under the thread on tex.stackexchange).

Check/indicate

Minimal example showing the issue

I created a small example that shows the behavior I'm experiencing:
main file content [main.tex]:

\documentclass[10pt]{book}
\usepackage[parent]{currfile}

\usepackage{xepersian}
\settextfont{Vazirmatn}
\setdigitfont{Vazirmatn}


\begin{document}

\begin{latin}

    This is from the main file:

    currfilepath: \currfilepath

    currfilename: \currfilename

    CurrentFile: \CurrentFile

    CurrentFilePath: \CurrentFilePath

    \input{dir/inside_dir}

\end{latin}

\end{document}

Then create a dir directory in the above directory and inside it create this inside_dir.tex file:

This is from the inside\_dir file:

currfilebase: \currfilebase

currfilepath: \currfilepath

currfilename: \currfilename

CurrentFile: \CurrentFile

CurrentFilePath: \CurrentFilePath

And then compile in the main dir using xelatex to see the output below:

xelatex main

Expected behavior

If I don't have the xepersian package, the output looks like below, which is the correct behavior:

Log and PDF files

Screenshots are provided above.

@neo-apz neo-apz added the bug Something isn't working label Apr 15, 2023
@neo-apz
Copy link
Author

neo-apz commented Sep 25, 2023

@kvafa, any chance you can look into this? your help is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants