speedata / publisher

speedata Publisher - a professional database Publishing system

Home Page:https://www.speedata.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

files in subdirectories

pr-apes opened this issue · comments

@pgundlach,

sometimes I have to invoke Publisher such as in:

sp --dummy --autoopen -v pdfdoc=./a.pdf

I have to force the current directory, because if there is any */a.pdf (a file named the same way in a subdirectory), Publisher selects it as variable value.

Sorry, if this is not a bug, I cannot see the reason of the gain in such a feature.

Many thanks for your help.

I am not sure I understand / can reproduce the problem.

I have a "out.pdf" in my current directory and another one in a subdirectory. When I invoke

sp --dummy --autoopen -v pdfdoc=./out.pdf, the variable is set to ./out.pdf, when I run sp --dummy --autoopen -v pdfdoc=out.pdf, the variable contains the string out.pdf.

I this not what is expected?

Sorry for my inaccuracy, the whole thing is more subtle.

If I run sp --dummy --autoopen -v pdfdoc=out.pdf and I have ./out.pdf and ./helloworld/out.pdf, the variable might be right, but ./helloworld/out.pdf is the file selected in Publisher.

I hope it is clear now.

selected where? When loading an image? This has nothing to do with -v ..., just the “normal” loading behaviour. If there are more resources with the same name, you have to resolve them with absolute paths or selectively add / remove directories from the recursive file search.

Yes, selected when loading an image.

Sorry, the variable was only my way of naming what it seems to be recursive file search.

This is the first time I experience that a file in the current directory is ignored in favor of the same file name in a subdirectory.

As far as I know, LuaTeX doesn't do recursive file searches (at least, from what I have experienced in ConTeXt).

I have just noticed that --no-local disables these recursive file searches (which would have been a more consistent default).

The recursive file search is a feature which I miss from LuaTeX et. al. and is a design choice which was there right from the beginning (and will be also part of XTS). I should issue a warning if there are duplicate file names found in the database.

I think this issue can be closed?

Sorry, but I think this is the first time I found recursive file search in the terminal.

I think it might be surprising (to say the least) to select a file in a subdirectory over a file in the current directory.

But a warning on duplicate files would be really desirable (if recursive file search has to be the default).

Closing the issue myself.