Re: [NTG-context] \typefile not including file and returning success
On Sat, 17 Dec 2022 17:43:48 +0100
Otared Kavian
It seems that one can fool ConTeXt into typing a file without suffix by giving the path to that file…
That works, I can confirm.
\typefile{/Users/kavian/Context/essais/mkiv/bar-bis}
Hard-coded absolute paths in TeX files are something I avoid, but I assume that's just for demonstration here.
\typefile{./bar-bis}
That works as well. It's a workaround at least. But context returning success when it clearly doesn't include the file is unfortunate. The missing file might go completely unnoticed. I'd expect an error there. Marco
On 12/17/2022 6:27 PM, Marco via ntg-context wrote:
On Sat, 17 Dec 2022 17:43:48 +0100 Otared Kavian
wrote: Thanks for your quick reply.
It seems that one can fool ConTeXt into typing a file without suffix by giving the path to that file…
That works, I can confirm.
\typefile{/Users/kavian/Context/essais/mkiv/bar-bis}
Hard-coded absolute paths in TeX files are something I avoid, but I assume that's just for demonstration here.
\typefile{./bar-bis}
That works as well. It's a workaround at least.
But context returning success when it clearly doesn't include the file is unfortunate. The missing file might go completely unnoticed. I'd expect an error there. The next upload will have:
\adddefaultsuffix[foo,{},crap] \adddefaultsuffix[{}] \typefile{./crapcrap} \typefile{crapcrap} which someone has to document on the wiki 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 -----------------------------------------------------------------
On Wed, 21 Dec 2022 13:17:15 +0100
Hans Hagen via ntg-context
But context returning success when it clearly doesn't include the file is unfortunate. The missing file might go completely unnoticed. I'd expect an error there. The next upload will have:
\adddefaultsuffix[foo,{},crap] \adddefaultsuffix[{}]
\typefile{./crapcrap} \typefile{crapcrap}
Thanks Hans for looking into that. I'll play with it after the next update.
which someone has to document on the wiki
Wilco Marco
On Wed, 21 Dec 2022 13:17:15 +0100
Hans Hagen via ntg-context
The next upload will have:
\adddefaultsuffix[foo,{},crap] \adddefaultsuffix[{}]
\typefile{./crapcrap} \typefile{crapcrap}
which someone has to document on the wiki
Apologies for taking so long. But I just now tested your fix and wanted to remove the absolute paths from my document and found that either your fix is not working or I'm doing something wrong (probably the latter). Example: # create file “bar” echo Bar > bar %% \adddefaultsuffix[foo,{},crap,bar] \adddefaultsuffix[{}] \starttext Foo \typefile{bar} \stoptext This does *not* include the file “bar”. As far as I understand: %% searches for files with no extention \adddefaultsuffix[{}] %% searches for files with extension aa, bb, foobar, %% e.g. file.aa, blurp.bb or example.foobar \adddefaultsuffix[aa, bb, foobar] But that's not how it behaves. Can you elaborate? Marco LMTX 2023.02.14 17:44 PS: When I get it to work, I'll document it on the wiki.
participants (3)
-
Hans Hagen
-
Marco
-
Marco Patzer