RFE: Better error messages for \usemodule
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
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
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
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 -----------------------------------------------------------------
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
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
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
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
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 -----------------------------------------------------------------
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
participants (4)
-
Brooks Moses
-
Hans Hagen
-
Martin Kolarík
-
Taco Hoekwater