pathing for print and web

11 views
Skip to first unread message

Shaun Ramsey

unread,
Sep 12, 2023, 1:18:46 PMSep 12
to PreTeXt support
I'm using a relative path for web that works well for pretext build web:
An image might sourced as the path:
  "../generated/latex-image/FAExM1.svg"

This image was generated from a tex image. I generate these images in a separate pass. Using -g rebuilds ALL images and takes quite a long time for hundreds of latex images. I use a 'newly generated images' ptx where I build any new images that are new or modified, but then the images are removed. Thus, I am left using only the svgs in my image tags. 

When building for print things fail however. I'm sure this is because I'm not reading the documentation on directories correctly, but try as I might, I can't seem to get print to look at these images.

In specific it seems to be referencing:
"external/../generated/latex-image/FAExM1.svg"
where it fails to find the file. I've tried moving the images around and removing the ../ in case that was a point of failure. 

That file is technically internal/generated, but I don't mind explicitly moving them after generation if that is necessary. The strange path was to remove this issue. Anyway, I don't mind scriptin/moving it if it helps 'print' find the files more easily. 

Any thoughts on how to get this system to work? Where would I place the svgs to have print find them with the same path that I use for web?

Rob Beezer

unread,
Sep 12, 2023, 1:56:08 PMSep 12
to pretext...@googlegroups.com
Dear Shaun,

Have you studied this?

Section 5.6: Directory Management
https://pretextbook.org/doc/guide/html/processing-directory-management.html

You should not need to examine intermediate output to discern path names and
move files around by hand. PreTeXt will do that for you if you organize your
source and your publisher file correctly.

Rob
> --
> 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
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mitch Keller

unread,
Sep 12, 2023, 2:01:14 PMSep 12
to pretext...@googlegroups.com
Also, up-to-date version of the CLI should be rebuilding only images that have changed (automatically without using -g) and for whatever format is being built, so that might be something to look at.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAzOC5iZWV6ZXI.1694541365%40quikprotect.


Shaun Ramsey

unread,
Sep 13, 2023, 11:02:34 AMSep 13
to PreTeXt support
New build checking image updates is amazing - chef's kiss. I will go back through and insert all my images in their place. That's great. But I'm still struggling to get print to read an svg that is not generated.

Problematically, I can't get my build print to ever look at an svg in external.
I tried this in ptx:
 <directories external="../external" generated="../generated" />
and then I tried using image source directly (removing ../) - still no love. I've used "data/" in the image source as well.

Does anybody have a minimum working example that uses image source and an svg? 
If I do this: <image source="FAExM1.svg" width="50%">
and my directories are as above. shouldn't putting the svg in a folder named external that is on the same level as source work?

Rob Beezer

unread,
Sep 13, 2023, 11:39:41 AMSep 13
to pretext...@googlegroups.com
What do you expect LaTeX to do with an SVG?

Study:

Paragraph
https://pretextbook.org/doc/guide/html/topic-images.html#p-564

On 9/13/23 08:02, Shaun Ramsey wrote:
> New build checking image updates is amazing - chef's kiss. I will go back
> through and insert all my images in their place. That's great. But I'm still
> struggling to get print to read an svg that is not generated.
>
> Problematically, I can't get my build print to ever look at an svg in external.
> I tried this in ptx:
>  <directories external="../external" generated="../generated" />
> and then I tried using image source directly (removing ../) - still no love.
> I've used "data/" in the image source as well.
>
> Does anybody have a minimum working example that uses image source and an svg?
> If I do this: <image source="FAExM1.svg" width="50%">
> and my directories are as above. shouldn't putting the svg in a folder named
> external that is on the same level as source work?
>
>
> On Tuesday, September 12, 2023 at 2:01:14 PM UTC-4 mi...@rellek.net wrote:
>
> Also, up-to-date version of the CLI should be rebuilding only images that
> have changed (automatically without using -g) and for whatever format is
> being built, so that might be something to look at.
>
>> On Sep 12, 2023, at 12:55 PM, Rob Beezer <bee...@privacyport.com> wrote:
>>
>> Dear Shaun,
>>
>> Have you studied this?
>>
>> Section 5.6: Directory Management
>> https://pretextbook.org/doc/guide/html/processing-directory-management.html <https://pretextbook.org/doc/guide/html/processing-directory-management.html>
>>> https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%40googlegroups.com> <https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pretext-support/4b76246b-584c-41ed-a94f-413c506c8e6an%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 to pretext-suppo...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pretext-support/MTAwMDAzOC5iZWV6ZXI.1694541365%40quikprotect <https://groups.google.com/d/msgid/pretext-support/MTAwMDAzOC5iZWV6ZXI.1694541365%40quikprotect>.
>
> --
> Mitch Keller
> mi...@rellek.net
>
> http://www.rellek.net/ <http://www.rellek.net/>
>
> --
> 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
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/6cb89818-5871-4b74-ad6e-f30ccbc2e427n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/6cb89818-5871-4b74-ad6e-f30ccbc2e427n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Shaun Ramsey

unread,
Sep 13, 2023, 11:41:49 AMSep 13
to pretext...@googlegroups.com
There's the rub. Thanks.

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/pKELxn016hY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAwNS5iZWV6ZXI.1694619579%40quikprotect.
Reply all
Reply to author
Forward
0 new messages