I'm using Scribble to pull in parts of files that are stored in other files (not written in Racket). Reading the files and getting the content in works fine, but I don't know how to figure out where the file that the function is being invoked is in, so the only way to get it to work is to pass in a path relative to the root of the document, which is unpleasant.
i.e., I have a directory structure like:
...
hw/
hwN/
assignment.scrbl
template.EXT
...
And in assignment.scrbl
, I want to pull in parts of template.EXT
, but currently I have to write hw/hwN/template.ext
. It would be a lot nicer to, as I can do with @include-section
, be able to write just template.EXT
, so that if I rearrange the directories I won't break all of these paths.
This is not really specific to Scribble. In Racket, you would do:
then you can use
template.EXT
to refer to the file.