Bug 65469 - Replace latex symbol commands with unicode symbols
Summary: Replace latex symbol commands with unicode symbols
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jeroen Wijnhout
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-04 11:35 UTC by Thorben Kröger
Modified: 2008-03-18 11:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorben Kröger 2003-10-04 11:36:00 UTC
Version:           1.6b1 (using KDE 3.1.9)
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB-athlon

Reading http://dot.kde.org/1065171869/, someone suggested this to be implemented in Kile, something I had also thought of before:

"Will you implement a possibilty for unicode symbols to be shown as unicode symbols instead of \alpha commands? This would be a real benefit."

Someone else pointed out that this might be a kate problem, and pointed to this bugreport:
http://bugs.kde.org/show_bug.cgi?id=58340

However I think it could be done in Kile itself.
What is needed is a translation table which lists all the LaTeX commands like \alpha \exists \neq and so on and lists the corresponding unicode character.
When a non-unicode document is opened (common with LaTeX),  Kile would then make a temporary unicode-copy of the file and parse it, replacing all the \alphas and so on with unicode characters according to the translation table. When typing the command \alpha, Kile would have to recognize that and remove the word \alpha and replace it with the unicode character.
Before compiling the LaTeX-document, Kile would have to replace all unicode characters back to the LaTeX-commands and then to overwrite the original file with non-unicode encoding (I use \usepackage[latin1]{inputenc} for german characters).

I'd be happy to help set up the translation table, but I know too little of KDE programming yet to be able to help implement it.

Thorben
Comment 1 Tristan Miller 2003-12-01 12:46:32 UTC
What the OP is asking for is something very similar to preview-latex and X-Symbol, which are packages for Emacs and XEmacs.  Instead of implementing this feature from scratch, it may be possible to steal code from one of these projects.  (Then again, Emacs stuff is often written in LISP, so maybe not.  But it's worth a look at least.)

Here are the relevant URLs:

http://preview-latex.sourceforge.net/
http://x-symbol.sourceforge.net/

LyX and TeXmacs are two other programs which, while not LaTeX editors, nevertheless do feature previews of LaTeX symbols and math formulas.  Again, it might be possible to pilfer some code:

http://www.texmacs.org/
http://www.lyx.org/
Comment 2 Jeroen Wijnhout 2003-12-01 21:30:37 UTC
I think the bug report is pretty clear: just a LaTeX to unicode converter (just like the inputenc package, it does the same for Latin1 or Latin2 encoding, whilst at compile time).

However the preview is kinda interesting.

best,
Jeroen
Comment 3 Jeroen Wijnhout 2004-05-14 13:33:43 UTC
A unicode converter will not be supported unless the inputenc package will support it. A convertor for the most common encodings (latin, cp) is implemented and will be available for kile-1.7.

best,
Jeroen
Comment 4 Maciej Pilichowski 2008-03-18 11:36:27 UTC
Why this report is closed? There is still not working option (at least I cannot find it) to switch Kile to actually show /alpha (and other characters) while editing.

Either I am mistaken or please reopen this report.