Hi! I was wondering what context considers a “bad” file name and what consequences that might have. From workflows-mkiv.pdf: “Bad names are reported and suitable action can be taken” Indeed, every run context tells me how many files are badly named: mkiv lua stats > graphics processing time: 0.021 seconds including tex, 14 processed images, 14 unique asked, 7 bad names A small test: \starttext \externalfigure [a] %% good \externalfigure [a.png] %% good \externalfigure [a.b.png] %% good \externalfigure [a.1.png] %% bad \externalfigure [a-1.png] %% good \externalfigure [a-.1.png] %% bad \externalfigure [a-b.1.png] %% bad \externalfigure [a-1.b.png] %% good \externalfigure [A] %% good \externalfigure [A.B] %% good \externalfigure [A.b] %% bad \externalfigure [A.B.png] %% bad \externalfigure [A.png] %% bad \externalfigure [a.c-b.b.png] %% bad %% bad names are reported in red \usemodule [s-figures-names] \stoptext I note that “A.png” and “a.1.png” are bad file names and “a-1.b.png” and “a-1.png” are good file names. What's the idea behind that logic? “A.png” and “a.1.png” seem perfectly fine file names to me. The files are included without issues, regardless of context's opinion about the name. What is a bad name for context? Does it have any consequences if badly named files are used? Just being curious. Marco
On 2/8/2019 10:22 PM, Marco Patzer wrote:
What is a bad name for context? Does it have any consequences if badly named files are used? Just being curious. Bad names are names that can result i a miss when looked up on a case sensitive system. When you have a workflow where images come from e.g. graphic designers don't be surprised to get names with inconsistent casing, one of more spaces in a row, multiple suffixes (or wrong ones), etc etc ... now when images are referred to e.g. from xml files that also come from someplace it can get pretty hard to find where something goes miss. So, here we always normalize (az09-).
In a tex tree files with the same name can lead to wrong lookups depending on the order of configured paths. There context alway has had case insensitive lookups. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 8 Feb 2019 23:26:21 +0100
Hans Hagen
On 2/8/2019 10:22 PM, Marco Patzer wrote:
What is a bad name for context? Does it have any consequences if badly named files are used? Just being curious. Bad names are names that can result i a miss when looked up on a case sensitive system. When you have a workflow where images come from e.g. graphic designers don't be surprised to get names with inconsistent casing, one of more spaces in a row, multiple suffixes (or wrong ones), etc etc ... now when images are referred to e.g. from xml files that also come from someplace it can get pretty hard to find where something goes miss. So, here we always normalize (az09-).
In a tex tree files with the same name can lead to wrong lookups depending on the order of configured paths. There context alway has had case insensitive lookups.
Because people use brain-dead file systems we get to use brain-dead file names, case-insensitive, etc., etc. This can be a bit frustrating for those used to working with real file systems and real (arbitrary) file names, but it gives better results for the least common denominator, i.e. Windows... :-( Alan
On 2/9/2019 12:15 AM, Alan Braslau wrote:
On Fri, 8 Feb 2019 23:26:21 +0100 Hans Hagen
wrote: On 2/8/2019 10:22 PM, Marco Patzer wrote:
What is a bad name for context? Does it have any consequences if badly named files are used? Just being curious. Bad names are names that can result i a miss when looked up on a case sensitive system. When you have a workflow where images come from e.g. graphic designers don't be surprised to get names with inconsistent casing, one of more spaces in a row, multiple suffixes (or wrong ones), etc etc ... now when images are referred to e.g. from xml files that also come from someplace it can get pretty hard to find where something goes miss. So, here we always normalize (az09-).
In a tex tree files with the same name can lead to wrong lookups depending on the order of configured paths. There context alway has had case insensitive lookups.
Because people use brain-dead file systems we get to use brain-dead file names, case-insensitive, etc., etc.
This can be a bit frustrating for those used to working with real file systems and real (arbitrary) file names, but it gives better results for the least common denominator, i.e. Windows... :-( very subjective ... when program shave to deal with names Foo FoO FOO foo ... a pain esp when users don't care, are inconistent, dont' see a difference between one or two (proportionally displayed) spaces
imo windows is quite ok: in permits mixed case but also has a normalized name .. it's for the tex runs on unixes that we always need to deal with inconsistent naming the problem is nor that much related to operatign systems but to graphic editors using a gui, moving files around without typing, constructing names from cur and pasted sentences describing the image (and mouse moves give worse names than keypresses). Fwiw: most images that we deal with come from illustrator on the mac. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 8 Feb 2019 23:26:21 +0100
Hans Hagen
On 2/8/2019 10:22 PM, Marco Patzer wrote:
What is a bad name for context? Does it have any consequences if badly named files are used? Just being curious. Bad names are names that can result i a miss when looked up on a case sensitive system. When you have a workflow where images come from e.g. graphic designers don't be surprised to get names with inconsistent casing, one of more spaces in a row, multiple suffixes (or wrong ones)
That's so true. I'm not surprised about anything when dealing with people. People are really bad at being precise and consistent. You can wish they were, but they just aren't.
... now when images are referred to e.g. from xml files that also come from someplace it can get pretty hard to find where something goes miss. So, here we always normalize (az09-).
So every file name containing something else than lowercase, digits and a dash is “bad” (and dots obviously)? Doesn't seem to be true: a.1.png %% bad name Names are read from a database in this case, in case you're wondering. Marco
participants (3)
-
Alan Braslau
-
Hans Hagen
-
Marco Patzer