diff --git a/sch2fig/sch2pdf b/sch2fig/sch2pdf index 105c0d6..9e1dae9 100755 --- a/sch2fig/sch2pdf +++ b/sch2fig/sch2pdf @@ -22,7 +22,8 @@ usage() { cat <&2 -usage: $0 [-o output.pdf] [-q] [-t template.fig ] file.lib ... file.sch +usage: $0 [-n first_num] [-o output.pdf] [-q] [-t template.fig ] + file.lib ... file.sch EOF exit 1 } @@ -31,8 +32,11 @@ EOF out=out.pdf quiet=false template= +num=1 while [ "$1" ]; do case "$1" in + -n) num=$2 + shift 2;; -o) out=$2 shift 2;; -q) quiet=true @@ -73,7 +77,8 @@ while read line; do file=${file%%\"*} $quiet || echo "$file" 1>&2 - ./sch2fig "-DTITLE=$name" $template $libs `dirname "$1"`/$file | + ./sch2fig "-DTITLE=$name" -DNUMBER=$num $template \ + $libs `dirname "$1"`/$file | fig2dev -L pdf >_tmp.pdf if $first; then mv _tmp.pdf "$out" @@ -82,5 +87,6 @@ while read line; do pdfunite "$out" _tmp.pdf _tmp2.pdf mv _tmp2.pdf "$out" fi + num=`expr $num + 1` done <"$1" exit