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:
Development state: alpha version
INSTALL and USE in SageMath Cloud (SMC)
1. Create an account in SMC `https://cloud.sagemath.com`_,
- 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+https://github.com/jpedroan/megua
4. Run for initialization:
$ megua
5. Change working options with (portuguese: for siacua system see bellow):
$ open ~/.megua/conf.py
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 (siacua.web.ua.pt).
- 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 'conf.py' com:
$ open ~/.megua/conf.py
- Contacto luisd@ua.pt ou pedrocruz@ua.pt 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
HISTORY
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](https://pt.wikipedia.org/wiki/L%C3%ADngua_portuguesa):
- MEGUA PACKAGE FOR PARAMETERIZED EXERCISES: people, works, seminars, and related things.
- Tutorial (portuguese): concepts and practice.
Presented at:
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.
DEVELOPMENT NOTES
- 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()
- sage_server.py: 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, http://thecodeship.com/patterns/guide-to-python-function-decorators/
- http://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/function_factory.html
Answered questions by SMC team
-
startup file for sagews
-
about "salvus"
HTML and Links
Images
END