Thứ Hai, 17 tháng 2, 2014

Test Đại số máy tính

  1. Máy của bạn là máy Ubuntu. Với máy tính MS Windows tôi sẽ có hướng dẫn sau.
  2. Đã cài đặt TeXLive, giac, TeXmaker (trong Ubuntu)
  3. Mở TeXmaker, Options, Configure TeXmaker, chọn  Command điều chỉnh dòng pdflatex như sau:
pdflatex -synctex=1 --shell-escape -interaction=nonstopmode %.tex

Copy code sau và dán vào TeXmaker:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\documentclass[12pt]{article}
\usepackage{moreverb}
\newcommand{\executGiac}[1]{
\immediate\write18{giac <#1 } }
\begin{document}
\begin{verbatimwrite}{test2.in}
maple_mode(0);
Sortie:=fopen("test2.out.tex");
1/2+1/3;
Resultat:=cat("\$\$",latex(ans()),"\$\$");
diff(sin(x^2),x);
Resultat:=cat(Resultat," ","\$\$",latex(ans()),"\$\$");
int(exp(x)*cos(x),x);
Resultat:=cat(Resultat," ","\$\$",latex(ans()),"\$\$");
fprint(Sortie,Unquoted,Resultat);
fclose(Sortie);
\end{verbatimwrite}
\executGiac{test2.in}
\input{test2.out}
\end{document}

Tốt nhất là download file test.tex
Sau đó:
  1. Trong Ubuntu, bấm vào logo Ubuntu ở góc trái trên màn hình (Dash home) để  mở Search, chọn phạm trù Office, sẽ thấy TeXMaker. Khi mở được TeXMaker trong Ubuntu thì mọi việc như thực hiện trong MS Windows.
  2. Nếu chạy được file test.tex, nghĩa là đại số máy tính đã hiện hữu trên máy tính Ubuntu của bạn. Phản hồi nếu có bất cứ ý kiến nào.

Không có nhận xét nào:

Đăng nhận xét