#!/bin/sh # mftest -- script to test the mf version of a single picture file # # Usage: mftest file # # e.g. copy ex01.m4 here and type ./mftest ex01 # Invokes m4 on file.m4, and builds the resulting picture in file.ps # NOTE: On some machines, change all occurrences of \\ to \ below. LIBS="$HOME/lib/mfpic.m4 $HOME/lib/libcct.m4 $HOME/lib/liblog.m4" BS=\\\\ # BS=\\ # PRINTER=-Pljfour echo "\documentclass{article} \usepackage{mfpic} \makeatletter \def"${BS}"bfig{\@ifnextchar[{\@bfig}{\@bfig[t]}} \def\@bfig[#1]{ "${BS}"begin{figure}[#1] "${BS}"begin{center} } \makeatother "${BS}"newcommand{\efig}[2]{ "${BS}"caption{#1} \label{#2} \end{figure} } "${BS}"begin{document} \opengraphsfile{"$1"mfpic} %{This is a test of the -m option of dpic (mfpic output).}" > $1.tex # "${BS}"bfig"${BS}"begin{minipage}{"${BS}"textwidth}" > $1.tex m4 -B16000 $LIBS $1.m4 | dpic -m >> $1.tex # echo "\end{minipage}\efig{}{1} echo " "${BS}"closegraphsfile \end{document}" >> $1.tex latex $1 MFINPUTS=.:/usr2/local/lib/mf/inputs: \ mf "\mode:=localfont; scrollmode; input "$1mfpic < /dev/null gftopk $1mfpic.*gf $1mfpic.pk TEXFORMATS=.: TEXFONTS=.: latex $1 TEXPKS=.: dvips $PRINTER $1 -o