File: mptest

package info (click to toggle)
circuit-macros 10.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,532 kB
  • sloc: makefile: 909; sh: 49
file content (27 lines) | stat: -rwxr-xr-x 685 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# mptest -- script to process a single picture file through MetaPost
#           to produce an eps file
#
# Usage: ./mptest file
# You may have to make this file executable first.
#
# e.g. copy ex01.m4 here and type ./mptest ex01
# Starting with file.m4, invoke m4, dpic -s, and MetaPost to produce file.1

LIBS=mpost.m4

rm -f $1.ps F$1.* $1.1 $1.mp $1.pic
m4 $LIBS $1.m4 > $1.pic

# Write the LaTeX heading.  The = signs get translated to backslashes
#
( echo 'verbatimtex
=documentclass[11pt]{article}
=usepackage{times,boxdims}=usepackage{graphicx}
=usepackage{siunitx}
=begin{document} etex
') | tr '=' '\134' > $1.mp

dpic -s $1.pic >> $1.mp

TEX=latex mpost $1.mp end