I'm using Yihui Xie's most excellent bookdown package to create my courseguide for BUSINESS 705.

    One problem I have is that I use SVG images. That's all well and good when I am rendering the courseguide as an HTML book, but when I try and produce a PDF, bookdown (well LaTeX) chokes. It's no one's fault really. It's just a fact of life.

    So, I need to convert my SVG images into PDFs. That'll fix the problem.

    The way I do it is

    inkscape mygraph.svg --export-pdf=mygraph.pdf


    I then created a Makefile to cycle through all the SVGs in the images director and convert them. I'm not sure how smart the Makefile is, but it works.

    # Convert the SVG files to PDFs
    SVGFILES := $(wildcard *.svg)
    all: $(SVGFILES:%.svg=%.pdf)
    %.pdf : %.svg
        inkscape --export-pdf $*.pdf $*.svg

    If you webmention this page, please let me know the URL of your page.

    BTW: Your webmention won't show up until I next "build" my site.

    Word count: 200 (about 1 minutes)


    Updated: 13 Jun '18 14:47

    Author: Peter Smith


    Section: blog

    Kind: page

    Bundle type: leaf

    Source: blog/2018/06/13/svg-to-pdf/