summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html')
-rw-r--r--Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html b/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html
new file mode 100644
index 00000000000..23a5dd9ab39
--- /dev/null
+++ b/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-mpprologues.html
@@ -0,0 +1,83 @@
+<head>
+<title>UK TeX FAQ -- question label mpprologues</title>
+</head><body>
+<h3>Making MetaPost output display in <i>ghostscript</i></h3>
+<p>MetaPost ordinarily expects its output to be included in some context
+where the 'standard' Metafont fonts (that you've specified) are already
+defined - for example, as a figure in TeX document. If you're
+debugging your MetaPost code, you may want to view it in
+<i>ghostscript</i> (or some other PostScript previewer). However,
+the PostScript 'engine' in <i>ghostscript</i> <em>doesn't</em>
+ordinarily have the fonts loaded, and you'll eperience an error such
+as
+<blockquote>
+<pre>
+Error: /undefined in cmmi10
+</pre>
+</blockquote>
+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'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're suffering such problems (the symptom is that
+characters disappear, or are wrongly presented) the only solution is
+to view the 'original' 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>
+or by issuing a shell command such as
+<blockquote>
+<pre>
+mp '\prologues:=2; input MyFigure'
+</pre>
+</blockquote>
+(which will work without the quote marks if you'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>
+Processing the resulting DVI file with the <i>dvips</i>
+command
+<blockquote>
+<pre>
+dvips -E -o MyFigure.eps MyFigure
+</pre>
+</blockquote>
+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's, by
+Dan Luecking. Dan'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>
+</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>