* LaTeX export for Org Mode Documents written in Indic Languages
@ 2023-01-07 7:11 Krishna Jani
2023-01-07 7:47 ` Alain.Cochard
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Krishna Jani @ 2023-01-07 7:11 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I have never had to write in languages other than English but an
assignment just came up to transcribe the Indian Penal Code in
simple and understandable Hindi. 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.
Has anyone had a similar experience, or has a clue to this problem. Is
there some documentation relating to languages that I can read
--
Regards,
Krishna Jani,
Student Associate Member,
Free Software Foundation
kjani@member.fsf.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: LaTeX export for Org Mode Documents written in Indic Languages
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
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alain.Cochard @ 2023-01-07 7:47 UTC (permalink / raw)
To: Krishna Jani; +Cc: emacs-orgmode
Krishna Jani writes on Sat 7 Jan 2023 12:41:
>
> Hello,
>
> I have never had to write in languages other than English but an
> assignment just came up to transcribe the Indian Penal Code in
> simple and understandable Hindi. 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.
When you say "I am unable ...", does it mean you tried something like
'C-c C-e l o' and it fails, whereas it works when it's plain English?
If so, what would likely help would be that you show us the relevant
content of the *Org PDF LaTeX Output* buffer (when it mentions an
error). Perhaps also provide us with a sample of your text in Hindi
so that we can try ourselves (perhaps as an attachment to limit to
risk of contamination).
--
EOST (École et Observatoire des Sciences de la Terre)
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 110] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | [ slot available for rent ]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: LaTeX export for Org Mode Documents written in Indic Languages
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
2023-01-07 11:36 ` Ihor Radchenko
3 siblings, 0 replies; 5+ messages in thread
From: tomas @ 2023-01-07 9:33 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
On Sat, Jan 07, 2023 at 12:41:39PM +0530, Krishna Jani wrote:
>
> Hello,
>
> I have never had to write in languages other than English but an
> assignment just came up to transcribe the Indian Penal Code in
> simple and understandable Hindi. 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.
>
> Has anyone had a similar experience, or has a clue to this problem. Is
> there some documentation relating to languages that I can read
There are some approaches described here:
https://tex.stackexchange.com/questions/199773/how-to-type-hindi-words-in-latex
Since your input will be most probably already UTF-8 encoding, I
guess the most promising avenue these days is to go with LuaLaTeX.
It should work as a drop-in replacement for LaTeX "classic" and
should be included in your favourite TeX distribution.
I don't know off-the-bat what to do to make it work with Org
(I'm sure there are folks around here who do :), I'd first
export to LaTeX and fiddle with the preamble until I know what
to do.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: LaTeX export for Org Mode Documents written in Indic Languages
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
2023-01-07 11:36 ` Ihor Radchenko
3 siblings, 0 replies; 5+ messages in thread
From: Vikas Rawal @ 2023-01-07 10:09 UTC (permalink / raw)
To: Krishna Jani; +Cc: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: LaTeX export for Org Mode Documents written in Indic Languages
2023-01-07 7:11 LaTeX export for Org Mode Documents written in Indic Languages Krishna Jani
` (2 preceding siblings ...)
2023-01-07 10:09 ` Vikas Rawal
@ 2023-01-07 11:36 ` Ihor Radchenko
3 siblings, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2023-01-07 11:36 UTC (permalink / raw)
To: Krishna Jani; +Cc: emacs-orgmode
Krishna Jani <krishnajani2005@gmail.com> writes:
> I have never had to write in languages other than English but an
> assignment just came up to transcribe the Indian Penal Code in
> simple and understandable Hindi. 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.
>
> Has anyone had a similar experience, or has a clue to this problem. Is
> there some documentation relating to languages that I can read
LaTeX makes it tricky to export non-English out of the box.
We support it partially via LANGUAGE setting (see 13.10.2 LaTeX specific
export settings), but you still need to accompany this with installing
certain LaTeX packages and adding LaTeX headers manually.
See the discussion in https://list.orgmode.org/orgmode/87h6z7jq4o.fsf@localhost/
The discussion also mentions some useful LaTeX headers and packages.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-07 11:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-01-07 11:36 ` Ihor Radchenko
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).