diff options
-rwxr-xr-x | bin/tex2pdf | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/tex2pdf b/bin/tex2pdf index d892300..d11c830 100755 --- a/bin/tex2pdf +++ b/bin/tex2pdf @@ -98,6 +98,7 @@ function cleanup() } render_diags() { + echo "Rendering diagrams to pdfs." if [ -d "${dirname}/diag/" ] && [ -x /usr/bin/seqdiag ] ; then for _diag in "${dirname}/diag/"*.diag; do seqdiag -T 'PDF' "${_diag}" @@ -105,10 +106,22 @@ render_diags() { fi } +render_svgs() { + echo "Rendering SVGs to pdfs." + for dir in "${dirname}/images" "${dirname}/../images"; do + if [ -d "${dir}" ]; then + for svg in "${dir}/"*; do + inkscape -D -z -A "${svg%\.svg}".pdf "${svg}" + done + fi + done +} + probe_extension $1 get_filename $1 get_dirname $1 render_diags +render_svgs echo "tex2pdf: Converting $filename$input_suffix to $filename$output_suffix." probe_tools create_pdf |