skip to navigation
skip to content

megua 2016.1.1a1

MEGUA project for SageMath

MEGUA package for SageMath and SageMath Cloud

MEGUA is a package for SageMath for creating parametrized exercises in HTML+MathJAX or LaTeX+PDF files (more formats are planned).

This tutorials are older than code but give a good ideia of the topics of this project:

* `Tutorial em português <http:"" pt="" latest=""/>`_
* `Tutorial in english <http:"" en="" latest=""/>`_
* Contact:

Development state: `alpha version <https:"" wiki="" software_release_life_cycle#alpha="">`_

INSTALL and USE in SageMath Cloud (SMC)

1. Create an account in SMC ``_,

- then create a project;
- other users must create an account
- and then add them to this project.

2. Create a terminal named BASH.term

- Button "+NEW"
- Change name to "BASH"
- Press ">_Terminal" button

3. In the terminal do:

$ sage -pip install --user git+

4. Run for initialization:

$ megua

5. Change working options with (portuguese: for siacua system see bellow):

$ open ~/.megua/

6. Create the first exercise targeting LaTeX (a worksheet will open)

$ megua new E12X34_AddTwoNumbers_001_latex.sagews

7. Create a catalog of all exercises:

$ megua catalog

8. More options with:

$ megua help

MEGUA para o sistema SIACUA (português)

As instruções seguintes são para o sistema SIACUA (

- Devem ser realizados os passos de instalação mencionados acima.

- Em particular, deve ser criado um terminal com nome BASH.term

- O SIACUA requer o nome do curso, um username e uma password de sistema. Para isso deve ser editar '' com:

$ open ~/.megua/

- Contacto ou para ajuda.

- A conversão de exercícios de "SIACUA" para "LaTeX" está satisfatória e outras conversões vão sendo criadas.

Para criar exercícios:

1. Criar um exercício para o SIACUA (esta etapa abre uma janela com o novo exercício)

$ megua new E12X34_AddTwoNumbers_001_siacua.sagews

2. Criar um catálogo com todos os exercícios transcritos para um ficheiro LaTeX (catalog.tex):

$ megua catalog


Started in 2011, MEGUA is an external package for Sagemath for creating parametrized exercises in HTML+MathJAX or LaTeX PDF files. Software docs strings are in english but the following documentation is in [portuguese](

- `MEGUA PACKAGE FOR PARAMETERIZED EXERCISES <http:"" megua="">`_: people, works, seminars, and related things.
- `Tutorial (portuguese) <http:"" pt="" latest=""/>`_: concepts and practice.

Presented at:

- `MEGUA PACKAGE FOR PARAMETERIZED EXERCISES <http:"" view="" cruz2013meg="">`_

There are two branches in this repository:

- **master**: version to be adopted for SageMathCloud use, command-line, etc.
- **old_megua**: running in a non public server from november 2010 to 2015.


* etoolbox.sty: sudo apt-get install texlive-latex-extra

* salvus: /projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews

* from smc_sagews.sage_salvus import salvus #Functions: salvus.file(), salvus.html()

* contains definitions of "def file()" and "def html()", see useful arguments

* decorators dynamically alter the functionality of a function, method or class without having to directly use subclasses,


**Answered questions by SMC team**

- startup file for sagews


- about "salvus"

HTML and Links




File Type Py Version Uploaded on Size
megua-2016.1.1a1.tar.gz (md5)
It needs SageMath
Python Egg 2.7 2016-08-20 491KB