Skip to content


Browse files Browse the repository at this point in the history
Rewrite tikz IDs to prevent collisions when merging files
  • Loading branch information
lukasschwab committed May 23, 2021
1 parent dbae4ec commit 9401b3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tikz2svg
Expand Up @@ -19,4 +19,7 @@ xelatex -interaction=batchmode -output-directory="/tmp" -jobname="$intermediate"
pdf2svg "/tmp/$intermediate.pdf" "$filename.svg"
# Clean up intermediates.
rm /tmp/$intermediate*
# Rewrite IDs to prevent collisions between generated SVGs.
sed -i '' "s/ id=\"/ id=\"$filename-/g; s/\"#/\"#$filename-/g" "$filename.svg"

blog info "Wrote $filename.svg"

0 comments on commit 9401b3a

Please sign in to comment.