0
\documentclass{article}
\everymath{\displaystyle}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[estonian]{babel}
\usepackage[a4paper]{geometry}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[shellescape]{gmp}
\DeclareMathOperator{\ch}{ch}
\DeclareMathOperator{\sh}{sh}
\renewcommand\leq\leqslant
\renewcommand\geq\geqslant
\DeclareGraphicsRule{.1}{mps}{*}{}

\begin{document}

\begin{mpost*}
outputtemplate := "%j-%c.mps";
beginfig(1);
$ := 1;
for i = -.3cm step .6cm until 3.6cm:
  % draw a line  
  draw (1cm,2cm) -- (3cm,5cm); 
endfor;
endfig;          
\end{mpost*}


\end{document}

enter image description here

1 Answer 1

1

Remove the following line

outputtemplate := "%j-%c.mps";

and compile with

pdflatex --shell-escape your_file_name.tex
1
  • 1
    Additionally, beginfig(1) and endfig are also not needed and can be removed.
    – Marijn
    Commented Dec 27, 2019 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .