Having a lot of trouble getting my images to work

17 views
Skip to first unread message

Jennifer Nordstrom

unread,
Dec 26, 2017, 1:36:02 PM12/26/17
to MathBook XML Support
I am trying to add TikZ images to my book. Here is what I'm trying. I add the new <latex-image> with the tikz code (as I have done before). Then I run xsltproc -xinclude ~/mathbook/xsl/mathbook-latex.xsl ~/books/igt/mbx-src/index.mbx (which seems to work). Then I do pdflatex index.tex (which also seems to work). Then I do /Users/jfirkins/mathbook/script/mbx -vv -c latex-image -f svg -d images /Users/jfirkins/books/igt/mbx-src/index.mbx   which now gives me an error--

 File "/Users/jfirkins/mathbook/script/mbx", line 1375, in <module>
    latex_image_conversion(args.xml_file, args.xmlid, args.data_dir, output_dir, 'svg')
  File "/Users/jfirkins/mathbook/script/mbx", line 165, in latex_image_conversion
    dest_dir = sanitize_directory(dest_dir)
  File "/Users/jfirkins/mathbook/script/mbx", line 1230, in sanitize_directory
    raise ValueError('directory {} does not exist'.format(dir))
ValueError: directory /Users/jfirkins/images does not exist

I don't know whether this is a problem. But the new image does not appear and my old images are shifted--so if I put the new image in as my second image, I get my old second image in its place, etc. So it is clearly trying to put an image where I want the new one, it just isn't creating the new one. I really don't feel like I know what I am doing with these images at all. I also need some of these images to use the sidbyside rather than figure tag. That didn't seem to make a difference, though. I go the exact same output.

Thanks for any help with this.

Keller, Mitch

unread,
Dec 26, 2017, 1:43:04 PM12/26/17
to mathbook-x...@googlegroups.com
The last line is the meaningful error. Instead of -d images, I think you need to put the full path for where the images directory should live (/Users/jfirkins/books/…) instead of just images, since right now, it’s looking for an images directory /Users/jfirkins instead of where you want it to live.

--
You received this message because you are subscribed to the Google Groups "MathBook XML Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathbook-xml-sup...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Mitch Keller
Assistant Professor of Mathematics
Washington & Lee University, Lexington VA

Jennifer Nordstrom

unread,
Dec 26, 2017, 2:05:16 PM12/26/17
to MathBook XML Support
Thank you, Mitch!! I got it working now.

Rob Beezer

unread,
Dec 27, 2017, 2:18:32 PM12/27/17
to mathbook-x...@googlegroups.com
Thanks, Mitch, for the fix.

Jen - you are not the first to get bit by this. My fault, which I should make a
priority to fix (so I've labeled it as a "bug").

https://github.com/rbeezer/mathbook/issues/797

Pssssst - we've all moved over to the "pretext-support" list, link on website
main page. See you over there. ;-)

Rob

On 12/26/2017 10:43 AM, Keller, Mitch wrote:
> The last line is the meaningful error. Instead of -d images, I think you need to
> put the full path for where the images directory should live
> (/Users/jfirkins/books/…) instead of just images, since right now, it’s looking
> for an images directory /Users/jfirkins instead of where you want it to live.
>
>> On Dec 26, 2017, at 11:36 AM, Jennifer Nordstrom <jfir...@linfield.edu
>> <mailto:mathbook-xml-sup...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> Mitch Keller
> Assistant Professor of Mathematics
> Washington & Lee University, Lexington VA
> 206 Robinson Hall ~ 540.458.8099 ~ http://www.rellek.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathbook-xml-sup...@googlegroups.com
> <mailto:mathbook-xml-sup...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages