ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bad names
@ 2019-02-08 21:22 Marco Patzer
  2019-02-08 22:26 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2019-02-08 21:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bad names
  2019-02-08 21:22 Bad names Marco Patzer
@ 2019-02-08 22:26 ` Hans Hagen
  2019-02-08 23:15   ` Alan Braslau
  2019-02-09 11:37   ` Marco Patzer
  0 siblings, 2 replies; 5+ messages in thread
From: Hans Hagen @ 2019-02-08 22:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Marco Patzer

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bad names
  2019-02-08 22:26 ` Hans Hagen
@ 2019-02-08 23:15   ` Alan Braslau
  2019-02-09 19:47     ` Hans Hagen
  2019-02-09 11:37   ` Marco Patzer
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Braslau @ 2019-02-08 23:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 8 Feb 2019 23:26:21 +0100
Hans Hagen <j.hagen@xs4all.nl> 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... :-(

Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bad names
  2019-02-08 22:26 ` Hans Hagen
  2019-02-08 23:15   ` Alan Braslau
@ 2019-02-09 11:37   ` Marco Patzer
  1 sibling, 0 replies; 5+ messages in thread
From: Marco Patzer @ 2019-02-09 11:37 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Fri, 8 Feb 2019 23:26:21 +0100
Hans Hagen <j.hagen@xs4all.nl> 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)

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bad names
  2019-02-08 23:15   ` Alan Braslau
@ 2019-02-09 19:47     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2019-02-09 19:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

On 2/9/2019 12:15 AM, Alan Braslau wrote:
> On Fri, 8 Feb 2019 23:26:21 +0100
> Hans Hagen <j.hagen@xs4all.nl> 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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-09 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 21:22 Bad names Marco Patzer
2019-02-08 22:26 ` Hans Hagen
2019-02-08 23:15   ` Alan Braslau
2019-02-09 19:47     ` Hans Hagen
2019-02-09 11:37   ` Marco Patzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).