diff options
author | Karl Berry <karl@freefriends.org> | 2008-04-16 00:48:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-04-16 00:48:06 +0000 |
commit | a35845a36ac2ee5a72f83f3820bf60c59285f07c (patch) | |
tree | c81c1d4244e6e1264709b1d3fadeb9b57ad31c50 /Master/texmf-dist/metapost | |
parent | 206a7fd1b0bc3f4ed9a490a9b8582e08a7b3b020 (diff) |
metapost package dviincl
git-svn-id: svn://tug.org/texlive/trunk@7436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/dviincl/fix_brks.mp | 25 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/dviincl/fix_page.mp | 7 |
2 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/metapost/dviincl/fix_brks.mp b/Master/texmf-dist/metapost/dviincl/fix_brks.mp new file mode 100644 index 00000000000..43ff4e8c48f --- /dev/null +++ b/Master/texmf-dist/metapost/dviincl/fix_brks.mp @@ -0,0 +1,25 @@ +if unknown ifi: string ifi; ifi:="~vicar~.mpx"; fi +if unknown ofi: string ofi; ofi:="~vicar~.mpy"; fi +selected_page:=1; +write "if selected_page=1:" to ofi; +forever: + % re-declaration apparently cures problems with the string pool with + % large DVI files, such as TeXbook.DVI (Oostrum's DOS implementation + % swallows occasionally strings and issues "???" instead) + string l_; l_:=readfrom ifi; + exitif (l_=EOF); + if (l_="mpxbreak"): + l_:="elseif selected_page=" & decimal(incr(selected_page)) & ":"; + fi + write l_ to ofi; +endfor +write "errmessage " & + ditto & "Non-existant page " & decimal(selected_page) & ditto & ";" + to ofi; +write "else:" to ofi; +write "errmessage " & + ditto & "Non-existant page " & ditto & " & decimal(selected_page);" + to ofi; +write "fi" to ofi; +write "endinput" to ofi; +end diff --git a/Master/texmf-dist/metapost/dviincl/fix_page.mp b/Master/texmf-dist/metapost/dviincl/fix_page.mp new file mode 100644 index 00000000000..fe33dc44ef2 --- /dev/null +++ b/Master/texmf-dist/metapost/dviincl/fix_page.mp @@ -0,0 +1,7 @@ +vardef fix_page (expr p_,f_) = + save selected_page; selected_page=p_; + save setbounds; def setbounds text t = enddef; % we'd better ignore it + scantokens ("input " & f_) +enddef; + +endinput |