summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
committerKarl Berry <karl@freefriends.org>2009-05-22 23:51:44 +0000
commit566f5207d7e3cafb0633d31277067336ccd9cca7 (patch)
tree7af53e7ac405185168bc1dc38c4e820f442b78d0 /Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html
parentb0beea26ffffd915bb6d9b82f2d65a0a05b7e23b (diff)
move generic english documents out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13396 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html
new file mode 100644
index 00000000000..848e6932446
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-mpprologues.html
@@ -0,0 +1,84 @@
+<head>
+<title>UK TeX FAQ -- question label mpprologues</title>
+</head><body>
+<h3>Displaying MetaPost output in <i>ghostscript</i></h3>
+<p/>MetaPost ordinarily expects its output to be included in some context
+where the &lsquo;standard&rsquo; Metafont fonts (that you&rsquo;ve specified) are already
+defined &mdash; for example, as a figure in TeX document. If you&rsquo;re
+debugging your MetaPost code, you may want to view it in
+<i>ghostscript</i> (or some other PostScript previewer). However,
+the PostScript &lsquo;engine&rsquo; in <i>ghostscript</i> <em>doesn&rsquo;t</em>
+ordinarily have the fonts loaded, and you&rsquo;ll experience an error such
+as
+<blockquote>
+<pre>
+Error: /undefined in cmmi10
+</pre>
+</blockquote><p>
+There is provision in MetaPost for avoiding this problem: issue the
+command <code>prologues := 2;</code> at the start of the <code>.mp</code> file.
+<p/>Unfortunately, the PostScript that MetaPost inserts in its output,
+following this command, is incompatible with ordinary use of the
+PostScript in inclusions into (La)TeX documents, so it&rsquo;s best to
+make the <code>prologues</code> command optional. Furthermore, MetaPost takes a
+very simple-minded approach to font encoding: since TeX font
+encodings regularly confuse sophisticated minds, this can prove
+troublesome. If you&rsquo;re suffering such problems (the symptom is that
+characters disappear, or are wrongly presented) the only solution is
+to view the &lsquo;original&rsquo; MetaPost output after processing through
+LaTeX and <i>dvips</i>.
+<p/>Conditional compilation may be done either
+by inputting <i>MyFigure.mp</i> indirectly from a simple wrapper
+<i>MyFigureDisplay.mp</i>:
+<blockquote>
+<pre>
+prologues := 2;
+input MyFigure
+</pre>
+</blockquote><p>
+or by issuing a shell command such as
+<blockquote>
+<pre>
+mp '\prologues:=2; input MyFigure'
+</pre>
+</blockquote><p>
+(which will work without the quote marks if you&rsquo;re not using a Unix
+shell).
+<p/>A suitable LaTeX route would involve processing
+<i>MyFigure.tex</i>, which contains:
+<blockquote>
+<pre>
+\documentclass{article}
+\usepackage{graphicx}
+\begin{document}
+\thispagestyle{empty}
+\includegraphics{MyFigure.1}
+\end{document}
+</pre>
+</blockquote><p>
+Processing the resulting DVI file with the <i>dvips</i>
+command
+<blockquote>
+<pre>
+dvips -E -o MyFigure.eps MyFigure
+</pre>
+</blockquote><p>
+would then give a satisfactory Encapsulated PostScript file. This
+procedure may be automated using the <i>Perl</i> script
+<i>mps2eps</i>, thus saving a certain amount of tedium.
+<p/>The Plain TeX user may use an adaptation of a jiffy of Knuth&rsquo;s, by
+Dan Luecking. Dan&rsquo;s version <i>mpsproof.tex</i> will work under
+TeX to produce a DVI file for use with <i>dvips</i>, or
+under PDFTeX to produce a PDF file, direct. The output is
+set up to look like a proof sheet.
+<p/>A script application, <i>mptopdf</i>, is available in recent
+(La)TeX distributions: it seems fairly reliably to produce
+PDF from MetaPost, so may reasonably be considered an answer to
+the question...
+<dl>
+<dt><tt><i>mps2eps</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/support/mps2eps.zip">support/mps2eps</a> (<a href="ftp://cam.ctan.org/tex-archive/support/mps2eps.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/support/mps2eps/">browse</a>)
+<dt><tt><i>mpsproof.tex</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/graphics/metapost/contrib/misc/mpsproof.tex">graphics/metapost/contrib/misc/mpsproof.tex</a>
+<dt><tt><i>mptopdf</i></tt><dd>Part of <a href="ftp://cam.ctan.org/tex-archive/macros/pdftex/graphics.zip">macros/pdftex/graphics</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/pdftex/graphics.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/pdftex/graphics/">browse</a>)
+</dl>
+<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=mpprologues">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=mpprologues</a>
+</body>