GNU TeXmacs for SFD 2019 @ USTC

2019年软件自由日在中国科学技术大学讲GNU TeXmacs

展开查看详情

1. 1/18 GNU TEXMACS: A Scientific Editing Platform

2. What is GNU TEXMACS 2/18 GNU TEXMACS is a scientific editing platform inspired by TEX and GNU Emacs but not based on TEX or LATEX.  allows you to write structured documents in a wysiwyg way  is suitable as an interface for computer algebra system  can be highly customized as it supports the Guile/Scheme extension language

3. inspired by LATEX 3/18 h\ frac i ! 1 1 ! p h\ sqrt i 1 1 p ! p 2h\ pi i 2 1 1 p ! p 2 h\ sigma i 2  1 1 p h\ mathe i ! p e 2  2 

4.beyond LATEX: quick input 4/18 ⌥F ! 1 1 ! p ⌥S 1 1 q ! p 2P ⇥ 2 1 1 p ! p 2 S ⇥ 2  1 1 p E⇥⇥ ! p e 2  2 

5. from/to LATEX 5/18 1 1 p e () p e 2  2  Edit!Copy to!LaTeX $\frac{1}{\sqrt{2 \pi} \sigma} \mathe$ Edit!Paste from!LaTeX

6. beyond LATEX: semantics 6/18 Shortcut Glyph Example Semantics * ab Multiplication ␣ sin x Function application ,⇥⇥ aij = aji Invisible separator +⇥⇥⇥⇥ 17 3/8 Invisible addition . . 123.456 Decimal point .⇥ . lx. x2 Dot connector *⇥⇥⇥  vw Dot multiplication Table 1. Homoglyphs supported by TEXMACS.

7.beyond LATEX: semantics 7/18 1 − e−2x 1 + e−2x 1 − e−2x−2x 1 + e−2x−2x 1 − e−2x 1 + e−2x−2x 1 − e−2x 1 + e−2x

8. Maxima Session 8/18 1 − e −2x ( % i 2 ) d i f f ( 1 + e−2x , x ) −2x ( % i 1 0 ) d i f f ( 11 − e + e −2x ,x) (%i2)

9. Maxima Session 8/18 1 − e −2x ( % i 2 ) d i f f ( 1 + e−2x , x ) incorrect syntax: x is not an infix operator diff((1-e^(-2*x))/(1-e^(2*x)), x) ^ 1 − e −2x ( % i 1 0 ) d i f f ( 1 + e−2x , x ) (%i2)

10. Maxima Session 8/18 1 − e −2x ( % i 2 ) d i f f ( 1 + e−2x , x ) incorrect syntax: x is not an infix operator diff((1-e^(-2*x))/(1-e^(2*x)), x) ^ 1 − e −2x ( % i 1 0 ) d i f f ( 1 + e−2x , x ) 1  2 log (e) 2 log (e) 1 − 2x (%o10) 1 + 1 e2 e 2x + 1 e2x +1 e2x e2x (%i2)

11. Foldable Session 9/18 Maxima 1 − e −2x d i f f ( 1 + e−2x , x ) Fricas 1 − e −2x D ( 1 + e−2x , x )

12. Foldable Session 9/18 Busy... Fricas 1 − e −2x D ( 1 + e−2x , x )

13. Foldable Session 9/18 Busy... Busy...

14. 10/18 1 1 = x 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ ::: 1 = x 1+x Maxima   1 solve =x 1+x

15.

16. 10/18 1 1 = x 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ 1 1+ ::: 1 = x 1+x Busy:::

17. kbd-map 11/18 Scheme] (kbd-map ("u s t c" (insert "中 国 科学 技 术 大学 "))) Scheme] (kbd-map ("u s t c l u g" (insert "中 国 科 学 技术 大 学 Linux用 户 组"))) Scheme] 中国科学技术大学 中国科学技术大学Linux用户组

18. kbd-map 11/18 Scheme] (kbd-map ("u s t c" (insert "中 国 科学 技 术 大学 "))) ("u s t c") Scheme] (kbd-map ("u s t c l u g" (insert "中 国 科 学 技术 大 学 Linux用 户 组"))) Scheme] 中国科学技术大学 中国科学技术大学Linux用户组

19. kbd-map 11/18 Scheme] (kbd-map ("u s t c" (insert "中 国 科学 技 术 大学 "))) ("u s t c") Scheme] (kbd-map ("u s t c l u g" (insert "中 国 科 学 技术 大 学 Linux用 户 组"))) ("u s t c l u g") Scheme] 中国科学技术大学 中国科学技术大学Linux用户组

20. kbd-map(math) 12/18 Scheme] (kbd-map (:mode in-math?) ("1 /" (begin (math-insert `(frac "1" "")) (go-to-previous-word))))) Scheme] 1 1 1+ 1 1+ 1 1+

21. kbd-map(math) 12/18 Scheme] (kbd-map (:mode in-math?) ("1 /" (begin (math-insert `(frac "1" "")) (go-to-previous-word))))) ("1 /") Scheme] 1 1 1+ 1 1+ 1 1+

22. Graph Session 13/18 dot] help dot] gnuplot gnuplot] plot sin(x) dot] dot dot] digraph G { a -> b; a -> c; a -> d } dot]

23. Graph Session 13/18 dot] help [help, dot, neato, twopi, circo, fdp, sfdp, patchwork, osage, asy, plantuml, mmdc, xypic, tikz, feynmf, latex, pdflatex, gnuplot] dot - graphviz version 2.40.1 (20161225.0304) dot] gnuplot gnuplot] plot sin(x) dot] dot dot] digraph G { a -> b; a -> c; a -> d } dot]

24. Graph Session 13/18 dot] help [help, dot, neato, twopi, circo, fdp, sfdp, patchwork, osage, asy, plantuml, mmdc, xypic, tikz, feynmf, latex, pdflatex, gnuplot] dot - graphviz version 2.40.1 (20161225.0304) dot] gnuplot gnuplot 5.2 patchlevel 6 gnuplot] plot sin(x) dot] dot dot] digraph G { a -> b; a -> c; a -> d } dot]

25. Graph Session 13/18 dot] help [help, dot, neato, twopi, circo, fdp, sfdp, patchwork, osage, asy, plantuml, mmdc, xypic, tikz, feynmf, latex, pdflatex, gnuplot] dot - graphviz version 2.40.1 (20161225.0304) dot] gnuplot gnuplot 5.2 patchlevel 6

26.gnuplot] plot sin(x) 1 sin(x) 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -10 -5 0 5 10 dot] dot dot] digraph G { a -> b; a -> c; a -> d } dot]

27. Graph Session 13/18 dot] help [help, dot, neato, twopi, circo, fdp, sfdp, patchwork, osage, asy, plantuml, mmdc, xypic, tikz, feynmf, latex, pdflatex, gnuplot] dot - graphviz version 2.40.1 (20161225.0304) dot] gnuplot gnuplot 5.2 patchlevel 6

28.gnuplot] plot sin(x) 1 sin(x) 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -10 -5 0 5 10 dot] dot dot - graphviz version 2.40.1 (20161225.0304) dot] digraph G { a -> b; a -> c; a -> d } dot]

29. Graph Session 13/18 dot] help [help, dot, neato, twopi, circo, fdp, sfdp, patchwork, osage, asy, plantuml, mmdc, xypic, tikz, feynmf, latex, pdflatex, gnuplot] dot - graphviz version 2.40.1 (20161225.0304)