From: Vikas Rawal <vikasrawal@gmail.com>
To: Krishna Jani <krishnajani2005@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: LaTeX export for Org Mode Documents written in Indic Languages
Date: Sat, 7 Jan 2023 15:39:39 +0530 [thread overview]
Message-ID: <CALtzAB0Fj3DqARS7C1+nSmdKDvco0KxtpVF7x-RjHZAHHX_aOg@mail.gmail.com> (raw)
In-Reply-To: <87358mx1hw.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]
>
>
> I have an Org file with some of my
> transcriptions (because of Emacs's awesome language support) but I am
> unable to org-export these files to pdf. I suppose I must install some
> latex packages, but I have not been able to find any documentation for
> the same. I dont really know latex, I mainly just use it for Org pdf
> export.
>
>
I had once written a blog post (from 2012) describing steps for writing and
exporting devanagari which is still available at:
https://web.archive.org/web/20131201063324/http://agrarianresearch.org/blog/?p=563
Since this is old, you may have to see how much of it still works.
Key excerpt from a recent org file which combined english and devanagari:
#+LATEX_HEADER: \usepackage{fontspec,xltxtra}
#+LATEX_HEADER: \usepackage{polyglossia}
#+LATEX_HEADER: \usepackage[Latin,Devanagari]{ucharclasses}
#+LATEX_HEADER: \setmainfont[Ligatures=TeX,Scale=1.0454]{Minion Pro}
#+LATEX_HEADER:
\newfontfamily{\defaultfont}[Ligatures=TeX,Scale=1.0454]{Minion Pro}
#+LATEX_HEADER: \newfontfamily{\devanagarifont}[Scale=0.9]{Lohit Devanagari}
#+LATEX_HEADER: \setdefaultlanguage{english}
#+LATEX_HEADER: \setotherlanguage{devanagari}
#+LATEX_HEADER: \setDefaultTransitions{\defaultfont}{}
#+LATEX_HEADER: \setTransitionTo{devanagari}{\devanagarifont}
#+LATEX_HEADER: \setTransitionFrom{devanagari}{\defaultfont}
#+LATEX_HEADER: \setTransitionsForLatin{\defaultfont}{}
#+LATEX_HEADER: \setTransitionTo{Devanagari}{\devanagarifont}
#+LATEX_HEADER: \setTransitionsForDevanagari{\devanagarifont}{}
Note that I used Minion Pro for English and Lohit Devanagari for Hindi. You
may have to check what fonts are installed on your system, and modify these
accordingly.
And I have this in my emacs config, which allows me to use arabic numbers
with devanagari script (since I don't want to use devanagari numbers even
when I am writing devanagari):
;; Function to mix Devanagari with Arabic numbers
(require 'ind-util)
;; based on:
;;
https://github.com/emacs-mirror/emacs/blob/30c09955f64815201ae9b86215fed8ea2af0ba66/lisp/language/ind-util.el#L464
(defun indian-make-hash-without-digits (table trans-table)
"Indian Transliteration Hash for decode/encode"
(let* ((encode-hash (make-hash-table :test 'equal))
(decode-hash (make-hash-table :test 'equal))
(hashtbls (cons encode-hash decode-hash))
(vowels (elt table 0))
(consonants (elt table 1))
(misc (elt table 2))
(digits (elt table 3))
(halant (char-to-string (elt misc 4)))
(trans-vowels (elt trans-table 0))
(trans-consonants (elt trans-table 1))
(trans-misc (elt trans-table 2))
(trans-digits '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")))
(indian--puthash-v vowels trans-vowels hashtbls)
(indian--puthash-c consonants trans-consonants halant hashtbls)
(indian--puthash-cv consonants trans-consonants
vowels trans-vowels hashtbls)
(indian--puthash-m misc trans-misc hashtbls)
;; (indian--puthash-m digits trans-digits hashtbls)
hashtbls))
;; based on:
;;
https://github.com/emacs-mirror/emacs/blob/30c09955f64815201ae9b86215fed8ea2af0ba66/lisp/language/ind-util.el#L486
(setq indian-dev-itrans-v5-hash-without-digits
(indian-make-hash-without-digits indian-dev-base-table
indian-itrans-v5-table))
;; needed for the quail-define-indian-trans-package function:
;;(add-to-list 'load-path "~/emacs/lisp/leim/")
(load "leim/quail/indian.elc")
;; (load "quail/indian.el.gz")
;; based on:
;;
https://github.com/emacs-mirror/emacs/blob/30c09955f64815201ae9b86215fed8ea2af0ba66/lisp/leim/quail/indian.el#L56
(quail-define-indian-trans-package
indian-dev-itrans-v5-hash-without-digits
"devanagari-itrans-without-digits" "Devanagari" "DevIT"
"Devanagari transliteration by ITRANS method, with Arabic numerals.")
[-- Attachment #2: Type: text/html, Size: 5164 bytes --]
next prev parent reply other threads:[~2023-01-07 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 7:11 LaTeX export for Org Mode Documents written in Indic Languages Krishna Jani
2023-01-07 7:47 ` Alain.Cochard
2023-01-07 9:33 ` tomas
2023-01-07 10:09 ` Vikas Rawal [this message]
2023-01-07 11:36 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALtzAB0Fj3DqARS7C1+nSmdKDvco0KxtpVF7x-RjHZAHHX_aOg@mail.gmail.com \
--to=vikasrawal@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=krishnajani2005@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).