ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* RFE: Better error messages for \usemodule
@ 2005-07-17  0:13 Brooks Moses
  2005-07-17  6:16 ` Taco Hoekwater
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Brooks Moses @ 2005-07-17  0:13 UTC (permalink / raw)


Just now, I was trying to figure out how to write a module that ConTeXt 
would load.  Should be simple, right?  I wrote a file called 
"t-mymodule.tex", put it in a directory next to a test file that had the 
line "\usemodule[mymodule]", and tried processing it.

After scratching my head over "no macros found in module mymodule", I 
decided to try replacing the line with "\input{t-mymodule}".

This produced the very cryptic result of a "I can't find the file 
't-mymodule'.  Please type another filename:" error.  However, simply using 
"t-mymodule" as a replacement filename worked fine.

Eventually, after much consternation, I tracked the problem down to the 
fact that ConTeXt truncates input file names to 8 letters.  Thus, my 
\usemodule command was looking for files called "t-mymodu" and so forth.

Given the amount of trouble that I had with figuring that out, I'd like to 
suggest the following enhancement: can the "no modules found in..." and "I 
can't find the file..." errors be adjusted so that they give the shortened 
file name that ConTeXt is actually looking for, rather than the long file 
name?

I would also tend to suggest that "no macros found in module..." is a 
fairly misleading error message anyway, since it seems to imply that the 
module file itself was found.  It is particularly unclear given that it 
_doesn't_ show up if the module file exists but contains no macros!

- Brooks

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  0:13 RFE: Better error messages for \usemodule Brooks Moses
@ 2005-07-17  6:16 ` Taco Hoekwater
  2005-07-17  6:45   ` Brooks Moses
  2005-07-17  6:16 ` Taco Hoekwater
  2005-07-17  6:17 ` RFE: Better error messages for \usemodule Taco Hoekwater
  2 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2005-07-17  6:16 UTC (permalink / raw)


Brooks Moses wrote:
> After scratching my head over "no macros found in module mymodule", I 
> decided to try replacing the line with "\input{t-mymodule}".


> This produced the very cryptic result of a "I can't find the file 
> 't-mymodule'.  Please type another filename:" error.  However, simply 
> using "t-mymodule" as a replacement filename worked fine.

The \input with braces is latex-ese. The TeX primitive is
   \input t-mymodule
and that would have worked.

However, as of ConTeXt release 2005.05.25, the original \usemodule
would also have worked: the automatic filename truncation was removed
in that version.

Greetings,

Taco

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  0:13 RFE: Better error messages for \usemodule Brooks Moses
  2005-07-17  6:16 ` Taco Hoekwater
@ 2005-07-17  6:16 ` Taco Hoekwater
  2005-07-17  6:32   ` Taco Hoekwater
  2005-07-17  6:17 ` RFE: Better error messages for \usemodule Taco Hoekwater
  2 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2005-07-17  6:16 UTC (permalink / raw)


Brooks Moses wrote:
> After scratching my head over "no macros found in module mymodule", I 
> decided to try replacing the line with "\input{t-mymodule}".


> This produced the very cryptic result of a "I can't find the file 
> 't-mymodule'.  Please type another filename:" error.  However, simply 
> using "t-mymodule" as a replacement filename worked fine.

The \input with braces is latex-ese. The TeX primitive is
   \input t-mymodule
and that would have worked.

However, as of ConTeXt release 2005.05.25, the original \usemodule
would also have worked: the automatic filename truncation was removed
in that version.

Greetings,

Taco

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  0:13 RFE: Better error messages for \usemodule Brooks Moses
  2005-07-17  6:16 ` Taco Hoekwater
  2005-07-17  6:16 ` Taco Hoekwater
@ 2005-07-17  6:17 ` Taco Hoekwater
  2 siblings, 0 replies; 10+ messages in thread
From: Taco Hoekwater @ 2005-07-17  6:17 UTC (permalink / raw)


Brooks Moses wrote:
> After scratching my head over "no macros found in module mymodule", I 
> decided to try replacing the line with "\input{t-mymodule}".


> This produced the very cryptic result of a "I can't find the file 
> 't-mymodule'.  Please type another filename:" error.  However, simply 
> using "t-mymodule" as a replacement filename worked fine.

The \input with braces is latex-ese. The TeX primitive is
   \input t-mymodule
and that would have worked.

However, as of ConTeXt release 2005.05.25, the original \usemodule
would also have worked: the automatic filename truncation was removed
in that version.

Greetings,

Taco

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  6:16 ` Taco Hoekwater
@ 2005-07-17  6:32   ` Taco Hoekwater
  2005-07-17 14:13     ` another problem with textbackground Martin Kolarík
  2005-07-17 14:14     ` Martin Kolarík
  0 siblings, 2 replies; 10+ messages in thread
From: Taco Hoekwater @ 2005-07-17  6:32 UTC (permalink / raw)


Hi,

Sorry about this triplication, My smtp server was reacting
so slow that I believed it was non-functioning, but turned
out the mail came through anyway.

Taco

Taco Hoekwater wrote:
> Brooks Moses wrote:
> 
>> After scratching my head over "no macros found in module mymodule", I 
>> decided to try replacing the line with "\input{t-mymodule}".
> 
> 
> 
>> This produced the very cryptic result of a "I can't find the file 
>> 't-mymodule'.  Please type another filename:" error.  However, simply 
>> using "t-mymodule" as a replacement filename worked fine.
> 
> 
> The \input with braces is latex-ese. The TeX primitive is
>   \input t-mymodule
> and that would have worked.
> 
> However, as of ConTeXt release 2005.05.25, the original \usemodule
> would also have worked: the automatic filename truncation was removed
> in that version.
> 
> Greetings,
> 
> Taco
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  6:16 ` Taco Hoekwater
@ 2005-07-17  6:45   ` Brooks Moses
  2005-07-17 18:27     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Brooks Moses @ 2005-07-17  6:45 UTC (permalink / raw)


At 11:16 PM 7/16/2005, you wrote:
>Brooks Moses wrote:
>>After scratching my head over "no macros found in module mymodule", I 
>>decided to try replacing the line with "\input{t-mymodule}".
>
>
>>This produced the very cryptic result of a "I can't find the file 
>>'t-mymodule'.  Please type another filename:" error.  However, simply 
>>using "t-mymodule" as a replacement filename worked fine.
>
>The \input with braces is latex-ese. The TeX primitive is
>   \input t-mymodule
>and that would have worked.

Ah, ok.  I hadn't realized those were different!

>However, as of ConTeXt release 2005.05.25, the original \usemodule
>would also have worked: the automatic filename truncation was removed
>in that version.

Good to know; it _did_ seem like something that really was likely to be 
more of an annoyance than a useful thing.

Thanks for the corrections.  :)

- Brooks

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

* another problem with textbackground
  2005-07-17  6:32   ` Taco Hoekwater
@ 2005-07-17 14:13     ` Martin Kolarík
  2005-07-17 14:14     ` Martin Kolarík
  1 sibling, 0 replies; 10+ messages in thread
From: Martin Kolarík @ 2005-07-17 14:13 UTC (permalink / raw)


Hi all,

I need to create document where all text is colored (e.g. gray). So I used
textbackground, and it works. But if I add some floating table into the
document, the text in the table is not colored corectly.

Small attached example show this, all texts should be red. The second table
has for the errorneous cell set [color=red] too, and neither this works.

Example is only an example -- real situation comes from XML document, which
is a bit more complicated and the color problems are a bit more complicated
too -- colors in the table (color and framecolor too) firstly appear after
the first in-cell color change, before this color change table is not
colored. But this I did not suceed simplify to the example.

Now it seems like textbackground affects floats too (why not) but with some
difficulties. One could expect some "renewing" of the backgrounds in the
floating table (again why not :-), but this does not work fully too.

Thanks for any hints or corrections,

have a nice day,

Martin

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

* another problem with textbackground
  2005-07-17  6:32   ` Taco Hoekwater
  2005-07-17 14:13     ` another problem with textbackground Martin Kolarík
@ 2005-07-17 14:14     ` Martin Kolarík
  2005-07-17 21:43       ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Martin Kolarík @ 2005-07-17 14:14 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

Hi all,

I need to create document where all text is colored (e.g. gray). So I used
textbackground, and it works. But if I add some floating table into the
document, the text in the table is not colored corectly.

Small attached example show this, all texts should be red. The second table
has for the errorneous cell set [color=red] too, and neither this works.

Example is only an example -- real situation comes from XML document, which
is a bit more complicated and the color problems are a bit more complicated
too -- colors in the table (color and framecolor too) firstly appear after
the first in-cell color change, before this color change table is not
colored. But this I did not suceed simplify to the example.

Now it seems like textbackground affects floats too (why not) but with some
difficulties. One could expect some "renewing" of the backgrounds in the
floating table (again why not :-), but this does not work fully too.

Thanks for any hints or corrections,

have a nice day,

Martin

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 3796 bytes --]

[-- Attachment #3: test.tex --]
[-- Type: application/octet-stream, Size: 724 bytes --]

\setupcolors
  [state=start]

\definetextbackground
  [textcolor]
  [color=red,
   frame=no,
   location=text,
   backgroundcolor=green]

\starttext

\starttextbackground[textcolor]

\placefloat
  [table]
  [force,here]
  {none}
  {\bTABLE
     \bTR\bTD One little indian\eTD\bTD Two little indians\eTD\eTR
     \bTR\bTD One little indian\eTD\bTD Two little indians\eTD\eTR
   \eTABLE}

\stoptextbackground

\starttextbackground[textcolor]

\placefloat
  [table]
  [force,here]
  {none}
  {\bTABLE
     \bTR\bTD[color=red] One little indian\eTD\bTD Two little indians\eTD\eTR
     \bTR\bTD One little indian\eTD\bTD Two little indians\eTD\eTR
   \eTABLE}

\stoptextbackground

\stoptext

[-- Attachment #4: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: RFE: Better error messages for \usemodule
  2005-07-17  6:45   ` Brooks Moses
@ 2005-07-17 18:27     ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2005-07-17 18:27 UTC (permalink / raw)


Brooks Moses wrote:

> At 11:16 PM 7/16/2005, you wrote:
>
>> Brooks Moses wrote:
>>
>>> After scratching my head over "no macros found in module mymodule", 
>>> I decided to try replacing the line with "\input{t-mymodule}".
>>
>>
>>
>>> This produced the very cryptic result of a "I can't find the file 
>>> 't-mymodule'.  Please type another filename:" error.  However, 
>>> simply using "t-mymodule" as a replacement filename worked fine.
>>
>>
>> The \input with braces is latex-ese. The TeX primitive is
>>   \input t-mymodule
>> and that would have worked.
>
>
> Ah, ok.  I hadn't realized those were different!

There are a few file reading macros, for instance:

\readfile {yourfile.tex} {\message{OK}} {\message{BAD NEWS}}

supp-fil.tex shows a few (global loading, local loading, recursive 
loading, etc) ans in core-fil there are some macros to load files with 
knowledge of system paths and such

>> However, as of ConTeXt release 2005.05.25, the original \usemodule
>> would also have worked: the automatic filename truncation was removed
>> in that version.
>
>
> Good to know; it _did_ seem like something that really was likely to 
> be more of an annoyance than a useful thing.

it was useful in the days that 8+3 filenames were the rule (msdos but 
also cdroms demanded it) and that the tex binaries were not able to 
handle truncated names well

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

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

* Re: another problem with textbackground
  2005-07-17 14:14     ` Martin Kolarík
@ 2005-07-17 21:43       ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2005-07-17 21:43 UTC (permalink / raw)


Martin Kolarík wrote:

>Hi all,
>
>I need to create document where all text is colored (e.g. gray). So I used
>textbackground, and it works. But if I add some floating table into the
>document, the text in the table is not colored corectly.
>
>Small attached example show this, all texts should be red. The second table
>has for the errorneous cell set [color=red] too, and neither this works.
>
>Example is only an example -- real situation comes from XML document, which
>is a bit more complicated and the color problems are a bit more complicated
>too -- colors in the table (color and framecolor too) firstly appear after
>the first in-cell color change, before this color change table is not
>colored. But this I did not suceed simplify to the example.
>  
>
looks funny and buggy to me; you can file a bug report on the temp wiki 
bug page

>Now it seems like textbackground affects floats too (why not) but with some
>difficulties. One could expect some "renewing" of the backgrounds in the
>floating table (again why not :-), but this does not work fully too.
>
>Thanks for any hints or corrections,
>  
>
forget about background in your case, just use:

\setupcolors
  [state=start,
   textcolor=red]


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

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

end of thread, other threads:[~2005-07-17 21:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-17  0:13 RFE: Better error messages for \usemodule Brooks Moses
2005-07-17  6:16 ` Taco Hoekwater
2005-07-17  6:45   ` Brooks Moses
2005-07-17 18:27     ` Hans Hagen
2005-07-17  6:16 ` Taco Hoekwater
2005-07-17  6:32   ` Taco Hoekwater
2005-07-17 14:13     ` another problem with textbackground Martin Kolarík
2005-07-17 14:14     ` Martin Kolarík
2005-07-17 21:43       ` Hans Hagen
2005-07-17  6:17 ` RFE: Better error messages for \usemodule Taco Hoekwater

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