Examples of interactive computations inside a LATEX file compiled to HTML.

B. Parisse
Institut Fourier
UMR 5582 du CNRS
Université de Grenoble




  • giaccmd, 3
  • giaccmdbigmath, 3
  • giaccmdmath, 3
  • giacinput, 3
  • giacinputbig, 3
  • giacinputbigmath, 3
  • giacinputmath, 3
  • giacjs, 3
  • giacjshere, 3
  • giacjsonline, 3
  • giaclink, 3
  • giacprog, 3
  • giacslider, 3

  • index, 3

  • table, 3

1  Description

This LATEX source will output an interactive HTML file if you compile with hevea (tested with hevea 2.23), where interactive computations are done with the computer algebra system Giac.

2  Install

Please install hevea. Copy giac.tex and hevea.sty in the same folder as your source file. You can also get a copy of the source test.tex for this file and check your installation by compiling it
hevea test

3  Commands

You must first enter the command \input{giac.tex} in the preamble of your LATEX source file and add one of the commands \begin{giacjshere} \begin{giacjs} or \begin{giacjsonline} just after \begin{document}: the difference is that the javascript kernel giac.js will either be found from the same place where the file was downloaded or on the hard disk (assuming that Giac/Xcas is installed on the target computer) or downloaded from Giac Internet website. You must also add the corresponding command \end{giacjs} or \end{giacjsonline} just before \end{document}. You should add the command \tableofcontents then \printindex just after \begin{giacjsonline} (and add \makeindex somewhere).

Inline command with Mathml or 2d graph output \giacinputmath{} or \giaccmdmath{}{} :

With an optional style argument



Outline command with mathml output \giacinputbigmath{} or \giaccmdbigmath{}{} :




Inline command example with text or plot output \giacinput and \giacinputbig, example:
\giacinput{factor(x^4-1)} :

Same command with optional style argument

A button with a command applied on the field entry with \giaccmd, example
\giaccmd{factor}{x^4-1} :

with optional style argument

Warning, you must replace < by &lt; and > by &gt;, otherwise they will be interpreted as HTML delimiters.

For a program or multi-line commands
\begin{giacprog}...\end{giacprog}, example homemade absolute value

  local y;
  if x<0 then y:=-x; else y=x; fi;
  return y;

Inside this environment, you can keep < and >. Do not use this environment in another environment (like itemize or enumerate).

A link to Xcas offline with a few commands
Test online

A slider

Not evaled

4  Logo turtle