help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on Mule and Makor2, font display vs char input?


From: Joe Corneli
Subject: Re: Question on Mule and Makor2, font display vs char input?
Date: Wed, 01 Dec 2004 23:52:53 -0600

   > From: Joe Corneli <jcorneli@math.utexas.edu>
   > Date: Wed, 01 Dec 2004 13:22:20 -0600
   > 
   >    > Any advice on how to make a string already entered into the buffer
   >    > render according to the current input method?
   > 
   >    You could use display tables for that.  They are documented in the
   >    ELisp manual.
   > 
   > The section doesn't make it clear to me how one would change the
   > display of a string, only the display of a character.

   This feature does change display of characters only, but I thought
   that would be enough for you to get what you want.

   Perhaps I don't understand what exactly are you trying to accomplish.
   Could you post an example with explanations?


The idea is to automatically translate certain strings into a new
representation while editing.  We'll start with a file like this:

%% example.tex
\documentclass[12pt]{article}
\begin{document}
I am an example. $$\lambda$$  Rowr! 
\end{document}

My .emacs contains something like this:

(add-hook 'latex-mode-hook 'turn-on-special-latex-display-mode)

Now I open example.tex in my Emacs, and I see

%% example.tex
\documentclass[12pt]{article}
\begin{document}
I am an example. $$<lambda>$$  Rowr! 
\end{document}

where <lambda> stands for the lambda character.  Now I edit...

M-: (insert "\\mu")

and I see something like this:

%% example.tex
\documentclass[12pt]{article}
\begin{document}
I am an example. $$<lambda>$$  Rowr! <mu>
\end{document}

(<mu> stands for the mu character).

Next, I save the file and send it to you in an email, and you see:

%% example.tex
\documentclass[12pt]{article}
\begin{document}
I am an example. $$\lambda$$  Rowr! \mu
\end{document}

The critical points are that instead of inputting the characters
through quail (as in "\ l a m b d a") I can insert them using a
program and also have them parsed when the file is first opened and
"unparsed" when the file is saved.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]