LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Phelype Oleinik <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Fri, 28 Jul 2023 15:48:40 -0300
text/plain (40 lines)
On Fri, Jul 28, 2023 at 3:16 PM LARONDE Thierry <[log in to unmask]> wrote:
> I simply thought about the feature: when wanting the size, it can
> be for whatever file.  Adding automatically an extension was
> preventing from obtaining the size of a file without an extension and
> this was not giving the size of the file as specified (being partly
> specified, not absolute was not a problem; changing the filename was).
> This was stupid to not be able to obtain the size of a filename
> without extension or to alter the filename. So I didn't implement
> it this way but, contrary to the others, I tried to described
> precisely what the implementation was doing so that somebody reading
> the description would have an accurate description of the behavior.

If I'm not mistaken, the behaviour for file lookup (regardless which
primitive) is (crappy pseudocode warning):

If Exists(file name)
  Return 0 % file found
  If ContainsExtension(file name)
    Return 1 % not found
    If Exists(file name + ".tex")
      Return 0 % file found
      Return 1 % not found

So it /is/ possible to use |\filesize| or |\input| or... on a file
without extension, because the lookup first checks the name as given.
If that name is not found, and only if the file name doesn't have an
extension (i.e., a "." after the last "/"), then that name is tried with
".tex" appended to it.  It's been a while, so that may not be 100%
correct, but I'm pretty sure it's possible to use extensionless files.