%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% giac/hevea interaction code definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Use one of the environment \begin{giacjs}...\end{giacjs} or \begin{giacjsonline}...\end{giacjsonline}
%% to load the javascript code (from hard disk or Internet)
%% Commands \giacinput{} or \giacinputmath{} or \giacinputbigmath{}
%% \giaccmd{} or \giaccmdmath{} or \giaccmdbigmath{}
%% or \begin{giacprog}...\end{giacprog}
\usepackage{hevea}
\usepackage{listings}
\usepackage{fancyvrb}
\ifhevea
\newcommand\giacmathjax[1][3]{
\usepackage[auto]{mathjax}
\renewcommand{\jax@meta}{\begin{rawhtml}
\end{rawhtml}}
}
\newenvironment{giacjs}[1]["max-height: 500px; overflow:auto"]
{\loadgiacmain{#1}
}
{\loadgiaccontrol
\loadgiacscriptstart
\loadgiacscript["file:///usr/share/giac/doc/"]
\loadgiacscriptend
}
\newenvironment{giacjshere}[1]["max-height: 500px; overflow:auto"]
{\loadgiacmain{#1}
}
{\loadgiaccontrol
\loadgiacscriptstart
\loadgiacscript[""]
\loadgiacscriptend
}
\newenvironment{giacparijs}[1]["max-height: 500px; overflow:auto"]
{\loadgiacmain{#1}
}
{
\loadgiaccontrol
\loadgiacscriptstart
\@print{
}
\loadgiacscriptend
}
\newenvironment{giacjsonline}[1]["max-height: 500px; overflow:auto"]
{\loadgiacmain{#1}
}
{
\loadgiaccontrol
\loadgiacscriptstart
\loadgiacscript["https://www-fourier.univ-grenoble-alpes.fr/~parisse/"]
\loadgiacscriptend
}
\newenvironment{giacparijsonline}[1]["max-height: 500px; overflow:auto"]
{\loadgiacmain{#1}
}
{
\loadgiaccontrol
\loadgiacscriptstart
\@print{
}
\loadgiacscriptend
}
\else
\newcommand\giacmathjax{}
\newenvironment{giacjs}[1]["max-height: 500px; overflow:auto"]{}{}
\newenvironment{giacjshere}[1]["max-height: 500px; overflow:auto"]{}{}
\newenvironment{giacparijs}[1]["max-height: 500px; overflow:auto"]{}{}
\newenvironment{giacjsonline}[1]["max-height: 500px; overflow:auto"]{}{}
\newenvironment{giacparijsonline}[1]["max-height: 500px; overflow:auto"]{}{}
\fi
\newcommand{\loadgiacscript}[1][""]{
\ifhevea
\@print{
}
\fi
}
\newcommand{\loadgiacscriptstart}{
\ifhevea
\@print{
}
\fi
}
\newcommand{\loadgiacmain}[1]{
\ifhevea
\@print{
}
\fi
}
\newcommand{\loadgiaccontrol}{
\ifhevea
\@print{
}
\fi
}
\ifhevea
\newcommand{\loadgiacscriptend}{
\@print{
}
}
\else
\newcommand{\loadgiacscriptend}{}
\fi
\ifhevea
\newcommand{\giacpython}{
\@print{onload}
}
\newenvironment{giacprog}{
\verbatim}
{\endverbatim
\@print{
}
}
\newenvironment{pythonprog}{
\verbatim}
{\endverbatim
\@print{
}
}
\newenvironment{giaconload}{
\verbatim}
{\endverbatim
\@print{onload
}
}
\newenvironment{pythononload}{
\verbatim}
{\endverbatim
\@print{onload
}
}
\newenvironment{giaconloadhide}{
\verbatim}
{\endverbatim
\@print{onload
}
}
\newenvironment{pythononloadhide}{
\verbatim}
{\endverbatim
\@print{onload
}
}
\else
\newcommand\giacpython{}
\newenvironment{giacprog}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\newenvironment{pythonprog}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\newenvironment{giaconload}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\newenvironment{pythononload}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\newenvironment{giaconloadhide}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\newenvironment{pythononloadhide}
{
\VerbatimEnvironment
\begin{Verbatim}
}
{
\end{Verbatim}
}
\fi
% for example \giaccmd{factor}{x^4-1}
\newcommand{\giaccmd}[3][style="width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2(#3)@
\fi
}
\newcommand{\pythoncmd}[3][style="width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2(#3)@
\fi
}
\newcommand{\giacinput}[2][style="width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\pythoninput}[2][style="width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\giachidden}[3][style="display:none;width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\pythonhidden}[3][style="display:none;width:400px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\giacinputbig}[2][style="width:800px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\pythoninputbig}[2][style="width:800px;font-size:large"]{
\ifhevea
\@print{
}
\else
\lstinline@#2@
\fi
}
\newcommand{\giaccmdmath}[3][style="width:400px;font-size:large"]{\ifhevea
\begin{rawhtml}
\end{rawhtml}
\else
\lstinline@#2(#3)@
\fi
}
\newcommand{\giacinputmath}[2][style="width:400px;font-size:large"]{\ifhevea
\begin{rawhtml}
\end{rawhtml}
\else
\lstinline@#2@
\fi
}
\newcommand{\giachiddenmath}[3][style="display:none;width:400px;font-size:large"]{\ifhevea
\begin{rawhtml}
\end{rawhtml}
\else
\lstinline@#2@
\fi
}
\newcommand{\giaccmdbigmath}[3][style="width:800px;font-size:large"]{\ifhevea
\begin{rawhtml}
\end{rawhtml}
\else
\lstinline@#2(#3)@
\fi
}
\newcommand{\giacinputbigmath}[2][style="width:800px;font-size:large"]{\ifhevea
\begin{rawhtml}\end{rawhtml}
\else
\lstinline@#2@
\fi
}
\newcommand{\giaclink}[2][Tester en ligne]{\ifhevea
\begin{rawhtml}\end{rawhtml}
\@getprint{#1}
\begin{rawhtml}\end{rawhtml}
\else
\fi
}
% \giacslider{name}{mini}{maxi}{step}{value}{prog}
\newcommand{\giacslider}[6]{
\ifhevea
\begin{rawhtml}
Not evaled
\end{rawhtml}
\else
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% giac/hevea end code definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%