\typefile not including file and returning success
Hi! In the following example the file “bar” is not included: # create file “bar” echo Bar > bar # t.tex \starttext Foo \typefile{bar} \stoptext Then run context --errors='*' t.tex The text “bar” is not included in the PDF, only Foo is. The log file shows: verbatims > file 'bar' does not exist However, the file “bar” clearly does exist. Furthermore, context exits with no error in the log file and a successful exit value: context --errors='*' t.tex > /dev/null; echo $? 0 Is this working as intended? Marco
Hi Marco, If I create a file named « bar.txt » then \starttext Nothing to say\dots \typefile{bar.txt} \stoptext gives the correct result. However ConTeXt seems to dislike \typefile{bar} when the filename has no suffix. Best regards : Otared
On 17 Dec 2022, at 16:06, Marco Patzer via ntg-context
wrote: Hi!
In the following example the file “bar” is not included:
# create file “bar” echo Bar > bar
# t.tex \starttext Foo \typefile{bar} \stoptext
Then run
context --errors='*' t.tex
The text “bar” is not included in the PDF, only Foo is. The log file shows:
verbatims > file 'bar' does not exist
However, the file “bar” clearly does exist. Furthermore, context exits with no error in the log file and a successful exit value:
context --errors='*' t.tex > /dev/null; echo $? 0
Is this working as intended?
Marco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Otared Kavian e-mail: otared@gmail.com Phone: +33 6 88 26 70 95
On Sat, 17 Dec 2022 16:25:01 +0100
Otared Kavian via ntg-context
If I create a file named « bar.txt » then
\starttext Nothing to say\dots
\typefile{bar.txt}
\stoptext
gives the correct result.
I can confirm that.
However ConTeXt seems to dislike \typefile{bar} when the filename has no suffix.
Is there a way around it? Traditionally there are plenty of files without suffix (e.g. README, Makefile, configure, etc.) Marco
The context wiki says:
"When no file extension is specified the extension .tex is assumed."
Yes an error message should be displayed.
By chance, do you have a file named "bar.tex" that would prevent this from being an error?
skyhorse
---------
Otared Kavian via ntg-context
Hi Marco,
If I create a file named « bar.txt » then
\starttext Nothing to say\dots
\typefile{bar.txt}
\stoptext
gives the correct result. However ConTeXt seems to dislike \typefile{bar} when the filename has no suffix.
Best regards : Otared
On 17 Dec 2022, at 16:06, Marco Patzer via ntg-context
wrote: Hi!
In the following example the file “bar” is not included:
# create file “bar” echo Bar > bar
# t.tex \starttext Foo \typefile{bar} \stoptext
Then run
context --errors='*' t.tex
The text “bar” is not included in the PDF, only Foo is. The log file shows:
verbatims > file 'bar' does not exist
However, the file “bar” clearly does exist. Furthermore, context exits with no error in the log file and a successful exit value:
context --errors='*' t.tex > /dev/null; echo $? 0
Is this working as intended?
Marco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Otared Kavian e-mail: otared@gmail.com Phone: +33 6 88 26 70 95
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
On Sat, 17 Dec 2022 10:41:11 -0800
skyhorse--- via ntg-context
The context wiki says: "When no file extension is specified the extension .tex is assumed."
It's not on the page for typefile: https://wiki.contextgarden.net/Command/typefile And that surely makes sense for TeX (input) files, but not \type'ed files, which are usually not TeX files. \startnitpicking The message verbatims > file 'bar' does not exist is wrong, the file “bar” exists. Displaying verbatims > file 'bar.txt' does not exist \stopnitpicking would be correct. But as I said, assuming \type'ed files are .tex files does not make sense, IMO.
By chance, do you have a file named "bar.tex" that would prevent this from being an error?
No. It just doesn't produce an error here (or non-success exit code for that matter). using LMTX: 2022.12.15 18:12 Marco
participants (3)
-
Marco Patzer
-
Otared Kavian
-
skyhorse@gmx.us