3

The following problems occurred a week ago. Everything was fine before and the TeX file does compile on my friends computer but does not compile anymore on mine.

When I compile my TeX file I get error messages about the PSTricks:

! Undefined control sequence. \c@lor@to@ps \psframe

I use TeXMaker with MikTeX2.9 on Windows 8. I did already install the packages : \usepackage{pstricks} and \usepackage{pstricks-add}

I compile with the options : latex+dvips+ps2pdf+voir Pdf

I allready uninstall TeXmaker and MikTeX and install them back again.

The code is :

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{amsmath}
\usepackage{dcolumn}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{slashbox}
\usepackage{tabularx}
\usepackage{amsfonts}
\usepackage{amssymb}
\newcommand{\vect}[1]{\mathchoice%
{\overrightarrow{\displaystyle\mathstrut#1\,\,}}%
{\overrightarrow{\textstyle\mathstrut#1\,\,}}%
{\overrightarrow{\scriptstyle\mathstrut#1\,\,}}%
{\overrightarrow{\scriptscriptstyle\mathstrut#1\,\,}}}
\def\Oij{$\left(\text{O},~\vect{\imath},~\vect{\jmath}\right)$}
\def\Oijk{$\left(\text{O},~\vect{\imath},~ \vect{\jmath},~ \vect{k}\right)$}
\def\Ouv{$\left(\text{O},~\vect{u},~\vect{v}\right)$}
\usepackage{pstricks}
\usepackage{pstricks-add}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}
\fancyhead[L]{\textit{Terminale S  }}
\fancyhead[R]{\textit{Année scolaire 2014-2015}}
\fancyfoot[R]{\textit{R.Delpuech}}
\fancyfoot[L]{\textit{Lycée des Mascareignes}}
\usepackage[frenchb]{babel}
\usepackage{xcolor}

\begin{document}

\begin{center}
\textbf{{\Large Introduction au calcul d'aire - Méthode des rectangles}}
\end{center}

\vspace{0.3cm}

\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-2.34,-0.84)(2.46,3.36)
\psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1,Dy=1,ticksize=-2pt 0,subticks=2]{->}(0,0)(-2.34,-0.84)(2.46,3.36)
\psplot[plotpoints=200]{-2.34}{2.46}{x^(2)}
\begin{scriptsize}
\rput[bl](-2.32,5.98){$f$}
\end{scriptsize}
\end{pspicture*}

\end{document}
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Sep 20 '14 at 17:00
  • 1
    That error typically occurs, if you try to compile a pstricks document with pdflatex. Try to use latex instead – user31729 Sep 20 '14 at 17:55
2
% graph.tex
% compile with
% latex graph.tex
% dvips graph.dvi
% ps2pdf -dNOSAFER -dAutoRotatePages=/None graph.ps

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-plot}
\psset
{
    algebraic,
    plotpoints=200,
    labelFontSize=\scriptstyle,
    subticks=2,
}
\begin{document}


\begin{pspicture}(-3.0,-0.5)(3.0,7.0)
\psaxes{->}(0,0)(-2.5,-0.5)(2.5,6.5)[$x$,0][$y$,90]
\psplot{-2.5}{2.5}{x^2}
\end{pspicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.