ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* externalfigure and uppercase extensions
@ 2007-09-13 16:56 Santy, Michael
  2007-09-13 17:27 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Santy, Michael @ 2007-09-13 16:56 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1041 bytes --]



Hello,

I'm using conTeXt as the renderer in a XML workflow and have run into a problem with externalfigure.  When a user chooses to include a PNG, PDF, or JPG image with an extension that is capitalized (or more generally, not all lower case), the externalfigure just includes a grey box like it can't find the file.  The snippet below illustrates the problem.  Note that I'm able to include the image by renaming the file to IMG_0103.jpg and changing the externalfigure to the corresponding filename.

\starttext
\externalfigure[IMG_0103.JPG]
\stoptext

I tried adding type=jpg and/or method=jpg to the externalfigure arguments, but the file did not compile.

I found that by adding the entry "\definefileinsertion{tpd}{JPG}{\handlepdfimage}" to the spec-tpd.tex file in the context distribution, the externalfigure is able to include this image correctly.      Should the mappings in these files be case insensitive?

I'm sure that I'm missing something basic.  Could someone please enlighten me?

Cheers,
Mike Santy 

[-- Attachment #1.2: Type: text/html, Size: 1544 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: externalfigure and uppercase extensions
  2007-09-13 16:56 externalfigure and uppercase extensions Santy, Michael
@ 2007-09-13 17:27 ` Taco Hoekwater
  0 siblings, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2007-09-13 17:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Santy, Michael wrote:

> I tried adding type=jpg and/or method=jpg to the externalfigure
> arguments, but the file did not compile.

That is a bit odd, I thought that should have worked. But:

> I found that by adding the entry
> "\definefileinsertion{tpd}{JPG}{\handlepdfimage}" to the spec-tpd.tex

This makes sense. So much so that perhaps it could be added to the
core spec-tpd.tex file.

For now however, putting that line in your local cont-sys.tex is
probably  better, otherwise you will have to remember to reapply
your fix at each context update you do.

> file in the context distribution, the externalfigure is able to
> include this image correctly.      Should the mappings in these files
> be case insensitive?

You could consider using a case-insensitive file system to store
your data on, and lowercasing all entity input to ConTeXt, but
that is more clumsy than the extra \definefileinsertion-s.

Best wishes,
Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* externalfigure and uppercase extensions
@ 2007-09-24 16:38 Santy, Michael
  0 siblings, 0 replies; 6+ messages in thread
From: Santy, Michael @ 2007-09-24 16:38 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 200 bytes --]



Hans,

You asked me to remind you this week to look into problems externalfigures and filenames with uppercase extensions.  Have you gotten a chance to look into the problem?

Cheers,
Mike 

[-- Attachment #1.2: Type: text/html, Size: 613 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: externalfigure and uppercase extensions
  2007-09-13 19:06 ` Santy, Michael
  2007-09-13 20:21   ` Hans Hagen
@ 2007-09-13 21:48   ` Taco Hoekwater
  1 sibling, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2007-09-13 21:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Santy, Michael wrote:



> Back to my original question, should
> "\externalfigure[MY_FIGURE.JPG][type=jpg] work?  Or am I
> misunderstanding the meaning of the type parameter?


Personally, I thought that

   \externalfigure[MY_FIGURE.JPG][method=jpg]

was supposed to work. But it doesn't, so I must have
misunderstood something also. It seems its more related to
choosing between e.g. MY_FIGURE.jpg and MY_FIGURE.pdf

Best wishes,
Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: externalfigure and uppercase extensions
  2007-09-13 19:06 ` Santy, Michael
@ 2007-09-13 20:21   ` Hans Hagen
  2007-09-13 21:48   ` Taco Hoekwater
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2007-09-13 20:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Santy, Michael wrote:
> 
>> This makes sense. So much so that perhaps it could be added to the
>> core spec-tpd.tex file.
> 
> I think it would make more sense for conTeXt to first convert an image's extension to lower case before trying to figure out rule to apply.  Otherwise in order to be correct, you would need an entry for 
> "Jpg", "jPg", "jpG", "JPg", "JpG", and "jPG" -- not even counting the permutations for "jpeg".
> 
>> You could consider using a case-insensitive file system to store
>> your data on, and lowercasing all entity input to ConTeXt, but
>> that is more clumsy than the extra \definefileinsertion-s.
> 
> I don't think a case-insensitive FS is going to be an option for us (*nix only).
> 
> Back to my original question, should "\externalfigure[MY_FIGURE.JPG][type=jpg] work?  Or am I misunderstanding the meaning of the type parameter?

should work so i have to look into the uppercase suffix, i thought that 
that was ok, remind me next week

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: externalfigure and uppercase extensions
       [not found] <mailman.1759.1189705411.2346.ntg-context@ntg.nl>
@ 2007-09-13 19:06 ` Santy, Michael
  2007-09-13 20:21   ` Hans Hagen
  2007-09-13 21:48   ` Taco Hoekwater
  0 siblings, 2 replies; 6+ messages in thread
From: Santy, Michael @ 2007-09-13 19:06 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 852 bytes --]



> This makes sense. So much so that perhaps it could be added to the
> core spec-tpd.tex file.

I think it would make more sense for conTeXt to first convert an image's extension to lower case before trying to figure out rule to apply.  Otherwise in order to be correct, you would need an entry for 
"Jpg", "jPg", "jpG", "JPg", "JpG", and "jPG" -- not even counting the permutations for "jpeg".

> You could consider using a case-insensitive file system to store
> your data on, and lowercasing all entity input to ConTeXt, but
> that is more clumsy than the extra \definefileinsertion-s.

I don't think a case-insensitive FS is going to be an option for us (*nix only).

Back to my original question, should "\externalfigure[MY_FIGURE.JPG][type=jpg] work?  Or am I misunderstanding the meaning of the type parameter?

Cheers,
Mike

[-- Attachment #1.2: Type: text/html, Size: 1409 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2007-09-24 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-13 16:56 externalfigure and uppercase extensions Santy, Michael
2007-09-13 17:27 ` Taco Hoekwater
     [not found] <mailman.1759.1189705411.2346.ntg-context@ntg.nl>
2007-09-13 19:06 ` Santy, Michael
2007-09-13 20:21   ` Hans Hagen
2007-09-13 21:48   ` Taco Hoekwater
2007-09-24 16:38 Santy, Michael

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).