Dear Stephen,
I guess I had not realized those images were not in the external directory.
Anyway, thanks to David A for getting this one going.
* It is a bit of an accident that this works at all, and could be improved.
(*Will* be improved.)
* For anyone reading this later, we may eventually have a *different* directory
to support this sort of thing, so check around for that.
* Stephen - would you be willing to allow us permission to add your example
into the sample article (with credit)? It'd give us something to work with once
we shore things up.
Rob
On 6/18/25 14:50, Stephen Brown wrote:
> That's done the trick! Thank you David!
>
> (Unfortunately, the swimmer does not escape. But by question 9, they realize
> they can surf a wave instead to make it to safety.)
>
> Stephen
>
> On Tuesday, 17 June 2025 at 11:31:29 UTC-7
david.a...@gmail.com wrote:
>
> I can confirm that building TikZ images in the sample-article with the
> pretext/pretext script copies the contents of the external directory
> (@external="media") into the "external" directory inside the tmp directory
> where the build happens. It doesn't do this when building prefigure
> diagrams though. :-(
>
> Stephen: In your publication file (publication/publication.xml), there is a
> #source element that looks like this:
>
> <source>
> <directories external="../assets" generated="../generated-assets" />
> <!-- Set which marked elements are included in this version: -->
> <!-- See
>
https://pretextbook.org/doc/guide/html/publication-file-
> source.html#publication-file-source-version <
https://pretextbook.org/doc/
> guide/html/publication-file-source.html#publication-file-source-version> -->
> <!-- <version include="videos labs"/> -->
> </source>
>
> Note the @external attribute on the #directories element. The contents of
> this directory are copied into the build directory so you could include
> shark.png in that directory. I don't see an assets directory in your
> repository, but if you include assets/images/shark.png and assets/images/
> swimmer.png, your TikZ code should work if you use
> \includegraphics{external/images/shark.png}. assets is a sibling of source
> in the directory structure.
>
> (I'm really hoping the swimmer escapes in your problem.)
>
> On Tue, Jun 17, 2025 at 1:48 PM Stephen Brown <
stephen....@gmail.com> wrote:
>
> Hi Rob,
>
> Here is my source directory structure, with the file in question:
>
https://github.com/scbrown-okanagan/exploring-calculus-with-maple/blob/
> main/source/activities_math122/act_shark_attack.ptx <
https://github.com/
> scbrown-okanagan/exploring-calculus-with-maple/blob/main/source/
> activities_math122/act_shark_attack.ptx>
> pretext-support/ <
https://groups.google.com/d/msgid/pretext-support/>
> > a53bc8f0-afcd-4886-a23c-ab462c707bc3n%
40googlegroups.com
> <
http://40googlegroups.com> <https://
> >
groups.google.com/d/msgid/pretext-support/a53bc8f0-afcd-4886-
> a23c- <
http://groups.google.com/d/msgid/pretext-support/a53bc8f0-
> afcd-4886-a23c->
> > ab462c707bc3n%
40googlegroups.com?
> utm_medium=email&utm_source=footer <
http://40googlegroups.com?
> <
https://groups.google.com/d/msgid/pretext-support/
> a486eb3d-2c66-45b0-8d8c-abfd94d960a8n%
40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> support/7353d2e5-c263-430a-9a03-f3c57a159e29n%
40googlegroups.com <https://
>
groups.google.com/d/msgid/pretext-support/7353d2e5-c263-430a-9a03-
> f3c57a159e29n%
40googlegroups.com?utm_medium=email&utm_source=footer>.