Aurel Page on Mon, 11 Mar 2024 11:32:58 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: which LaTeX package for Pari/GP scripts ?


Dear Joël,

Have you tried simply using verbatim?

Cheers,
Aurel

On 11/03/2024 11:28, Joël Bleuse wrote:

Hello,

I'm currently writing an article where most results were computed with a Pari/GP script. I would like to include it in the methods section, and tried the 'listings' package to do so. Unfortunately, this package does not properly handle Pari comments (\\ seems to be a nightmare for LaTeX).

I even tired to define Pari as a new language, with :

\lstdefinelanguage{parigp}
{    morekeywords={for,if,sum,binomial,my,eval,print,return,vector,write},%
    sensitive=true,%
    morecomment=[l]{//},%
    morecomment=[s]{/*}{*/},%
    literate={//}{\textbackslash\textbackslash}{2},
}

but to no avail...

Which package would you recommend for Pari scripts ? Would it need tweaks ?

Thanks,

    Joël