zk-phi / magic-latex-buffer

Magical syntax highlighting for LaTeX-mode buffers
152 stars 13 forks source link

magic-latex-buffer vs. x-symbol #21

Closed DrWaleedAYousef closed 8 years ago

DrWaleedAYousef commented 8 years ago

Thanks so much for your great package. I am trying installing x-symbols on Emacs 24.5.1; I am having a nightmare for several hours. It does not work.

So, is there a big difference between x-symbol and magic-latex-buffer?

Thanks so much

zk-phi commented 8 years ago

Sorry but I've never looked into x-symbol so much.

zk-phi commented 8 years ago

As I goolgled a bit, x-symbol seems not supporting block highlight/alignment but does support more languages.

DrWaleedAYousef commented 8 years ago

Thanks so much for your reply,

but regarding only LaTeX, can your package support the same exclusive symbols by "X-Symbols"? I like your package much more since it is very simple to use; I cannot even run X-Symbols so far. However, X-Symbols seems to be so exclusive and supports almost all symbols, matrices, etc.

zk-phi notifications@github.com writes:

As I goolgled a bit just now, x-symbol seems not supporting block highlight/alignment but does support more languages.

— Reply to this email directly or view it on GitHub.*

zk-phi commented 8 years ago

List of symbols can be easily updated and is not a fundamental difference.

DrWaleedAYousef commented 8 years ago

Are you planing to update a comprehensive list of symbols (including matrices)

zk-phi notifications@github.com writes:

List of symbols can be easily updated and is not a fundamental difference.

— Reply to this email directly or view it on GitHub.*

zk-phi commented 8 years ago

you can find the list(s) here in the code. if you think it needs some improvements (i.e. the list lacks some frequently used symbols), send me a list of symbols that need to be added, or fork and edit this repository and send me as a PR (which is better). (sorry but I'm not sure what the word "matrices" here means..)

DrWaleedAYousef commented 8 years ago

Could you guide me (in steps) what should I do to add a symbol? I tried in the .el file but it seems that it loads the compiled file. How should I add my new symbols in addition to yours

zk-phi notifications@github.com writes:

you can find the list(s) here the code (I'm not sure what the word "matrices" here means).

— Reply to this email directly or view it on GitHub.*

zk-phi commented 8 years ago

.el is not loaded if .elc exists. you can remove .elc to force emacs to load .el, or you can also recompile the .el you edited to update .elc.

DrWaleedAYousef commented 8 years ago

Thanks so much for your support,

do you have any idea how can I produce the following:

1- \underset{a}{b} 2- both superscript and subscript for same symbol, e.g., \sum_a^b. Your code does not put b as a superscript to \sum; rather it visualizes it as a superscript to a.

Thanks so much, and sorry for many questions. But, I really love your package and find it optimal solution for WYSIWYG for emacs.

zk-phi notifications@github.com writes:

.el is not loaded if .elc exists. you can remove .elc to force emacs to load .el, or you can also recompile the .el you edited to update .elc.

— Reply to this email directly or view it on GitHub.*

zk-phi commented 8 years ago

The ideas are hard to realize I think.

The only way to align multiple chars vertically in a single line AFAIK is, to compose multiple chars to form a single complex char like this (try evaluating the following in a Emacs buffer):

(insert (compose-chars ?d '(cr cl 0 0) ?e '(cr cl 0 0) ?f '(cc tc 0 0) ?=))

But a copmosed char is treated as if it's a single char in Emacs, thus

and

Since magic-latex-buffer 's aim isn't to transform Emacs into a WYSIWYG editor but just to make it easier to read LaTeX documents with pretty symbols (which I call semi-WYSIWYG), the current behavior is okay I think.

For true rendering, latex-math-preview exists, which substitutes maths with rendered images. Compared to this, the magic-latex-buffer 's advantage is that, maths are still just char sequences but not images, and we can still utilize the text-based commands to edit them. So, it's not good idea to (ab)use compose-chars IMO.

zk-phi commented 8 years ago

not interested anymore ? (closing ...)

zk-phi commented 8 years ago

closed