From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustom Mody Subject: Re: multilingual presentation with org Date: Fri, 17 Feb 2012 09:14:05 +0530 Message-ID: References: <8739aa4c6g.wl%n142857@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f234bd39c568804b920c1bd Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyEjv-00072w-9B for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 22:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyEju-0002x3-2a for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 22:44:07 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:52661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyEjt-0002w1-TB for emacs-orgmode@gnu.org; Thu, 16 Feb 2012 22:44:06 -0500 Received: by iagz16 with SMTP id z16so4835388iag.0 for ; Thu, 16 Feb 2012 19:44:05 -0800 (PST) In-Reply-To: <8739aa4c6g.wl%n142857@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Daniel Clemente Cc: emacs-orgmode --e89a8f234bd39c568804b920c1bd Content-Type: text/plain; charset=ISO-8859-1 On Fri, Feb 17, 2012 at 4:29 AM, Daniel Clemente wrote: > > > El Wed, 15 Feb 2012 13:33:49 +0530 Rustom Mody va escriure: > > > Now I am exploring how I could 'zip' the two together. My requirements > are like this: > > > > Any thoughts/suggestions? > > > > I made a small markup language which lets you write it in this way: > > > ------------------------------------------- > A song in English and Sanskrit: > Thanks Daniel -- that looks useful at some stage of the processing. I was thinking of concocting something like this myself. My (current main) use is a bit different however. Its not so much hand-translation as machine-transliteration. The below elisp code will apply whatever input-method you put into rpm-input-method and put the result into a new buffer. After that pasting the two together into something palatable/presentable is the question. For now Ive used paste -d'|' and then run it through org's table system to produce html -----------------------elisp----------------------------- (defvar rpm-input-method "devanagari-itrans") (defun rpm-apply-input-method () (interactive) (let* ((inp (buffer-substring-no-properties (point-min) (point-max))) (filename (file-name-nondirectory (buffer-file-name))) (outname (concat (file-name-sans-extension filename) "-hi" (file-name-extension filename t))) (p)) (switch-to-buffer-other-frame outname) (save-excursion (save-window-excursion (setq p (point)) (erase-buffer) (setq buffer-file-coding-system 'utf-8) (set-input-method rpm-input-method t) (execute-kbd-macro inp))) (goto-char p) (other-frame 1))) (global-set-key [f4] 'rpm-apply-input-method) --e89a8f234bd39c568804b920c1bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Feb 17, 2012 at 4:29 AM, Daniel = Clemente <n142857= @gmail.com> wrote:


El Wed, 15 Feb 2012 13:33:49 +0530 Rustom Mody va escriure:

> Now I am exploring how I could 'zip' the two together. My requ= irements are like this:
>
> Any thoughts/suggestions?
>

=A0I made a small markup language which lets you write it in this way:


-------------------------------------------
A song in English and Sanskrit:

Thanks Daniel -- = that looks useful at some stage of the processing. I was thinking of concoc= ting something like this myself.
My (current main) use is a bit differen= t however. Its not so much hand-translation as machine-transliteration.

The below elisp code will apply whatever input-method you put into rpm-= input-method and put the result into a new buffer.=A0 After that pasting th= e two together into something palatable/presentable is the question.=A0 For= now Ive used paste -d'|' and then run it through org's table s= ystem to produce html


-----------------------elisp-----------------------------
(defva= r rpm-input-method "devanagari-itrans")
(defun rpm-apply-input= -method ()
=A0 (interactive)
=A0 (let* ((inp (buffer-substring-no-pro= perties (point-min) (point-max)))
=A0=A0=A0 =A0(filename (file-name-nondirectory (buffer-file-name)))
=A0= =A0=A0 =A0(outname (concat (file-name-sans-extension filename)
=A0=A0=A0= =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0=A0 "-hi"
=A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0=A0=A0=A0 (file-name-extension filename t)))
=A0= =A0=A0 =A0(p))
=A0=A0=A0 (switch-to-buffer-other-frame outname)
=A0=A0=A0 (save-excursi= on
=A0=A0=A0=A0=A0 (save-window-excursion
=A0=A0=A0 (setq p (point))<= br>=A0=A0=A0 (erase-buffer)
=A0=A0=A0 (setq buffer-file-coding-system &#= 39;utf-8)
=A0=A0=A0 (set-input-method rpm-input-method t)
=A0=A0=A0 (execute-kbd-macro inp)))
=A0=A0=A0 (goto-char p)
=A0=A0=A0= (other-frame 1)))

(global-set-key [f4] 'rpm-apply-input-method)=


--e89a8f234bd39c568804b920c1bd--