0

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 ./ddd.

Running "main.tex" typesets da.tex under ./ddd []||.

My question is: why does \getabspath not find the file ./ddd/da.tex?

PS: win7 + MikTex + Xelatex -recorder

main.tex:

\documentclass{article}
\usepackage[abspath]{currfile}
\begin{document}
\input{ddd/da.tex}
\getabspath{ddd/da.tex} [\theabspath]|\theabsdir|.
\end{document}
17
  • It does work properly for me. Maybe try running again (with -recorder flag)?
    – user202729
    Jul 18 at 5:19
  • Also maybe delete any unused .fls file, and ensure that after running it the fls file does get generated
    – user202729
    Jul 18 at 5:20
  • 1
    Either \ExplSyntaxOn \exp_args:Nx \getabspath {ddd \cs_to_str:N \\ da.tex}, or use (my) package (needs installation however) \usepackage{precattl} then \precattlExec{\getabspath{\ddd\cO\\da.tex}}
    – user202729
    Jul 18 at 5:37
  • 1
    a sorry, mixed up texlive and miktex. Try with \getabspath{.\string\testinput\string\aa.tex} Jul 18 at 15:43
  • 1
    Yes there is (replace any slash with backslash. Learn some expl3 (str_replace_all) or Lua (this one is not difficult). Although it's unrelated to this question...?
    – user202729
    Jul 19 at 15:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.