Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
fichiers:postscript:afficher_la_sortie_de_metapost_dans_ghostscript [2018/06/03 13:37] d.p.carlisle5_fichiers:postscript:afficher_la_sortie_de_metapost_dans_ghostscript [2023/12/28 20:18] (Version actuelle) – Remise en forme. jejust
Ligne 1: Ligne 1:
---- +====== Displaying MetaPost output in ghostscript” ====== 
-title: Displaying MetaPost output in `ghostscript+
-category: graphics +
-permalink: /FAQ-mpprologues +
----+
  
 MetaPost ordinarily expects its output to be included in some context MetaPost ordinarily expects its output to be included in some context
 where the "standard" MetaFont fonts (that you've specified) are already where the "standard" MetaFont fonts (that you've specified) are already
-defined — for example, as a figure in TeX document.  If you're +defined --- for example, as a figure in TeX document.  If you're debugging 
-debugging your MetaPost code, you may want to view it in a +your MetaPost code, you may want to view it in a 
-[`ghostscript`](https://www.ghostscript.com/)-based (or some+''[[https://www.ghostscript.com/|ghostscript]]''-based (or some
 other PostScript) previewer, but note that viewers (even other PostScript) previewer, but note that viewers (even
-[`ghostscript`](https://www.ghostscript.com/)+''[[https://www.ghostscript.com/|ghostscript]]''//don't// ordinarily 
-_don't_ ordinarily have the fonts loaded, and you'll experience +have the fonts loaded, and you'll experience an error such as 
-an error such as +<code>
-```latex+
 Error: /undefined in cmmi10 Error: /undefined in cmmi10
-```+</code> 
 There is provision in MetaPost for avoiding this problem: issue the There is provision in MetaPost for avoiding this problem: issue the
-command `prologues := 2;at the start of the `mpfile.+command «''prologues := 2;''» at the start of the ''mp'' file.
  
 Unfortunately, the PostScript that MetaPost inserts in its output, Unfortunately, the PostScript that MetaPost inserts in its output,
 following this command, is incompatible with ordinary use of the following this command, is incompatible with ordinary use of the
 PostScript in inclusions into (La)TeX documents, so it's best to PostScript in inclusions into (La)TeX documents, so it's best to
-make the `prologuescommand optional.  Furthermore, MetaPost takes a+make the ''prologues'' command optional.  Furthermore, MetaPost takes a
 very simple-minded approach to font encoding: since TeX font very simple-minded approach to font encoding: since TeX font
 encodings are anything but simple, encoding of text in diagrams are encodings are anything but simple, encoding of text in diagrams are
Ligne 30: Ligne 27:
 characters disappear, or are wrongly presented) the solution is characters disappear, or are wrongly presented) the solution is
 to view the "original" MetaPost output after processing through to view the "original" MetaPost output after processing through
-LaTeX and `dvips`.+LaTeX and ''dvips''.
  
-Conditional compilation may be done either +Conditional compilation may be done either by inputting ''MyFigure.mp'' 
-by inputting `MyFigure.mpindirectly from a simple wrapper +indirectly from a simple wrapper ''MyFigureDisplay.mp''
-`MyFigureDisplay.mp`+ 
-```latex+<code>
 prologues := 2; prologues := 2;
 input MyFigure input MyFigure
-```+</code>
 or by issuing a shell command such as or by issuing a shell command such as
-```latex+ 
 +<code bash>
 mp "\prologues:=2; input MyFigure" mp "\prologues:=2; input MyFigure"
-``` +</code> 
-(which will work without the quote marks if you're not using a Unix +(which will work without the quote marks if you're not using a Unix shell).
-shell).+
  
 A suitable LaTeX route would involve processing A suitable LaTeX route would involve processing
-`MyFigure.tex`, which contains: +''MyFigure.tex'', which contains: 
-```latex+ 
 +<code latex MyFigure.tex>
 \documentclass{article} \documentclass{article}
 \usepackage{graphicx} \usepackage{graphicx}
Ligne 55: Ligne 53:
 \includegraphics{MyFigure.1} \includegraphics{MyFigure.1}
 \end{document} \end{document}
-``` +</code> 
-Processing the resulting DVI file with the `dvips+ 
-command +Processing the resulting DVI file with the ''dvips'' command 
-```latex+<code bash>
 dvips -E -o MyFigure.eps MyFigure dvips -E -o MyFigure.eps MyFigure
-```+</code>
 would then give a satisfactory Encapsulated PostScript file.  This would then give a satisfactory Encapsulated PostScript file.  This
-procedure may be automated using the `Perlscript +procedure may be automated using the Perl script ''mps2eps'', 
-`mps2eps`, thus saving a certain amount of tedium.+thus saving a certain amount of tedium.
  
 The Plain TeX user may use an adaptation, by The Plain TeX user may use an adaptation, by
 Dan Luecking, of a jiffy of Knuth's.  Dan's version Dan Luecking, of a jiffy of Knuth's.  Dan's version
-[`mpsproof.tex`](https://ctan.org/pkg/obsolete) will work under +[[ctanpkg>obsolete|mpsproof.tex]will work under 
-TeX to produce a DVI file for use with `dvips`, or+TeX to produce a DVI file for use with ''dvips'', or
 under pdfTeX to produce a PDF file, direct.  The output is under pdfTeX to produce a PDF file, direct.  The output is
 set up to look like a proof sheet. set up to look like a proof sheet.
  
-A script application, `mptopdf`, is available in recent+A script application, ''mptopdf'', is available in recent
 (La)TeX distributions: it seems fairly reliably to produce (La)TeX distributions: it seems fairly reliably to produce
 PDF from MetaPost, so may reasonably be considered an answer to PDF from MetaPost, so may reasonably be considered an answer to
-the question&hellip;+the question... 
 + 
 + 
 +----- 
 +//Source:// [[faquk>FAQ-mpprologues|Displaying MetaPost output in `ghostscript`]]
  
 +{{htmlmetatags>metatag-keywords=(LaTeX,graphics,Metapost,Postscript output)
 +metatag-og:title=(Displaying MetaPost output in “ghostscript”)
 +metatag-og:site_name=(FAQ LaTeX francophone)
 +}}
  
5_fichiers/postscript/afficher_la_sortie_de_metapost_dans_ghostscript.1528033072.txt.gz · Dernière modification : 2018/06/03 13:37 de d.p.carlisle
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0