GithubHelp home page GithubHelp logo

xmacslabs / mogan Goto Github PK

View Code? Open in Web Editor NEW
340.0 8.0 24.0 180.24 MB

Mogan (based on GNU TeXmacs): Let us enjoy exploring science and technology!

Home Page: https://mogan.app

License: GNU General Public License v3.0

Makefile 0.01% Tcl 15.74% Scheme 47.08% C++ 30.78% TypeScript 5.00% C 0.04% Awk 0.01% TeX 0.15% QMake 0.02% PostScript 0.05% Prolog 0.02% CSS 0.23% Emacs Lisp 0.03% Shell 0.02% Roff 0.03% Common Lisp 0.07% Objective-C 0.44% Objective-C++ 0.14% MATLAB 0.13% M 0.02%
editor mathematics texmacs cpp qt scheme made-on-earth beamer codeeditor emcc

mogan's People

Contributors

charonxin avatar darcy-shen avatar ebreak avatar edmond-j-a avatar erentar avatar fpoulain avatar jingkaimori avatar mdbenito avatar mgubi avatar oyyko avatar paradisuman avatar pikachuhy avatar shynur avatar slowphil avatar tangdouer1005 avatar vdhoeven avatar xiaoliyuhh avatar yiqixu avatar yuanmxc avatar zxc-phy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mogan's Issues

Crash when `Use native menubar` is activated

When Use native menubar is activated, Mogan crashes a lot on macOS. I first noticed this issue when I found out about the following problem. And it turned out to be related to the native menubar.

image

After clicking the following button Mogan v1.0 alpha3 always gets stuck.

image

apply's last argument should be a proper list: (#<lambda (form arg)> recent-buffer)

;apply's last argument should be a proper list: (#<lambda (form arg)> recent-buffer)
;    (if (pair? var) (list-values 'apply...
;    /home/sadhen/software/share/TeXmacs/progs/kernel/boot/abbrevs.scm, line 89, position: 3656
; ahash-set-2!: (if (pair? var) (list-value...
; decode-old: ((let* ((r (ahash-table->list... ; t: (hash-table 'symbol (("#<lambda...
; (primitive-load file (if (null? env) *cur...
; ((load *module-file* (curlet)))            ; *module-file*: "/home/sadhen/software/share/Te...

TeXmacs] With linked TrueType support

;unbound variable buffer-missing-style?
;    (and (not (url-none? u)) u)
;    /home/sadhen/software/share/TeXmacs/progs/kernel/library/base.scm, line 338, position: 11309
; (and (not (url-none? u)) u)
; ((buffer-set-default-style))
; decode-old: ((let* ((r (ahash-table->list... ; t: (hash-table 'symbol (("#<lambda...
; (primitive-load file (if (null? env) *cur...

Throwing widget should be attached
-------------------------------------------------
Error message:
  widget should be attached

System information:
  TeXmacs version  : 2.1
  Built by         : sadhen
  Building date    : 2022-01-03T22:32:00
  Operating system : linux-gnu
  Vendor           : pc
  Processor        : x86_64
  Crash date       : 2022年 01月 03日 星期一 22:33:49 HKT

TeXmacs does not yet have a current view
Backtrace of C++ stack:
  xmacs.bin : () + 0x290262
  xmacs.bin : () + 0x12c569
  xmacs.bin : () + 0x2872f3
  xmacs.bin : () + 0x287877
  xmacs.bin : () + 0x28babb
  xmacs.bin : () + 0x28bc72
  xmacs.bin : () + 0x1000d5
  xmacs.bin : () + 0x150401
  xmacs.bin : () + 0x102729
  /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main() + 0xcd
  xmacs.bin : () + 0xfc6fa

-------------------------------------------------
terminate called after throwing an instance of 'string'
[1]    171270 IOT instruction  bin/xmacs

Modernize UI

The user interface of TeXmacs doesn't change much over the last two decades. According to my own experiences, the outdated UI has constantly pushed away newcomers interested in TeXmacs. I think that modernizing the UI should be a long-term goal of Mogan.

The following two issues could be solved in the short term.

  1. Updating the icons on the menu seems a viable option and a great improvement in the short term.
  2. The dark mode is far beyond ideal for daily usage (see the first screenshot). The switch between light and dark mode should follow the system settings (either automatically or manually in preferences). It would be even better if the paper and character color changed accordingly, like Microsoft Word (see the second screenshot).

image

It fails to open all files in one window as tabs.

TeXmacs 2.1.1 can open all files in one window as tabs as in the following screenshot, only when the following options are turned on:

  • always under System Preferences → General → Prefer tabs in the app Preview on macOS, and
  • Documents in separate windows under Edit → Preferences → General → Buffer managements in TeXmacs,
  • Native under Edit → Preferences → General → User interface theme in TeXmacs,

But in Mogan, it fails.

image

Complete support of "The Comprehensive LaTeX Symbol List"

Although TeXmacs supports Unicode very well, the code for a specific symbol is hard to memorize; on the contrary, the LaTeX commands of various mathematical symbols are well-known, especially for newcomers interested in TeXmacs and at the same time familiar with LaTeX.

State of the art on The Comprehensive TeXmacs Symbol List (incomplete) is still far from satisfactory in comparison to The Comprehensive LaTeX Symbol List.

For the benefit of all TeXmacs users, it would be nice to have built-in macros for all the symbols listed in the above file, even though TeXmacs is independent of LaTeX/TeX. No doubt it would be a massive long-term job, but it would be more accessible as community work once the companion website mentioned in #12 is set up.

Subtasks:

  • Table 48 #278
  • Table 50 #279
  • Table 51: 𝒜M𝒮 Binary Operators
  • Table 59: stix Binary Operators
  • Table 72: Variable-sized Math Operators
  • Table 73: 𝒜M𝒮 Variable-sized Math Operators
  • Table 83: stix Variable-sized Math Operators
  • Table 84: stix Integrals with Explicit Slant
  • Table 89: Binary Relations
  • Table 90: 𝒜M𝒮 Binary Relations
  • Table 91: 𝒜M𝒮 Negated Binary Relations
  • Table 104: stix Binary Relations
  • Table 500: #316

Set preview-ref and smart-ref to be on by default

These functions can be set on as in the following screenshot.
image

These two functions are killing features that man cannot get enough of. They are also promoted in the demo video of v2.1 (around 1:31, 1:43 and 1:47). It would be absurd that such nice functions are set off by default, confusing newcomers.

A better tool for drawing commutative diagrams

Commutative diagrams are indispensable in many fields of pure mathematics. Still, it is usually not easy to draw or edit them. TikZ and Xy-pic plugins in TeXmacs don't make it easier because, in principle, we draw commutative diagrams precisely as we do with LaTeX. Besides, TeXmacs provides a fantastic drawing tool capable of producing some commutative diagrams relatively easily.

A beautiful tool named quiver does make a big difference for drawing commutative diagrams with LaTeX since it came out at the end of 2020. It makes the drawing much easier and more intuitive. It is the kind of tool that you can't get enough of. Thanks to the excellent work of @darcy-shen, TeXmacs now also has a plugin for quiver.

The quiver plugin and the drawing tools in TeXmacs have their advantages and disadvantages. What bothers me the most is that they are not compatible. It would sometimes be hard to choose between these two.

  • The drawing tools in TeXmacs support the WYSIWYG interface for professional writing, especially for formulas, which quiver definitely doesn't have. Quiver accepts only LaTeX code. It is excruciating to switch between TeXmacs and quiver.
  • The drawing tools are very flexible in various cases, but the flexibility sometimes becomes burdensome for commutative diagrams. For example, a minor move would change the position of the source or the target of an arrow, and it took me a very long time to get used to operating arrows in TeXmacs. But for drawing arrows, the positions of the source and the target are the only things that matter. Quiver is following this idea. After specifying the source and target, an arrow is automatically well-placed, and curved arrows are clicks away.
  • In quiver, the start- and endpoint of an arrow change automatically as the contents on both sides vary. In TeXmacs, one should change them by hand when adding or subtracting something on the source or the target.
  • Quiver supports a large variety of arrows and decorations, for example, double and triple arrows, which are very common in mathematics. But I have no idea how to draw most of them in TeXmacs. Especially in TeXmacs, there is no easy way to flip the accent above to below.
  • As quiver generates diagrams using TikZ-cd, they are naturally LaTeX-compatible. But in TeXmacs, the diagrams can only be exported as pictures for now.

I strongly suggest developing a built-in deeply embedded quiver plugin for TeXmacs, which supports both the UI of quiver and the WYSIWYG interface of TeXmacs. It would be a more significant attraction for a large group of mathematicians. I sincerely hope that the developers can consider my proposal in the near future. Thank you for reading.

Forum: [Feature Request] A Better Tool for Drawing Commutative Diagrams
Savannah: [Feature Request] A Better Tool for Drawing Commutative Diagrams

S7: property does not work for glue symbols

For example:

(property `system :argument)

should not yield #f.

(property `open-gradient-selector :interactive)

yield (#t) as expected.

Debugging

(define-public (tm-property-sub head body)
  (display* "head: " head "\n")
  (display* "body: " body "\n")
  (if (null? body)
      (cons 'tm-property-overloaded (cons head body))
      (let ((decl (tm-property-sub head (cdr body))))
	((ahash-ref define-option-table (caar body)) (cdar body) decl))))
head: (footer-eval cmd)
body: ((:argument cmd "Scheme command"))
head: (footer-eval cmd)
body: ()
(tm-property (footer-eval cmd)
  (:argument cmd "Scheme command"))

;; -->
(tm-property-sub `(footer-eval cmd) `((:argument cmd "Scheme command")))

;; ->
(define-option-argument `(cmd "Scheme command") (tm-property-sub `(footer-eval cmd) `()))

;; ->
(define-option-argument `(cmd "Scheme command") (tm-property-overloaded (footer-eval cmd)))

;; --> 
(tm-property-overloaded (footer-eval cmd))

Support wide overline/underline in mode toolbar

image

Like the screenshot above, in the mode toolbar, when the mathematical mode is activated, only short overlines are supported, which doesn't look quite lovely in comparison to the wide ones e.g.

image

the latter of which is now only available in the menu bar when the mathematical mode is activated, as in the following screenshot.

image

The Language Icon for Taiwanese

Taiwanese is a term of language. For Mogan, Taiwanese means the computer terms adopted in Taiwan.

It's "fine" for GNU TeXmacs to distinguish the language icon of Chinese with Taiwan. And personally, I don't want to be too politics sensitive on a GNU open source project. I will not create a pull request to GNU TeXmacs to solve this issue.

For Mogan, the language icon of Taiwanese is not acceptable for me (the author of this distribution of GNU TeXmacs).

Support Zettelkasten-style note-taking functions

The Zettelkasten-style note-taking apps, e.g. Obsidian and LogSeq, support bidirectional links and graph views, which are very helpful in linking the ideas. But none of them has the WYSIWYG interface like TeXmacs, even though they have plugins supporting LaTeX.

Recently I noticed that linking tools provide bidirectional links, which I still do not figure out how they work.
image

It would be nice that TeXmacs supports these functions, too. I have no clear picture of how these can be done. Just name some possibilities:

  • A plugin for Obsidian or apps alike; or
  • built-in functions of backlinks and graph views in TeXmacs, cf. the open-source code of LogSeq.

Here are some related forum discussions

Mogan Mark: the light-weighted distribution of GNU TeXmacs

Here is the main feature of Mogan Mark:

  • Menu redesign for the Markdown Editor
  • A Switch between the Markdown Editor and GNU TeXmacs
  • A Style designed for the Markdown editor
  • Load markdown files directly and then render it with the markdown styles
  • Save the buffer into markdown format
  • Convert TeXmacs files into markdown format
  • Support math snippets

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.