Errori su pacchetto pstricks

  • Creatore
    Topic
  • #30884
    Up
    0
    Down
    ::


    Buongiorno a tutti,
    sto provando a muovere i primi passi con pstricks ma ho un errore fin dal primo banale esempio trovato in una delle tante presentazioni presenti sul web:
    Presentazione
    Ora, il codice che inserisco è questo:

    `
    \documentclass{article}
    \usepackage{pstricks}

    \begin{document}
    \begin{figure}
    \begin{pspicture}(4,5)
    \psframe(0.7,2)(3.3,3)
    \rput(2,2.5){First Example}
    \end{pspicture}
    \end{figure}
    \end{document}
    `

    ma quando compilo mi da errori come “la presenza di un doppio documentclass o documentstyle che proprio non comprendo…
    Premetto che mi succede sia su ambiente windows sia linux.
    Gli errori sono i seguenti:

    `
    This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2008.9.22) 11 FEB 2009 20:19
    entering extended mode
    %&-line parsing enabled.
    **piripicchio.tex
    (./piripicchio.tex
    LaTeX2e <2005/12/01>
    Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
    yphenation, loaded.
    (/usr/share/texmf-texlive/tex/latex/base/article.cls
    Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
    (/usr/share/texmf-texlive/tex/latex/base/size10.clo
    File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
    )
    \c@part=\count79
    \c@section=\count80
    \c@subsection=\count81
    \c@subsubsection=\count82
    \c@paragraph=\count83
    \c@subparagraph=\count84
    \c@figure=\count85
    \c@table=\count86
    \abovecaptionskip=\skip41
    \belowcaptionskip=\skip42
    \bibindent=\dimen102
    )
    (/usr/share/texmf-texlive/tex/latex/pstricks/pstricks.sty
    Package: pstricks 2006/08/10 v0.32 LaTeX wrapper for `PSTricks' (RN,HV)
    (./pstricks.tex

    ! LaTeX Error: Two \documentclass or \documentstyle commands.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H for immediate help.

    l.1 \documentclass{
    article}
    The document may only declare one class.

    (./piripicchio.aux)
    \openout1 = `piripicchio.aux'.

    LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
    LaTeX Font Info: … okay on input line 4.
    LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
    LaTeX Font Info: … okay on input line 4.
    LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
    LaTeX Font Info: … okay on input line 4.
    LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
    LaTeX Font Info: … okay on input line 4.
    LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
    LaTeX Font Info: … okay on input line 4.
    LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
    LaTeX Font Info: … okay on input line 4.

    ! LaTeX Error: Environment pspicture undefined.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H for immediate help.

    l.6 \begin{pspicture}
    (4,5)
    Your command was ignored.
    Type I to replace it with another command,
    or
    to continue without it.

    ! Undefined control sequence.
    l.7 \psframe
    (0.7,2)(3.3,3)
    The control sequence at the end of the top line
    of your error message was never \def'ed. If you have
    misspelled it (e.g., `\hobx'), type `I' and the correct
    spelling (e.g., `I\hbox'). Otherwise just continue,
    and I'll forget about whatever was undefined.

    ! Undefined control sequence.
    l.8 \rput
    (2,2.5){First Example}
    The control sequence at the end of the top line
    of your error message was never \def'ed. If you have
    misspelled it (e.g., `\hobx'), type `I' and the correct
    spelling (e.g., `I\hbox'). Otherwise just continue,
    and I'll forget about whatever was undefined.

    ! LaTeX Error: \begin{figure} on input line 5 ended by \end{pspicture}.
    [SNIP………]
    `

Visualizzazione 0 filoni di risposte
  • Autore
    Risposte
    • #30885
      robitex
      Amministratore del forum
        Up
        0
        Down
        ::


        Il tuo codice funziona perfettamente.
        Attenzione a compilare con latex e non con pdflatex.

        … o forse la tua installazione è bacata.

        Bye

    Visualizzazione 0 filoni di risposte
    • Devi essere connesso per rispondere a questo topic.

    Go to top