2

I am trying to run the following beamer class file containging some PStricks codes (generated by Geogebra) in the sequence Latex+Dvips+ps2pdf+viewpdf in Texmaker (for Ubuntu 12.04):

\documentclass[10pt,a4paper]{beamer}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multimedia}
\usepackage{graphicx}
\usepackage{textpos}
\usepackage{graphicx}
\usepackage{pstricks}
\usetheme{CambridgeUS}%NICe
\usefonttheme{serif}
\setbeamercolor{normal text}{bg=white!100}%}, fg=black!100}
\begin{document}
\begin{frame}{Sample}
\begin{block}{Sample}
\begin{figure}[h]
\psset{xunit=0.2cm,yunit=0.2cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-26.85,-7.45)(50.42,28.24)
\psline(-26,10)(-14,10)
\psline(-14,10)(-2,16)
\psline(-26,4)(-14,4)
\psline(-14,10)(-2,4)
\end{pspicture*}
\end{figure}
\end{block}
\end{frame}
\end{document}

But when I compile this code, Texmaker gives me the following error message :

"! Graphics parameter `algebraic' not defined..
\@pstrickserr ... immediate help.}\errmessage {#1}
\endgroup
l.187 \end{frame}"

I can't understand what could be the problem. I need some help !

3
  • Sounds like you don't have the proper package version, or the package isn't linked to texmaker properly. – 1010011010 Jul 19 '14 at 8:10
  • ya most probably. All these days I had used texmaker in Windows and there was an option to install missing packages in Miktex but in Linux, Miktex is not required. So how do I install missing packages here? Do you have any idea about it ? – Debashish Jul 19 '14 at 8:14
  • Installing packages (tex.stackexchange.com/search?q=installing+packages) and updating packages (tex.stackexchange.com/search?q=updating+packages) depend on what TeX distribution you have installed. There's a search function at the top right corner of the site that will allow you to search existing answers on the subject - The general outline of installation (for me) is: - download .sty off CTAN; - create a directory in your tex distribution at the right location (for me its /2013/texmf-dist/tex/latex/); - run texhash in your command prompt/command line. Good luck! – 1010011010 Jul 19 '14 at 8:44
2

algebraic=true option is used to let us write the math expression in infix form. algebraic=false which is default prompts as to write the math expression in postfix form (aka Reverse Polish Notation or RPN for short).

In your code below, algebraic option is not needed because no part in your code need infix math expression. Just remove the algebraic=true. Also remove \usepackage{pstricks} as you did it twice.

\documentclass[10pt,a4paper]{beamer}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multimedia}
\usepackage{textpos}
\usepackage{graphicx}
\usepackage{pstricks}
\usetheme{CambridgeUS}%NICe
\usefonttheme{serif}
\setbeamercolor{normal text}{bg=white!100}%}, fg=black!100}
\begin{document}
\begin{frame}{Sample}
\begin{block}{Sample}
\begin{figure}[h]
\psset{xunit=0.2cm,yunit=0.2cm,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-26.85,-7.45)(50.42,28.24)
\psline(-26,10)(-14,10)
\psline(-14,10)(-2,16)
\psline(-26,4)(-14,4)
\psline(-14,10)(-2,4)
\end{pspicture*}
\end{figure}
\end{block}
\end{frame}
\end{document}

enter image description here

0

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.